Ocular Engine
Ocular::Editor::EditorCameraController Class Reference

#include <EditorCameraController.hpp>

Inheritance diagram for Ocular::Editor::EditorCameraController:
Ocular::Core::ARoutine Ocular::Core::Object Ocular::Core::AEventListener Ocular::Core::ObjectIO Ocular::Core::Exposable Ocular::Core::Buildable

Public Member Functions

virtual void onUpdate (float const delta) override
virtual bool onEvent (std::shared_ptr< Core::AEvent > event) override
void setLookSensitivity (float sensitivity)
float getLookSensitivity () const
void setPanSensitivity (float sensitivity)
float getPanSensitivity () const
void setZoomSensitivity (float sensitivity)
float getZoomSensitivity () const
- Public Member Functions inherited from Ocular::Core::ARoutine
 ARoutine (std::string const &name, std::string const &type)
bool operator< (ARoutine const &rhs)
bool operator> (ARoutine const &rhs)
virtual void onSceneStart ()
virtual void onSceneEnd ()
virtual void onCreation ()
virtual void onDestruction ()
virtual void onPause ()
virtual void onUnpause ()
virtual float onTimedUpdate ()
virtual void onPreRender ()
virtual void onPostRender ()
virtual bool onEvent (std::shared_ptr< AEvent > event)
Priority getPriorityLevel () const
SceneObjectgetParent () const
std::string const & getName () const
- Public Member Functions inherited from Ocular::Core::Object
 Object (std::string name, std::string className)
 Creates a new Object with the specified name and class. More...
 Object (std::string name)
 Creates a new Object with the specified name. More...
 Object ()
 Creates a new Object with the default name ('Name').
std::string const & getName () const
void setName (std::string name)
 Sets the name of the Object. More...
std::string const & getClass () const
void setUUID (std::string const &uuid)
UUID const & getUUID () const
int64_t getCreationTime () const
virtual std::string toString () const
template<class T >
bool isType ()
- Public Member Functions inherited from Ocular::Core::ObjectIO
virtual void onLoad (BuilderNode const *node) override
virtual void onSave (BuilderNode *node) const override
- Public Member Functions inherited from Ocular::Core::Exposable
void getAllExposedNames (std::vector< std::string > &names) const
bool getVariable (std::string const &name, ExposedVariable &var)
template<typename T >
bool getVariableValue (std::string const &name, T &var)
template<typename T >
bool setVariableValue (std::string const &name, T const &value)
virtual void onVariableModified (std::string const &varName)

Protected Member Functions

void updateFocusMove (float const delta)
void updateCameraMode ()
void handleEventMouseScroll (Core::MouseScrollInputEvent *event)
void handleEventObjectFocused (SceneObjectFocusedEvent *event)
void handleMouseMovement ()
void handleMousePan ()
void handleMouseDrag ()
void handleMouseLook ()
void handleMouseOrbit ()
- Protected Member Functions inherited from Ocular::Core::ARoutine
virtual void setParent (SceneObject *object)
void setName (std::string const &name)
- Protected Member Functions inherited from Ocular::Core::Exposable
void exposeVariable (std::string const &name, std::string const &type, bool isPointer, bool isExposed, void *data)

Additional Inherited Members

- Protected Attributes inherited from Ocular::Core::ARoutine
Priority m_Priority
 Priority level of this Routine in the Routine Queue.
 The SceneObject instance that this routine is attached to.
- Protected Attributes inherited from Ocular::Core::Object
std::string m_Name
std::string m_Class
const int64_t m_CreationTime
- Protected Attributes inherited from Ocular::Core::Exposable
std::unordered_map< std::string, ExposedVariablem_ExposedVariables

Detailed Description

Supports a variety of camera controls:

- Looking around via right-mouse button + mouse movement
- Panning via middle-mouse button + mouse movement
- Orbiting via alt + left-mouse button + mouse movement
- Zooming via scroll wheel
- Focusing via SceneObjectFocusedEvent

Member Function Documentation

void Ocular::Editor::EditorCameraController::onUpdate ( float const  delta)

Called once per frame. Generally, Routines are updated in the order they are traversed in a Scene.

If a special circumstance requires that a Routine's update is called before or after other Routines, then the priority level can be adjusted.

[in]deltaCurrent delta time (time in seconds that the last frame took to complete).

Reimplemented from Ocular::Core::ARoutine.

The documentation for this class was generated from the following files: