Polymorph package
polymorph::PCamRig Class Reference

#include <PCamRig.h>

Collaboration diagram for polymorph::PCamRig:

Public Member Functions

 PCamRig ()
 
virtual ~PCamRig ()
 
void configure (const PCamRigData &src)
 
void fit (Ogre::RenderWindow *rw)
 
void fit (const Ogre::Vector2 &window_size)
 
void init (Ogre::SceneManager *sm, Ogre::Camera *cam=0)
 
void frame (Ogre::FrameEvent &evt)
 
void move (Ogre::Vector3 p, bool campivot=false)
 
void pitch (Ogre::Real a, bool campivot=false)
 
void yaw (Ogre::Real a, bool campivot=false)
 
void roll (Ogre::Real a, bool campivot=false)
 
void pitchRange (Ogre::Real pc, bool campivot=false)
 
void yawRange (Ogre::Real pc, bool campivot=false)
 
void rollRange (Ogre::Real pc, bool campivot=false)
 
Ogre::Real getPitch (bool pivot=false)
 
Ogre::Real getYaw (bool pivot=false)
 
Ogre::Real getRoll (bool pivot=false)
 
const Ogre::Matrix4 & getCamMat ()
 
const Ogre::Matrix4 & getCamMatI ()
 
const Ogre::Matrix4 & getWorldToOrigin ()
 
Ogre::Camera * getCam ()
 
Ogre::SceneNode * getOrigin ()
 
Ogre::SceneNode * getPivot ()
 
bool isTransiting ()
 
PCamRigStatus getStatus ()
 
PCamRigStatus getFallbackStatus ()
 
std::string getStringStatus ()
 
std::string getStringFallbackStatus ()
 

Protected Member Functions

void move (Ogre::Vector3 p, bool local, bool externalCall)
 

Private Member Functions

void adaptfov ()
 
void orient (Ogre::Real a, bool x, bool y, bool z, bool campivot)
 
Ogre::Real sinInterpolation (Ogre::Real duration, Ogre::Real time)
 
void build3DAxis (void)
 
void updateWorldToOrign (void)
 
void update3DAxis (void)
 

Private Attributes

PCamRigData conf
 
PCamRigStatus status
 
PCamRigStatus fallback_status
 
Ogre::SceneManager * _sm
 
Ogre::Camera * _cam
 
Ogre::SceneNode * _origin
 
Ogre::SceneNode * _pivot
 
Ogre::Matrix4 world2origin_orientation
 
Ogre::Matrix4 cam_mat
 
Ogre::Matrix4 cam_mat_inverse
 
Ogre::Vector3 origin_eulers
 
Ogre::Vector3 pivot_eulers
 
Ogre::Real origin_move_duration
 
Ogre::Real origin_move_time
 
Ogre::Vector3 ori_pos_previous
 
Ogre::Vector3 ori_pos_current
 
Ogre::Vector3 ori_pos_target
 
Ogre::Quaternion ori_dir_previous
 
Ogre::Quaternion ori_dir_current
 
Ogre::Quaternion ori_dir_target
 
Ogre::Real cam_dist_duration
 
Ogre::Real cam_dist_time
 
Ogre::Real cam_dist_previous
 
Ogre::Real cam_dist_target
 
Ogre::Vector3 _axis_x
 
Ogre::Vector3 _axis_y
 
Ogre::Vector3 _axis_z
 
Ogre::SceneNode * _node_x
 
Ogre::SceneNode * _node_y
 
Ogre::SceneNode * _node_z
 
Ogre::SceneNode * _ball_x
 
Ogre::SceneNode * _ball_y
 
Ogre::SceneNode * _ball_z
 

Detailed Description

Definition at line 67 of file PCamRig.h.

Constructor & Destructor Documentation

PCamRig::PCamRig ( )

Definition at line 58 of file PCamRig.cpp.

PCamRig::~PCamRig ( )
virtual

