/
camera.h
64 lines (53 loc) · 2.86 KB
/
camera.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/******************************************************************************
* This file is part of ExcessiveOverkill. *
* *
* Copyright 2011 Jimmy Bøgh Christensen *
* *
* ExcessiveOverkill is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* ExcessiveOverkill is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with ExcessiveOverkill. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#ifndef CAMERA_H_INCLUDED
#define CAMERA_H_INCLUDED
#include "types.h"
#include "input.h"
void camInit();
void camBegin(); //Called before drawing anything, sets up modelView matrix
void eoCamPosSet(vec3 p); //Moves the camera to position (camera looks in same direction)
void eoCamTargetSet(vec3 p); //Point camera at position
void eoCamZoomSet( GLfloat zoom ); //1 = normal, 2 = double zoom,
void eoCamMoveForward( GLfloat l );
void eoCamMoveBackward( GLfloat l );
void eoCamMoveLeft( GLfloat l );
void eoCamMoveRight( GLfloat l );
void eoCamMoveUp( GLfloat l );
void eoCamMoveDown( GLfloat l );
vec3 eoCamPosGet();
vec3 eoCamTargetGet();
GLfloat eoCamZoomGet();
vec3 eoCamDirectionGet();
vec2 eoCamRotGet();
void eoCamRecPlay( const char* fileName, int absolute, void (*finishedCallback)() );
void eoCamRecStop();
int cameraBeginRecord( const char* args, void* data );
int cameraEndRecord( const char* args, void* data );
int camConPlayRec( const char* args, void* data );
int cameraRecordRelative( const char* args, void* data);
int eoCamGetPlaybackState();
camData* camGet(); //Returns camera data
int cameraFreeLook( const char* args, void* data ); //Console callback, for enabling freelook
int cameraSetSens( const char* args, void* data ); //Console callback for setting mouse sens
int cameraGrabCursor( const char* args, void* data);
int cameraLockLook( const char* args, void* data);
void camSetMatrix();
void setCameraLockLook(int l);
#endif // CAMERA_H_INCLUDED