cangine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cangine::Camera Class Reference

Game object representing the scene camera. More...

#include <camera_object.hpp>

Inheritance diagram for cangine::Camera:
Inheritance graph
[legend]
Collaboration diagram for cangine::Camera:
Collaboration graph
[legend]

Public Member Functions

 Camera ()
 Constructs a camera with its camera/transform components.
 
- Public Member Functions inherited from cangine::GameObject
 GameObject ()
 
virtual ~GameObject ()
 
virtual void onUpdate (double deltaTime)
 Per-frame update hook.
 
virtual void onMouseEvent (const MouseEvent *e)
 Mouse event hook.
 
virtual void onDisable ()
 Called when the object becomes inactive.
 
virtual void onEnable ()
 Called when the object becomes active.
 
void destroy ()
 Marks the object for destruction by the ObjectManager.
 
template<typename T >
void appendComponent (T *component)
 Attaches an existing component to this object.
 
template<typename T >
void destroyComponent ()
 Destroys and removes the first component of a type.
 
template<typename T >
T * getComponent ()
 Returns the first attached component of a type.
 
template<typename T >
std::vector< T * > getComponents ()
 Returns all attached components of a type.
 
template<typename T , typename... Args>
T * newComponent (Args &&... args)
 Constructs a component in place and attaches it.
 
void setActive (bool a)
 Activates or deactivates the object.
 
bool isActive ()
 Reports whether the object is active.
 

Detailed Description

Game object representing the scene camera.

Comes preconfigured with a CameraComponent (and a Transform) so its position defines the rendered viewpoint.

Constructor & Destructor Documentation

◆ Camera()

cangine::Camera::Camera ( )

Constructs a camera with its camera/transform components.


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