Definition at line 11 of file CameraMgr.h.
◆ ChangeCurrentCamera()
Definition at line 62 of file CameraMgr.cpp.
62 {
63
64 m_currentCamera = camera;
65
66}
◆ DeleteCameraComponent()
Definition at line 22 of file CameraMgr.cpp.
22 {
23 if (object == nullptr) return;
24
25 auto iGameObj = std::find(m_objects.begin(), m_objects.end(), object);
26
27 if (iGameObj != m_objects.end()) {
28 m_size--;
29 m_objects.erase(iGameObj);
30 object->GetGameObject()->DeleteComponent(object);
31
32 }
33}
◆ GetCurrentCamera()
Definition at line 54 of file CameraMgr.cpp.
54 {
55 if (m_currentCamera == nullptr && m_size > 0)
56 return m_objects.front();
57
58 return m_currentCamera;
59}
◆ GetProjectionRatio()
const float * CameraMgr::GetProjectionRatio |
( |
| ) |
const |
Definition at line 36 of file CameraMgr.cpp.
36 {
37 return &m_projectionRatio;
38}
◆ GetSkyboxProgram()
Definition at line 68 of file CameraMgr.cpp.
68 {
69 return m_skyboxProgram;
70}
◆ Init()
Implements CSE::CoreBase.
Definition at line 15 of file CameraMgr.cpp.
15 {
16 std::string cubemap_vert = CSE::AssetMgr::LoadAssetFile(CSE::AssetsPath() + "Shader/PBR/IBL/cubemap.vert");
17 std::string cubemap_frag = CSE::AssetMgr::LoadAssetFile(CSE::AssetsPath() + "Shader/PBR/IBL/cubemap.frag");
18
20}
static GLProgramHandle * CreateProgramHandle(const GLchar *vertexSource, const GLchar *fragmentSource, GLProgramHandle *handle=nullptr)
Creates a program handle.
◆ SetProjectionRatio()
void CameraMgr::SetProjectionRatio |
( |
float |
ratio | ) |
|
Definition at line 41 of file CameraMgr.cpp.
41 {
42 m_projectionRatio = ratio;
43
44 for (auto camera : m_objects) {
45
46 if (camera == nullptr) continue;
47
48 camera->SetProjectionMatrix();
49
50 }
51}
The documentation for this class was generated from the following files: