class CAVERN_rotScaleManipStrategy : public ManipStrategy

Rotation and scaling manipulation strategy

Inheritance:


Public Methods

CAVERN_rotScaleManipStrategy()
Default constructor.
CAVERN_rotScaleManipStrategy( const int rotBttn, const int scaleBttn )
Parameterized constructor specifying buttons for rotation and scale
virtual ~CAVERN_rotScaleManipStrategy()
Destructor.
virtual void eval()
Manipulation strategy implementation for rotation and scale
void setButtons( const int rotBttn, const int scaleBttn )
Set the manipulation buttons for rotation and scale

Inherited from ManipStrategy:

Public Methods

inline void setDCS( pfNetDCS *aDCS )
inline void setParent( pfGroup *aParent )

Protected Fields

pfGroup* parent
pfNetDCS* dcs

Documentation

Rotation and scaling manipulation strategy.. This strategy provides and example of combining two operations into a single strategy. Rotation and scaling are both available in this implementation. Each operation is activated by a separate button on the pointing device.

When the manipulator is attached to a node for transformation, the bounding sphere of that node is calculated using pfGetBound(). This sphere is used to offset the object so that all rotation and scale manipulations will be calculated about the bounding sphere's center. Currently (pf 2.3 SGI), this bounding sphere does not calculate correctly for complex scene graph heirarchies. The solution is to place items under the manipulator at the same level.

CAVERN_rotScaleManipStrategy()
Default constructor.

CAVERN_rotScaleManipStrategy( const int rotBttn, const int scaleBttn )
Parameterized constructor specifying buttons for rotation and scale. The user can specify different buttons from the default. Either may be disabled by setting a value within 1-16 which your pointing device does not have. (eg. If you have a three button wand and want to disable scaling, set the scale button to 4 or higher.)
Parameters:
rotBttn - button (1-16) to use for rotation manipulation
scaleBttn - button (1-16) to use for scale manipulation

virtual ~CAVERN_rotScaleManipStrategy()
Destructor.

virtual void eval()
Manipulation strategy implementation for rotation and scale. The strategy checks the Wand during every Performer app traversal through the scene graph. If the user is pressing the specified button for manipulation, then the object transformation will be calcuatled about the center of the object.

This object center is calculated using the Performer bounding sphere of the node to which the manipulator has been attached. For some reason, complex heirarchies do not seem to correctly calculate the bounding sphere. The current workaround is to ensure that geometry is placed at the same level directly under the node.

void setButtons( const int rotBttn, const int scaleBttn )
Set the manipulation buttons for rotation and scale
Parameters:
rotBttn - button (1-16) to use for rotation manipulation
scaleBttn - button (1-16) to use for scale manipulation


This class has no child classes.
Author:
Chris Scharver, Electronic Visualization Laboratory

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de