Blackcomb  prealpha
Engine-ish
Public Member Functions | Public Attributes | List of all members
blackcomb::entity::FreeMoveCamera Class Reference

A camera that can be used to look around a scene freely. More...

#include <FreeMoveCamera.h>

Inheritance diagram for blackcomb::entity::FreeMoveCamera:
Inheritance graph
[legend]
Collaboration diagram for blackcomb::entity::FreeMoveCamera:
Collaboration graph
[legend]

Public Member Functions

void loadViewMatrix (renderer::Shader &shader) override
 Generate a view matrix and load it into a shader. More...
 
void processInput (base::Window &window, float deltaTime)
 Process input and move the camera accordingly. More...
 
- Public Member Functions inherited from blackcomb::entity::Camera
void loadProjectionMatrix (renderer::Shader &shader, base::Window &window)
 Generate a projection matrix and load it into a shader. More...
 
- Public Member Functions inherited from blackcomb::entity::BaseEntity
void setPos (glm::vec3 position)
 Set the position of the entity.
 
void setPos (float x, float y, float z)
 
glm::vec3 getPos ()
 
void setX (float x)
 Set the X position of the entity.
 
void setY (float y)
 Set the Y position of the entity.
 
void setZ (float z)
 Set the Z position of the entity.
 
void setRotation (glm::vec3 rotation)
 Set the rotation of the entity. More...
 
void setRotation (float x, float y, float z)
 Set the rotation of the entity on the XYZ axes.
 
void setHpr (glm::vec3 hpr)
 Set the rotation of the entity on the HPR axes (which map to YXZ). More...
 
void setHpr (float h, float p, float r)
 Set the rotation of the entity on the HPR axes.
 
void setH (float h)
 Sets the H/Y axis rotation of the entity.
 
void setP (float p)
 Sets the P/X axis rotation of the entity.
 
void setR (float r)
 Sets the R/Z axis rotation of the entity.
 
void setScale (glm::vec3 scale)
 Sets the scale of the entity.
 
void setScale (float sx, float sy, float sz)
 
void setScale (float scale)
 Scales the entity by a uniform value.
 
void setSx (float sx)
 Set the scaling of the entity in the X direction.
 
void setSy (float sy)
 Set the scaling of the entity in the Y direction.
 
void setSz (float sz)
 Set the scaling of the entity in the Z direction.
 
virtual void update ()
 Function that allows code to be run every game tick. More...
 

Public Attributes

float speed = 5.0f
 The speed at which the camera moves.
 
- Public Attributes inherited from blackcomb::entity::Camera
float fov = 90.0f
 Field of view of the camera.
 

Additional Inherited Members

- Protected Member Functions inherited from blackcomb::entity::BaseEntity
void updateTransMat ()
 Updates the translation matrix for the entity.
 
- Protected Attributes inherited from blackcomb::entity::BaseEntity
glm::vec3 pos = glm::vec3(0.0f, 0.0f, 0.0f)
 The position of the entity in 3D space.
 
glm::vec3 rotation = glm::vec3(0.0f, 0.0f, 0.0f)
 The rotation of the entity on the XYZ axes, in degrees.
 
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f)
 The scale of the entity.
 
glm::mat4 transform = glm::mat4(1.0f)
 The transformation matrix for the entity.
 

Detailed Description

A camera that can be used to look around a scene freely.

Member Function Documentation

◆ loadViewMatrix()

void blackcomb::entity::FreeMoveCamera::loadViewMatrix ( renderer::Shader shader)
overridevirtual

Generate a view matrix and load it into a shader.

Parameters
shaderThe Shader to load the view matrix into.

Reimplemented from blackcomb::entity::Camera.

◆ processInput()

void blackcomb::entity::FreeMoveCamera::processInput ( base::Window window,
float  deltaTime 
)

Process input and move the camera accordingly.

Parameters
windowThe pointer to the window that the mouse should be tracked over.
deltaTimeTime since the last tick.

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