14 #undef DUMP_RESULT_GRIDS
18 #define EPSILON (1.0e-35f)
21 #define CCGSUBSURF_LEVEL_MAX 11
27 typedef unsigned char byte;
48 #define EHASH_alloc(eh, nb) ((eh)->allocatorIFC.alloc((eh)->allocator, nb))
49 #define EHASH_free(eh, ptr) ((eh)->allocatorIFC.free((eh)->allocator, ptr))
50 #define EHASH_hash(eh, item) (((uintptr_t)(item)) % ((unsigned int)(eh)->curSize))
191 #define CCGSUBSURF_alloc(ss, nb) ((ss)->allocatorIFC.alloc((ss)->allocator, nb))
192 #define CCGSUBSURF_realloc(ss, ptr, nb, ob) \
193 ((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob))
194 #define CCGSUBSURF_free(ss, ptr) ((ss)->allocatorIFC.free((ss)->allocator, ptr))
196 #define VERT_getCo(v, lvl) ccg_vert_getCo(v, lvl, vertDataSize)
197 #define VERT_getNo(v, lvl) ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)
198 #define EDGE_getCo(e, lvl, x) ccg_edge_getCo(e, lvl, x, vertDataSize)
199 #define EDGE_getNo(e, lvl, x) ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset)
200 #define FACE_getIFNo(f, lvl, S, x, y) \
201 ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset)
203 # define FACE_calcIFNo(f, lvl, S, x, y, no) \
204 _face_calcIFNo(f, lvl, S, x, y, no, subdivLevels, vertDataSize)
206 #define FACE_getIENo(f, lvl, S, x) \
207 ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset)
208 #define FACE_getIECo(f, lvl, S, x) ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize)
209 #define FACE_getIFCo(f, lvl, S, x, y) ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize)
211 #define NormZero(av) \
213 float *_a = (float *)av; \
214 _a[0] = _a[1] = _a[2] = 0.0f; \
217 #define NormCopy(av, bv) \
219 float *_a = (float *)av, *_b = (float *)bv; \
225 #define NormAdd(av, bv) \
227 float *_a = (float *)av, *_b = (float *)bv; \
269 #ifdef DUMP_RESULT_GRIDS
void * ccg_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r)
void ccgSubSurf_converter_setup_from_ccg(CCGSubSurf *ss, struct OpenSubdiv_Converter *converter)
void ccgSubSurf__effectedFaceNeighbors(CCGSubSurf *ss, CCGFace **faces, int numFaces, CCGVert ***verts, int *numVerts, CCGEdge ***edges, int *numEdges)
void ccgSubSurf__sync_opensubdiv(CCGSubSurf *ss)
void ccg_ehashIterator_init(EHash *eh, EHashIterator *ehi)
void ccg_ehashIterator_next(EHashIterator *ehi)
void * ccg_ehash_lookup(EHash *eh, void *key)
void ccg_ehash_insert(EHash *eh, EHEntry *entry)
void ccgSubSurf__allFaces(CCGSubSurf *ss, CCGFace ***faces, int *numFaces, int *freeFaces)
EHash * ccg_ehash_new(int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
void ccg_ehash_free(EHash *eh, EHEntryFreeFP freeEntry, void *userData)
void * ccg_ehashIterator_getCurrent(EHashIterator *ehi)
int ccg_ehashIterator_isStopped(EHashIterator *ehi)
CCGAllocatorIFC * ccg_getStandardAllocatorIFC(void)
void ccgSubSurf_converter_setup_from_derivedmesh(CCGSubSurf *ss, struct DerivedMesh *dm, struct OpenSubdiv_Converter *converter)
void(* EHEntryFreeFP)(EHEntry *, void *)
void ccgSubSurf_converter_free(struct OpenSubdiv_Converter *converter)
void ccgSubSurf__sync_legacy(CCGSubSurf *ss)
SyclQueue void void size_t num_bytes void
CCGAllocatorIFC allocatorIFC
void * defaultEdgeUserData
CCGAllocatorHDL allocator
CCGAllocatorIFC allocatorIFC
CCGAllocatorHDL allocator