forked from markjessell/functionNoddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3dRender.h
88 lines (68 loc) · 1.59 KB
/
3dRender.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*****************************************************************************
* File: Render.h
*
* © 1991 Mark M. Owen. All rights reserved.
*****************************************************************************
*/
#define _H_Render
#ifndef _Render_
#define _Render_
#include "3dColor.h"
#include "3dZBuff.h"
typedef struct
{
FPType red, green, blue;
} FPRGBColor;
typedef struct
{
FPType x,y,z;
} FPPoint3d,*pFPPoint3d;
typedef struct
{
FPPoint3d minPt, maxPt;
} Box, *pBox;
typedef struct
{
FPPoint3d v; /* the vertex */
FPPoint3d n; /* its normal */
FPPoint3d r; /* raw vertex */
FPPoint3d d; /* next vector */
} VN,*pVN;
typedef struct
{
pZBuffer pZB;
pLighting pL;
RendAttr RA;
Box bounds;
short np;
FPType d; /* centroid distance */
FPPoint3d c; /* centroid */
FPPoint3d n; /* normal */
VN *vn;
} polyExt,*pPolyExt;
#if XVT_CC_PROTO
void SetShadows(BOOLEAN state);
BOOLEAN Shadows(void);
void SetAntiAliasing(BOOLEAN state);
BOOLEAN AntiAliasing(void);
void AddToPolyList (PNT *pp);
void DisposePolyList (void);
void RenderPolyList (BOOLEAN edgesOnly);
PNT *NewPolygon(int nSrcPts, PNT *srcPts, pLighting pL, pRendAttr pRA,
FPType dist, FPPoint3d *centroid, FPPoint3d *normal, FPPoint3d *V,
FPPoint3d *N, FPPoint3d *R, pZBuffer pLZB);
void KillPolygon (PNT *ph);
int RenderPolygon (PNT *ph, BOOLEAN edgesOnly);
#else
void SetShadows();
BOOLEAN Shadows();
void SetAntiAliasing();
BOOLEAN AntiAliasing();
void AddToPolyList ();
void DisposePolyList ();
void RenderPolyList ();
PNT *NewPolygon();
void KillPolygon ();
int RenderPolygon ();
#endif
#endif /* _Render_ */