35 constexpr
float DEFAULT_MOTION_SPEED = 0.03f;
36 constexpr
float DEFAULT_ROTATION_SPEED = 0.006f;
41 , _keyboardHandler(keyboardHandler)
42 , _motionSpeed{DEFAULT_ROTATION_SPEED}
43 , _rotationSpeed{DEFAULT_ROTATION_SPEED}
49 const auto size = boundingBox.
isEmpty() ? 1 : glm::compMax(boundingBox.
getSize());
51 auto target = position;
61 CORE_INFO(
"World bounding box: " << boundingBox);
88 const auto translation = glm::rotate(orientation,
vector);
100 const Quaterniond deltaU = glm::angleAxis(-du, axisY);
101 const Quaterniond deltaV = glm::angleAxis(-dv, axisX);
float getWheelSpeed() const
void updateMotionSpeed(float speed)
AbstractManipulator(Camera &camera, KeyboardHandler &keyboardHandler)
void rotate(const Vector3d &pivot, double du, double dv, AxisMode axisMode)
virtual void adjust(const Boxd &boundingBox)
float getMotionSpeed() const
float getRotationSpeed() const
void translate(const Vector3d &v)
The Camera class is an abstract interface for a camera in a 3D graphics application....
PLATFORM_API void setInitialState(const Vector3d &position, const Quaterniond &orientation, const Vector3d &target=Vector3d(0.0, 0.0, 0.0))
Sets the initial state of the camera.
PLATFORM_API void setTarget(const Vector3d &target)
Sets the camera target.
PLATFORM_API void setPosition(const Vector3d &position)
Sets the camera position.
PLATFORM_API const Vector3d & getPosition() const
Gets the camera position.
PLATFORM_API const Quaterniond & getOrientation() const
Gets the camera orientation quaternion.
PLATFORM_API void setOrientation(Quaterniond orientation)
Sets the camera orientation quaternion.
The KeyboardHandler class manages keyboard shortcuts and special keys.
glm::vec< 3, double > Vector3d
glm::tquat< double, glm::highp > Quaterniond
Double quaternion.