OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Macros | Functions | Variables
Camera.cpp File Reference

Camera, View Frustum. More...

#include <limits>
#include "imgui/imgui.h"
#include "global.h"
#include "RunTime.h"
#include "system/Shader.h"
#include "system/Sound.h"
#include "system/Window.h"
#include "Camera.h"
#include <glm/gtc/epsilon.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
Include dependency graph for Camera.cpp:

Go to the source code of this file.

Macros

#define NEAR   0
 
#define FAR   1
 
#define TOP   2
 
#define BOTTOM   3
 
#define LEFT   4
 
#define RIGHT   5
 
#define NTL   0
 
#define NBL   1
 
#define NBR   2
 
#define NTR   3
 
#define FTL   4
 
#define FBL   5
 
#define FBR   6
 
#define FTR   7
 

Functions

static bool equal (float a, float b)
 
static bool equal (glm::vec2 a, float b)
 
static bool equal (glm::vec3 a, float b)
 
static const glm::vec3 rightUnit (1.0f, 0.0f, 0.0f)
 
static const glm::vec3 upUnit (0.0f, 1.0f, 0.0f)
 
static const glm::vec3 dirUnit (0.0f, 0.0f,-1.0f)
 

Variables

static const float fov = 45.0f
 
static const float nearDist = 0.1f
 
static const float farDist = 75000.0f
 
static const float maxSpeed = 3072.0f
 
static const float controllerDeadZone = 0.33f
 
static const float controllerViewFactor = glm::pi<float>()
 
static const float rotationAngleClamp = glm::pi<float>() * 2.0f
 
static const float rotationAngleVertMax = glm::pi<float>() / 2.0f
 
static const float runFactor = 2.5f
 
static FrustumPlane planes [6]
 
static glm::vec3 frustumColors [6]
 
static glm::vec3 frustumVertices [8]
 
static ShaderBuffer vertexBuffer
 
static ShaderBuffer colorBuffer
 
static ShaderBuffer indexBuffer
 
static ShaderBuffer vertexPointBuffer
 
static ShaderBuffer colorPointBuffer
 

Detailed Description

Camera, View Frustum.

Author
Mongoose
xythobuz

Definition in file Camera.cpp.

Macro Definition Documentation

#define NEAR   0

Definition at line 246 of file Camera.cpp.

#define FAR   1

Definition at line 247 of file Camera.cpp.

#define TOP   2

Definition at line 248 of file Camera.cpp.

#define BOTTOM   3

Definition at line 249 of file Camera.cpp.

#define LEFT   4

Definition at line 250 of file Camera.cpp.

#define RIGHT   5

Definition at line 251 of file Camera.cpp.

#define NTL   0

Definition at line 253 of file Camera.cpp.

#define NBL   1

Definition at line 254 of file Camera.cpp.

#define NBR   2

Definition at line 255 of file Camera.cpp.

#define NTR   3

Definition at line 256 of file Camera.cpp.

#define FTL   4

Definition at line 257 of file Camera.cpp.

#define FBL   5

Definition at line 258 of file Camera.cpp.

#define FBR   6

Definition at line 259 of file Camera.cpp.

#define FTR   7

Definition at line 260 of file Camera.cpp.

Function Documentation

static bool equal ( float  a,
float  b 
)
static

Definition at line 25 of file Camera.cpp.

static bool equal ( glm::vec2  a,
float  b 
)
static

Definition at line 29 of file Camera.cpp.

static bool equal ( glm::vec3  a,
float  b 
)
static

Definition at line 33 of file Camera.cpp.

static const glm::vec3 rightUnit ( 1.  0f,
0.  0f,
0.  0f 
)
static
static const glm::vec3 upUnit ( 0.  0f,
1.  0f,
0.  0f 
)
static
static const glm::vec3 dirUnit ( 0.  0f,
0.  0f,
-1.  0f 
)
static

Variable Documentation

const float fov = 45.0f
static

Definition at line 39 of file Camera.cpp.

const float nearDist = 0.1f
static

Definition at line 40 of file Camera.cpp.

const float farDist = 75000.0f
static

Definition at line 41 of file Camera.cpp.

const float maxSpeed = 3072.0f
static

Definition at line 42 of file Camera.cpp.

const float controllerDeadZone = 0.33f
static

Definition at line 43 of file Camera.cpp.

const float controllerViewFactor = glm::pi<float>()
static

Definition at line 44 of file Camera.cpp.

const float rotationAngleClamp = glm::pi<float>() * 2.0f
static

Definition at line 45 of file Camera.cpp.

const float rotationAngleVertMax = glm::pi<float>() / 2.0f
static

Definition at line 46 of file Camera.cpp.

const float runFactor = 2.5f
static

Definition at line 47 of file Camera.cpp.

FrustumPlane planes[6]
static

Definition at line 262 of file Camera.cpp.

glm::vec3 frustumColors[6]
static
Initial value:
= {
glm::vec3(1.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 1.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 1.0f),
glm::vec3(1.0f, 1.0f, 0.0f),
glm::vec3(0.0f, 1.0f, 1.0f),
glm::vec3(1.0f, 0.0f, 1.0f)
}

Definition at line 263 of file Camera.cpp.

glm::vec3 frustumVertices[8]
static

Definition at line 271 of file Camera.cpp.

ShaderBuffer vertexBuffer
static

Definition at line 273 of file Camera.cpp.

ShaderBuffer colorBuffer
static

Definition at line 274 of file Camera.cpp.

ShaderBuffer indexBuffer
static

Definition at line 275 of file Camera.cpp.

ShaderBuffer vertexPointBuffer
static

Definition at line 276 of file Camera.cpp.

ShaderBuffer colorPointBuffer
static

Definition at line 277 of file Camera.cpp.