|
template<class Transformation > |
| ArcBallCamera (SceneGraph::Scene< Transformation > &scene, const Vector3 &cameraPosition, const Vector3 &viewCenter, const Vector3 &upDir, Deg fov, const Vector2i &windowSize, const Vector2i &viewportSize) |
| Creates a new arc ball camera.
|
|
void | reshape (const Vector2i &windowSize, const Vector2i &viewportSize) |
| Update screen and viewport size after the window has been resized.
|
|
bool | update () |
| Update the SceneGraph camera if arc ball has been changed.
|
|
void | draw (SceneGraph::DrawableGroup3D &drawables) |
| Draw objects using the internal scene graph camera.
|
|
SceneGraph::Camera3D & | camera () const |
| Accessor to the raw camera object.
|
|
| ArcBall (const Vector3 &cameraPosition, const Vector3 &viewCenter, const Vector3 &upDir, Deg fov, const Vector2i &windowSize) |
| Constructs a new instance.
|
|
void | setViewParameters (const Vector3 &eye, const Vector3 &viewCenter, const Vector3 &upDir) |
| Set the camera view parameters: eye position, view center, up direction.
|
|
void | reset () |
| Reset the camera to its initial position, view center, and up dir.
|
|
void | reshape (const Vector2i &windowSize) |
| Update screen size after the window has been resized.
|
|
bool | updateTransformation () |
| Update any unfinished transformation due to lagging.
|
|
Float | lagging () const |
| Get the amount of lagging such that the camera will (slowly) smoothly navigate.
|
|
void | setLagging (Float lagging) |
| Set the amount of lagging such that the camera will (slowly) smoothly navigate. Lagging must be in [0, 1).
|
|
void | initTransformation (const Vector2i &mousePos) |
| Initialize the first (screen) mouse position for camera transformation. This should be called from the mouse pressed event.
|
|
void | rotate (const Vector2i &mousePos) |
| Rotate the camera from the previous (screen) mouse position to the current(screen) position.
|
|
void | translate (const Vector2i &mousePos) |
| Translate the camera from the previous (screen) mouse position to the current(screen) mouse position.
|
|
void | translateDelta (const Vector2 &translationNDC) |
| Translate the camera by the delta amount of (NDC) mouse position. Note that NDC position must be in[-1, -1] to[1, 1].
|
|
void | zoom (Float delta) |
| Zoom the camera.
|
|
Deg | fov () const |
| Field of view.
|
|
const DualQuaternion & | view () const |
| Get the camera's view transformation as a dual quaternion.
|
|
Matrix4 | viewMatrix () const |
| Get the camera's view transformation as a matrix.
|
|
Matrix4 | inverseViewMatrix () const |
| Get the camera's inverse view matrix (which also produces transformation of the camera)
|
|
const DualQuaternion & | transformation () const |
| Get the camera's transformation as a dual quaternion.
|
|
Matrix4 | transformationMatrix () const |
| Get the camera's transformation matrix.
|
|
Float | viewDistance () const |
| Return the distance from the camera position to the center view.
|
|
Arcball camera implementation integrated into the SceneGraph.