Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
Camera Class Reference

#include <camera.h>

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

Public Member Functions

 Camera (int viewportWidth, int viewportHeight)
 
void move (glm::vec3 dist)
 
void setPosition (glm::vec3 pos)
 
void rotateX (float rot)
 
void rotateY (float rot)
 
void rotateZ (float rot)
 
void setOrientation (glm::quat quat)
 
const glm::mat4 & view () const
 
const glm::mat4 & viewInverted () const
 
const glm::quat & orientation () const
 
const glm::vec3 & position () const
 
float zNear () const
 
void setZNear (float zNear)
 
float zFar () const
 
void setZFar (float zFar)
 
float fovy () const
 
void setFovy (float fovy)
 
const glm::ivec2 viewport () const
 
void setViewport (const glm::ivec2 &viewport)
 
const glm::vec3 & projectionOffset () const
 
void setProjectionOffset (const glm::vec3 &projectionOffset)
 
float aspectRatio () const
 
const glm::mat4 & projection () const
 
const glm::mat4 & viewProjection () const
 

Protected Member Functions

void viewDirty ()
 
void projectionDirty ()
 
- Protected Member Functions inherited from Transform
 Transform (glm::vec3 center=glm::vec3(0), float scale=1.0)
 
 Transform (const Transform &transform, const glm::vec3 &positionDelta, const glm::quat &orientationDelta)
 
const glm::vec3 & position () const
 
void setPosition (const glm::vec3 &pos)
 
const glm::quat & orientation () const
 
void setOrientation (const glm::quat &quat)
 
const glm::vec3 & center () const
 
void setCenter (const glm::vec3 &center)
 
void setCenterAndAdjustPosition (const glm::vec3 &newCenter)
 
float scale () const
 
void setScale (float scale)
 
void move (const glm::vec3 &dist)
 
void moveWorld (const glm::vec3 &dist)
 
void rotate (const glm::quat &qrot)
 
void rotateWorld (const glm::quat &qrot)
 
bool operator== (const Transform &other) const
 
bool operator!= (const Transform &other) const
 
const glm::mat4 matrix () const
 
glm::vec3 applyTo (const glm::vec3 &vertex) const
 
glm::vec3 inverseApplyTo (const glm::vec3 &vertex) const
 

Protected Attributes

float m_fovy
 
float m_aspect
 
float m_zNear
 
float m_zFar
 
glm::ivec2 m_viewport
 
glm::vec3 m_projectionOffset
 
glm::mat4 m_view
 
glm::mat4 m_projection
 
glm::mat4 m_viewProjection
 
- Protected Attributes inherited from Transform
glm::vec3 m_position
 
glm::quat m_orientation
 
glm::vec3 m_center
 
float m_scale
 

Detailed Description

Represents the camera. matrix thus is the view matrix for all other objects


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