Khaotic Engine Reborn
Loading...
Searching...
No Matches
camera_class.h
1
2// Filename: cameraclass.h
4#ifndef _CAMERACLASS_H_
5#define _CAMERACLASS_H_
6
7
9// INCLUDES //
11#include <directxmath.h>
12using namespace DirectX;
13
14
16// Class name: camera_class
19{
20public:
28
36 void set_position(float, float, float);
44 void set_rotation(float, float, float);
45
51 XMFLOAT3 get_position();
57 XMFLOAT3 get_rotation();
58
59
64 void render();
70 XMMATRIX get_view_matrix(XMMATRIX& view_matrix) const;
71
77 void render_reflection(float);
83 void get_reflection_view_matrix(XMMATRIX&) const;
84
85private:
86 float position_x_, position_y_, position_z_;
87 float rotation_x_, rotation_y_, rotation_z_;
88 XMMATRIX view_matrix_;
89 XMMATRIX reflection_view_matrix_;
90
91};
92
93#endif
void render()
Updates the camera's view matrix based on its position and rotation. This method recalculates the vie...
void set_rotation(float, float, float)
Sets the rotation of the camera in 3D space.
void set_position(float, float, float)
Sets the position of the camera in 3D space.
void render_reflection(float)
Renders the reflection of the scene from the camera's perspective.
XMFLOAT3 get_rotation()
Gets the current rotation of the camera.
XMMATRIX get_view_matrix(XMMATRIX &view_matrix) const
Retrieves the current view matrix of the camera.
camera_class()
Default constructor for camera_class. Initializes the camera position and rotation to zero.
void get_reflection_view_matrix(XMMATRIX &) const
Retrieves the reflection view matrix of the camera.
XMFLOAT3 get_position()
Gets the current position of the camera.