Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvui::TrackballCamManip Class Reference

Trackball Camera Manipulator. More...

#include <TrackballCamManip.h>

Inheritance diagram for nvui::TrackballCamManip:

Inheritance graph
[legend]
Collaboration diagram for nvui::TrackballCamManip:

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API TrackballCamManip (void)
 Default constructor. More...

virtual NVSG_API ~TrackballCamManip (void)
 Default destructor. More...

virtual NVSG_API void apply ()
 Apply the states to the camera. More...

virtual NVSG_API void setViewportSize (size_t x, size_t y)
 Set Viewport size. More...

bool isDolly (void)
 Signals if manipulator is in dolly mode. More...

bool isPan (void)
 Signals if manipulator is in pan mode. More...

bool isRotate (void)
 Signals if manipulator is in rotate mode. More...


Protected Methods

virtual NVSG_API void rotate (void)
 Do camera rotation. More...

virtual NVSG_API void pan (void)
 Do camera panning. More...

virtual NVSG_API void dolly (void)
 Do the camera dolly. More...


Protected Attributes

nvutil::Trackball m_trackball
 Trackball object that does all the calculations. More...


Static Protected Attributes

NVSG_API const UINT DOLLY1
 Button configuration for dolly. More...

NVSG_API const UINT DOLLY2
 Button configuration for dolly. More...

NVSG_API const UINT PAN1
 Button configuration for pan. More...

NVSG_API const UINT PAN2
 Button configuration for pan. More...

NVSG_API const UINT ROTATE1
 Button configuration for pan. More...


Detailed Description

Trackball Camera Manipulator.

This manipulator is a special CameraManipulator that interpretes mouse movement as trackball input. Think of a big sphere centered inside of the viewport where you can lay your hand on and rotate it. The manipulator also allows you to dolly and move the objects of the scene.

Note:
If you implement your own manipulator, refer to the button state to see how to add additional button combinations.


Constructor & Destructor Documentation

NVSG_API nvui::TrackballCamManip::TrackballCamManip void   
 

Default constructor.

virtual NVSG_API nvui::TrackballCamManip::~TrackballCamManip void    [virtual]
 

Default destructor.


Member Function Documentation

virtual NVSG_API void nvui::TrackballCamManip::apply   [virtual]
 

Apply the states to the camera.

Recalculate the camera regarding the manipulator states.

Implements nvui::CameraManipulator.

virtual NVSG_API void nvui::TrackballCamManip::setViewportSize size_t    x,
size_t    y
[virtual]
 

Set Viewport size.

Adapt resize of the render area and update the size of the trackball. Call this method whenever the viewport size changes or if you create / initialize the manipulator.

Parameters:
x  Specifies the width of the viewport (pixel).
y  Specifies the height of the viewport (pixel).

Reimplemented from nvui::CameraManipulator.

bool nvui::TrackballCamManip::isDolly void    [inline]
 

Signals if manipulator is in dolly mode.

This method compares the current button state with the configured button states of this object. e.g. DOLLY1, DOLLY2

Returns:
true: manipulator is in dolly mode

bool nvui::TrackballCamManip::isPan void    [inline]
 

Signals if manipulator is in pan mode.

This method compares the current button state with the configured button states of this object. e.g. PAN1, PAN2

Returns:
true: manipulator is in pan mode

bool nvui::TrackballCamManip::isRotate void    [inline]
 

Signals if manipulator is in rotate mode.

This method compares the current button state with the configured button states of this object. e.g. ROTATE1

Returns:
true: manipulator is in rotate mode

virtual NVSG_API void nvui::TrackballCamManip::rotate void    [protected, virtual]
 

Do camera rotation.

Trackball movement of the camera. You can simply replace it with your own way to handle this.

virtual NVSG_API void nvui::TrackballCamManip::pan void    [protected, virtual]
 

Do camera panning.

Move the camera in the camera plane. (left, right up, down) You can simply replace it with your own way to handle this.

virtual NVSG_API void nvui::TrackballCamManip::dolly void    [protected, virtual]
 

Do the camera dolly.

Dolly in and out. You can simply replace it with your own way to handle this.


Member Data Documentation

NVSG_API const UINT nvui::TrackballCamManip::DOLLY1 [static, protected]
 

Button configuration for dolly.

NVSG_API const UINT nvui::TrackballCamManip::DOLLY2 [static, protected]
 

Button configuration for dolly.

NVSG_API const UINT nvui::TrackballCamManip::PAN1 [static, protected]
 

Button configuration for pan.

NVSG_API const UINT nvui::TrackballCamManip::PAN2 [static, protected]
 

Button configuration for pan.

NVSG_API const UINT nvui::TrackballCamManip::ROTATE1 [static, protected]
 

Button configuration for pan.

nvutil::Trackball nvui::TrackballCamManip::m_trackball [protected]
 

Trackball object that does all the calculations.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:44 2005 for NVSGSDK by NVIDIA