18#undef DUMP_RESULT_GRIDS
22#define EPSILON (1.0e-35f)
25#define CCGSUBSURF_LEVEL_MAX 11
50#define EHASH_alloc(eh, nb) (EHEntry **)((eh)->allocatorIFC.alloc((eh)->allocator, nb))
51#define EHASH_free(eh, ptr) ((eh)->allocatorIFC.free((eh)->allocator, ptr))
52#define EHASH_hash(eh, item) (((uintptr_t)(item)) % ((unsigned int)(eh)->curSize))
190#define CCGSUBSURF_alloc(ss, nb) ((ss)->allocatorIFC.alloc((ss)->allocator, nb))
191#define CCGSUBSURF_realloc(ss, ptr, nb, ob) \
192 ((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob))
193#define CCGSUBSURF_free(ss, ptr) ((ss)->allocatorIFC.free((ss)->allocator, ptr))
195#define VERT_getCo(v, lvl) (float *)ccg_vert_getCo(v, lvl, vertDataSize)
196#define VERT_getNo(v, lvl) ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)
197#define EDGE_getCo(e, lvl, x) (float *)ccg_edge_getCo(e, lvl, x, vertDataSize)
198#define EDGE_getNo(e, lvl, x) ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset)
199#define FACE_getIFNo(f, lvl, S, x, y) \
200 ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset)
202# define FACE_calcIFNo(f, lvl, S, x, y, no) \
203 _face_calcIFNo(f, lvl, S, x, y, no, subdivLevels, vertDataSize)
205#define FACE_getIENo(f, lvl, S, x) \
206 ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset)
207#define FACE_getIECo(f, lvl, S, x) \
208 (float *)ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize)
209#define FACE_getIFCo(f, lvl, S, x, y) \
210 (float *)ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize)
212#define NormZero(av) \
214 float *_a = (float *)av; \
215 _a[0] = _a[1] = _a[2] = 0.0f; \
218#define NormCopy(av, bv) \
220 float *_a = (float *)av; \
221 const float *_b = (const float *)bv; \
227#define NormAdd(av, bv) \
229 float *_a = (float *)av; \
230 const float *_b = (const float *)bv; \
256#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)
void(*)(EHEntry *, void *) EHEntryFreeFP
EHash * ccg_ehash_new(int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
void * ccg_ehash_lookup(EHash *eh, void *key)
void ccgSubSurf__sync_legacy(CCGSubSurf *ss)
CCGAllocatorIFC allocatorIFC
void * defaultEdgeUserData
CCGAllocatorHDL allocator
CCGAllocatorHDL allocator
CCGAllocatorIFC allocatorIFC