|
cangine
|
Component marking its game object as the active camera. More...
#include <camera_component.hpp>


Public Member Functions | |
| CameraComponent (GameObject *gameObject=nullptr) | |
| Constructs the camera component and registers it as active. | |
Public Member Functions inherited from cangine::IComponent | |
| IComponent (GameObject *gameObject=nullptr) | |
| Constructs the component, optionally bound to a game object. | |
| virtual | ~IComponent () |
| GameObject * | getGameObject () const |
| Returns the game object this component is attached to. | |
| virtual void | firstFrame () |
| Called once before the first frame update. | |
| virtual void | frame (double deltaTime) |
| Called every frame to update the component. | |
| virtual void | onMouseEvent (const MouseEvent *e) |
| Called when a mouse event is dispatched to the owning object. | |
Static Public Member Functions | |
| static CameraComponent * | getInstance () |
| Returns the active camera component. | |
Static Private Attributes | |
| static CameraComponent * | instance = nullptr |
| Singleton instance (the active camera). | |
Additional Inherited Members | |
Public Attributes inherited from cangine::IComponent | |
| bool | isUnique = true |
| If true, only one of this component type may exist per object. | |
Component marking its game object as the active camera.
Exposes a singleton accessor so renderers can locate the current camera.
| cangine::CameraComponent::CameraComponent | ( | GameObject * | gameObject = nullptr | ) |
Constructs the camera component and registers it as active.
| gameObject | Owning game object. |
|
static |
Returns the active camera component.
|
staticprivate |
Singleton instance (the active camera).