-
Notifications
You must be signed in to change notification settings - Fork 2
/
view.h
48 lines (36 loc) · 1.44 KB
/
view.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
/* --------------------------------------------------------------------
EXTREME TUXRACER
Copyright (C) 1999-2001 Jasmin F. Patry (Tuxracer)
Copyright (C) 2010 Extreme Tuxracer Team
This program 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 2
of the License, or (at your option) any later version.
This program 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.
---------------------------------------------------------------------*/
#ifndef VIEW_H
#define VIEW_H
#include "bh.h"
#include "tux.h"
void set_view_mode (CControl *ctrl, TViewMode mode);
TViewMode get_view_mode (CControl *ctrl);
void update_view (CControl *ctrl, double dt);
void SetStationaryCamera (bool stat); // 0 follow, 1 stationary
void IncCameraDistance (double timestep);
void SetCameraDistance (double val);
// ------------- viewfrustum ------------------------------------------
typedef enum {
NoClip,
SomeClip,
NotVisible
} clip_result_t;
void SetupViewFrustum (CControl *ctrl);
clip_result_t clip_aabb_to_view_frustum (TVector3 min, TVector3 max );
TPlane get_far_clip_plane();
TPlane get_left_clip_plane();
TPlane get_right_clip_plane();
TPlane get_bottom_clip_plane();
#endif