Visual Computing Library
|
Public Types | |
using | ScalarType = Scalar |
using | MatrixType = vcl::Matrix44< Scalar > |
using | TrackBallType = vcl::TrackBall< Scalar > |
Public Member Functions | |
DesktopTrackBall (uint width=1024, uint height=768) | |
bool | isDragging () const |
MotionType | currentMotion () const |
DirectionalLight< Scalar > | light () const |
const Camera< Scalar > & | camera () const |
Matrix44< Scalar > | viewMatrix () const |
Matrix44< Scalar > | lightGizmoMatrix () const |
Matrix44< Scalar > | gizmoMatrix () const |
Matrix44< Scalar > | projectionMatrix () const |
void | resetTrackBall () |
void | setTrackBall (const Point3< Scalar > ¢er, Scalar radius) |
void | focus (const Point3< Scalar > ¢er) |
void | resizeViewer (uint w, uint h) |
void | setKeyModifiers (KeyModifiers keys) |
void | moveMouse (int x, int y) |
void | pressMouse (MouseButton::Enum button) |
void | releaseMouse (MouseButton::Enum button) |
void | scroll (Scalar pixelDeltaX, Scalar pixelDeltaY) |
void | keyPress (Key::Enum key) |
void | keyRelease (Key::Enum key) |
Static Public Attributes | |
static const Point3< Scalar > | UNIT_X = {1, 0, 0} |
static const Point3< Scalar > | UNIT_Y = {0, 1, 0} |
Private Types | |
using | MotionType = vcl::TrackBall< Scalar >::MotionType |
using | Axis = unsigned char |
Static Private Member Functions | |
static void | rotate (TrackBallType &t, const Point3< Scalar > &axis, Scalar angle=M_PI/6) |
static void | rotateLight (TrackBallType &t, const Point3< Scalar > &axis, Scalar angle=M_PI/6) |
static void | translate (TrackBallType &t, const Point3< Scalar > &translation) |
Private Attributes | |
uint | mWidth = 1024 |
uint | mHeight = 768 |
vcl::TrackBall< Scalar > | mTrackball |
Point3< Scalar > | mDefaultTrackBallCenter |
float | mDefaultTrackBallRadius = 1.0 |
KeyModifiers | mCurrentKeyModifiers = {KeyModifier::NO_MODIFIER} |
MouseButton::Enum | mCurrentMouseButton = MouseButton::NO_BUTTON |
std::map< std::pair< MouseButton::Enum, KeyModifiers >, MotionType > | mDragMotionMap |
std::map< std::pair< KeyModifiers, Axis >, MotionType > | mScrollAtomicMap |
std::map< std::pair< Key::Enum, KeyModifiers >, std::function< void(TrackBallType &t)> > | mKeyAtomicMap |
Static Private Attributes | |
static constexpr double | DISCRETE_TRANSLATION_STEP = 0.1 |
static constexpr double | DISCRETE_ROTATION_STEP = M_PI_4 / 3.0 |
|
private |
|
private |