Navigation
API > API/Runtime > API/Runtime/GeometryCore
TFrame3 is an object that represents an oriented 3D coordinate frame, ie orthogonal X/Y/Z axes at a point in space. One can think of this Frame as a local coordinate space measured along these axes. Functions are provided to map geometric objects to/from the Frame coordinate space.
Internally the representation is the same as an FTransform, except a Frame has no Scale.
| Name | TFrame3 |
| Type | struct |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/FrameTypes.h |
| Include Path | #include "FrameTypes.h" |
Syntax
template<typename RealType>
struct TFrame3
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TFrame3
(
const TVector< RealType >& OriginIn, |
Construct a Frame from the given Origin and Rotation | FrameTypes.h | |
| Convert between TFrame of different types | FrameTypes.h | ||
TFrame3
(
const FPlane& Plane |
Construct a Frame from an FPlane | FrameTypes.h | |
TFrame3
(
const FTransform& Transform |
Construct a Frame from an FTransform | FrameTypes.h | |
| Construct a frame at the given Origin aligned to the unit axes | FrameTypes.h | ||
TFrame3 () |
Construct a frame positioned at (0,0,0) aligned to the unit axes | FrameTypes.h | |
| Construct a frame with the Z axis aligned to a target axis | FrameTypes.h | ||
| Construct Frame from X/Y/Z axis vectors. Vectors must be mutually orthogonal. | FrameTypes.h | ||
TFrame3
(
const FVector& OriginIn, |
Construct a Frame from an FVector and FQuat | FrameTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Origin | TVector< RealType > | Origin of the frame | FrameTypes.h | |
| Rotation | TQuaternion< RealType > | Rotation of the frame. Think of this as the rotation of the unit X/Y/Z axes to the 3D frame axes. | FrameTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AlignAxis
(
int AxisIndex, |
Align an axis of this frame with a target direction | FrameTypes.h | |
| Compute rotation around vector that best-aligns axis of frame with target direction | FrameTypes.h | ||
| Compute rotation around NormalAxis that best-aligns one of the other two frame axes with either given UpAxis or FallbackAxis (FallbackAxis is required if Dot(NormalAxis,UpAxis) > UpDotTolerance, ie if the Normal and Up directions are too closely aligned. Basically this divides direction-sphere into three regions - polar caps with size defined by UpDotTolerance, and a wide equator band covering the rest. When crossing between these regions the alignment has a discontinuity. It is impossible to avoid this discontinuity because it is impossible to comb a sphere. | FrameTypes.h | ||
| FrameTypes.h | |||
| FrameTypes.h | |||
TQuaternion< RealType > FromFrame
(
const TQuaternion< RealType >& Quat |
FrameTypes.h | ||
| FrameTypes.h | |||
| FrameTypes.h | |||
| Map a point from local UV plane coordinates to the corresponding 3D point in one of the planes of the frame | FrameTypes.h | ||
| FrameTypes.h | |||
TVector< RealType > GetAxis
(
int AxisIndex |
FrameTypes.h | ||
| FrameTypes.h | |||
| FrameTypes.h | |||
bool RayPlaneIntersection
(
const TVector< RealType >& RayOrigin, |
Compute intersection of ray with plane defined by frame origin and axis as normal | FrameTypes.h | |
void Rotate
(
const TQuaternion< RealType >& Quat |
Rotate this frame by given quaternion | FrameTypes.h | |
FPlane ToFPlane() |
FrameTypes.h | ||
| FrameTypes.h | |||
| FrameTypes.h | |||
TQuaternion< RealType > ToFrame
(
const TQuaternion< RealType >& Quat |
FrameTypes.h | ||
| FrameTypes.h | |||
| FrameTypes.h | |||
FTransform ToFTransform() |
FrameTypes.h | ||
FTransform ToInverseFTransform() |
FrameTypes.h | ||
TTransformSRT3< RealType > ToInverseTransform() |
FrameTypes.h | ||
| Project a point onto one of the planes of the frame | FrameTypes.h | ||
| Project 3D point into plane and convert to UV coordinates in that plane | FrameTypes.h | ||
TTransformSRT3< RealType > ToTransform() |
FrameTypes.h | ||
void Transform
(
const TTransformSRT3< RealType >& XForm |
Transform this frame by the given transform. | FrameTypes.h | |
void Transform
(
const FTransform& XForm |
Transform this frame by the given transform. | FrameTypes.h | |
TVector< RealType > X() |
FrameTypes.h | ||
TVector< RealType > Y() |
FrameTypes.h | ||
TVector< RealType > Z() |
FrameTypes.h |