ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/objutil.h
(Generate patch)

Comparing ray/src/common/objutil.h (file contents):
Revision 2.11 by greg, Mon Feb 15 18:45:11 2021 UTC vs.
Revision 2.13 by greg, Fri Mar 12 03:59:25 2021 UTC

# Line 10 | Line 10
10   #ifndef _OBJUTIL_H_
11   #define _OBJUTIL_H_
12  
13 + #ifdef __cplusplus
14 + extern "C" {
15 + #endif
16 +
17   #ifndef DUP_CHECK_REVERSE
18   #define DUP_CHECK_REVERSE       1       /* eliminate flipped duplicates */
19   #endif
# Line 21 | Line 25
25   #define FACE_DUPLICATE          02
26   #define FACE_SELECTED           04
27   #define FACE_CUSTOM(n)          (FACE_SELECTED<<(n))
28 + #define FACE_RESERVED           (1<<15)
29  
30   struct Face;                            /* forward declaration */
31  
# Line 79 | Line 84 | typedef struct {
84          int             nfaces;         /* count of faces */
85   } Scene;
86  
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85
87   /* Allocate a new scene holder */
88   Scene *         newScene(void);
89  
# Line 177 | Line 178 | void           setMaterial(Scene *sc, const char *nm);
178   /* Add a new face to our scene, using current group and material */
179   Face *          addFace(Scene *sc, VNDX vid[], int nv);
180  
181 + /* Convert all faces with > 3 vertices to triangles */
182 + int             triangulateScene(Scene *sc);
183 +
184   /* Delete unreferenced vertices, normals, texture coords */
185   void            deleteUnreferenced(Scene *sc);
186  
# Line 192 | Line 196 | extern int      verbose;
196   extern char     *emalloc(unsigned int n);
197   extern char     *ecalloc(unsigned int ne, unsigned int n);
198   extern char     *erealloc(char *cp, unsigned int n);
199 < extern void     efree(char *cp);
199 > extern void     efree(char *cp);
200 >
201 > #define getGroupID(sc,nm)       findName(nm, (const char **)(sc)->grpname, (sc)->ngrps)
202 > #define getMaterialID(sc,nm)    findName(nm, (const char **)(sc)->matname, (sc)->nmats)
203  
204   #define CHUNKSIZ        128     /* object allocation chunk size */
205  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines