HOpCameraRelativeOrbit

class HOpCameraRelativeOrbit

The HOpCameraRelativeOrbit class provides interactive orbiting of the camera around elements in the scene.

HOpCameraRelativeOrbit implements three mouse event methods defined on the base class and maps the event information to the HOOPS routine #HC_Orbit_Camera. This operation consists of the following steps:

  1. Left Button Down: The orbit is initiated.
  2. Left Button Down and Drag: The camera orbits around a point.
  3. Left Button Up: The operation ends.

More Detailed Description: see event methods.

Inherits from: HOpCameraOrbit

Enumerations

Methods

HOpCameraRelativeOrbit::HOpCameraRelativeOrbit(HBaseView *view, int doRepeat = 0, int doCapture = 1)

Constructs an HOpCameraRelativeOrbit 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 HOpCameraRelativeOrbit::~HOpCameraRelativeOrbit()

virtual

virtual char const *HOpCameraRelativeOrbit::GetName()

virtual

Returns

A pointer to a character string denoting the name of the operator which is ‘HOpCameraRelativeOrbit‘.
virtual int HOpCameraRelativeOrbit::OnLButtonDown(HEventInfo &hevent)

virtual

OnLButtonDown draws a bounding box around the scene, records the mouse position, and maps the mouse position to spherical coordinates around the clicked object.

Parameters

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

Returns

An HOperatorReturn indicating the status of the event.
virtual int HOpCameraRelativeOrbit::OnLButtonDownAndMove(HEventInfo &hevent)

virtual

OnLButtonDownAndMove records points as the mouse is moved, maps the points to spherical coordinates, and calculates the appropriate values for #HC_Orbit_Camera and #HC_Roll_Camera. It also updates the position of the default light, depending on whether you have set the light to follow the camera.

Parameters

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

Returns

An HOperatorReturn indicating the status of the event.
virtual HBaseOperator *HOpCameraRelativeOrbit::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 HOpCameraRelativeOrbit object.
void HOpCameraRelativeOrbit::SetCenter(HPoint center)

Sets the center point for camera rotation.

Parameters

c: The center point for the camera rotation.
HPoint HOpCameraRelativeOrbit::GetCenter()

Get center point for camera rotation

Returns

The center point for the camera rotation.

Variables

HPoint HOpCameraRelativeOrbit::fauxTarget

private

TargetType HOpCameraRelativeOrbit::targetType

private

TargetType