Definition at line 68 of file PCamRig.cpp.

Member Function Documentation

void PCamRig::build3DAxis ( void  )
private

Definition at line 332 of file PCamRig.cpp.

References _axis_x, _axis_y, _axis_z, _ball_x, _ball_y, _ball_z, _node_x, _node_y, _node_z, _origin, and _sm.

Referenced by init().

void polymorph::PCamRig::configure ( const PCamRigData src)
inline

Definition at line 74 of file PCamRig.h.

References conf, fit(), frame(), init(), move(), pitch(), pitchRange(), roll(), rollRange(), yaw(), and yawRange().

Here is the call graph for this function:

void PCamRig::fit ( Ogre::RenderWindow *  rw)

Definition at line 149 of file PCamRig.cpp.

References _cam, and adaptfov().

Referenced by configure().

Here is the call graph for this function:

void PCamRig::fit ( const Ogre::Vector2 &  window_size)

Definition at line 155 of file PCamRig.cpp.

References _cam, and adaptfov().

Here is the call graph for this function:

void PCamRig::frame ( Ogre::FrameEvent &  evt)

Definition at line 166 of file PCamRig.cpp.

References _sm, update3DAxis(), and updateWorldToOrign().

Referenced by configure().

Here is the call graph for this function:

Ogre::Camera* polymorph::PCamRig::getCam ( )
inline

Definition at line 115 of file PCamRig.h.

References _cam.

const Ogre::Matrix4& polymorph::PCamRig::getCamMat ( )
inline

Definition at line 109 of file PCamRig.h.

References cam_mat.

const Ogre::Matrix4& polymorph::PCamRig::getCamMatI ( )
inline

Definition at line 111 of file PCamRig.h.

References cam_mat_inverse.

PCamRigStatus polymorph::PCamRig::getFallbackStatus ( )
inline

Definition at line 124 of file PCamRig.h.

References fallback_status.

Ogre::SceneNode* polymorph::PCamRig::getOrigin ( )
inline

Definition at line 117 of file PCamRig.h.

References _origin.

Ogre::Real polymorph::PCamRig::getPitch ( bool  pivot = false)
inline

Definition at line 96 of file PCamRig.h.

References origin_eulers, and pivot_eulers.

Ogre::SceneNode* polymorph::PCamRig::getPivot ( )
inline

Definition at line 118 of file PCamRig.h.

References _pivot.

Ogre::Real polymorph::PCamRig::getRoll ( bool  pivot = false)
inline

Definition at line 104 of file PCamRig.h.

References origin_eulers, and pivot_eulers.

PCamRigStatus polymorph::PCamRig::getStatus ( )
inline

Definition at line 122 of file PCamRig.h.

References status.

std::string polymorph::PCamRig::getStringFallbackStatus ( )
inline

Definition at line 138 of file PCamRig.h.

References polymorph::CRS_FREE, polymorph::CRS_IDLE, polymorph::CRS_TRANSITION, fallback_status, and move().

Here is the call graph for this function:

std::string polymorph::PCamRig::getStringStatus ( )
inline

Definition at line 126 of file PCamRig.h.

References polymorph::CRS_FREE, polymorph::CRS_IDLE, polymorph::CRS_TRANSITION, and status.

const Ogre::Matrix4& polymorph::PCamRig::getWorldToOrigin ( )
inline

Definition at line 113 of file PCamRig.h.

References world2origin_orientation.

Ogre::Real polymorph::PCamRig::getYaw ( bool  pivot = false)
inline

Definition at line 100 of file PCamRig.h.

References origin_eulers, and pivot_eulers.

bool polymorph::PCamRig::isTransiting ( )
inline

Definition at line 120 of file PCamRig.h.

References polymorph::CRS_TRANSITION, and status.

void PCamRig::move ( Ogre::Vector3  p,
bool  campivot = false 
)

Definition at line 436 of file PCamRig.cpp.

References _origin, and _pivot.

Referenced by configure(), and getStringFallbackStatus().

void polymorph::PCamRig::move ( Ogre::Vector3  p,
bool  local,
bool  externalCall 
)
protected
void PCamRig::orient ( Ogre::Real  a,
bool  x,
bool  y,
bool  z,
bool  campivot 
)
private

Definition at line 483 of file PCamRig.cpp.

References _origin, _pivot, adaptfov(), origin_eulers, and pivot_eulers.

Referenced by pitch(), roll(), and yaw().

Here is the call graph for this function:

void PCamRig::pitch ( Ogre::Real  a,
bool  campivot = false 
)

Definition at line 468 of file PCamRig.cpp.

References _origin, and orient().

Referenced by configure(), init(), and pitchRange().

Here is the call graph for this function:

void PCamRig::pitchRange ( Ogre::Real  pc,
bool  campivot = false 
)

Definition at line 444 of file PCamRig.cpp.

References conf, polymorph::PRange< T >::lerp(), polymorph::PCamRigData::origin_pitch_range, pitch(), and polymorph::PCamRigData::pivot_pitch_range.

Referenced by configure().

Here is the call graph for this function:

void PCamRig::roll ( Ogre::Real  a,
bool  campivot = false 
)

Definition at line 478 of file PCamRig.cpp.

References _origin, and orient().

Referenced by configure(), init(), and rollRange().

Here is the call graph for this function:

void PCamRig::rollRange ( Ogre::Real  pc,
bool  campivot = false 
)

Definition at line 460 of file PCamRig.cpp.

References conf, polymorph::PRange< T >::lerp(), polymorph::PCamRigData::origin_roll_range, polymorph::PCamRigData::pivot_roll_range, and roll().

Referenced by configure().

Here is the call graph for this function:

Ogre::Real polymorph::PCamRig::sinInterpolation ( Ogre::Real  duration,
Ogre::Real  time 
)
inlineprivate

Definition at line 193 of file PCamRig.h.

void PCamRig::update3DAxis ( void  )
private

Definition at line 319 of file PCamRig.cpp.

References _axis_x, _axis_y, _axis_z, _ball_x, _ball_y, _ball_z, _origin, and world2origin_orientation.

Referenced by frame().

void PCamRig::updateWorldToOrign ( void  )
private

Definition at line 84 of file PCamRig.cpp.

References _cam, cam_mat, cam_mat_inverse, and world2origin_orientation.

Referenced by frame().

void PCamRig::yaw ( Ogre::Real  a,
bool  campivot = false 
)

Definition at line 473 of file PCamRig.cpp.

References _origin, and orient().

Referenced by configure(), init(), and yawRange().

Here is the call graph for this function:

void PCamRig::yawRange ( Ogre::Real  pc,
bool  campivot = false 
)

Definition at line 452 of file PCamRig.cpp.

References conf, polymorph::PRange< T >::lerp(), polymorph::PCamRigData::origin_yaw_range, polymorph::PCamRigData::pivot_yaw_range, and yaw().

Referenced by configure().

Here is the call graph for this function:

Member Data Documentation

Ogre::Vector3 polymorph::PCamRig::_axis_x
private

Definition at line 197 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::Vector3 polymorph::PCamRig::_axis_y
private

Definition at line 198 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::Vector3 polymorph::PCamRig::_axis_z
private

Definition at line 199 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_ball_x
private

Definition at line 203 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_ball_y
private

Definition at line 204 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_ball_z
private

Definition at line 205 of file PCamRig.h.

Referenced by build3DAxis(), and update3DAxis().

Ogre::Camera* polymorph::PCamRig::_cam
private

Definition at line 162 of file PCamRig.h.

Referenced by adaptfov(), fit(), getCam(), init(), and updateWorldToOrign().

Ogre::SceneNode* polymorph::PCamRig::_node_x
private

Definition at line 200 of file PCamRig.h.

