Public Member Functions | Private Attributes
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, Point3f new_point)
 Apply a rotation, function of the user mouse drag action.
void Apply (Trackball *trackball, float WheelNotch)
 Apply a rotation, function of the user mouse wheel action.
 CylinderMode (Line3fN &ln, float s=0.0f)
 The line constructor.
 CylinderMode (const Point3f &origin, const Point3f &direction, float s=0.0f)
 The origin-direction 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:
lnthe line that represent the axis.
sa 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:
origina point on the axis.
directionthe axis direction.
sa rotational snap angle (non negative)

Definition at line 587 of file trackmode.h.


Member Function Documentation

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:
trackballthe manipulator manager.
new_pointthe new mouse pointer coordinate.

Reimplemented from vcg::TrackMode.

Definition at line 181 of file trackmode.cpp.

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:
trackballthe manipulator manager.
WheelNotchthe mouse wheel notch.

Reimplemented from vcg::TrackMode.

Definition at line 174 of file trackmode.cpp.

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

Render this manipulator.

Parameters:
trackballthe manipulator manager.

Reimplemented from vcg::TrackMode.

Definition at line 206 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:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:10