Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HOpCameraRelativeOrbit Class Reference

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

#include <HOpCameraRelativeOrbit.h>

Inheritance diagram for HOpCameraRelativeOrbit:

HOpCameraOrbit HBaseOperator

List of all members.

Public Member Functions

virtual HBaseOperatorClone ()
HPoint GetCenter ()
virtual const char * GetName ()
 HOpCameraRelativeOrbit (HBaseView *view, int doRepeat=0, int doCapture=1)
virtual int OnLButtonDown (HEventInfo &hevent)
virtual int OnLButtonDownAndMove (HEventInfo &hevent)
void SetCenter (HPoint center)


Detailed Description

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.

Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Reimplemented from HOpCameraOrbit.

HPoint HOpCameraRelativeOrbit::GetCenter (  ) 

Get center point for camera rotation

Returns:
The center point for the camera rotation.

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

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

Reimplemented from HOpCameraOrbit.

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.

Reimplemented from HOpCameraOrbit.

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.

Reimplemented from HOpCameraOrbit.

void HOpCameraRelativeOrbit::SetCenter ( HPoint  center  ) 

Sets the center point for camera rotation.

Parameters:
c The center point for the camera rotation.


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