Base class for all the manipulators. More...
#include <trackmode.h>
Public Member Functions | |
virtual void | Animate (unsigned int msec, Trackball *tb) |
virtual void | Apply (Trackball *trackball, Point3f new_point) |
The default manipulator application for mouse drags. | |
virtual void | Apply (Trackball *trackball, float WheelNotch) |
The default manipulator application for mouse scrolls. | |
virtual void | Draw (Trackball *trackball) |
The default manipulator's render function. | |
virtual bool | IsAnimating (const Trackball *tb) |
virtual bool | isSticky () |
The default avaibility to manipulator changes inside an action. | |
virtual const char * | Name () |
The default manipulator's name. | |
virtual void | Reset () |
The default manipulator's reset function. | |
virtual void | SetAction () |
The default manipulator's begin action function. | |
virtual void | Undo () |
The default manipulator's undo function. | |
virtual | ~TrackMode () |
The default virtual destructor. |
Base class for all the manipulators.
Functions in this class implements the default behaviour of a manipulator: doing nothing.
Every manipulator must be subclass of this class.
Definition at line 93 of file trackmode.h.
virtual vcg::TrackMode::~TrackMode | ( | ) | [inline, virtual] |
The default virtual destructor.
Definition at line 98 of file trackmode.h.
void TrackMode::Animate | ( | unsigned int | msec, |
Trackball * | tb | ||
) | [virtual] |
Reimplemented in vcg::NavigatorWasdMode.
Definition at line 48 of file trackmode.cpp.
void TrackMode::Apply | ( | Trackball * | trackball, |
Point3f | new_point | ||
) | [virtual] |
The default manipulator application for mouse drags.
This default application does nothing.
trackball | the manipulator manager. |
new_point | the new mouse pointer coordinate. |
Reimplemented in vcg::NavigatorWasdMode, vcg::PolarMode, vcg::AreaMode, vcg::PathMode, vcg::CylinderMode, vcg::PlaneMode, vcg::AxisMode, vcg::ScaleMode, vcg::ZMode, vcg::PanMode, and vcg::SphereMode.
Definition at line 36 of file trackmode.cpp.
void TrackMode::Apply | ( | Trackball * | trackball, |
float | WheelNotch | ||
) | [virtual] |
The default manipulator application for mouse scrolls.
This default application does nothing.
trackball | the manipulator manager. |
WheelNotch | the mouse wheel notch. |
Reimplemented in vcg::NavigatorWasdMode, vcg::PathMode, vcg::CylinderMode, vcg::AxisMode, vcg::ScaleMode, and vcg::ZMode.
Definition at line 34 of file trackmode.cpp.
void TrackMode::Draw | ( | Trackball * | trackball | ) | [virtual] |
The default manipulator's render function.
trackball | the manipulator manager. |
Reimplemented in vcg::PolarMode, vcg::AreaMode, vcg::PathMode, vcg::CylinderMode, vcg::PlaneMode, vcg::AxisMode, vcg::ScaleMode, vcg::ZMode, vcg::PanMode, vcg::SphereMode, and vcg::InactiveMode.
Definition at line 38 of file trackmode.cpp.
bool TrackMode::IsAnimating | ( | const Trackball * | tb | ) | [virtual] |
Reimplemented in vcg::NavigatorWasdMode.
Definition at line 44 of file trackmode.cpp.
bool TrackMode::isSticky | ( | ) | [virtual] |
The default avaibility to manipulator changes inside an action.
Every manipulator class can choose if the manipulator manager can switch between it and another manipulator in the middle of an user action, e.g. switching Trackball's current_mode without releasing the mouse button.
The default behaviour is to allow the switch.
Blocking switches is useful for stateful manipulators, regarding state consistency respect to Trackball's Undo() calls.
Reimplemented in vcg::NavigatorWasdMode, vcg::AreaMode, and vcg::PathMode.
Definition at line 51 of file trackmode.cpp.
virtual const char* vcg::TrackMode::Name | ( | ) | [inline, virtual] |
The default manipulator's name.
Reimplemented in vcg::NavigatorWasdMode, vcg::PolarMode, vcg::AreaMode, vcg::PathMode, vcg::CylinderMode, vcg::PlaneMode, vcg::AxisMode, vcg::ScaleMode, vcg::ZMode, vcg::PanMode, vcg::SphereMode, and vcg::InactiveMode.
Definition at line 135 of file trackmode.h.
void TrackMode::Reset | ( | ) | [virtual] |
The default manipulator's reset function.
If a manipulator has a state, it can be reset to the inital state calling this function.
Reimplemented in vcg::NavigatorWasdMode, vcg::PolarMode, vcg::AreaMode, and vcg::PathMode.
Definition at line 42 of file trackmode.cpp.
void TrackMode::SetAction | ( | ) | [virtual] |
The default manipulator's begin action function.
This default implementation does nothing.
Reimplemented in vcg::NavigatorWasdMode, vcg::PolarMode, vcg::AreaMode, and vcg::PathMode.
Definition at line 40 of file trackmode.cpp.
void TrackMode::Undo | ( | ) | [virtual] |
The default manipulator's undo function.
If a manipulator has a state, it must be undoable with a call of this function. The undo must recreate the state present before the last Apply() call.
This default implementation does nothing.
Reimplemented in vcg::AreaMode, and vcg::PathMode.
Definition at line 55 of file trackmode.cpp.