#include <ACG/Scenegraph/ManipulatorNode.hh>


Public Member Functions | |
| ManipulatorNode (BaseNode *_parent=0, const std::string &_name="<ManipulatorNode>") | |
| Default constructor. | |
| ~ManipulatorNode () | |
| Destructor. | |
| ACG_CLASSNAME (ManipulatorNode) | |
| class name | |
| virtual void | setIdentity () |
| void | set_draw_cylinder (bool _b) |
| set draw_cylinder_ | |
| bool | draw_cylinder () const |
| get drawCylinder | |
| void | set_direction (Vec3d &_v) |
| Vec3d | direction () const |
| void | set_size (double _size) |
| set cylindersize (height + radius) | |
| double | size () const |
| get cylindersize | |
| void | translate (double _s) |
| translate in cylinder direction | |
| void | draw (GLState &_state, DrawModes::DrawMode _drawMode) |
| draw the cylinder (if enabled) | |
| void | pick (GLState &_state, PickTarget _target) |
| picking | |
| virtual void | mouseEvent (GLState &_state, QMouseEvent *_event) |
| get mouse events | |
| bool | touched () |
| void | reset_touched () |
| Reset the touched flag ( see touched for details ). | |
Private Member Functions | |
| void | setup_sphere_system (GLState &_state) |
| void | setup_cylinder_system (GLState &_state) |
| bool | mapToSphere (GLState &_state, const Vec2i &_v2, Vec3d &_v3) |
| bool | hitSphere (GLState &_state, const Vec2i &_v2) |
| bool | mapToCylinder (GLState &_state, const Vec2i &_v2, double &axis_hit) |
Private Attributes | |
| bool | draw_cylinder_ |
| Vec3d | direction_ |
| GLUquadricObj * | cylinder_ |
| double | cylinder_radius_ |
| double | cylinder_height_ |
| int | cylinder_slices_ |
| int | cylinder_stacks_ |
| bool | cylinder_clicked_ |
| bool | sphere_clicked_ |
| Vec2i | oldPoint2D_ |
| bool | touched_ |
| if the manipulator is cklicked with a mouse, this flag will be set to true | |
Use a manipulator to rotate, translate and scale the children of this node.
Definition at line 82 of file ManipulatorNode.hh.
| Vec3d ACG::SceneGraph::ManipulatorNode::direction | ( | ) | const |
Get direction in world coordinates. Will take the current rotation into account.
Definition at line 575 of file ManipulatorNode.cc.
References ACG::SceneGraph::TransformNode::inverse_rotation(), and ACG::Matrix4x4T< Scalar >::transform_vector().
| void ACG::SceneGraph::ManipulatorNode::set_direction | ( | Vec3d & | _v | ) |
Set direction in world coordinates. Will take the current rotation into account.
Definition at line 565 of file ManipulatorNode.cc.
| void ACG::SceneGraph::ManipulatorNode::setIdentity | ( | ) | [virtual] |
set the current transformation to the identity transformation, i.e. change the center() to the transfomed center and loadIdentity().
Reimplemented from ACG::SceneGraph::TransformNode.
Definition at line 105 of file ManipulatorNode.cc.
| bool ACG::SceneGraph::ManipulatorNode::touched | ( | ) | [inline] |
if the manipulator node has been clicked by the mouse, this function will return true. Use reset_touched to reset this flag
Definition at line 146 of file ManipulatorNode.hh.