This structure of type t_comps stores some precomputed values that are useful when working intersections and their color calculations. More...
#include <world.h>

Data Fields | |
| float | t |
| t_shape * | object |
| t_point | point |
| t_sight | sight |
| t_bool | inside |
| t_tuple | over_point |
This structure of type t_comps stores some precomputed values that are useful when working intersections and their color calculations.
| t | Stores the intersection value at a given point, if any. |
| object | Stores shape's data. |
| point | Stores a point to be used as referenece. |
| sight | Stores the human's eye data used as reference. |
| inside | Stores TRUE or FALSE in regards to whether a hit occurs inside the object (or shape). If hit is inside the shape, the value is TRUE. Otherwise, it's is FALSE. It works together with the field over_point to fix a problem called acne. |
| over_point | This field avoids the effect called acne, which happens because computers cannot represent floating points very well. Because of that, sometimes the calculation of the ray-surface intersection will result in a point of intersection that lies beneath the actual surface of a given shape. This field sets a margin of error. |