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.
More...
#include <UprightFrame.h>
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
float yaw
Definition: UprightFrame.h:32
float pitch
Definition: UprightFrame.h:29
G3D::int16 y
Definition: Vector2int16.h:38
Vector3 translation
Definition: UprightFrame.h:26
14 Vector3 look = cframe.lookVector();
16 yaw = (float)(
G3D::pi() + atan2(look.x, look.z));
float yaw
Definition: UprightFrame.h:32
double pi()
Definition: g3dmath.h:147
float pitch
Definition: UprightFrame.h:29
Vector3 translation
Definition: UprightFrame.h:26
G3D::UprightFrame::UprightFrame |
( |
const Any & |
any | ) |
|
|
explicit |
Constructs an UprightFrame from an Any object.
The Any format for UprightFrame is:
pitch = ##, translation = Vector3(), yaw = ##
24 any.verifyName(
"UprightFrame");
float yaw
Definition: UprightFrame.h:32
bool any(float x)
Definition: g3dmath.h:424
float pitch
Definition: UprightFrame.h:29
Vector3 translation
Definition: UprightFrame.h:26
void G3D::UprightFrame::deserialize |
( |
class BinaryInput & |
b | ) |
|
111 pitch = b.readFloat32();
112 yaw = b.readFloat32();
float yaw
Definition: UprightFrame.h:32
float pitch
Definition: UprightFrame.h:29
void deserialize(class BinaryInput &b)
Definition: Vector3.cpp:190
Vector3 translation
Definition: UprightFrame.h:26
Supports implicit cast to CoordinateFrame
CoordinateFrame toCoordinateFrame() const
Definition: UprightFrame.cpp:49
Required for use with spline
float yaw
Definition: UprightFrame.h:32
float pitch
Definition: UprightFrame.h:29
UprightFrame(const Vector3 &t=Vector3::zero(), float p=0, float y=0)
Definition: UprightFrame.h:34
Vector3 translation
Definition: UprightFrame.h:26
Required for use with spline
float yaw
Definition: UprightFrame.h:32
float pitch
Definition: UprightFrame.h:29
UprightFrame(const Vector3 &t=Vector3::zero(), float p=0, float y=0)
Definition: UprightFrame.h:34
Vector3 translation
Definition: UprightFrame.h:26
bool any(float x)
Definition: g3dmath.h:424
UprightFrame(const Vector3 &t=Vector3::zero(), float p=0, float y=0)
Definition: UprightFrame.h:34
void G3D::UprightFrame::serialize |
( |
class BinaryOutput & |
b | ) |
const |
104 b.writeFloat32(
pitch);
float yaw
Definition: UprightFrame.h:32
float pitch
Definition: UprightFrame.h:29
void serialize(class BinaryOutput &b) const
Definition: Vector3.cpp:219
Vector3 translation
Definition: UprightFrame.h:26
Any G3D::UprightFrame::toAny |
( |
| ) |
const |
float yaw
Definition: UprightFrame.h:32
bool any(float x)
Definition: g3dmath.h:424
float pitch
Definition: UprightFrame.h:29
Vector3 translation
Definition: UprightFrame.h:26
50 CoordinateFrame cframe;
55 cframe.rotation =
Y *
P;
float yaw
Definition: UprightFrame.h:32
static Matrix3 fromAxisAngle(const Vector3 &rkAxis, float fRadians)
Definition: Matrix3.cpp:1346
float pitch
Definition: UprightFrame.h:29
static const Vector3 & unitX()
Definition: Vector3.cpp:121
static const Vector3 & unitY()
Definition: Vector3.cpp:122
Vector3 translation
Definition: UprightFrame.h:26
uint8 const P[]
Definition: AuthenticationPackets.cpp:225
#define Y
Definition: CollisionDetection.cpp:2282
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>
74 for (
int i = 1; i < N; ++i) {
75 const float prev = a[i - 1].yaw;
76 float& cur = a[i].yaw;
90 diff += (float)
twoPi();
92 diff -= (float)
twoPi();
double abs(double fValue)
Definition: g3dmath.h:617
double pi()
Definition: g3dmath.h:147
float wrap(float t, float lo, float hi)
Definition: g3dmath.h:495
double twoPi()
Definition: g3dmath.h:159
int prev(int i, int n)
Definition: RecastContour.cpp:468
float G3D::UprightFrame::pitch |
-pi/2 < pitch < pi/2 in radians about the X-axis
Vector3 G3D::UprightFrame::translation |
float G3D::UprightFrame::yaw |
In radians about the Y-axis
The documentation for this class was generated from the following files: