|
cangine
|
Game object representing the scene camera. More...
#include <camera_object.hpp>


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. | |
Game object representing the scene camera.
Comes preconfigured with a CameraComponent (and a Transform) so its position defines the rendered viewpoint.
| cangine::Camera::Camera | ( | ) |
Constructs a camera with its camera/transform components.