54#ifndef ACG_MANIPULATOR_NODE_HH
55#define ACG_MANIPULATOR_NODE_HH
62#include "TransformNode.hh"
63#include <ACG/GL/GLPrimitives.hh>
93 const std::string& _name=
"<ManipulatorNode>" );
109 virtual void setIdentity()
override;
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_);
135 TransformNode::translate(_s * rel_dir);
145 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event)
override;
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_;
void reset_touched()
Reset the touched flag ( see touched for details )
void set_size(double _size)
set cylindersize (height + radius)
bool touched_
if the manipulator is cklicked with a mouse, this flag will be set to true
ACG_CLASSNAME(ManipulatorNode)
class name
void set_draw_cylinder(bool _b)
set draw_cylinder_
bool draw_cylinder() const
get drawCylinder
void translate(double _s)
translate in cylinder direction
double size() const
get cylindersize
PickTarget
What target to use for picking.
Namespace providing different geometric functions concerning angles.