54 #ifndef ACG_TRANSLATIONMANIPULATOR_NODE_HH 55 #define ACG_TRANSLATIONMANIPULATOR_NODE_HH 61 #include "BaseNode.hh" 62 #include "TransformNode.hh" 66 #include <QMouseEvent> 124 ALL_AXIS = X_AXIS | Y_AXIS | Z_AXIS
129 const std::string& _name=
"<TranslationTranslationManipulatorNode>" );
143 virtual void setIdentity();
152 void set_direction(
const Vec3d& _directionX,
const Vec3d& _directionY);
155 Vec3d directionX()
const;
157 Vec3d directionY()
const;
159 Vec3d directionZ()
const;
165 set_manipulator_height_ = _size;
166 set_manipulator_radius_ = _size/10.0;
172 double size()
const {
return set_manipulator_height_; }
178 AutoSizeMode
autosize ()
const {
return auto_size_; }
188 activeRotations_ = _active;
197 return activeRotations_;
200 void rotate (
double _angle,
Vec3d _axis)
221 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event);
224 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
263 Vec4f active_target_color_;
264 Vec4f active_current_color_;
265 Vec4f inactive_target_color_;
266 Vec4f inactive_current_color_;
273 void update_manipulator_system(
GLState& _state);
276 void update_rotation(
GLState& _state);
281 void drawManipulator (
GLState& _state,
bool _active);
287 bool mapToCylinder (
GLState& _state,
const Vec2i& _v2, StateUpdates _updateStates =
None);
288 bool mapToCylinderTop (
GLState& _state,
const Vec2i& _v2, StateUpdates _updateStates =
None);
292 void updateTargetColors ();
293 bool updateCurrentColors (
GLState& _state);
295 double get_screen_length (
GLState& _state,
Vec3d& _point)
const;
297 void updateSize (
GLState& _state);
300 bool draw_manipulator_;
312 double manipulator_radius_;
313 double manipulator_height_;
314 double set_manipulator_radius_;
315 double set_manipulator_height_;
316 int manipulator_slices_;
317 int manipulator_stacks_;
319 bool any_axis_clicked_;
320 bool any_top_clicked_;
321 bool outer_ring_clicked_;
325 bool outer_ring_over_;
329 float resize_current_;
335 Vec3d draggingOrigin3D_;
342 AutoSizeMode auto_size_;
343 double auto_size_length_;
353 #endif // ACG_TRANSLATIONMANIPULATOR_NODE_HH defined Namespace providing different geometric functions concerning angles.
Clear all attribute bits.
ActiveRotations enabled_rotations() const
Get the current setting, which rotation handles are active.
void enable_rotations(ActiveRotations _active)
Enable or disable manipulator handles for specific orientations.
AutoSizeMode autosize() const
get autosize mode
ManipulatorMode
enum to define the manipulator mode
void set_size(double _size)
set cylindersize (height + radius). _size parameter has to be greater than zero
Interface class between scenegraph and renderer.
void rotate(double _angle, const Vec3d &_axis)
void set_draw_cylinder(bool _b)
set draw_cylinder_
double size() const
get cylindersize
void set_autosize(AutoSizeMode _mode)
set auto size mode
bool touched_
stores if this manipulator was used in order to avoid emitting manipulatorMoved unnecessarily ...
PickTarget
What target to use for picking.
bool draw_manipulator() const
get drawCylinder
ActiveRotations
enum to define which rotation axis should be enabled