File: stdvds.h

package info (click to toggle)
vdslib 0.9-6.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 312 kB
  • ctags: 402
  • sloc: ansic: 2,902; makefile: 128; lex: 25
file content (57 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download | duplicates (2)
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
/*
 * File:	stdvds.h
 * Description:	Declarations for the functions and globals used by the
 *		"standard" included routines for checking node visibility,
 *		and for deciding when to fold and unfold nodes.  You need
 *		only #include this file if using these standard routines.
 */

#ifndef _STDVDS_h_
#define _STDVDS_h_

#ifdef __cplusplus
extern "C" {
#endif

#include "vds.h"

#ifdef VDS_DOUBLE_PRECISION
#define GL_VERTEX3V(_v) glVertex3dv(_v)
#define GL_NORMAL3V(_n) glNormal3dv(_n)
#else
#define GL_VERTEX3V(_v) glVertex3fv(_v)
#define GL_NORMAL3V(_n) glNormal3fv(_n)
#endif

/* Public globals, used by the standard visibility and fold criterion tests */
extern vdsVec3 vdsViewPt;
extern vdsVec3 vdsLookVec;
extern vdsFloat vdsFOV;
extern vdsFloat vdsInvTanFOV;
extern vdsFloat vdsThreshold;

/* Common prototypes */
extern void vdsSetFOV(vdsFloat FOV);
extern void vdsSetViewpoint(vdsVec3 viewpt);
extern void vdsSetLookVec(vdsVec3 look);
extern void vdsSetThreshold(vdsFloat thresh);

/* Fold criterion prototypes */
extern int vdsThresholdTest(const vdsNode *node);

/* Visibility test prototypes */
extern int vdsSimpleVisibility(const vdsNode *node);

/* Rendering function prototypes */
extern void vdsRenderWireframe(const vdsNode *node);
extern void vdsRenderShaded(const vdsNode *node);
extern void vdsRenderShadedLit(const vdsNode *node);
extern void vdsRenderLit(const vdsNode *node);
extern unsigned int vdsCountTrisDrawn();

#ifdef __cplusplus
}
#endif

#endif /* _STDVDS_h_ */