54 #ifndef ACG_MANIPULATOR_NODE_HH 55 #define ACG_MANIPULATOR_NODE_HH 61 #include "BaseNode.hh" 62 #include "TransformNode.hh" 63 #include <ACG/GL/GLPrimitives.hh> 67 #include <QMouseEvent> 93 const std::string& _name=
"<ManipulatorNode>" );
109 virtual void setIdentity();
119 void set_direction(
Vec3d& _v);
123 Vec3d direction()
const;
126 void set_size(
double _size) { cylinder_height_ = _size;
127 cylinder_radius_ = _size/10.0;}
130 double size()
const {
return cylinder_height_; }
134 Vec3d rel_dir = rotation().transform_vector(direction_);
145 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event);
158 void setup_sphere_system(
GLState& _state);
159 void setup_cylinder_system(
GLState& _state);
163 bool mapToCylinder (
GLState& _state,
const Vec2i& _v2,
double& axis_hit);
174 double cylinder_radius_;
175 double cylinder_height_;
176 int cylinder_slices_;
177 int cylinder_stacks_;
180 bool cylinder_clicked_;
181 bool sphere_clicked_;
194 #endif // ACG_MANIPUKATOR_NODE_HH defined Namespace providing different geometric functions concerning angles.
void translate(const Vec3d &_v)
Add a translation to the current Transformation.
double size() const
get cylindersize
void set_size(double _size)
set cylindersize (height + radius)
void translate(double _s)
translate in cylinder direction
void reset_touched()
Reset the touched flag ( see touched for details )
bool touched_
if the manipulator is cklicked with a mouse, this flag will be set to true
bool draw_cylinder() const
get drawCylinder
void set_draw_cylinder(bool _b)
set draw_cylinder_
PickTarget
What target to use for picking.