Class representing a ray with position and direction
length of the ray
Intersection test between the ray and a given segment whithin a given tolerance (threshold)
the first point of the segment to test the intersection against
the second point of the segment to test the intersection against
the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
Calculate the intercept of a ray on a given axis
to check 'x' | 'y' | 'z'
from axis interception (i.e. an offset of 1y is intercepted above ground)
a vector containing the coordinates where 'axis' is equal to zero (else offset), or null if there is no intercept.
Unproject a ray from screen space to object space
defines the screen space x coordinate to use
defines the screen space y coordinate to use
defines the current width of the viewport
defines the current height of the viewport
defines the world matrix to use (can be set to Identity to go to world space)
defines the view matrix to use
defines the projection matrix to use
Update the ray from viewport position
this ray updated
Creates a new ray from screen space and viewport
Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be transformed to the given world matrix.
The origin point
The end point
a matrix to transform the ray to. Default is the identity matrix.
the new ray
Creates a ray with origin and direction of 0,0,0
the new ray
Generated using TypeDoc