HOpCameraOrbitTurntable

Functions

HOpCameraOrbitTurntable

~HOpCameraOrbitTurntable

char const *

GetName

int

OnLButtonDown

int

OnLButtonDownAndMove

int

OnLButtonUp

int

OnMouseWheel

void

SetLightFollowsCamera

bool

GetLightFollowsCamera

void

SetCenter

void

UnSetCenter

HBaseOperator *

Clone

Detailed Description

class HOpCameraOrbitTurntable : public HBaseOperator

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

Public Functions

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.

virtual ~HOpCameraOrbitTurntable()
virtual char const *GetName()
Returns

A pointer to a character string denoting the name of the operator which is ‘HOpCameraOrbitTurntable’.

virtual int OnLButtonDown(HEventInfo &hevent)

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.

virtual int OnLButtonDownAndMove(HEventInfo &hevent)

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.

virtual int OnLButtonUp(HEventInfo &hevent)

OnLButtonUp Clean up.

Parameters

hevent – An HEventInfo object containing information about the current event.

Returns

An HOperatorReturn indicating the status of the event.

virtual int OnMouseWheel(HEventInfo &hevent)

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.

inline void SetLightFollowsCamera(bool follow)

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.

inline bool GetLightFollowsCamera()
Returns

True if the light follows the camera or false if it doesn’t.

inline void SetCenter(HPoint center)

Sets the center of rotation for the horizontal and vertical rotation

Parameters

center – Center Point

inline void UnSetCenter()

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

virtual HBaseOperator *Clone()

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.