|
Blender V4.5
|
#include "CCGSubSurf.h"Go to the source code of this file.
Classes | |
| struct | EHEntry |
| struct | EHash |
| struct | CCGVert |
| struct | CCGEdge |
| struct | CCGFace |
| struct | CCGSubSurf |
Macros | |
| #define | EPSILON (1.0e-35f) |
| #define | CCGSUBSURF_LEVEL_MAX 11 |
| #define | EHASH_alloc(eh, nb) |
| #define | EHASH_free(eh, ptr) |
| #define | EHASH_hash(eh, item) |
| #define | CCGSUBSURF_alloc(ss, nb) |
| #define | CCGSUBSURF_realloc(ss, ptr, nb, ob) |
| #define | CCGSUBSURF_free(ss, ptr) |
| #define | VERT_getCo(v, lvl) |
| #define | VERT_getNo(v, lvl) |
| #define | EDGE_getCo(e, lvl, x) |
| #define | EDGE_getNo(e, lvl, x) |
| #define | FACE_getIFNo(f, lvl, S, x, y) |
| #define | FACE_getIENo(f, lvl, S, x) |
| #define | FACE_getIECo(f, lvl, S, x) |
| #define | FACE_getIFCo(f, lvl, S, x, y) |
| #define | NormZero(av) |
| #define | NormCopy(av, bv) |
| #define | NormAdd(av, bv) |
Typedefs | |
| using | EHEntryFreeFP = void (*)(EHEntry *, void *) |
Enumerations | |
| enum | { Vert_eEffected = (1 << 0) , Vert_eChanged = (1 << 1) , Vert_eSeam = (1 << 2) } |
| enum | { Edge_eEffected = (1 << 0) } |
| enum | { Face_eEffected = (1 << 0) } |
| enum | SyncState { eSyncState_None = 0 , eSyncState_Vert , eSyncState_Edge , eSyncState_Face , eSyncState_Partial } |
Functions | |
| EHash * | ccg_ehash_new (int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator) |
| void | ccg_ehash_free (EHash *eh, EHEntryFreeFP freeEntry, void *user_data) |
| void | ccg_ehash_insert (EHash *eh, EHEntry *entry) |
| void * | ccg_ehash_lookupWithPrev (EHash *eh, void *key, void ***prevp_r) |
| void * | ccg_ehash_lookup (EHash *eh, void *key) |
| void | ccg_ehashIterator_init (EHash *eh, EHashIterator *ehi) |
| void * | ccg_ehashIterator_getCurrent (EHashIterator *ehi) |
| void | ccg_ehashIterator_next (EHashIterator *ehi) |
| int | ccg_ehashIterator_isStopped (EHashIterator *ehi) |
| CCGAllocatorIFC * | ccg_getStandardAllocatorIFC (void) |
| void | ccgSubSurf__allFaces (CCGSubSurf *ss, CCGFace ***faces, int *numFaces, int *freeFaces) |
| void | ccgSubSurf__effectedFaceNeighbors (CCGSubSurf *ss, CCGFace **faces, int numFaces, CCGVert ***verts, int *numVerts, CCGEdge ***edges, int *numEdges) |
| void | ccgSubSurf__sync_legacy (CCGSubSurf *ss) |
| #define CCGSUBSURF_alloc | ( | ss, | |
| nb ) |
Definition at line 190 of file CCGSubSurf_intern.h.
Referenced by _edge_new(), _face_new(), _vert_new(), ccgSubSurf_new(), and ccgSubSurf_setAllowEdgeCreation().
| #define CCGSUBSURF_free | ( | ss, | |
| ptr ) |
Definition at line 193 of file CCGSubSurf_intern.h.
Referenced by _edge_free(), _face_free(), _vert_free(), ccgSubSurf_free(), and ccgSubSurf_setAllowEdgeCreation().
| #define CCGSUBSURF_LEVEL_MAX 11 |
Definition at line 25 of file CCGSubSurf_intern.h.
Referenced by ccg_edgebase(), ccg_edgesize(), ccg_gridsize(), and ccg_spacing().
| #define CCGSUBSURF_realloc | ( | ss, | |
| ptr, | |||
| nb, | |||
| ob ) |
Definition at line 191 of file CCGSubSurf_intern.h.
Referenced by _edge_addFace(), _vert_addEdge(), and _vert_addFace().
Definition at line 197 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals(), ccgSubSurf__sync_legacy(), and ccgSubSurf_stitchFaces().
Definition at line 198 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals().
| #define EHASH_alloc | ( | eh, | |
| nb ) |
Definition at line 50 of file CCGSubSurf_intern.h.
Referenced by ccg_ehash_insert(), and ccg_ehash_new().
| #define EHASH_free | ( | eh, | |
| ptr ) |
Definition at line 51 of file CCGSubSurf_intern.h.
Referenced by ccg_ehash_free(), and ccg_ehash_insert().
| #define EHASH_hash | ( | eh, | |
| item ) |
Definition at line 52 of file CCGSubSurf_intern.h.
Referenced by ccg_ehash_insert(), ccg_ehash_lookup(), and ccg_ehash_lookupWithPrev().
| #define EPSILON (1.0e-35f) |
Definitions which defines internal behavior of CCGSubSurf.
Definition at line 22 of file CCGSubSurf_intern.h.
Referenced by box_isect(), btMultiBodySliderConstraint::createConstraintRows(), and Normalize().
| #define FACE_getIECo | ( | f, | |
| lvl, | |||
| S, | |||
| x ) |
Definition at line 207 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
| #define FACE_getIENo | ( | f, | |
| lvl, | |||
| S, | |||
| x ) |
Definition at line 205 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals_faces_finalize_cb().
Definition at line 209 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
Definition at line 199 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_finalize_cb().
| #define NormAdd | ( | av, | |
| bv ) |
Definition at line 227 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_edges_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_accumulate_cb().
| #define NormCopy | ( | av, | |
| bv ) |
Definition at line 218 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_edges_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_finalize_cb().
| #define NormZero | ( | av | ) |
Definition at line 212 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), and Normalize().
| #define VERT_getCo | ( | v, | |
| lvl ) |
Definition at line 195 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals(), ccgSubSurf__sync_legacy(), ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
| #define VERT_getNo | ( | v, | |
| lvl ) |
Definition at line 196 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals().
| using EHEntryFreeFP = void (*)(EHEntry *, void *) |
Definition at line 48 of file CCGSubSurf_intern.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Face_eEffected | |
Definition at line 93 of file CCGSubSurf_intern.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Edge_eEffected | |
Definition at line 89 of file CCGSubSurf_intern.h.
| anonymous enum |
Catmull-Clark Gridding Subdivision Surface.
| Enumerator | |
|---|---|
| Vert_eEffected | |
| Vert_eChanged | |
| Vert_eSeam | |
Definition at line 83 of file CCGSubSurf_intern.h.
| enum SyncState |
| Enumerator | |
|---|---|
| eSyncState_None | |
| eSyncState_Vert | |
| eSyncState_Edge | |
| eSyncState_Face | |
| eSyncState_Partial | |
Definition at line 138 of file CCGSubSurf_intern.h.
| void ccg_ehash_free | ( | EHash * | eh, |
| EHEntryFreeFP | freeEntry, | ||
| void * | user_data ) |
Definition at line 52 of file CCGSubSurf_util.cc.
References EHash::buckets, EHash::curSize, EHASH_free, EHEntry::next, and next.
Referenced by ccgSubSurf_free(), ccgSubSurf_processSync(), and ccgSubSurf_setSubdivisionLevels().
Definition at line 72 of file CCGSubSurf_util.cc.
References EHash::buckets, EHash::curSize, EHash::curSizeIdx, EHASH_alloc, EHASH_free, EHASH_hash, hash, EHEntry::key, kHashSizes, EHEntry::next, next, EHash::numEntries, and UNLIKELY.
Referenced by ccgSubSurf_syncEdge(), ccgSubSurf_syncFace(), and ccgSubSurf_syncVert().
| void * ccg_ehash_lookup | ( | EHash * | eh, |
| void * | key ) |
Definition at line 119 of file CCGSubSurf_util.cc.
References EHash::buckets, EHASH_hash, hash, EHEntry::key, and EHEntry::next.
Referenced by ccgSubSurf_getEdge(), ccgSubSurf_getFace(), ccgSubSurf_getVert(), ccgSubSurf_syncEdge(), and ccgSubSurf_syncFace().
| void * ccg_ehash_lookupWithPrev | ( | EHash * | eh, |
| void * | key, | ||
| void *** | prevp_r ) |
Definition at line 103 of file CCGSubSurf_util.cc.
References EHash::buckets, EHASH_hash, hash, EHEntry::key, and EHEntry::next.
Referenced by ccgSubSurf_syncEdge(), ccgSubSurf_syncEdgeDel(), ccgSubSurf_syncFace(), ccgSubSurf_syncFaceDel(), ccgSubSurf_syncVert(), and ccgSubSurf_syncVertDel().
| EHash * ccg_ehash_new | ( | int | estimatedNumEntries, |
| CCGAllocatorIFC * | allocatorIFC, | ||
| CCGAllocatorHDL | allocator ) |
Definition at line 33 of file CCGSubSurf_util.cc.
References CCGAllocatorIFC::alloc, EHash::allocator, EHash::allocatorIFC, EHash::buckets, EHash::curSize, EHash::curSizeIdx, EHASH_alloc, kHashSizes, and EHash::numEntries.
Referenced by ccgSubSurf_initFullSync(), ccgSubSurf_new(), and ccgSubSurf_setSubdivisionLevels().
| void * ccg_ehashIterator_getCurrent | ( | EHashIterator * | ehi | ) |
Definition at line 155 of file CCGSubSurf_util.cc.
References EHashIterator::curEntry.
Referenced by ccgEdgeIterator_getCurrent(), ccgFaceIterator_getCurrent(), and ccgVertIterator_getCurrent().
| void ccg_ehashIterator_init | ( | EHash * | eh, |
| EHashIterator * | ehi ) |
Definition at line 139 of file CCGSubSurf_util.cc.
References EHash::buckets, EHashIterator::curBucket, EHashIterator::curEntry, EHash::curSize, and EHashIterator::eh.
Referenced by ccgSubSurf_initEdgeIterator(), ccgSubSurf_initFaceIterator(), and ccgSubSurf_initVertIterator().
| int ccg_ehashIterator_isStopped | ( | EHashIterator * | ehi | ) |
Definition at line 173 of file CCGSubSurf_util.cc.
References EHashIterator::curEntry.
Referenced by ccgEdgeIterator_isStopped(), ccgFaceIterator_isStopped(), and ccgVertIterator_isStopped().
| void ccg_ehashIterator_next | ( | EHashIterator * | ehi | ) |
Definition at line 160 of file CCGSubSurf_util.cc.
References EHash::buckets, EHashIterator::curBucket, EHashIterator::curEntry, EHash::curSize, EHashIterator::eh, and EHEntry::next.
Referenced by ccgEdgeIterator_next(), ccgFaceIterator_next(), and ccgVertIterator_next().
| CCGAllocatorIFC * ccg_getStandardAllocatorIFC | ( | void | ) |
Standard allocator implementation.
Definition at line 199 of file CCGSubSurf_util.cc.
References _stdAllocator_alloc(), _stdAllocator_free(), _stdAllocator_realloc(), CCGAllocatorIFC::alloc, CCGAllocatorIFC::free, CCGAllocatorIFC::realloc, and CCGAllocatorIFC::release.
Referenced by ccgSubSurf_new().
| void ccgSubSurf__allFaces | ( | CCGSubSurf * | ss, |
| CCGFace *** | faces, | ||
| int * | numFaces, | ||
| int * | freeFaces ) |
Definition at line 865 of file CCGSubSurf.cc.
References EHash::buckets, EHash::curSize, faces, CCGSubSurf::fMap, i, MEM_malloc_arrayN(), CCGFace::next, num, and EHash::numEntries.
Referenced by ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), ccgSubSurf_updateLevels(), ccgSubSurf_updateNormals(), and ccgSubSurf_updateToFaces().
| void ccgSubSurf__effectedFaceNeighbors | ( | CCGSubSurf * | ss, |
| CCGFace ** | faces, | ||
| int | numFaces, | ||
| CCGVert *** | verts, | ||
| int * | numVerts, | ||
| CCGEdge *** | edges, | ||
| int * | numEdges ) |
Definition at line 890 of file CCGSubSurf.cc.
References EHash::buckets, EHash::curSize, e, Edge_eEffected, CCGSubSurf::eMap, Face_eEffected, faces, CCGFace::flags, i, MEM_malloc_arrayN(), EHash::numEntries, v, Vert_eEffected, verts, and CCGSubSurf::vMap.
Referenced by ccgSubSurf_stitchFaces(), ccgSubSurf_updateLevels(), and ccgSubSurf_updateNormals().
| void ccgSubSurf__sync_legacy | ( | CCGSubSurf * | ss | ) |
Definition at line 1009 of file CCGSubSurf_legacy.cc.
References _edge_getCoVert(), _edge_getOtherVert(), _edge_isBoundary(), _vert_isBoundary(), EHash::buckets, CCGSubSurf::calcVertNormals, ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcVertNormals(), ccgSubSurf_getEdgeUserData(), ccgSubSurf_getFaceUserData(), ccgSubSurf_getVertUserData(), CCGSubSurf::currentAge, EHash::curSize, e, Edge_eEffected, EDGE_getCo, EDGE_getSharpness(), CCGSubSurf::edgeUserAgeOffset, CCGSubSurf::eMap, Face_eEffected, FACE_getCenterData(), FACE_getEdges(), FACE_getIECo, FACE_getIFCo, FACE_getVerts(), CCGSubSurf::faceUserAgeOffset, CCGFace::flags, CCGSubSurf::fMap, i, MEM_freeN(), MEM_malloc_arrayN(), CCGSubSurf::meshIFC, EHash::numEntries, CCGFace::numVerts, CCGSubSurf::q, CCGSubSurf::r, CCGMeshIFC::simpleSubdiv, CCGSubSurf::subdivLevels, CCGSubSurf::useAgeCounts, v, Vert_eEffected, VERT_getCo, VERT_seam(), VertDataAdd(), VertDataCopy(), VertDataMulN(), CCGMeshIFC::vertDataSize, VertDataSub(), VertDataZero(), CCGSubSurf::vertUserAgeOffset, and CCGSubSurf::vMap.
Referenced by ccgSubSurf__sync().