Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/MathFwd.h |
| Include | #include "Math/MathFwd.h" |
Syntax
template<typename T>
struct TRay
Variables
| Type | Name | Description | |
|---|---|---|---|
| TVector< T > | Direction | Ray direction vector (always normalized) | |
| TVector< T > | Origin | Ray origin point |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TRay () |
Default constructor initializes ray to Zero origin and Z-axis direction | ||
TRay
(
EForceInit |
Creates and initializes a new Ray to Zero Origin and Z-axis Direction. | ||
| Conversion to other type. | |||
| Initialize Ray with origin and direction |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TVector< T > | ClosestPoint
(
const TVector< T >& Point |
Find closest point on ray to query point | |
| T | Find minimum distance from query point to ray | ||
| T | DistSquared
(
const TVector< T >& Point |
Find minimum squared distance from query point to ray | |
| T | GetParameter
(
const TVector< T >& Point |
Calculate ray parameter (distance from origin to closest point) for query Point | |
| void | Init () |
Set the initial values of the Ray to Zero Origin and Z-axis Direction. | |
| TVector< T > | PointAt
(
T RayParameter |
Calculate position on ray at given distance/parameter | |
| bool | Note: TRay is usually written via binary serialization. This function exists for SerializeFromMismatchedTag conversion usage. | ||
| bool | SerializeFromMismatchedTag
(
FName StructTag, |
||
| FString | ToString () |
Get a textual representation of the Ray. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const TRay< T >& Other |
Compares two Rays for inequality. | |
| bool | operator==
(
const TRay< T >& Other |
Compares two Rays for equality. |
Typedefs
| Name | Description |
|---|---|
| FReal |