vcg::AxisMode Class Reference

The one-directional manipulator. More...

#include <trackmode.h>

Inheritance diagram for vcg::AxisMode:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
ln the line that represent the direction.

Definition at line 421 of file trackmode.h.

vcg::AxisMode::AxisMode ( const Point3f origin,
const Point3f direction 
) [inline]

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.

Parameters:
origin a point on the line.
direction the line direction.

Definition at line 434 of file trackmode.h.


Member Function Documentation

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.

Parameters:
trackball the manipulator manager.
WheelNotch the mouse wheel notch.

Reimplemented from vcg::TrackMode.

Definition at line 249 of file trackmode.cpp.

void AxisMode::Apply ( Trackball trackball,
Point3f  new_point 
) [virtual]

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.

Parameters:
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.

Parameters:
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.

Returns:
the constant string "AxisMode"

Reimplemented from vcg::TrackMode.

Definition at line 442 of file trackmode.h.


Member Data Documentation

The direction, stored as a normalized line.

Definition at line 474 of file trackmode.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:57 2013