Interface IRayCastable
Represents an entity that can be intersected by a ray.
public interface IRayCastable
Methods
RayCast(in JVector, in JVector, out JVector, out float)
Performs a ray cast against this object.
bool RayCast(in JVector origin, in JVector direction, out JVector normal, out float lambda)
Parameters
originJVectorThe starting point of the ray.
directionJVectorThe direction of the ray. Does not need to be normalized.
normalJVectorThe surface normal at the intersection point, or Zero if the ray origin is inside the object. Use the return value, not this parameter, to test whether a hit occurred.
lambdafloatThe distance along the ray to the intersection:
hitPoint = origin + lambda * direction. Zero when the ray origin is inside the object.