The one-directional manipulator. More...
#include <trackmode.h>
Public Member Functions | |
void | Apply (Trackball *trackball, float WheelNotch) |
Apply a translation, function of the user mouse wheel action. | |
void | Apply (Trackball *trackball, Point3f new_point) |
Apply a translation, function of the user mouse drag action. | |
AxisMode (const Point3f &origin, const Point3f &direction) | |
The origin-direction constructor. | |
AxisMode (const Line3f &ln) | |
The line constructor. | |
void | Draw (Trackball *trackball) |
Render this manipulator. | |
const char * | Name () |
Return this manipulator's name. | |
Private Attributes | |
Line3fN | axis |
The direction, stored as a normalized line. |
The one-directional manipulator.
This manipulator implements a monodimensional translation on a constrained direction.
Dragging the mouse up and down or scrolling the mouse wheel will move the object along the direction.
This is a stateless manipulator, result of the Apply functions is determined only either by the mouse coordinates or by the mouse wheel notch.
Definition at line 410 of file trackmode.h.
vcg::AxisMode::AxisMode | ( | const Line3f & | ln | ) | [inline] |
The line constructor.
This manipulator needs to be initialized with a direction. This constructor can initialize it with a Line3f.
The line will be normalized.
ln | the line that represent the direction. |
Definition at line 421 of file trackmode.h.
The origin-direction constructor.
This manipulator needs to be initialized with a direction. This constructor can initialize it with two Point3f, representing a point and a vector.
origin | a point on the line. | |
direction | the line direction. |
Definition at line 434 of file trackmode.h.
void AxisMode::Apply | ( | Trackball * | trackball, | |
float | WheelNotch | |||
) | [virtual] |
Apply a translation, function of the user mouse wheel action.
The manipulated object is moved along the direction.
trackball | the manipulator manager. | |
WheelNotch | the mouse wheel notch. |
Reimplemented from vcg::TrackMode.
Definition at line 249 of file trackmode.cpp.
Apply a translation, function of the user mouse drag action.
The manipulated object is moved along the direction.
If the pointer ray is divergent from the direction the object is not moved.
trackball | the manipulator manager. | |
new_point | the new mouse pointer coordinate. |
Reimplemented from vcg::TrackMode.
Definition at line 254 of file trackmode.cpp.
void AxisMode::Draw | ( | Trackball * | trackball | ) | [virtual] |
Render this manipulator.
trackball | the manipulator manager. |
Reimplemented from vcg::TrackMode.
Definition at line 263 of file trackmode.cpp.
const char* vcg::AxisMode::Name | ( | ) | [inline, virtual] |
Return this manipulator's name.
Reimplemented from vcg::TrackMode.
Definition at line 442 of file trackmode.h.
Line3fN vcg::AxisMode::axis [private] |
The direction, stored as a normalized line.
Definition at line 474 of file trackmode.h.