Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DRay Class Reference

Public Member Functions

 U4DRay ()
 ray constructor
 
 U4DRay (U4DPoint3n &uOrigin, U4DVector3n &uDirection)
 ray constructor with origing and direction More...
 
 ~U4DRay ()
 ray destructor
 
 U4DRay (const U4DRay &a)
 Copy constructor for the Ray.
 
U4DRayoperator= (const U4DRay &a)
 Copy constructor for the Ray. More...
 
bool intersectPlane (U4DPlane &uPlane, U4DPoint3n &uIntersectionPoint, float &uIntersectionTime)
 tests intersection with a plane More...
 
bool intersectTriangle (U4DTriangle &uTriangle, U4DPoint3n &uIntersectionPoint, float &uIntersectionTime)
 test intersection with a 3D triangle More...
 
bool intersectAABB (U4DAABB &uAABB, U4DPoint3n &uIntersectionPoint, float &uIntersectionTime)
 test intersection with an AABB Box More...
 

Public Attributes

U4DPoint3n origin
 3D origin of ray
 
U4DVector3n direction
 3D direction of ray
 

Constructor & Destructor Documentation

◆ U4DRay()

U4DEngine::U4DRay::U4DRay ( U4DPoint3n uOrigin,
U4DVector3n uDirection 
)

ray constructor with origing and direction

Parameters
uOriginRay origin
uDirectionRay direction

Member Function Documentation

◆ intersectAABB()

bool U4DEngine::U4DRay::intersectAABB ( U4DAABB uAABB,
U4DPoint3n uIntersectionPoint,
float &  uIntersectionTime 
)

test intersection with an AABB Box

Parameters
uAABBAABB to test intersection
uIntersectionPointray intersection point
uIntersectionTimeray intersection time
Returns
true if the ray intersects the AABB

◆ intersectPlane()

bool U4DEngine::U4DRay::intersectPlane ( U4DPlane uPlane,
U4DPoint3n uIntersectionPoint,
float &  uIntersectionTime 
)

tests intersection with a plane

Parameters
uPlanePlane to test intersection
uIntersectionPointray intersection point
uIntersectionTimeray intersection time
Returns
true if the ray intersects the plane

◆ intersectTriangle()

bool U4DEngine::U4DRay::intersectTriangle ( U4DTriangle uTriangle,
U4DPoint3n uIntersectionPoint,
float &  uIntersectionTime 
)

test intersection with a 3D triangle

Parameters
uTriangle3D Triangle to test intersection
uIntersectionPointray intersection point
uIntersectionTimeray intersection time
Returns
true if the ray intersects the triangle

◆ operator=()

U4DRay & U4DEngine::U4DRay::operator= ( const U4DRay a)

Copy constructor for the Ray.

Parameters
a3D ray to copy
Returns
Returns a copy of the 3D ray