]> icculus.org git repositories - taylor/freespace2.git/blob - include/3dinternal.h
embed standalone web in executable
[taylor/freespace2.git] / include / 3dinternal.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Render/3dInternal.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Used internally by the 3d renderer lib
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:12  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
25  * 2     10/07/98 10:53a Dave
26  * Initial checkin.
27  * 
28  * 1     10/07/98 10:51a Dave
29  * 
30  * 5     3/16/98 4:51p John
31  * Added low-level code to clip all polygons against an arbritary plane.
32  * Took out all old model_interp_zclip and used this new method instead.  
33  * 
34  * 4     4/29/97 9:55a John
35  * 
36  * 3     2/17/97 5:18p John
37  * Added a bunch of RCS headers to a bunch of old files that don't have
38  * them.
39  *
40  * $NoKeywords: $
41  */
42
43 #ifndef _3DINTERNAL_H
44 #define _3DINTERNAL_H
45
46 #include "3d.h"
47
48 extern int Canvas_width,Canvas_height;  //the actual width & height
49 extern float Canv_w2,Canv_h2;                   //fixed-point width,height/2
50
51 extern vector Window_scale;
52 extern int free_point_num;
53
54 extern float View_zoom;
55 extern vector View_position,Matrix_scale;
56 extern matrix View_matrix,Unscaled_matrix;
57
58
59 //vertex buffers for polygon drawing and clipping
60 extern vertex *Vbuf0[];
61 extern vertex *Vbuf1[];
62
63 extern void free_temp_point(vertex *p);
64 extern vertex **clip_polygon(vertex **src,vertex **dest,int *nv,ccodes *cc,uint flags);
65 extern void init_free_points(void);
66 extern void clip_line(vertex **p0,vertex **p1,ubyte codes_or, uint flags);
67
68 extern int G3_count;
69
70 extern int G3_user_clip;
71 extern vector G3_user_clip_normal;
72 extern vector G3_user_clip_point;
73
74 // Returns TRUE if point is behind user plane
75 extern int g3_point_behind_user_plane( vector *pnt );
76
77 #endif
78