Public Member Functions | List of all members
OrthoControllerInstance Class Reference

#include <orthocontroller.h>

Public Member Functions

 OrthoControllerInstance (EntityInstance &entity, Component &resource)
virtual bool init (utility::ErrorState &errorState) override
void enable (const glm::vec3 &cameraPos, const glm::quat &cameraRotate)
void disable ()
CameraComponentInstancegetCameraComponent ()
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
virtual void update (double deltaTime)
nap::EntityInstancegetEntityInstance () const
nap::ComponentgetComponent () const
template<typename T >
T * getComponent () const
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (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 orthographic controller. Adds Orthographic camera control to the entity it is attached to. It uses the TransformComponent to move the entity and the InputComponent to receive input. These components are required to be present on the same entity. Hold left mouse button to pan, right mouse button to zoom.

Inheritance diagram for OrthoControllerInstance:
Collaboration diagram for OrthoControllerInstance:

Constructor & Destructor Documentation

◆ OrthoControllerInstance()

OrthoControllerInstance ( EntityInstance entity,
Component resource 

Member Function Documentation

◆ disable()

void disable ( )

Disables controlling of the camera.

◆ enable()

void enable ( const glm::vec3 &  cameraPos,
const glm::quat &  cameraRotate 

Enables orthographic control based on the given camera position and rotation values.

cameraPosCamera translation to set.
cameraRotateCamera rotation to set.

◆ getCameraComponent()

CameraComponentInstance& getCameraComponent ( )
The orthographic camera component that we're controlling.

◆ init()

virtual bool init ( utility::ErrorState errorState)

Initialize this ComponentInstance

Reimplemented from ComponentInstance.