|
| 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 x-axis by dpitch, the y-axis by dyaw, and its z-axis 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 x-axis, 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 command-line 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...
|
|
virtual | ~Transformable () |
| Deletes this Transformable. More...
|
|
virtual | ~Transformable () |
| Deletes this Transformable_d. More...
|
|
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
void Rigid_object::compute_new_euler_angles_on_rotations |
( |
double |
dpitch, |
|
|
double |
dyaw, |
|
|
double |
droll, |
|
|
kjb::Vector & |
angles |
|
) |
| const |
|
virtual |
computes the new values for the object's euler angles, after a rotation of dpitch around the object's x-axis, 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 x-axis, 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
- Parameters
-
dpitch | the amount of rotation around the object's x-axis |
dyaw | the amount of rotation around the object's y-axis |
droll | the amount of rotation around the object's z-axis |
angles | will contain the new Euler angles (pitch, yaw, roll) |
void Rigid_object::rotate |
( |
double |
dpitch, |
|
|
double |
dyaw, |
|
|
double |
droll |
|
) |
| |
|
virtual |
rotate this object around its x-axis by dpitch, the y-axis by dyaw, and its z-axis by droll (in this order, starting from the object's current position)
Rotates this object around its x-axis by the input angle dpitch, around its y-axis by the input angle dyaw, around its z-axis 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 x-axis by dpitch, and then around the object's z axis (that moved after the first rotation by dpitch) by 0.2
- Parameters
-
dpitch | the amount of rotation around the object's x-axis |
dyaw | the amount of rotation around the object's y-axis |
droll | the amount of rotation around the object's z-axis |
Reimplemented in kjb::Polymesh.
void Rigid_object::set_rotations_and_translate |
( |
double |
pitch, |
|
|
double |
yaw, |
|
|
double |
roll, |
|
|
double |
dx, |
|
|
double |
dy, |
|
|
double |
dz |
|
) |
| |
|
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 x-axis 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
- Parameters
-
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 x-axis |
dy | the amount of translation along the world's y-axis |
dz | the amount of translation along the world's z-axis |