Carpenter Engine
A C++ game engine with a build once run anywhere solution
|
Camera class for the game engine. More...
#include <Camera.hpp>
Public Member Functions | |
Camera (std::string name, float fov=60.0f) | |
Default constructor for Camera. | |
float | getFOV () const |
Getter for the field of view of the camera. | |
![]() | |
GameObject (std::string name) | |
Default constructor. | |
Vec3f | GetGlobalPosition () |
Returns the position of the game object relative to the global 0,0. | |
Vec3f | GetGlobalRotation () |
Returns the overall rotation in respect to any parent game objects. | |
![]() | |
Node (std::string name) | |
Default constructor. | |
virtual | ~Node () |
Default destructor. | |
size_t | AddChild (Node *child) |
Adds a child to the node and assigns itself as the parent of the new node. | |
Node * | GetChild (size_t index) |
Returns a reference to the child at the specified index. | |
Success | RemoveChild (size_t index) |
Removes the child at the specified index. | |
Success | SetEnabled (bool enabled=true) |
Toggles the state of the node. | |
virtual void | OnEnable () |
Overridable enable method for the node. | |
virtual void | OnDisable () |
Overridable disable method for the node. | |
virtual void | Init () |
virtual void | Draw () |
Overridable draw method for the node. | |
virtual void | Update (float dt) |
Overridable update method for the node. | |
Additional Inherited Members | |
![]() | |
Vec3f | Position {0.0f, 0.0f, 0.0f} |
Vec3f | Scale {1.0f, 1.0f, 1.0f} |
Vec3f | Rotation {0.0f, 0.0f, 0.0f} |
![]() | |
const char * | m_nodeType |
std::string | m_name |
![]() | |
Node * | m_parent |
Camera class for the game engine.
This class represents a camera in the game engine. It inherits from the GameObject class.
Engine::Camera::Camera | ( | std::string | name, |
float | fov = 60.0f |
||
) |
Default constructor for Camera.
Initializes a camera with an FOV of 60 degrees. if orthographic, that just means everything in the environment is scaled down by a factor of the FOV.
name | The name of the camera gameobject. |
fov | The field of view of the camera in degrees. |
float Engine::Camera::getFOV | ( | ) | const |
Getter for the field of view of the camera.