Voltray Engine Docs
Loading...
Searching...
No Matches
OrthographicCamera.h
Go to the documentation of this file.
1#pragma once
2
3#include "BaseCamera.h"
4
13{
14public:
23 OrthographicCamera(const std::string &name, float aspect, float nearPlane, float farPlane, float size = 10.0f);
24
25 // Camera type identification
26 virtual CameraType GetType() const override { return CameraType::ORTHOGRAPHIC; }
27 virtual std::string GetTypeName() const override { return "Orthographic"; }
28
29 // Orthographic projection
30 virtual Mat4 GetProjectionMatrix() const override;
31 virtual Ray ScreenToWorldRay(float screenX, float screenY) const override;
32
33 // Orthographic-specific operations
34 virtual void SetOrthographicSize(float size);
35 virtual float GetOrthographicSize() const { return m_Size; }
36
37protected:
38 float m_Size; // Half the height of the orthographic view volume
39};
CameraType
Enumeration of all supported camera types.
Definition BaseCamera.h:17
Abstract base class for all camera types.
Definition BaseCamera.h:34
Orthographic projection camera for parallel projections.
Definition OrthographicCamera.h:13
float m_Size
Definition OrthographicCamera.h:38
virtual Mat4 GetProjectionMatrix() const override
Definition OrthographicCamera.cpp:11
virtual void SetOrthographicSize(float size)
Definition OrthographicCamera.cpp:52
virtual Ray ScreenToWorldRay(float screenX, float screenY) const override
Definition OrthographicCamera.cpp:21
virtual CameraType GetType() const override
Definition OrthographicCamera.h:26
virtual float GetOrthographicSize() const
Definition OrthographicCamera.h:35
virtual std::string GetTypeName() const override
Definition OrthographicCamera.h:27
4x4 Matrix structure for 3D transformations and projections.
Definition Mat4.h:16
Represents a ray in 3D space with an origin and direction.
Definition Ray.h:15