|
Public Types |
enum | UpdateMode { UpdateNone,
UpdateRotation,
UpdatePan,
UpdateDistance
} |
enum | Orientation { Y_UP,
Z_UP
} |
enum | TransformOrder { RotateTranslate,
TranslateRotate
} |
enum | RotationalMode { FixedAxis,
Spherical
} |
enum | ThrowMode {
ThrowNone,
ThrowRotation,
ThrowPan,
ThrowPanRotation,
ThrowDistance,
ThrowRotationDistance,
ThrowPanDistance,
ThrowRotationPanDistance
} |
enum | OperationalMode { DefaultOperationalMode,
InventorLike,
PerformerLike
} |
Public Member Functions |
| Trackball (void) |
void | mapButtonState (unsigned int state, UpdateMode mode) |
UpdateMode | getMappedButtonState (unsigned int state) const |
void | setOrientation (Orientation mode) |
Orientation | getOrientation () const |
void | setComputeOrientation (bool flag) |
bool | getComputeOrientation () |
void | setTransformOrder (TransformOrder mode) |
TransformOrder | getTransformOrder () const |
void | setRotationalMode (RotationalMode mode) |
RotationalMode | getRotationalMode () const |
void | setThrowMode (ThrowMode throw_mode) |
ThrowMode | getThrowMode () const |
void | addThrowMode (ThrowMode throw_mode) |
void | removeThrowMode (ThrowMode throw_mode) |
void | setThrowThreshold (float threshold) |
void | setOperationalMode (OperationalMode) |
OperationalMode | getOperationalMode () const |
void | setAutoScale (bool flag) |
bool | getAutoScale (void) const |
void | setScale (float scale) |
float | getScale (void) const |
void | setMinimumScale (float minScale) |
float | getMinimumScale (float minScale) |
void | setRotScale (float scale) |
float | getRotScale (void) const |
void | setPanFOV (float panFov) |
float | getPanFOV (void) const |
void | setReference (void) |
void | setMinimumDistance (float dist) |
void | setDistance (float dist, bool do_update=true) |
void | resetDistance (bool do_update=true) |
float | getDistance () const |
bool | distanceHasChanged () const |
void | setTranslation (const Matrix tmat) |
const Matrix & | getTranslation () const |
void | setRotation (const Matrix rmat) |
const Matrix & | getRotation () const |
void | setScaleMatrix (const Matrix smat) |
const Matrix & | getScaleMatrix (void) const |
void | setMatrix (const Matrix mat) |
void | translate (float x, float y, float z, bool do_update=true) |
void | rotate (float rad, float x, float y, float z, bool do_update=true) |
void | scale (float sx, float sy, float sz, bool do_update=true) |
virtual void | input (float mx, float my, unsigned int mbutton, bool do_update=true) |
void | update (void) |
void | restart (float mx, float my) |
void | reset (bool do_update=true) |
void | enableRotation () |
void | disableRotation () |
bool | isRotationEnabled () |
void | enablePanning () |
void | disablePanning () |
bool | isPanningEnabled () |
void | enableDistancing () |
void | disableDistancing () |
bool | isDistancingEnabled () |
void | enableAllTransforms () |
Matrix & | getMatrix (void) |
const Matrix & | getMatrix (void) const |
Protected Member Functions |
| ~Trackball (void) |
void | updateScale () |
Protected Attributes |
Matrix | S |
Matrix | O |
Matrix | R |
Matrix | Rr |
Matrix | T |
Matrix | Tr |
Matrix | TX |
float | _distance |
float | _min_distance |
bool | _min_distance_is_set |
float | _lastx |
float | _lasty |
float | _dx |
float | _dy |
float | _distance_ref |
Orientation | _orientation |
unsigned int | _mbutton |
bool | _auto_scale |
bool | _minimum_scale_is_set |
float | _minimum_scale |
float | _scale |
float | _rscale |
float | _pan_fov |
UpdateMode | _update_mode |
std::map< unsigned int, UpdateMode > | _buttonMap |
ThrowMode | _throw_mode |
float | _throwThreshold |
TransformOrder | _transform_order |
RotationalMode | _rotational_mode |
OperationalMode | _operational_mode |
bool | _distance_has_changed |
bool | _rotation |
bool | _panning |
bool | _distancing |
bool | _computeOrientation |