-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.h
More file actions
37 lines (30 loc) · 696 Bytes
/
camera.h
File metadata and controls
37 lines (30 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "misc.h"
#include "linear_math/vector.h"
#include "linear_math/matrix.h"
#include "common.h"
struct camera
{
vec3 Position;
vec3 Right;
vec3 Forward;
float NearClipPlane;
float FarClipPlane;
float FieldOfView;
float Speed;
float MaxTiltAngle;
bool OrbitSelected;
//bool Padding0;
//bool Padding1;
//bool Padding2;
float OrbitRadius;
vec2 OrbitRotation;
vec2 Rotation;
mat4 ViewMatrix;
mat4 ProjectionMatrix;
mat4 VPMatrix;
mat4 InvVPMatrix;
};
void UpdateCamera(camera* Camera, vec3 FollowPoint, const game_input* Input);
void UpdateCamera(camera* Camera, const game_input* Input);
void UpdateCameraDerivedFields(camera* Camera);