vcg::CylinderMode Class Reference

The constrained rotation manipulator. More...

#include <trackmode.h>

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

List of all members.

Public Member Functions

void Apply (Trackball *trackball, float WheelNotch)
 Apply a rotation, function of the user mouse wheel action.
void Apply (Trackball *trackball, Point3f new_point)
 Apply a rotation, function of the user mouse drag action.
 CylinderMode (const Point3f &origin, const Point3f &direction, float s=0.0f)
 The origin-direction constructor.
 CylinderMode (Line3fN &ln, float s=0.0f)
 The line constructor.
void Draw (Trackball *trackball)
 Render this manipulator.
const char * Name ()
 Return this manipulator's name.

Private Attributes

Line3fN axis
 The axis, stored as a normalized line.
float snap
 The rotational snap value.

Detailed Description

The constrained rotation manipulator.

This manipulator implements a rotation manipulator, that make the rotation constrained around a given axis.

The user can either drag the mouse or scroll the wheel, in either cases the rotation's angle is influenced by the radius of the trackball.

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 560 of file trackmode.h.


Constructor & Destructor Documentation

vcg::CylinderMode::CylinderMode ( Line3fN ln,
float  s = 0.0f 
) [inline]

The line constructor.

This manipulator needs to be initialized with an axis. This constructor can initialize it with a Line3f.

The line will be normalized.

Parameters:
ln the line that represent the axis.
s a rotational snap angle non negative

Definition at line 572 of file trackmode.h.

vcg::CylinderMode::CylinderMode ( const Point3f origin,
const Point3f direction,
float  s = 0.0f 
) [inline]

The origin-direction constructor.

This manipulator needs to be initialized with a axis. This constructor can initialize it with two Point3f, representing a point and a vector.

Parameters:
origin a point on the axis.
direction the axis direction.
s a rotational snap angle (non negative)

Definition at line 587 of file trackmode.h.


Member Function Documentation

void CylinderMode::Apply ( Trackball trackball,
float  WheelNotch 
) [virtual]

Apply a rotation, function of the user mouse wheel action.

The manipulated object is rotated around the axis.

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

Reimplemented from vcg::TrackMode.

Definition at line 284 of file trackmode.cpp.

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

Apply a rotation, function of the user mouse drag action.

The manipulated object is rotated around the axis.

if the axis is too perpendicular to view plane, the angle is specified only by the vertical component of the mouse drag and the radius.

Parameters:
trackball the manipulator manager.
new_point the new mouse pointer coordinate.

Reimplemented from vcg::TrackMode.

Definition at line 291 of file trackmode.cpp.

void CylinderMode::Draw ( Trackball trackball  )  [virtual]

Render this manipulator.

Parameters:
trackball the manipulator manager.

Reimplemented from vcg::TrackMode.

Definition at line 316 of file trackmode.cpp.

const char* vcg::CylinderMode::Name (  )  [inline, virtual]

Return this manipulator's name.

Returns:
the constant string "CylinderMode"

Reimplemented from vcg::TrackMode.

Definition at line 596 of file trackmode.h.


Member Data Documentation

The axis, stored as a normalized line.

Definition at line 628 of file trackmode.h.

float vcg::CylinderMode::snap [private]

The rotational snap value.

Definition at line 630 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:58 2013