The HOpCameraOrbitTurntable class orbits the camera around a predefined vertical and horizontal axis.
More...
#include <HOpCameraOrbitTurntable.h>
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:
-
Left Button Down: The orbit is initiated.
-
Left Button Down and Drag: The camera orbits.
-
Left Button Up: The operation ends.
More Detailed Description: see event methods
◆ HOpCameraOrbitTurntable()
HOpCameraOrbitTurntable::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. |
◆ 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.
Reimplemented from HBaseOperator.
◆ GetLightFollowsCamera()
bool HOpCameraOrbitTurntable::GetLightFollowsCamera |
( |
| ) |
|
|
inline |
- Returns
- True if the light follows the camera or false if it doesn't.
◆ GetName()
virtual const char* HOpCameraOrbitTurntable::GetName |
( |
| ) |
|
|
virtual |
◆ OnLButtonDown()
virtual int HOpCameraOrbitTurntable::OnLButtonDown |
( |
HEventInfo & |
hevent | ) |
|
|
virtual |
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.
Reimplemented from HBaseOperator.
◆ OnLButtonDownAndMove()
virtual int HOpCameraOrbitTurntable::OnLButtonDownAndMove |
( |
HEventInfo & |
hevent | ) |
|
|
virtual |
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.
Reimplemented from HBaseOperator.
◆ OnLButtonUp()
virtual int HOpCameraOrbitTurntable::OnLButtonUp |
( |
HEventInfo & |
hevent | ) |
|
|
virtual |
OnLButtonUp Clean up.
- Parameters
-
hevent | An HEventInfo object containing information about the current event. |
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented from HBaseOperator.
◆ OnMouseWheel()
virtual int HOpCameraOrbitTurntable::OnMouseWheel |
( |
HEventInfo & |
hevent | ) |
|
|
virtual |
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.
Reimplemented from HBaseOperator.
◆ RotateAroundAxis()
void HOpCameraOrbitTurntable::RotateAroundAxis |
( |
HPoint |
axis, |
|
|
float |
rf |
|
) |
| |
|
protected |
Rotates camera around given axis
- Parameters
-
axis | Axis to rotate around |
rf | Angle of rotation |
◆ SetCenter()
void HOpCameraOrbitTurntable::SetCenter |
( |
HPoint |
center | ) |
|
|
inline |
Sets the center of rotation for the horizontal and vertical rotation
- Parameters
-
◆ SetLightFollowsCamera()
void HOpCameraOrbitTurntable::SetLightFollowsCamera |
( |
bool |
follow | ) |
|
|
inline |
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. |
◆ UnSetCenter()
void HOpCameraOrbitTurntable::UnSetCenter |
( |
| ) |
|
|
inline |
Indicates if center of rotation is set externally. If not set center of rotation will be calculated based on scene bounding box
The documentation for this class was generated from the following file: