LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::FRay Struct Reference

#include <Ray.h>

Public Member Functions

 FRay (const LVector &InOrigin, const LVector &InDirection)
 
 FRay (const glm::vec3 &InOrigin, const glm::vec3 &InDirection)
 
FORCEINLINE bool IntersectsAABB (const FAABB &AABB, float &t) const
 Checks if a ray intersects an axis-aligned bounding box (AABB) in 3D space.
 
FORCEINLINE bool IntersectsTriangle (const glm::vec3 &A, const glm::vec3 &B, const glm::vec3 &C, float &t) const
 Checks if a ray intersects with a triangle in 3D space.
 
FORCEINLINE bool IntersectsTriangle (const LVector &A, const LVector &B, const LVector &C, float &t) const
 Checks if a ray intersects with a triangle in 3D space.
 

Static Public Member Functions

static FRay Zero ()
 Get a zero-initialized ray.
 

Public Attributes

LVector Origin
 
LVector Direction
 

Detailed Description

Individual ray with an origin and direction.

Member Function Documentation

◆ IntersectsAABB()

FORCEINLINE bool LkEngine::FRay::IntersectsAABB ( const FAABB & AABB,
float & t ) const
inline

Checks if a ray intersects an axis-aligned bounding box (AABB) in 3D space.

The distance from the ray's origin to the nearest intersection point is set in 't', if any intersection is found.

Returns
true if an intersection occured, else false.

◆ IntersectsTriangle() [1/2]

FORCEINLINE bool LkEngine::FRay::IntersectsTriangle ( const glm::vec3 & A,
const glm::vec3 & B,
const glm::vec3 & C,
float & t ) const
inline

Checks if a ray intersects with a triangle in 3D space.

The distance from the ray's origin to the intersection point is set in 't' if an intersection occurs.

Returns
true if an intersection occured, else false.

◆ IntersectsTriangle() [2/2]

FORCEINLINE bool LkEngine::FRay::IntersectsTriangle ( const LVector & A,
const LVector & B,
const LVector & C,
float & t ) const
inline

Checks if a ray intersects with a triangle in 3D space.

The distance from the ray's origin to the intersection point is set in 't' if an intersection occurs.

Returns
true if an intersection occured, else false.

The documentation for this struct was generated from the following file: