Structure ISect
See Also: Class RenderGlobalContext, Class RenderInstance, Class ISectList.
Description:
This structure is available in release 2.0 and later only.
This structure is updated by the RenderGlobalContext::IntersectWorld() and RenderGlobalContext::IntersectRay() methods. It stores information about the intersection of a ray and a single triangle in a mesh.
struct ISect {
float t;
The ray that was intersected has a unit vector specifying a direction. The ray defines an infinite line in the specified direction. If you take this value t and multiply it by the direction itself it gives a point on the ray. This specifies a distance along the vector. For instance if this way 5.0, the point would 5.0 units along the ray vector. This is the point of intersection along the ray.
BOOL exit;
TRUE if the ray is exiting the object; otherwise FALSE.
BOOL backFace;
TRUE if the ray hits a back face of the triangle; otherwise FALSE.
RenderInstance *inst;
Points to the render instance associated with this triangle hit.
int fnum;
The face number of the triangle.
Point3 bc;
The barycentric coordinates of the intersection.
Point3 p;
The intersection point in object coordinates.
Point3 pc;
The intersection point in camera coordinates.
ULONG matreq;
The material requirements of the intersected face. See List of Material Requirement Flags.
int mtlNum;
The material number for a multi-material.
ISect *next;
Points to the next ISect structure in the list.
};