Vigilante Game Framework  1.0.0.8
A 2D/3D C++ Game Framework using SFML.
Public Types | Public Member Functions | List of all members
V3DOrthographicCamera Class Reference

3D Camera with an Orthographic View. More...

#include <V3DCamera.h>

Inheritance diagram for V3DOrthographicCamera:
V3DCamera

Public Types

typedef V3DCamera VSUPERCLASS
 Used to call parent class functions when they are overrided in class.
 

Public Member Functions

 V3DOrthographicCamera (const sf::Vector3f &pos, float width, float height, float zNear=0.1f, float zFar=500.0f)
 
virtual glm::mat4 ProjectionMatrix () const
 
sf::Vector2f GetViewDimensions ()
 
void SetViewDimensions (const sf::Vector2f &value)
 
- Public Member Functions inherited from V3DCamera
 V3DCamera (const sf::Vector3f &pos, float zNear=0.1f, float zFar=500.0f)
 
glm::mat4 Orientation () const
 
void LookAt (const sf::Vector3f &pos)
 
glm::mat4 ViewMatrix () const
 
glm::mat4 PVMatrix () const
 
sf::Vector3f Forward () const
 Camera's Forward Vector.
 
sf::Vector3f Right () const
 Camera's Right Vector.
 
sf::Vector3f Up () const
 Camera's Up Vector.
 
virtual bool PointInView (sf::Vector3f p)
 
virtual bool SphereInView (sf::Vector3f p, float radius)
 
virtual bool BoxInView (sf::Vector3f p, sf::Vector3f min, sf::Vector3f max)
 

Additional Inherited Members

- Public Attributes inherited from V3DCamera
sf::Vector3f Position
 The Camera Position.
 
sf::Vector3f Rotation
 The Camera Angle.
 
sf::FloatRect Viewport
 Render Viewport Area to apply a Renderscene.
 
- Protected Types inherited from V3DCamera
enum  FrustumPlane : unsigned char {
  PRIGHT, PLEFT, PTOP, PBOTTOM,
  PNEAR, PFAR
}
 Sides of a Frustum plane for box overlap.
 
- Protected Member Functions inherited from V3DCamera
void normalizeAngles ()
 Normalize the rotation angles.
 
void updatePlanes ()
 Updates the plane coordinates based on the view-projection transform.
 
float pointPlaneDistance (const glm::vec4 &plane, const glm::vec3 &point)
 Works out the distance between a point and plane based on dot-product.
 
- Protected Attributes inherited from V3DCamera
float fnear
 Field Near value.
 
float ffar
 Field Far value.
 
glm::vec4 planes [6]
 The plane coordinates for all six size.
 

Detailed Description

3D Camera with an Orthographic View.

Constructor & Destructor Documentation

◆ V3DOrthographicCamera()

V3DOrthographicCamera::V3DOrthographicCamera ( const sf::Vector3f &  pos,
float  width,
float  height,
float  zNear = 0.1f,
float  zFar = 500.0f 
)
Parameters
posInitial Camera Position.
widthCamera View Width.
heightCamera View Height.
zNearThe near z value for the projection matrix.
zFarThe far z value for the projection matrix.

Member Function Documentation

◆ GetViewDimensions()

sf::Vector2f V3DOrthographicCamera::GetViewDimensions ( )
Returns
The current camera view dimensions.

◆ ProjectionMatrix()

virtual glm::mat4 V3DOrthographicCamera::ProjectionMatrix ( ) const
virtual
Returns
The calculated Projection Matrix of the Camera.

Implements V3DCamera.

◆ SetViewDimensions()

void V3DOrthographicCamera::SetViewDimensions ( const sf::Vector2f &  value)
Parameters
valueNew camera view dimensions.

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