![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <FrameTypes.h>
Public Member Functions | |
| TFrame3 () | |
| TFrame3 (const TVector< RealType > &OriginIn) | |
| TFrame3 (const TVector< RealType > &OriginIn, const TQuaternion< RealType > RotationIn) | |
| TFrame3 (const TVector< RealType > &OriginIn, const TVector< RealType > &SetZ) | |
| TFrame3 (const TVector< RealType > &OriginIn, const TVector< RealType > &X, const TVector< RealType > &Y, const TVector< RealType > &Z) | |
| TFrame3 (const FTransform &Transform) | |
| TFrame3 (const FPlane &Plane) | |
| TFrame3 (const FVector &OriginIn, const FQuat &RotationIn) | |
| template<typename RealType2 > | |
| TFrame3 (const TFrame3< RealType2 > &OtherFrame) | |
| TVector< RealType > | GetAxis (int AxisIndex) const |
| void | GetAxes (TVector< RealType > &X, TVector< RealType > &Y, TVector< RealType > &Z) const |
| TVector< RealType > | X () const |
| TVector< RealType > | Y () const |
| TVector< RealType > | Z () const |
| FTransform | ToFTransform () const |
| FTransform | ToInverseFTransform () const |
| FPlane | ToFPlane () const |
| TTransformSRT3< RealType > | ToTransform () const |
| TTransformSRT3< RealType > | ToInverseTransform () const |
| TVector< RealType > | PointAt (RealType X, RealType Y, RealType Z) const |
| TVector< RealType > | PointAt (const TVector< RealType > &Point) const |
| TVector< RealType > | ToFramePoint (const TVector< RealType > &Point) const |
| TVector< RealType > | FromFramePoint (const TVector< RealType > &Point) const |
| TVector< RealType > | ToFrameVector (const TVector< RealType > &Vector) const |
| TVector< RealType > | FromFrameVector (const TVector< RealType > &Vector) const |
| TQuaternion< RealType > | ToFrame (const TQuaternion< RealType > &Quat) const |
| TQuaternion< RealType > | FromFrame (const TQuaternion< RealType > &Quat) const |
| TRay< RealType > | ToFrame (const TRay< RealType > &Ray) const |
| TRay< RealType > | FromFrame (const TRay< RealType > &Ray) const |
| TFrame3< RealType > | ToFrame (const TFrame3< RealType > &Frame) const |
| TFrame3< RealType > | FromFrame (const TFrame3< RealType > &Frame) const |
| TVector2< RealType > | ToPlaneUV (const TVector< RealType > &Pos, int PlaneNormalAxis=2) const |
| TVector< RealType > | FromPlaneUV (const TVector2< RealType > &PosUV, int PlaneNormalAxis=2) const |
| TVector< RealType > | ToPlane (const TVector< RealType > &Pos, int PlaneNormalAxis=2) const |
| void | Rotate (const TQuaternion< RealType > &Quat) |
| void | Transform (const FTransform &XForm) |
| void | Transform (const TTransformSRT3< RealType > &XForm) |
| void | AlignAxis (int AxisIndex, const TVector< RealType > &ToDirection) |
| void | ConstrainedAlignAxis (int AxisIndex, const TVector< RealType > &ToDirection, const TVector< RealType > &AroundVector) |
| void | ConstrainedAlignPerpAxes (int PerpAxis1=0, int PerpAxis2=1, int NormalAxis=2, const TVector< RealType > &UpAxis=TVector< RealType >::UnitZ(), const TVector< RealType > &FallbackAxis=TVector< RealType >::UnitX(), RealType UpDotTolerance=(RealType) 0.707) |
| bool | RayPlaneIntersection (const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, int PlaneNormalAxis, UE::Math::TVector< RealType > &HitPointOut) const |
Public Attributes | |
| TVector< RealType > | Origin |
| TQuaternion< RealType > | Rotation |
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.
|
inline |
Construct a frame positioned at (0,0,0) aligned to the unit axes
|
inlineexplicit |
Construct a frame at the given Origin aligned to the unit axes
|
inline |
Construct a Frame from the given Origin and Rotation
|
inline |
Construct a frame with the Z axis aligned to a target axis
| OriginIn | origin of frame |
| SetZ | target Z axis |
|
inline |
Construct Frame from X/Y/Z axis vectors. Vectors must be mutually orthogonal.
| OriginIn | origin of frame |
| X | desired X axis of frame |
| Y | desired Y axis of frame |
| Z | desired Z axis of frame |
|
inlineexplicit |
Construct a Frame from an FTransform
|
inlineexplicit |
Construct a Frame from an FPlane
|
inlineexplicit |
Construct a Frame from an FVector and FQuat
|
inlineexplicit |
Convert between TFrame of different types
|
inline |
Align an axis of this frame with a target direction
| AxisIndex | which axis to align |
| ToDirection | target direction |
|
inline |
Compute rotation around vector that best-aligns axis of frame with target direction
| AxisIndex | which axis to try to align |
| ToDirection | target direction |
| AroundVector | rotation is constrained to be around this vector (ie this direction in frame stays constant) |
|
inline |
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.
| PerpAxis1 | Index of first axis orthogonal to NormalAxis |
| PerpAxis2 | Index of second axis orthogonal to NormalAxis |
| NormalAxis | Axis of frame to rotate around |
| UpAxis | Target axis in equator region, defaults to UnitZ |
| FallbackAxis | Target axis in polar region, defaults to UnitX |
| UpDotTolerance | defaults to cos(45), ie flip between regions happens roughly half way to poles |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Map a point from local UV plane coordinates to the corresponding 3D point in one of the planes of the frame
| PosUV | local UV plane coordinates |
| PlaneNormalAxis | which plane to map to, identified by perpendicular normal. Default is 2, ie normal is Z, plane is (X,Y) |
|
inline |
|
inline |
| AxisIndex | index of axis of frame, either 0, 1, or 2 |
|
inline |
|
inline |
|
inline |
Compute intersection of ray with plane defined by frame origin and axis as normal
| RayOrigin | origin of ray |
| RayDirection | direction of ray |
| PlaneNormalAxis | which axis of frame to use as plane normal |
| HitPointOut | intersection point, or invalid point if ray does not hit plane or is parallel to plane |
|
inline |
Rotate this frame by given quaternion
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Project a point onto one of the planes of the frame
| Pos | 3D position |
| PlaneNormalAxis | which plane to project onto, identified by perpendicular normal. Default is 2, ie normal is Z, plane is (X,Y) |
|
inline |
Project 3D point into plane and convert to UV coordinates in that plane
| Pos | 3D position |
| PlaneNormalAxis | which plane to project onto, identified by perpendicular normal. Default is 2, ie normal is Z, plane is (X,Y) |
|
inline |
|
inline |
transform this frame by the given transform. Note: Ignores scale, as TFrame3 does not support scaling
|
inline |
transform this frame by the given transform. Note: Ignores scale, as TFrame3 does not support scaling
|
inline |
|
inline |
|
inline |
| TVector<RealType> UE::Geometry::TFrame3< RealType >::Origin |
Origin of the frame
| TQuaternion<RealType> UE::Geometry::TFrame3< RealType >::Rotation |
Rotation of the frame. Think of this as the rotation of the unit X/Y/Z axes to the 3D frame axes.