#include <ACG/Scenegraph/TransformNode.hh>


Public Member Functions | |
| TransformNode (BaseNode *_parent=0, const std::string &_name="<TransformNode>") | |
| Constructor. | |
| virtual | ~TransformNode () |
| Destructor. | |
| ACG_CLASSNAME (TransformNode) | |
| set name | |
| void | enter (GLState &_state, DrawModes::DrawMode _drawmode) |
| set current GL-color and GL-material | |
| void | leave (GLState &_state, DrawModes::DrawMode _drawmode) |
| restores original GL-color and GL-material | |
| void | set_center (const Vec3d &_c) |
| set center | |
| const Vec3d & | center () const |
| get center | |
| void | loadIdentity () |
| virtual void | setIdentity () |
| void | translate (const Vec3d &_v) |
| Add a translation to the current Transformation. | |
| void | rotate (double _angle, const Vec3d &_axis) |
| void | scale (double _s) |
| Add scaling to the current Transformation. | |
| void | scale (const Vec3d &_s) |
| Add scaling to the current Transformation. | |
| void | scale (const GLMatrixd &_m) |
| Add scaling to the current Transformation. | |
| const GLMatrixd & | matrix () const |
| Returns a const reference to the current transformation matrix. | |
| const GLMatrixd & | inverse_matrix () const |
| return inverse matrix | |
| void | rotation (Vec3d &_axis, double &_angle) const |
| return rotation axis & angle | |
| const GLMatrixd & | rotation () const |
| return rotation matrix | |
| const GLMatrixd & | inverse_rotation () const |
| return inverse rotation matrix | |
| const Vec3d & | translation () const |
| returns ref. to translation vector | |
| const GLMatrixd & | scale () const |
| return scale matrix | |
| const GLMatrixd & | inverse_scale () const |
| return inverse scale matrix | |
| bool | apply_transformation () |
| void | apply_transformation (bool _applyTransformation) |
Private Member Functions | |
| void | updateMatrix () |
| update matrix | |
Private Attributes | |
| GLMatrixd | matrix_ |
| GLMatrixd | inverse_matrix_ |
| GLMatrixd | rotation_matrix_ |
| GLMatrixd | inverse_rotation_matrix_ |
| GLMatrixd | scale_matrix_ |
| GLMatrixd | inverse_scale_matrix_ |
| Vec3d | center_ |
| Vec3d | translation_ |
| Quaterniond | quaternion_ |
| bool | applyTransformation_ |
TransformNode - general 3D geometric transformation node. Provides functionality to translate, scale or rotate around a specified center. This is the base class for e.g. the TrackballNode and the ManipulatorNode, that only add a GUI for generating the transformations.
Definition at line 84 of file TransformNode.hh.
| void ACG::SceneGraph::TransformNode::loadIdentity | ( | ) |
Reset transformation to identity, i.e. reset rotation, translating and scaling factor.
Definition at line 83 of file TransformNode.cc.
References ACG::QuaternionT< Scalar >::identity(), and ACG::Matrix4x4T< Scalar >::identity().
Referenced by setIdentity(), and TransformNode().
| void ACG::SceneGraph::TransformNode::rotate | ( | double | _angle, | |
| const Vec3d & | _axis | |||
| ) |
Add a rotation to the current Transformation. Assume angle in degree and axis normalized
Reimplemented in ACG::SceneGraph::QtManipulatorNode.
Definition at line 129 of file TransformNode.cc.
References ACG::QuaternionT< Scalar >::rotation_matrix(), ACG::Matrix4x4T< Scalar >::transpose(), and updateMatrix().
Referenced by ACG::SceneGraph::QtManipulatorNode::rotate().
| void ACG::SceneGraph::TransformNode::setIdentity | ( | ) | [virtual] |
set the current transformation to the identity transformation, i.e. change the center() to the transfomed center and loadIdentity().
Reimplemented in ACG::SceneGraph::ManipulatorNode, ACG::SceneGraph::TrackballNode, and ACG::SceneGraph::TranslationManipulatorNode.
Definition at line 104 of file TransformNode.cc.
References center(), loadIdentity(), set_center(), and ACG::Matrix4x4T< Scalar >::transform_point().
Referenced by ACG::SceneGraph::TrackballNode::setIdentity().