20#undef DUMP_RESULT_GRIDS
24#define EPSILON (1.0e-35f)
27#define CCGSUBSURF_LEVEL_MAX 11
54#define EHASH_alloc(eh, nb) (EHEntry **)((eh)->allocatorIFC.alloc((eh)->allocator, nb))
55#define EHASH_free(eh, ptr) ((eh)->allocatorIFC.free((eh)->allocator, ptr))
56#define EHASH_hash(eh, item) (((uintptr_t)(item)) % ((unsigned int)(eh)->curSize))
194#define CCGSUBSURF_alloc(ss, nb) ((ss)->allocatorIFC.alloc((ss)->allocator, nb))
195#define CCGSUBSURF_realloc(ss, ptr, nb, ob) \
196 ((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob))
197#define CCGSUBSURF_free(ss, ptr) ((ss)->allocatorIFC.free((ss)->allocator, ptr))
199#define VERT_getCo(v, lvl) (float *)ccg_vert_getCo(v, lvl, vertDataSize)
200#define VERT_getNo(v, lvl) ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)
201#define EDGE_getCo(e, lvl, x) (float *)ccg_edge_getCo(e, lvl, x, vertDataSize)
202#define EDGE_getNo(e, lvl, x) ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset)
203#define FACE_getIFNo(f, lvl, S, x, y) \
204 ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset)
206# define FACE_calcIFNo(f, lvl, S, x, y, no) \
207 _face_calcIFNo(f, lvl, S, x, y, no, subdivLevels, vertDataSize)
209#define FACE_getIENo(f, lvl, S, x) \
210 ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset)
211#define FACE_getIECo(f, lvl, S, x) \
212 (float *)ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize)
213#define FACE_getIFCo(f, lvl, S, x, y) \
214 (float *)ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize)
216#define NormZero(av) \
218 float *_a = (float *)av; \
219 _a[0] = _a[1] = _a[2] = 0.0f; \
222#define NormCopy(av, bv) \
224 float *_a = (float *)av; \
225 const float *_b = (const float *)bv; \
231#define NormAdd(av, bv) \
233 float *_a = (float *)av; \
234 const float *_b = (const float *)bv; \
260#ifdef DUMP_RESULT_GRIDS
CCGAllocatorIFC * ccg_getStandardAllocatorIFC(void)
void ccgSubSurf__effectedFaceNeighbors(CCGSubSurf *ss, CCGFace **faces, int numFaces, CCGVert ***verts, int *numVerts, CCGEdge ***edges, int *numEdges)
void ccg_ehashIterator_init(EHash *eh, EHashIterator *ehi)
void ccg_ehashIterator_next(EHashIterator *ehi)
void ccg_ehash_insert(EHash *eh, EHEntry *entry)
void ccgSubSurf__allFaces(CCGSubSurf *ss, CCGFace ***faces, int *numFaces, int *freeFaces)
int ccg_ehashIterator_isStopped(EHashIterator *ehi)
void * ccg_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r)
void * ccg_ehashIterator_getCurrent(EHashIterator *ehi)
void ccg_ehash_free(EHash *eh, EHEntryFreeFP freeEntry, void *user_data)
EHash * ccg_ehash_new(int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
void(* EHEntryFreeFP)(EHEntry *, void *)
void * ccg_ehash_lookup(EHash *eh, void *key)
void ccgSubSurf__sync_legacy(CCGSubSurf *ss)
CCGAllocatorIFC allocatorIFC
void * defaultEdgeUserData
CCGAllocatorHDL allocator
CCGAllocatorIFC allocatorIFC
CCGAllocatorHDL allocator