Class SceneCamera#
Defined in File SceneCamera.h
Inheritance Relationships#
Base Type#
public TRAP::Graphics::Camera
(Class Camera)
Class Documentation#
-
class SceneCamera : public TRAP::Graphics::Camera#
Public Types
Public Functions
-
SceneCamera()#
Constructor.
-
constexpr ~SceneCamera() override = default#
Destructor.
-
constexpr SceneCamera(const SceneCamera&) noexcept = default#
Copy constructor.
-
constexpr SceneCamera(SceneCamera&&) noexcept = default#
Move constructor.
-
SceneCamera &operator=(const SceneCamera&) noexcept = default#
Copy assignment operator.
-
SceneCamera &operator=(SceneCamera&&) noexcept = default#
Move assignment operator.
-
void SetPerspective(f32 verticalFOV, f32 nearClip)#
Make the camera perspective.
Note
This camera uses an infinite far plane.
- Parameters:
verticalFOV – Field ov view to use.
nearClip – Near clip plane.
-
void SetOrthographic(f32 size, f32 nearClip, f32 farClip)#
Make the camera orthographic.
Note
This camera uses reversed Z coordinates.
- Parameters:
size – Size for the camera.
nearClip – Near clip plane.
farClip – Far clip plane.
-
void SetViewportSize(u32 width, u32 height)#
Update viewport size.
- Parameters:
width – New width.
height – New height.
-
constexpr f32 GetPerspectiveVerticalFOV() const noexcept#
Retrieve the vertical field of view.
- Returns:
Vertical field of view.
-
void SetPerspectiveVerticalFOV(f32 verticalFov)#
Set the vertical field of view.
- Parameters:
verticalFov – Vertical field of view to use.
-
constexpr f32 GetPerspectiveNearClip() const noexcept#
Retrieve the near clip plane.
- Returns:
Near clip plane.
-
void SetPerspectiveNearClip(f32 nearClip)#
Set the near clip plane.
- Parameters:
nearClip – Near clip plane to use.
-
constexpr Math::Vec2 GetOrthographicClip() const noexcept#
Retrieve the clip planes.
- Returns:
Near and far clip planes.
-
void SetOrthographicClip(Math::Vec2 clip)#
Set the near and far clip planes.
- Parameters:
clip – Clip planes to use.
-
constexpr f32 GetOrthographicNearClip() const noexcept#
Retrieve the near clip plane.
- Returns:
Near clip plane.
-
void SetOrthographicNearClip(f32 nearClip)#
Set the near clip plane.
- Parameters:
nearClip – Near clip plane to use.
-
constexpr f32 GetOrthographicFarClip() const noexcept#
Retrieve the far clip plane.
- Returns:
Far clip plane.
-
void SetOrthographicFarClip(f32 farClip)#
Set the far clip plane.
- Parameters:
farClip – Far clip plane to use.
-
constexpr ProjectionType GetProjectionType() const noexcept#
Retrieve the current projection type of the camera.
- Returns:
Current projection type.
-
void SetProjectionType(ProjectionType type)#
Set the projection type of the camera.
- Parameters:
type – Projection type to use.
-
SceneCamera()#