60 #ifndef ACG_MANIPULATOR_NODE_HH
61 #define ACG_MANIPULATOR_NODE_HH
67 #include "BaseNode.hh"
68 #include "TransformNode.hh"
72 #include <QMouseEvent>
74 #include <ACG/GL/GLPrimitives.hh>
80 namespace SceneGraph {
98 const std::string& _name=
"<ManipulatorNode>" );
114 virtual void setIdentity();
124 void set_direction(
Vec3d& _v);
128 Vec3d direction()
const;
131 void set_size(
double _size) { cylinder_height_ = _size;
132 cylinder_radius_ = _size/10.0;}
135 double size()
const {
return cylinder_height_; }
139 Vec3d rel_dir = rotation().transform_vector(direction_);
150 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event);
163 void setup_sphere_system(
GLState& _state);
164 void setup_cylinder_system(
GLState& _state);
168 bool mapToCylinder (
GLState& _state,
const Vec2i& _v2,
double& axis_hit);
179 double cylinder_radius_;
180 double cylinder_height_;
181 int cylinder_slices_;
182 int cylinder_stacks_;
185 bool cylinder_clicked_;
186 bool sphere_clicked_;
199 #endif // ACG_MANIPUKATOR_NODE_HH defined
double size() const
get cylindersize
void translate(double _s)
translate in cylinder direction
Namespace providing different geometric functions concerning angles.
PickTarget
What target to use for picking.
bool touched_
if the manipulator is cklicked with a mouse, this flag will be set to true
bool draw_cylinder() const
get drawCylinder
void reset_touched()
Reset the touched flag ( see touched for details )
void translate(const Vec3d &_v)
Add a translation to the current Transformation.
void set_draw_cylinder(bool _b)
set draw_cylinder_
void set_size(double _size)
set cylindersize (height + radius)