Vivid
Loading...
Searching...
No Matches
OrthoCamera Class Reference

A class for the OrthoCamera's. More...

#include <OrthoCamera.h>

Inheritance diagram for OrthoCamera:
[legend]
Collaboration diagram for OrthoCamera:
[legend]

Public Member Functions

 OrthoCamera (Vivid::Maths::Vec3 position, float rotation, float zoomLevel, float near=-1.0f, float far=1.0f)
 
void SetRotation (float rotation)
 
float GetRotation () const
 
void SetPerspective (float left, float right, float bottom, float top)
 
Vivid::Maths::Vec4 GetBounds ()
 
void SetViewportSize (int width, int height) override
 
void MoveForward () override
 
void MoveBackward () override
 
void MoveLeft () override
 
void MoveRight () override
 
void ProcessMouseScroll (float scrollOffset) override
 
void ProcessMouseMovement (float xOffset, float yOffset, bool constrainPitch) override
 
Vivid::Maths::Vec2 ScreenToWorldCoords (float x, float y)
 
- Public Member Functions inherited from MovableCamera
glm::vec3 GetPosition ()
 
glm::mat4 GetViewMatrix ()
 
glm::mat4 GetProjectionMatrix ()
 
void SetPosition (const Vivid::Maths::Vec3 &position)
 
void SetPerspective (const glm::mat4 &perspective)
 
void SetViewMatrix (const glm::mat4 &view)
 
virtual void SetViewportSize (int width, int height)=0
 
virtual void MoveForward ()=0
 
virtual void MoveBackward ()=0
 
virtual void MoveLeft ()=0
 
virtual void MoveRight ()=0
 
virtual void ProcessMouseScroll (float scrollOffset)=0
 
virtual void ProcessMouseMovement (float xOffset, float yOffset, bool constrainPitch=true)=0
 
- Public Member Functions inherited from Camera
virtual glm::mat4 GetViewMatrix ()=0
 
virtual glm::mat4 GetProjectionMatrix ()=0
 
virtual void SetPerspective (const glm::mat4 &perspective)=0
 
virtual void SetViewMatrix (const glm::mat4 &view)=0
 
virtual void SetViewportSize (int width, int height)=0
 
int GetViewportWidth ()
 
int GetViewportHeight ()
 

Additional Inherited Members

- Protected Attributes inherited from MovableCamera
Vivid::Maths::Vec3 m_Position
 
glm::mat4 m_ProjectionMatrix
 
glm::mat4 m_ViewMatrix
 
- Protected Attributes inherited from Camera
int m_ViewportWidth = 1920
 
int m_ViewportHeight = 1080
 

Detailed Description

A class for the OrthoCamera's.

OrthoCamera is a camera that can be moved around in the scene. It can be moved forward, backward, left, right, and can be rotated using the mouse.

Definition at line 11 of file OrthoCamera.h.

Constructor & Destructor Documentation

◆ OrthoCamera()

OrthoCamera::OrthoCamera ( Vivid::Maths::Vec3  position,
float  rotation,
float  zoomLevel,
float  near = -1.0f,
float  far = 1.0f 
)

Definition at line 6 of file OrthoCamera.cpp.

Member Function Documentation

◆ GetBounds()

Vivid::Maths::Vec4 OrthoCamera::GetBounds ( )
inline

Definition at line 42 of file OrthoCamera.h.

◆ GetRotation()

float OrthoCamera::GetRotation ( ) const
inline

Definition at line 36 of file OrthoCamera.h.

◆ MoveBackward()

void OrthoCamera::MoveBackward ( )
overridevirtual

Implements MovableCamera.

Definition at line 67 of file OrthoCamera.cpp.

◆ MoveForward()

void OrthoCamera::MoveForward ( )
overridevirtual

Implements MovableCamera.

Definition at line 60 of file OrthoCamera.cpp.

◆ MoveLeft()

void OrthoCamera::MoveLeft ( )
overridevirtual

Implements MovableCamera.

Definition at line 74 of file OrthoCamera.cpp.

◆ MoveRight()

void OrthoCamera::MoveRight ( )
overridevirtual

Implements MovableCamera.

Definition at line 80 of file OrthoCamera.cpp.

◆ ProcessMouseMovement()

void OrthoCamera::ProcessMouseMovement ( float  xOffset,
float  yOffset,
bool  constrainPitch 
)
overridevirtual

Implements MovableCamera.

Definition at line 93 of file OrthoCamera.cpp.

◆ ProcessMouseScroll()

void OrthoCamera::ProcessMouseScroll ( float  scrollOffset)
overridevirtual

Implements MovableCamera.

Definition at line 86 of file OrthoCamera.cpp.

◆ ScreenToWorldCoords()

Vivid::Maths::Vec2 OrthoCamera::ScreenToWorldCoords ( float  x,
float  y 
)

Definition at line 100 of file OrthoCamera.cpp.

◆ SetPerspective()

void OrthoCamera::SetPerspective ( float  left,
float  right,
float  bottom,
float  top 
)

Definition at line 43 of file OrthoCamera.cpp.

◆ SetRotation()

void OrthoCamera::SetRotation ( float  rotation)

Definition at line 38 of file OrthoCamera.cpp.

◆ SetViewportSize()

void OrthoCamera::SetViewportSize ( int  width,
int  height 
)
overridevirtual

Implements MovableCamera.

Definition at line 48 of file OrthoCamera.cpp.


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