UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_camera.h
Go to the documentation of this file.
1
4
5
/*
6
All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8
Original file from Quake 2 v3.21: quake2-2.31/client/cl_input.c
9
Copyright (C) 1997-2001 Id Software, Inc.
10
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20
See the GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26
*/
27
28
#pragma once
29
30
typedef
struct
camera_s {
31
vec3_t
origin
;
32
vec3_t
camorg
;
33
vec3_t
speed
;
34
vec3_t
angles
;
35
vec3_t
omega
;
36
vec3_t
axis
[3];
37
38
float
lerplevel
;
39
float
zoom
;
40
}
camera_t
;
41
42
#define FOV 75.0
43
#define CAMERA_START_DIST 600
44
#define CAMERA_START_HEIGHT UNIT_HEIGHT * 1.5
45
#define CAMERA_LEVEL_HEIGHT UNIT_HEIGHT
46
47
extern
cvar_t
*
cl_centerview
;
48
extern
cvar_t
*
cl_camzoommax
;
49
extern
cvar_t
*
cl_camzoommin
;
50
extern
cvar_t
*
cl_camzoomquant
;
51
52
extern
const
float
MIN_ZOOM
,
MAX_ZOOM
;
53
54
void
CL_CameraInit
(
void
);
55
void
CL_CameraMove
(
void
);
56
void
CL_CameraRoute
(
const
pos3_t
from,
const
pos3_t
target);
57
void
CL_CheckCameraRoute
(
const
pos3_t
from,
const
pos3_t
target);
58
void
CL_CameraZoomIn
(
void
);
59
void
CL_CameraZoomOut
(
void
);
cl_centerview
cvar_t * cl_centerview
Definition
cl_camera.cpp:69
cl_camzoommax
cvar_t * cl_camzoommax
Definition
cl_camera.cpp:66
cl_camzoommin
cvar_t * cl_camzoommin
Definition
cl_camera.cpp:68
cl_camzoomquant
cvar_t * cl_camzoomquant
Definition
cl_camera.cpp:67
MAX_ZOOM
const float MAX_ZOOM
Definition
cl_camera.cpp:44
MIN_ZOOM
const float MIN_ZOOM
Definition
cl_camera.cpp:40
CL_CheckCameraRoute
void CL_CheckCameraRoute(const pos3_t from, const pos3_t target)
Only moves the camera to the given target location if its not yet close enough.
Definition
cl_camera.cpp:285
CL_CameraMove
void CL_CameraMove(void)
Update the camera position. This can be done in two different reasons. The first is the user input,...
Definition
cl_camera.cpp:93
CL_CameraRoute
void CL_CameraRoute(const pos3_t from, const pos3_t target)
Interpolates the camera movement from the given start point to the given end point.
Definition
cl_camera.cpp:250
CL_CameraZoomIn
void CL_CameraZoomIn(void)
Zooms the scene of the battlefield in.
Definition
cl_camera.cpp:302
CL_CameraZoomOut
void CL_CameraZoomOut(void)
Zooms the scene of the battlefield out.
Definition
cl_camera.cpp:325
CL_CameraInit
void CL_CameraInit(void)
Definition
cl_camera.cpp:391
camera_t
Definition
cl_camera.h:30
camera_t::camorg
vec3_t camorg
Definition
cl_camera.h:32
camera_t::lerplevel
float lerplevel
Definition
cl_camera.h:38
camera_t::origin
vec3_t origin
Definition
cl_camera.h:31
camera_t::axis
vec3_t axis[3]
Definition
cl_camera.h:36
camera_t::zoom
float zoom
Definition
cl_camera.h:39
camera_t::angles
vec3_t angles
Definition
cl_camera.h:34
camera_t::speed
vec3_t speed
Definition
cl_camera.h:33
camera_t::omega
vec3_t omega
Definition
cl_camera.h:35
cvar_t
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition
cvar.h:71
pos3_t
pos_t pos3_t[3]
Definition
ufotypes.h:58
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
client
battlescape
cl_camera.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0