23 |
|
|
24 |
|
struct Face; /* forward declaration */ |
25 |
|
|
26 |
+ |
typedef int VNDX[3]; /* vertex indices (point,map,normal) */ |
27 |
+ |
|
28 |
+ |
/* Structure to hold vertex indices and link back to face list */ |
29 |
|
typedef struct { |
30 |
|
int vid; /* vertex id */ |
31 |
|
int tid; /* texture id */ |
92 |
|
Scene * dupScene(const Scene *sc); |
93 |
|
|
94 |
|
/* Transform entire scene */ |
95 |
+ |
int xfScene(Scene *sc, int xac, char *xav[]); |
96 |
|
int xfmScene(Scene *sc, const char *xfm); |
97 |
|
|
98 |
|
/* Add a descriptive comment */ |
155 |
|
int changeMaterial(Scene *sc, const char *mname, |
156 |
|
int flreq, int flexc); |
157 |
|
|
158 |
< |
/* Grab texture coord's/normals from another object via ray tracing */ |
159 |
< |
#define GET_TEXTURE 01 |
160 |
< |
#define GET_NORMALS 02 |
161 |
< |
int traceSurface(Scene *sc, int flreq, int flexc, |
162 |
< |
const char *oct, int what); |
158 |
> |
/* Add a vertex to our scene, returning index */ |
159 |
> |
int addVertex(Scene *sc, double x, double y, double z); |
160 |
> |
|
161 |
> |
/* Add a texture coordinate to our scene, returning index */ |
162 |
> |
int addTexture(Scene *sc, double u, double v); |
163 |
> |
|
164 |
> |
/* Add a surface normal to our scene, returning index */ |
165 |
> |
int addNormal(Scene *sc, double xn, double yn, double zn); |
166 |
> |
|
167 |
> |
/* Set current group (sc->lastgrp) to given ID */ |
168 |
> |
void setGroup(Scene *sc, const char *nm); |
169 |
> |
|
170 |
> |
/* Set current material (sc->lastmat) to given ID */ |
171 |
> |
void setMaterial(Scene *sc, const char *nm); |
172 |
> |
|
173 |
> |
/* Add a new face to our scene, using current group and material */ |
174 |
> |
Face * addFace(Scene *sc, VNDX vid[], int nv); |
175 |
|
|
176 |
|
/* Free a scene */ |
177 |
|
void freeScene(Scene *sc); |