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

A Smoothed Pose. More...

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

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

Public Member Functions

 SmoothPose (const Pose &init=Pose(), double psmooth=0.9, double qsmooth=0.9)
 
SmoothPoseoperator() ()
 
SmoothPoseoperator() (const Pose &p)
 
Posetarget ()
 
void target (const Pose &p)
 
void target (const Vec3d &p)
 
void target (const Quatd &p)
 
void jump (Pose &p)
 
void jump (Vec3d &v)
 
void jump (Quatd &q)
 
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
 
template<class T >
Posepos (const Vec< 3, T > &v)
 Set position.
 
Posepos (double x, double y, double z)
 Set position from individual components.
 
Vec3dvec ()
 Get vector component.
 
const Vec3dvec () const
 
template<class T >
Posevec (const Vec< 3, T > &v)
 Set vector component.
 
Quatdquat ()
 Get quaternion component (represents orientation)
 
const Quatdquat () const
 
template<class T >
Posequat (const Quat< T > &v)
 Set quaternion component.
 
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.
 
 operator Vec3d ()
 
 operator Quatd ()
 
void print () const
 Print to standard output.
 

Static Public Member Functions

static Pose identity ()
 Get identity.
 

Protected Attributes

Pose mTarget
 
double mPF
 
double mQF
 
Vec3d mVec
 
Quatd mQuat
 

Detailed Description

A Smoothed Pose.

This Pose approaches the stored target Pose exponentially with a curvature determined by psmooth and qsmooth

Definition at line 236 of file al_Pose.hpp.

Member Function Documentation

◆ faceToward()

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

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


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