Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Engine::Camera Class Reference

Camera class for the game engine. More...

#include <Camera.hpp>

Inheritance diagram for Engine::Camera:
Engine::GameObject Engine::Node

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.
 
- Public Member Functions inherited from Engine::GameObject
 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.
 
- Public Member Functions inherited from Engine::Node
 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.
 
NodeGetChild (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

- Public Attributes inherited from Engine::GameObject
Vec3f Position {0.0f, 0.0f, 0.0f}
 
Vec3f Scale {1.0f, 1.0f, 1.0f}
 
Vec3f Rotation {0.0f, 0.0f, 0.0f}
 
- Public Attributes inherited from Engine::Node
const char * m_nodeType
 
std::string m_name
 
- Protected Attributes inherited from Engine::Node
Nodem_parent
 

Detailed Description

Camera class for the game engine.

This class represents a camera in the game engine. It inherits from the GameObject class.

Constructor & Destructor Documentation

◆ Camera()

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.

Parameters
nameThe name of the camera gameobject.
fovThe field of view of the camera in degrees.

Member Function Documentation

◆ getFOV()

float Engine::Camera::getFOV ( ) const

Getter for the field of view of the camera.

Returns
The field of view of the camera in degrees.

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