#include <orbitcontroller.h>
Public Member Functions | |
| OrbitControllerInstance (EntityInstance &entity, Component &resource) | |
| virtual bool | init (utility::ErrorState &errorState) override |
| void | enable (const glm::vec3 &cameraPos, const glm::vec3 &lookAtPos) |
| void | enable (const glm::vec3 &lookAtPos) |
| void | disable () |
| const glm::vec3 | getLookAtPos () const |
| float | getMovementSpeed () const |
| void | setMovementSpeed (float speed) |
| float | getRotateSpeed () const |
| void | setRotateSpeed (float speed) |
| CameraComponentInstance & | getCameraComponent () |
Public Member Functions inherited from ComponentInstance | |
| ComponentInstance (EntityInstance &entity, Component &resource) | |
| virtual void | update (double deltaTime) |
| nap::EntityInstance * | getEntityInstance () const |
| nap::Component * | getComponent () const |
| template<typename T > | |
| T * | getComponent () const |
| virtual bool | init (utility::ErrorState &errorState) |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Instance part of the orbit controller. The controller is a perspective camera controller that rotates the camera around a target point. Left mouse button to rotate, right mouse button to zoom in and out on the target. Requires a nap::PointerInputComponent and nap::TransformComponent to be present on the same entity.
| OrbitControllerInstance | ( | EntityInstance & | entity, |
| Component & | resource | ||
| ) |
| void disable | ( | ) |
Disable responding to input for this controller.
| void enable | ( | const glm::vec3 & | cameraPos, |
| const glm::vec3 & | lookAtPos | ||
| ) |
Enable responding to input for this controller. Set translate and look-at position.
| cameraPos | Worldspace camera position to set. |
| lookAtPos | Worldspace position to target. |
| void enable | ( | const glm::vec3 & | lookAtPos | ) |
Enable this controller using the given look-at position.
| lookAtPos | position to look at. |
| CameraComponentInstance& getCameraComponent | ( | ) |
| const glm::vec3 getLookAtPos | ( | ) | const |
| float getMovementSpeed | ( | ) | const |
| float getRotateSpeed | ( | ) | const |
|
overridevirtual |
Initialize this ComponentInstance
Reimplemented from ComponentInstance.
| void setMovementSpeed | ( | float | speed | ) |
Set the camera movement speed
| relative | movement speed |
| void setRotateSpeed | ( | float | speed | ) |
Set the camera rotation speed
| relative | rotation speed |