The HOpCameraRelativeOrbit class provides interactive orbiting of the camera around elements in the scene. More...
#include <HOpCameraRelativeOrbit.h>
Public Member Functions | |
virtual HBaseOperator * | Clone () |
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) |
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:
More Detailed Description: see event methods.
HOpCameraRelativeOrbit::HOpCameraRelativeOrbit | ( | HBaseView * | view, |
int | doRepeat = 0 , |
||
int | doCapture = 1 |
||
) |
Constructs an HOpCameraRelativeOrbit object.
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 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.
Reimplemented from HOpCameraOrbit.
HPoint HOpCameraRelativeOrbit::GetCenter | ( | ) |
Get center point for camera rotation
virtual const char* HOpCameraRelativeOrbit::GetName | ( | ) | [virtual] |
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.
hevent | An HEventInfo object containing information about the current 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.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HOpCameraOrbit.
void HOpCameraRelativeOrbit::SetCenter | ( | HPoint | center | ) |
Sets the center point for camera rotation.
c | The center point for the camera rotation. |