NAP
Public Member Functions | Public Attributes | List of all members
OrbitController Class Reference

#include <orbitcontroller.h>

Public Member Functions

virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const override
 
- Public Member Functions inherited from Component
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

float mMovementSpeed = 0.5f
 Property: "MovementSpeed" The speed with which to move. More...
 
float mRotateSpeed = 0.005f
 Property: "RotateSpeed" The speed with which to rotate. More...
 
float mMinZoomDistance = 0.5f
 Property: "MinimumZoomDistance" Limits the camera from moving too close to the lookat position, to use 'LimitZoomDistance' must be enabled. More...
 
bool mLimitZoomDistance = false
 Property: "LimitZoomDistance" Whether to limit the camera from moving past the lookat position. More...
 
glm::vec3 mLookAtPos
 Property: "LookAtPosition" The world space position to look at. More...
 
ComponentPtr< PerspCameraComponentmPerspCameraComponent
 Property: "PerspCameraComponent" Link to perspective camera that we are controlling. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Resource 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.

Inheritance diagram for OrbitController:
[legend]
Collaboration diagram for OrbitController:
[legend]

Member Function Documentation

◆ getDependentComponents()

virtual void getDependentComponents ( std::vector< rtti::TypeInfo > &  components) const
overridevirtual

Get the types of components on which this component depends

Reimplemented from Component.

Member Data Documentation

◆ mLimitZoomDistance

bool mLimitZoomDistance = false

Property: "LimitZoomDistance" Whether to limit the camera from moving past the lookat position.

◆ mLookAtPos

glm::vec3 mLookAtPos

Property: "LookAtPosition" The world space position to look at.

◆ mMinZoomDistance

float mMinZoomDistance = 0.5f

Property: "MinimumZoomDistance" Limits the camera from moving too close to the lookat position, to use 'LimitZoomDistance' must be enabled.

◆ mMovementSpeed

float mMovementSpeed = 0.5f

Property: "MovementSpeed" The speed with which to move.

◆ mPerspCameraComponent

ComponentPtr<PerspCameraComponent> mPerspCameraComponent

Property: "PerspCameraComponent" Link to perspective camera that we are controlling.

◆ mRotateSpeed

float mRotateSpeed = 0.005f

Property: "RotateSpeed" The speed with which to rotate.