Referenced by build3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_node_y
private

Definition at line 201 of file PCamRig.h.

Referenced by build3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_node_z
private

Definition at line 202 of file PCamRig.h.

Referenced by build3DAxis().

Ogre::SceneNode* polymorph::PCamRig::_origin
private

Definition at line 163 of file PCamRig.h.

Referenced by adaptfov(), build3DAxis(), getOrigin(), init(), move(), orient(), pitch(), roll(), update3DAxis(), and yaw().

Ogre::SceneNode* polymorph::PCamRig::_pivot
private

Definition at line 164 of file PCamRig.h.

Referenced by getPivot(), init(), move(), and orient().

Ogre::SceneManager* polymorph::PCamRig::_sm
private

Definition at line 161 of file PCamRig.h.

Referenced by build3DAxis(), frame(), and init().

Ogre::Real polymorph::PCamRig::cam_dist_duration
private

Definition at line 188 of file PCamRig.h.

Ogre::Real polymorph::PCamRig::cam_dist_previous
private

Definition at line 190 of file PCamRig.h.

Ogre::Real polymorph::PCamRig::cam_dist_target
private

Definition at line 191 of file PCamRig.h.

Ogre::Real polymorph::PCamRig::cam_dist_time
private

Definition at line 189 of file PCamRig.h.

Ogre::Matrix4 polymorph::PCamRig::cam_mat
private

Definition at line 171 of file PCamRig.h.

Referenced by getCamMat(), and updateWorldToOrign().

Ogre::Matrix4 polymorph::PCamRig::cam_mat_inverse
private

Definition at line 172 of file PCamRig.h.

Referenced by getCamMatI(), and updateWorldToOrign().

PCamRigData polymorph::PCamRig::conf
private

Definition at line 157 of file PCamRig.h.

Referenced by adaptfov(), configure(), init(), pitchRange(), rollRange(), and yawRange().

PCamRigStatus polymorph::PCamRig::fallback_status
private

Definition at line 159 of file PCamRig.h.

Referenced by getFallbackStatus(), getStringFallbackStatus(), and init().

Ogre::Quaternion polymorph::PCamRig::ori_dir_current
private

Definition at line 184 of file PCamRig.h.

Ogre::Quaternion polymorph::PCamRig::ori_dir_previous
private

Definition at line 183 of file PCamRig.h.

Ogre::Quaternion polymorph::PCamRig::ori_dir_target
private

Definition at line 185 of file PCamRig.h.

Ogre::Vector3 polymorph::PCamRig::ori_pos_current
private

Definition at line 181 of file PCamRig.h.

Ogre::Vector3 polymorph::PCamRig::ori_pos_previous
private

Definition at line 180 of file PCamRig.h.

Ogre::Vector3 polymorph::PCamRig::ori_pos_target
private

Definition at line 182 of file PCamRig.h.

Ogre::Vector3 polymorph::PCamRig::origin_eulers
private

Definition at line 174 of file PCamRig.h.

Referenced by getPitch(), getRoll(), getYaw(), and orient().

Ogre::Real polymorph::PCamRig::origin_move_duration
private

Definition at line 178 of file PCamRig.h.

Ogre::Real polymorph::PCamRig::origin_move_time
private

Definition at line 179 of file PCamRig.h.

Ogre::Vector3 polymorph::PCamRig::pivot_eulers
private

Definition at line 175 of file PCamRig.h.

Referenced by getPitch(), getRoll(), getYaw(), and orient().

PCamRigStatus polymorph::PCamRig::status
private

Definition at line 158 of file PCamRig.h.

Referenced by getStatus(), getStringStatus(), init(), and isTransiting().

Ogre::Matrix4 polymorph::PCamRig::world2origin_orientation
private

Definition at line 170 of file PCamRig.h.

Referenced by getWorldToOrigin(), update3DAxis(), and updateWorldToOrign().


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