HOpCameraRelativeOrbit
Functions
HOpCameraRelativeOrbit |
|
~HOpCameraRelativeOrbit |
|
char const * | GetName |
int | OnLButtonDown |
int | OnLButtonDownAndMove |
HBaseOperator * | Clone |
void | SetCenter |
HPoint | GetCenter |
Detailed Description
-
class
HOpCameraRelativeOrbit
: public HOpCameraOrbit 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:
- Left Button Down: The orbit is initiated.
- Left Button Down and Drag: The camera orbits around a point.
- Left Button Up: The operation ends.
Public Functions
-
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
()
-
virtual char const *
GetName
() Returns: A pointer to a character string denoting the name of the operator which is ‘HOpCameraRelativeOrbit’.
-
virtual int
OnLButtonDown
(HEventInfo &hevent) 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
OnLButtonDownAndMove
(HEventInfo &hevent) 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 *
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 HOpCameraRelativeOrbit object.