The direction vector of the ray (typically normalized).
The origin point of the ray.
Applies a 4x4 transformation matrix to this ray.
The transformation matrix to apply.
This ray instance for method chaining.
Creates a new ray with the same origin and direction as this one.
A new ray with the same properties.
Copies the origin and direction from another ray.
The ray to copy from.
This ray instance for method chaining.
Computes the squared distance from the ray to a point. More efficient than distanceToPoint as it avoids the square root operation.
The point to compute distance to.
The squared distance from the ray to the point.
Computes the distance from the ray to a point.
The point to compute distance to.
The distance from the ray to the point.
Checks if this ray is equal to another ray.
The ray to compare with.
True if the rays are equal, false otherwise.
Tests if the ray intersects a triangle. References: https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h
The intersection point if the ray intersects the triangle, null otherwise.
Sets the direction of the ray to point from the origin to the given point. The direction vector is automatically normalized.
The point to look at.
This ray instance for method chaining.
Moves the origin of the ray along its direction by distance t.
The distance to move the origin.
This ray instance for method chaining.
Represents a ray in 3D space with an origin point and direction vector. A ray extends infinitely in one direction from the origin.