Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
G3D::UprightFrame Class Reference

Coordinate frame expressed in Euler angles. More...

Public Member Functions

 UprightFrame (const Vector3 &t=Vector3::zero(), float p=0, float y=0)
 
 UprightFrame (const CoordinateFrame &cframe)
 
 UprightFrame (const Any &any)
 Constructs an UprightFrame from an Any object. More...
 
void deserialize (class BinaryInput &b)
 
 operator CoordinateFrame () const
 Supports implicit cast to CoordinateFrame. More...
 
UprightFrame operator* (const float k) const
 Required for use with spline. More...
 
UprightFrame operator+ (const UprightFrame &other) const
 Required for use with spline. More...
 
UprightFrameoperator= (const Any &any)
 
void serialize (class BinaryOutput &b) const
 
Any toAny () const
 
CoordinateFrame toCoordinateFrame () const
 

Static Public Member Functions

static void unwrapYaw (UprightFrame *a, int N)
 Unwraps the yaw values in the elements of the array such that they still represent the same angles but strictly increase/decrease without wrapping about zero. More...
 

Public Attributes

float pitch
 -pi/2 < pitch < pi/2 in radians about the X-axis More...
 
Vector3 translation
 
float yaw
 In radians about the Y-axis. More...
 

Detailed Description

Coordinate frame expressed in Euler angles.

Unlike a G3D::Quat, UprightFrame always keeps the reference frame from rolling about its own z axis. Particularly useful for cameras.

See also
G3D::CoordinateFrame, G3D::Matrix4, G3D::PhysicsFrame, G3D::UprightSpline, G3D::UprightSplineManipulator

Constructor & Destructor Documentation

◆ UprightFrame() [1/3]

G3D::UprightFrame::UprightFrame ( const Vector3 t = Vector3::zero(),
float  p = 0,
float  y = 0 
)
inline

◆ UprightFrame() [2/3]

G3D::UprightFrame::UprightFrame ( const CoordinateFrame cframe)

◆ UprightFrame() [3/3]

G3D::UprightFrame::UprightFrame ( const Any any)
explicit

Constructs an UprightFrame from an Any object.

The Any format for UprightFrame is:

pitch = ##, translation = Vector3(), yaw = ##

Member Function Documentation

◆ deserialize()

void G3D::UprightFrame::deserialize ( class BinaryInput b)

◆ operator CoordinateFrame()

G3D::UprightFrame::operator CoordinateFrame ( ) const
inline

Supports implicit cast to CoordinateFrame.

◆ operator*()

UprightFrame G3D::UprightFrame::operator* ( const float  k) const

Required for use with spline.

◆ operator+()

UprightFrame G3D::UprightFrame::operator+ ( const UprightFrame other) const

Required for use with spline.

◆ operator=()

UprightFrame& G3D::UprightFrame::operator= ( const Any any)

◆ serialize()

void G3D::UprightFrame::serialize ( class BinaryOutput b) const

◆ toAny()

Any G3D::UprightFrame::toAny ( ) const

◆ toCoordinateFrame()

CoordinateFrame G3D::UprightFrame::toCoordinateFrame ( ) const

◆ unwrapYaw()

static void G3D::UprightFrame::unwrapYaw ( UprightFrame a,
int  N 
)
static

Unwraps the yaw values in the elements of the array such that they still represent the same angles but strictly increase/decrease without wrapping about zero.

For use with Spline<UprightFrame>

Referenced by G3D::UprightSpline::ensureShortestPath().

Member Data Documentation

◆ pitch

float G3D::UprightFrame::pitch

-pi/2 < pitch < pi/2 in radians about the X-axis

◆ translation

Vector3 G3D::UprightFrame::translation

◆ yaw

float G3D::UprightFrame::yaw

In radians about the Y-axis.


documentation generated on Wed Nov 24 2021 08:02:01 using doxygen 1.8.15