File: v3dmodel.h

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (73 lines) | stat: -rw-r--r-- 1,616 bytes parent folder | download | duplicates (7)
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
/*
			       V3D Models

	When adding new members to the structure, make sure you update
	functions ModelCreate(), ModelDup(), and ModelDestroy() to
	ensure all members are handled properly.

 */

#ifndef V3DMODEL_H
#define V3DMODEL_H

#include <sys/types.h>
#include "v3dmp.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */


/*
 *	Model type codes:
 */
#define V3D_MODEL_TYPE_STANDARD		1
#define V3D_MODEL_TYPE_OTHER_DATA	2	/* Third party data block. */

/*
 *	Model flags:
 */
#define V3D_MODEL_FLAG_HIDE		(1 << 1)


/*
 *	Model structure:
 */
typedef struct {

	int type;		/* One of V3D_MODEL_TYPE_*. */
	unsigned int flags;	/* Any of V3D_MODEL_FLAG_*. */
	char *name;		/* To be displayed on the list widget. */

	/* Only if type is V3D_MODEL_TYPE_STANDARD. */
	void **primitive;
	int total_primitives;

	/* Only if type is V3D_MODEL_TYPE_OTHERDATA. */
	char **other_data_line;
	int total_other_data_lines;

} v3d_model_struct;


extern v3d_model_struct *V3DModelCreate(int type, const char *name);
extern v3d_model_struct *V3DModelDup(const v3d_model_struct *m);
extern void V3DModelDestroy(v3d_model_struct *m);

extern v3d_model_struct *V3DModelListGetPtr(v3d_model_struct **list, int total, int i);
extern v3d_model_struct *V3DModelListInsert(
	v3d_model_struct ***list, int *total, int i,
	int type, const char *name
);
extern void V3DModelListDelete(v3d_model_struct ***list, int *total, int i);
extern void V3DModelListDeleteAll(v3d_model_struct ***list, int *total);


extern int V3DModelGetType(v3d_model_struct *m);


#ifdef __cplusplus
}  
#endif /* __cplusplus */

#endif	/* V3DMODEL_H */