1
1
/* display list (or rather multi purpose list) stuff */
3
$Id: BKE_displist.h,v 1.10 2004/03/28 08:46:33 zuster Exp $
3
$Id: BKE_displist.h,v 1.26 2005/05/27 09:51:06 ton Exp $
5
5
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
44
45
#define DL_VERTCOL 6
49
/* EVIL: #define DL_SURFINDEX(cyclu, cyclv, sizeu, sizev) */
52
#define DL_FRONT_CURVE 4
53
#define DL_BACK_CURVE 8
55
/* This should, of course, become a function */
56
#define DL_SURFINDEX(cyclu, cyclv, sizeu, sizev) \
58
if( (cyclv)==0 && a==(sizev)-1) break; \
73
if( (cyclv) && a==sizev-1) { \
62
92
typedef struct DispListMesh DispListMesh;
63
93
struct DispListMesh {
94
int totvert, totedge, totface;
65
95
struct MVert *mvert;
67
98
struct MFace *mface;
68
99
struct TFace *tface;
100
float *nors; // facenormals
72
103
void displistmesh_free(DispListMesh *dlm);
73
void displistmesh_calc_vert_normals(DispListMesh *dlm);
104
void displistmesh_calc_normals(DispListMesh *dlm);
75
106
void displistmesh_to_mesh(DispListMesh *dlm, struct Mesh *me);
77
DispListMesh *displistmesh_from_editmesh(struct EditMesh *em);
78
DispListMesh *displistmesh_from_mesh(struct Mesh *mesh, float *extverts);
108
DispListMesh *displistmesh_copy(DispListMesh *odlm);
81
111
* All the different DispList.type's use the
97
127
float *verts, *nors;
99
129
unsigned int *col1, *col2;
100
struct DispListMesh *mesh;
102
/* Begin NASTY_NLA_STUFF */
103
// int *offset, *run; /* Used to index into the bone & weight lists */
104
// struct Bone *bones;
106
/* End NASTY_NLA_STUFF */
109
132
extern void copy_displist(struct ListBase *lbn, struct ListBase *lb);
110
133
extern void free_disp_elem(DispList *dl);
111
extern void free_displist_by_type(struct ListBase *lb, int type);
112
134
extern DispList *find_displist_create(struct ListBase *lb, int type);
113
135
extern DispList *find_displist(struct ListBase *lb, int type);
114
136
extern void addnormalsDispList(struct Object *ob, struct ListBase *lb);
115
137
extern void count_displist(struct ListBase *lb, int *totvert, int *totface);
116
extern void curve_to_filledpoly(struct Curve *cu, struct ListBase *dispbase);
138
extern void curve_to_filledpoly(struct Curve *cu, struct ListBase *nurb, struct ListBase *dispbase);
117
139
extern void freedisplist(struct ListBase *lb);
140
extern int displist_has_faces(struct ListBase *lb);
141
extern float calc_taper(struct Object *taperobj, int cur, int tot);
118
142
extern void makeDispList(struct Object *ob);
119
143
extern void set_displist_onlyzero(int val);
120
144
extern void shadeDispList(struct Object *ob);
123
147
void imagestodisplist(void);
124
148
void reshadeall_displist(void);
125
149
void test_all_displists(void);
150
void filldisplist(struct ListBase *dispbase, struct ListBase *to);