
Public Member Functions | |
| void | SetRadius (float fRadius) |
| float | GetRadius () const |
| void | SetRotateButton (int button, int modifier=0, bool bExact=true) |
| void | SetZoomButton (int button, int modifier=0, bool bExact=true) |
| void | SetTranslateButton (int button, int modifier=0, bool bExact=true) |
| void | SetZoomScale (float s) |
| void | SetRotScale (float s) |
| void | SetTransScale (float s) |
| void | SetDirection (float fTheta, float fPhi) |
| void | MoveDirection (float fTheta, float fPhi) |
| void | OnMouse (vtMouseEvent &event) |
| Virtual handler, to catch mouse events, can be overridden by your engine class. | |
| void | Eval () |
You can set which combinations of mouse buttons and modifier keys will rotate, zoom and translate the target. The default is:
| void vtTrackball::Eval | ( | ) | [virtual] |
Virtual handler, will be called every frame to do the work of the engine. You must override this if you want your engine to be useful.
Reimplemented from vtEngine.
| float vtTrackball::GetRadius | ( | ) | const |
Get the radius, the distance from the pivot point that the Trackball rotates around.
| void vtTrackball::MoveDirection | ( | float | fTheta, | |
| float | fPhi | |||
| ) |
Shift the direction the trackball is facing, by a given offset.
| fTheta,fPhi | Polar coordinates for the target relative to the pivot point. |
| void vtTrackball::SetDirection | ( | float | fTheta, | |
| float | fPhi | |||
| ) |
Set the direction the trackball is facing.
| fTheta,fPhi | Polar coordinates for the target relative to the pivot point. |
| void vtTrackball::SetRadius | ( | float | fRadius | ) |
Set the radius, the distance from the pivot point that the Trackball rotates around.
| void vtTrackball::SetRotateButton | ( | int | button, | |
| int | modifier = 0, |
|||
| bool | bExact = true | |||
| ) |
Set the buttons and modifier keys that will cause the Trackball to rotate.
| button | The button state (VT_LEFT, VT_RIGHT, and/or VT_MIDDLE) | |
| modifier | The modifier state (VT_SHIFT, VT_CONTROL, and/or VT_ALT) | |
| bExact | If true, then exactly this button must occur. Otherwise, any button state that includes this state will suffice. |
| void vtTrackball::SetRotScale | ( | float | s | ) |
Set the scale factor for rotation, which controls how fast the Trackball will spin its target.
| void vtTrackball::SetTranslateButton | ( | int | button, | |
| int | modifier = 0, |
|||
| bool | bExact = true | |||
| ) |
Set the buttons and modifier keys that will cause the Trackball to translate.
| button | The button state (VT_LEFT, VT_RIGHT, and/or VT_MIDDLE) | |
| modifier | The modifier state (VT_SHIFT, VT_CONTROL, and/or VT_ALT) | |
| bExact | If true, then exactly this button must occur. Otherwise, any button state that includes this state will suffice. |
| void vtTrackball::SetTransScale | ( | float | s | ) |
Set the scale factor for translation, which controls how fast the Trackball will translate its target.
| void vtTrackball::SetZoomButton | ( | int | button, | |
| int | modifier = 0, |
|||
| bool | bExact = true | |||
| ) |
Set the buttons and modifier keys that will cause the Trackball to zoom.
| button | The button state (VT_LEFT, VT_RIGHT, and/or VT_MIDDLE) | |
| modifier | The modifier state (VT_SHIFT, VT_CONTROL, and/or VT_ALT) | |
| bExact | If true, then exactly this button must occur. Otherwise, any button state that includes this state will suffice. |
| void vtTrackball::SetZoomScale | ( | float | s | ) |
Set the scale factor for zoom, which controls how fast the Trackball will zoom in/out.
1.5.7.1