Allolib  1.0
C++ Components For Interactive Multimedia
al::Pose Class Reference

A local coordinate frame. More...

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/spatial/al_Pose.hpp>

Inheritance diagram for al::Pose:
al::Nav al::SmoothPose

Public Member Functions

 Pose (const Vec3d &pos=Vec3d(0), const Quatd &ori=Quatd::identity())
 
 Pose (const Pose &p)
 Copy constructor.
 
Pose operator* (const Pose &v) const
 Get pose transformed by another pose.
 
Poseoperator*= (const Pose &v)
 Translate and rotate by argument.
 
bool operator== (const Pose &v) const
 
void faceToward (const Vec3d &p, double amt=1.)
 Turn to face a given world-coordinate point.
 
void faceToward (const Vec3d &point, const Vec3d &up, double amt=1.)
 
Vec3dpos ()
 Get "position" vector.
 
const Vec3dpos () const
 
Vec3dvec ()
 Get vector component.
 
const Vec3dvec () const
 
Quatdquat ()
 Get quaternion component (represents orientation)
 
const Quatdquat () const
 
double x () const
 
double y () const
 
double z () const
 
Mat4d matrix () const
 Convert to 4x4 projection space matrix.
 
Mat4d directionMatrix () const
 Convert to 4x4 direction matrix.
 
void toAED (const Vec3d &to, double &azimuth, double &elevation, double &distance) const
 Get the azimuth, elevation & distance from this to another point.
 
Vec3d ux () const
 Get world space X unit vector.
 
Vec3d uy () const
 Get world space Y unit vector.
 
Vec3d uz () const
 Get world space Z unit vector.
 
template<class T >
void unitVectors (Vec< 3, T > &ux, Vec< 3, T > &uy, Vec< 3, T > &uz) const
 Get world space unit vectors.
 
template<class T >
void directionVectors (Vec< 3, T > &ur, Vec< 3, T > &uu, Vec< 3, T > &uf) const
 Get local right, up, and forward unit vectors.
 
Vec3d ur () const
 Get right unit vector.
 
Vec3d uu () const
 Get up unit vector.
 
Vec3d uf () const
 Get forward unit vector (negative of Z)
 
Pose lerp (const Pose &target, double amt) const
 Get a linear-interpolated Pose between this and another.
 
Poseset (Pose &src)
 Copy all attributes from another Pose.
 
Poseset (const Pose &src)
 Set state from another Pose.
 
PosesetIdentity ()
 Set to identity transform.
 
template<class T >
Posepos (const Vec< 3, T > &v)
 Set position.
 
Posepos (double x, double y, double z)
 Set position from individual components.
 
template<class T >
Posevec (const Vec< 3, T > &v)
 Set vector component.
 
template<class T >
Posequat (const Quat< T > &v)
 Set quaternion component.
 
 operator Vec3d ()
 
 operator Quatd ()
 
void print () const
 Print to standard output.
 

Static Public Member Functions

static Pose identity ()
 Get identity.
 

Protected Attributes

Vec3d mVec
 
Quatd mQuat
 

Detailed Description

A local coordinate frame.

A Pose is a combined position (3-vector) and orientation (quaternion). Local coordinate bases are referred to as r, u, and f which stand for right, up, and forward, respectively.

Definition at line 63 of file al_Pose.hpp.

Constructor & Destructor Documentation

◆ Pose()

al::Pose::Pose ( const Vec3d pos = Vec3d(0),
const Quatd ori = Quatd::identity() 
)
Parameters
[in]posInitial position
[in]oriInitial orientation

Member Function Documentation

◆ faceToward()

void al::Pose::faceToward ( const Vec3d point,
const Vec3d up,
double  amt = 1. 
)

Turn to face a given world-coordinate point, while maintaining an up vector


The documentation for this class was generated from the following file: