Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpCameraOrbitTurntable Class Reference

The HOpCameraOrbitTurntable class orbits the camera around a predefined vertical and horizontal axis. More...

#include <HOpCameraOrbitTurntable.h>

Inheritance diagram for HOpCameraOrbitTurntable:

HBaseOperator

List of all members.

Public Member Functions

virtual HBaseOperatorClone ()
bool GetLightFollowsCamera ()
virtual const char * GetName ()
 HOpCameraOrbitTurntable (HBaseView *view, int DoRepeat=0, int DoCapture=1)
virtual int OnLButtonDown (HEventInfo &hevent)
virtual int OnLButtonDownAndMove (HEventInfo &hevent)
virtual int OnLButtonUp (HEventInfo &hevent)
virtual int OnMouseWheel (HEventInfo &hevent)
void SetCenter (HPoint center)
void SetLightFollowsCamera (bool follow)
void UnSetCenter ()

Protected Member Functions

void RotateAroundAxis (HPoint axis, float rf)


Detailed Description

The HOpCameraOrbitTurntable class orbits the camera around a predefined vertical and horizontal axis.

HOpCameraOrbitTurntable takes the fixed "Top Axis" of its associated view and allows the user to rotate around it by dragging the mouse horizontally across the screen. With the mouse wheel the user can also rotate the scene around the horizontal view axis which is dependent on the current camera position

HOpCameraOrbitTurntable implements three mouse event methods defined on the base class and maps the event information to HOOPS camera routines. This operation consists of the following steps:

  1. Left Button Down: The orbit is initiated.
  2. Left Button Down and Drag: The camera orbits.
  3. Left Button Up: The operation ends.
More Detailed Description: see event methods

Constructor & Destructor Documentation

HOpCameraOrbitTurntable::HOpCameraOrbitTurntable ( HBaseView view,
int  DoRepeat = 0,
int  DoCapture = 1 
)

Constructs an HOpCameraOrbitTurntable object.

Parameters:
view A pointer to an HBaseView object.
DoRepeat An integer denoting whether this is a repeatable operator. This parameter has been deprecated.
DoCapture An integer denoting whether the mouse state should be captured, which means that all mouse events should be received after a mousedown, even if it leaves the window. This parameter has been deprecated.


Member Function Documentation

virtual HBaseOperator* HOpCameraOrbitTurntable::Clone (  )  [virtual]

Creates a new operator which is a copy of the current operator. The user is responsible for deleting the newly created operator.

Returns:
A pointer to the newly created HOpCameraOrbitTurntable object.

Reimplemented from HBaseOperator.

bool HOpCameraOrbitTurntable::GetLightFollowsCamera (  )  [inline]

Returns:
True if the light follows the camera or false if it doesn't.

virtual const char* HOpCameraOrbitTurntable::GetName (  )  [virtual]

Returns:
A pointer to a character string denoting the name of the operator which is 'HOpCameraOrbitTurntable'.

Reimplemented from HBaseOperator.

virtual int HOpCameraOrbitTurntable::OnLButtonDown ( HEventInfo hevent  )  [virtual]

OnLButtonDown records the initial mouse position.

Parameters:
hevent An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HBaseOperator.

virtual int HOpCameraOrbitTurntable::OnLButtonDownAndMove ( HEventInfo hevent  )  [virtual]

OnLButtonDownAndMove records points as the mouse is moved and calculates the values used for rotating the camera by modifying the camera's target and position.

Parameters:
hevent An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HBaseOperator.

virtual int HOpCameraOrbitTurntable::OnLButtonUp ( HEventInfo hevent  )  [virtual]

OnLButtonUp Clean up.

Parameters:
hevent An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HBaseOperator.

virtual int HOpCameraOrbitTurntable::OnMouseWheel ( HEventInfo hevent  )  [virtual]

OnMouseWheel OnMouseWheel performs rotation around the horizontal view axis

Parameters:
hevent An HEventInfo object containing information about the current event.
Returns:
An HOperatorReturn indicating the status of the event.

Reimplemented from HBaseOperator.

void HOpCameraOrbitTurntable::RotateAroundAxis ( HPoint  axis,
float  rf 
) [protected]

Rotates camera around given axis

Parameters:
axis Axis to rotate around
rf Angle of rotation

void HOpCameraOrbitTurntable::SetCenter ( HPoint  center  )  [inline]

Sets the center of rotation for the horizontal and vertical rotation

Parameters:
center Center Point

void HOpCameraOrbitTurntable::SetLightFollowsCamera ( bool  follow  )  [inline]

SetLightFollowsCamera sets the lights to follow the camera or to stay in one place during orbit. This has the effect of either lighting the scene during orbit or allowing the camera to move through shadow. The default is off.

Parameters:
follow Pass true to have the light follow the camera.

void HOpCameraOrbitTurntable::UnSetCenter (  )  [inline]

Indicates if center of rotation is set externally. If not set center of rotation will be calculated based on scene bounding box


The documentation for this class was generated from the following file: