KJB

#include <gr_rigid_object.h>
Public Member Functions  
Rigid_object ()  
Rigid_object (const Rigid_object &ro)  
virtual Rigid_object &  operator= (const Rigid_object &src) 
virtual  ~Rigid_object () 
virtual void  swap (Self &other) 
virtual void  translate (double dx, double dy, double dz) 
Translates this rigid object. More...  
virtual void  rotate (double dpitch, double dyaw, double droll) 
rotate this object around its xaxis by dpitch, the yaxis by dyaw, and its zaxis by droll (in this order, starting from the object's current position) More...  
virtual void  compute_new_euler_angles_on_rotations (double dpitch, double dyaw, double droll, kjb::Vector &angles) const 
computes the new values for the object's euler angles, after a rotation of dpitch around the object's xaxis, a rotation of dyaw around the object's y axis, and a rotation of droll around the object's z axis (in this order, starting from the object's current position). The state of this rigid object is not changed More...  
virtual void  set_rotations (double pitch, double yaw, double roll) 
rotate this object so that its pitch, yaw and roll match the input values More...  
virtual void  set_rotations_and_translate (double pitch, double yaw, double roll, double dx, double dy, double dz) 
rotate this object so that its pitch, yaw and roll match the input values, and translates it More...  
virtual Rigid_object *  clone () const =0 
Processes an Option from program commandline arguments. More...  
virtual void  transform (const kjb::Matrix &M)=0 
const Matrix &  get_rotations () const 
Returns the current transformation matrix, that is used to store the rotation to be applied to the object. More...  
const Vector &  get_euler_angles () const 
returns vector [pitch, yaw, roll] More...  
void  set_rotation_mode (kjb::Quaternion::Euler_mode imode) 
const kjb::Quaternion &  get_orientation () const 
returns the quaternion defining this object's orientation More...  
void  set_orientation (const Quaternion &orientation) 
sets the orientation of this object from an input quaternion More...  
Public Member Functions inherited from kjb::Transformable  
virtual  ~Transformable () 
Deletes this Transformable. More...  
virtual  ~Transformable () 
Deletes this Transformable_d. More...  
Public Member Functions inherited from kjb::Cloneable  
virtual  ~Cloneable () 
Deletes this Cloneable. More...  
details
Methods of this class update the gl modelview and projection parameters so that they reflect the changes in the camera extrinsic and intrinsic parameters

inline 
Rigid_object::Rigid_object  (  const Rigid_object &  ro  ) 
ro  Rigid_object to copy into this one. 

inlinevirtual 

pure virtual 
Processes an Option from program commandline arguments.
Implements kjb::Cloneable.
Implemented in kjb::Parametric_camera_gl_interface, kjb::Triangular_mesh, kjb::Parapiped, kjb::Frustum, and kjb::Polymesh.

virtual 
computes the new values for the object's euler angles, after a rotation of dpitch around the object's xaxis, a rotation of dyaw around the object's y axis, and a rotation of droll around the object's z axis (in this order, starting from the object's current position). The state of this rigid object is not changed
computes the new values for the object's euler angles, after a rotation of dpitch around the object's xaxis, a rotation of dyaw around the object's y axis, and a rotation of droll around the object's z axis (in this order). The state of this rigid object is not changed
dpitch  the amount of rotation around the object's xaxis 
dyaw  the amount of rotation around the object's yaxis 
droll  the amount of rotation around the object's zaxis 
angles  will contain the new Euler angles (pitch, yaw, roll) 

inline 
returns vector [pitch, yaw, roll]

inline 
returns the quaternion defining this object's orientation

inline 
Returns the current transformation matrix, that is used to store the rotation to be applied to the object.

virtual 
src  Rigid_object to be assigned to this one 

virtual 
rotate this object around its xaxis by dpitch, the yaxis by dyaw, and its zaxis by droll (in this order, starting from the object's current position)
Rotates this object around its xaxis by the input angle dpitch, around its yaxis by the input angle dyaw, around its zaxis by the input angle droll. The rotations will add to the current state of the object, ie if the inputs are dpitch = 0.1, dyaw =0.0 and, droll = 0.2, the object will be rotated around the object's xaxis by dpitch, and then around the object's z axis (that moved after the first rotation by dpitch) by 0.2
dpitch  the amount of rotation around the object's xaxis 
dyaw  the amount of rotation around the object's yaxis 
droll  the amount of rotation around the object's zaxis 
Reimplemented in kjb::Polymesh.
void Rigid_object::set_orientation  (  const Quaternion &  orientation  ) 
sets the orientation of this object from an input quaternion

inline 

virtual 
rotate this object so that its pitch, yaw and roll match the input values
Rotates this rigid object so that the amount of rotation around its xaxis will match the input pitch, the amount of rotation around its yaxis will match the input yaw and the amount of rotation around its zaxis will match the input roll. The rotations are done in this order starting from a configuration where the object is aligned with the world's axis
pitch  The desired amount of rotation around the object's x axis 
yaw  The desired amount of rotation around the object's y axis 
roll  The desired amount of rotation around the object's z axis 

virtual 
rotate this object so that its pitch, yaw and roll match the input values, and translates it
Rotates this rigid object around its x axis by the input pitch angle, then around the object's y axis by the input yaw angle, and last around the object's z axis by the input roll angle. Rotations are performed IN THIS ORDER, consider this if the resulting rotations are not as you would expect (rotation is not transitive). Last, the object is translated along the world's xaxis by dx, along the world's y axis by dy, and along the world's z axis by dz (The object is translated by these amounts starting from its current location). The method is provided to set rotations and translate in an efficient way, by avoiding a matrix multiplication
pitch  The desired amount of rotation around the object's x axis 
yaw  The desired amount of rotation around the object's y axis 
roll  The desired amount of rotation around the object's z axis 
dx  the amount of translation along the world's xaxis 
dy  the amount of translation along the world's yaxis 
dz  the amount of translation along the world's zaxis 

inlinevirtual 
Swap contents with another Perspective_camera. This is implemented to prevent deep copies, which allows it to run much more quickly than: Type tmp = b; b = a; a = tmp;

pure virtual 
@ brief Transforms this rigid object by using the input 3D transformation matrix, in homogeneous coordinates
Implements kjb::Transformable.
Implemented in kjb::Polymesh, kjb::Parapiped, and kjb::Frustum.

virtual 
Translates this rigid object.
Translates this rigid object
dx  The amount of translation along the world's x axis 
dy  The amount of translation along the world's y axis 
dz  The amount of translation along the world's z axis 
Reimplemented in kjb::Polymesh.