#include <HOpCameraOrbitTurntable.h>
Public Member Functions | |
virtual HBaseOperator * | Clone () |
bool | GetLightFollowsCamera () |
virtual const char * | GetName () |
HOpCameraOrbitTurntable (HBaseView *view, int DoRepeat=0, int DoCapture=1) | |
virtual int | OnLButtonDown (HEventInfo &hevent) |
virtual int | OnLButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnLButtonUp (HEventInfo &hevent) |
virtual int | OnMouseWheel (HEventInfo &hevent) |
void | SetCenter (HPoint center) |
void | SetLightFollowsCamera (bool follow) |
void | UnSetCenter () |
Protected Member Functions | |
void | RotateAroundAxis (HPoint axis, float rf) |
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:
HOpCameraOrbitTurntable::HOpCameraOrbitTurntable | ( | HBaseView * | view, | |
int | DoRepeat = 0 , |
|||
int | DoCapture = 1 | |||
) |
Constructs an HOpCameraOrbitTurntable 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* HOpCameraOrbitTurntable::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 HBaseOperator.
bool HOpCameraOrbitTurntable::GetLightFollowsCamera | ( | ) | [inline] |
virtual const char* HOpCameraOrbitTurntable::GetName | ( | ) | [virtual] |
Reimplemented from HBaseOperator.
virtual int HOpCameraOrbitTurntable::OnLButtonDown | ( | HEventInfo & | hevent | ) | [virtual] |
OnLButtonDown records the initial mouse position.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
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.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
virtual int HOpCameraOrbitTurntable::OnLButtonUp | ( | HEventInfo & | hevent | ) | [virtual] |
OnLButtonUp Clean up.
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
virtual int HOpCameraOrbitTurntable::OnMouseWheel | ( | HEventInfo & | hevent | ) | [virtual] |
OnMouseWheel OnMouseWheel performs rotation around the horizontal view axis
hevent | An HEventInfo object containing information about the current event. |
Reimplemented from HBaseOperator.
void HOpCameraOrbitTurntable::RotateAroundAxis | ( | HPoint | axis, | |
float | rf | |||
) | [protected] |
Rotates camera around given axis
axis | Axis to rotate around | |
rf | Angle of rotation |
void HOpCameraOrbitTurntable::SetCenter | ( | HPoint | center | ) | [inline] |
Sets the center of rotation for the horizontal and vertical rotation
center | Center Point |
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.
follow | Pass true to have the light follow the camera. |
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