ACG::SceneGraph::ManipulatorNode Class Reference

#include <ACG/Scenegraph/ManipulatorNode.hh>

Inheritance diagram for ACG::SceneGraph::ManipulatorNode:
Inheritance graph
[legend]
Collaboration diagram for ACG::SceneGraph::ManipulatorNode:
Collaboration graph
[legend]

List of all members.

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, unsigned int _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

Detailed Description

Use a manipulator to rotate, translate and scale the children of this node.

Definition at line 82 of file ManipulatorNode.hh.


Member Function Documentation

Vec3d ACG::SceneGraph::ManipulatorNode::direction (  )  const

Get direction in world coordinates. Will take the current rotation into account.

Definition at line 587 of file ManipulatorNode.cc.

References ACG::SceneGraph::TransformNode::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 577 of file ManipulatorNode.cc.

References ACG::SceneGraph::TransformNode::inverse_rotation(), and ACG::Matrix4x4T< Scalar >::transform_vector().

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 117 of file ManipulatorNode.cc.

References ACG::SceneGraph::TransformNode::rotation(), and ACG::Matrix4x4T< Scalar >::transform_vector().

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.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .