#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 |
CameraComponentInstance & | getCameraComponent () |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
![]() | |
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 bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
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 |
|
overridevirtual |
Initialize this ComponentInstance
Reimplemented from ComponentInstance.