|
Blender V4.3
|
#include "CCGSubSurf_inline.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) (EHEntry **)((eh)->allocatorIFC.alloc((eh)->allocator, nb)) |
| #define | EHASH_free(eh, ptr) ((eh)->allocatorIFC.free((eh)->allocator, ptr)) |
| #define | EHASH_hash(eh, item) (((uintptr_t)(item)) % ((unsigned int)(eh)->curSize)) |
| #define | CCGSUBSURF_alloc(ss, nb) ((ss)->allocatorIFC.alloc((ss)->allocator, nb)) |
| #define | CCGSUBSURF_realloc(ss, ptr, nb, ob) ((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob)) |
| #define | CCGSUBSURF_free(ss, ptr) ((ss)->allocatorIFC.free((ss)->allocator, ptr)) |
| #define | VERT_getCo(v, lvl) (float *)ccg_vert_getCo(v, lvl, vertDataSize) |
| #define | VERT_getNo(v, lvl) ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset) |
| #define | EDGE_getCo(e, lvl, x) (float *)ccg_edge_getCo(e, lvl, x, vertDataSize) |
| #define | EDGE_getNo(e, lvl, x) ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset) |
| #define | FACE_getIFNo(f, lvl, S, x, y) ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset) |
| #define | FACE_getIENo(f, lvl, S, x) ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset) |
| #define | FACE_getIECo(f, lvl, S, x) (float *)ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize) |
| #define | FACE_getIFCo(f, lvl, S, x, y) (float *)ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize) |
| #define | NormZero(av) |
| #define | NormCopy(av, bv) |
| #define | NormAdd(av, bv) |
Typedefs | |
| typedef unsigned char | byte |
| typedef struct _EHEntry | EHEntry |
| typedef struct _EHash | EHash |
| typedef void(* | EHEntryFreeFP) (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 ) ((ss)->allocatorIFC.alloc((ss)->allocator, nb)) |
Definition at line 194 of file CCGSubSurf_intern.h.
Referenced by _edge_new(), _face_new(), _vert_new(), ccgSubSurf_new(), and ccgSubSurf_setAllowEdgeCreation().
| #define CCGSUBSURF_free | ( | ss, | |
| ptr ) ((ss)->allocatorIFC.free((ss)->allocator, ptr)) |
Definition at line 197 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 27 of file CCGSubSurf_intern.h.
Referenced by ccg_edgebase(), ccg_edgesize(), ccg_gridsize(), and ccg_spacing().
| #define CCGSUBSURF_realloc | ( | ss, | |
| ptr, | |||
| nb, | |||
| ob ) ((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob)) |
Definition at line 195 of file CCGSubSurf_intern.h.
Referenced by _edge_addFace(), _vert_addEdge(), and _vert_addFace().
| #define EDGE_getCo | ( | e, | |
| lvl, | |||
| x ) (float *)ccg_edge_getCo(e, lvl, x, vertDataSize) |
Definition at line 201 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals(), ccgSubSurf__sync_legacy(), and ccgSubSurf_stitchFaces().
| #define EDGE_getNo | ( | e, | |
| lvl, | |||
| x ) ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset) |
Definition at line 202 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals().
Definition at line 54 of file CCGSubSurf_intern.h.
Referenced by ccg_ehash_insert(), and ccg_ehash_new().
| #define EHASH_free | ( | eh, | |
| ptr ) ((eh)->allocatorIFC.free((eh)->allocator, ptr)) |
Definition at line 55 of file CCGSubSurf_intern.h.
Referenced by ccg_ehash_free(), and ccg_ehash_insert().
Definition at line 56 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 24 of file CCGSubSurf_intern.h.
Referenced by btMultiBodySliderConstraint::createConstraintRows(), and Normalize().
| #define FACE_getIECo | ( | f, | |
| lvl, | |||
| S, | |||
| x ) (float *)ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize) |
Definition at line 211 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 ) ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset) |
Definition at line 209 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals_faces_finalize_cb().
| #define FACE_getIFCo | ( | f, | |
| lvl, | |||
| S, | |||
| x, | |||
| y ) (float *)ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize) |
Definition at line 213 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().
| #define FACE_getIFNo | ( | f, | |
| lvl, | |||
| S, | |||
| x, | |||
| y ) ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset) |
Definition at line 203 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 231 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 222 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 216 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), and Normalize().
| #define VERT_getCo | ( | v, | |
| lvl ) (float *)ccg_vert_getCo(v, lvl, vertDataSize) |
Definition at line 199 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 ) ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset) |
Definition at line 200 of file CCGSubSurf_intern.h.
Referenced by ccgSubSurf__calcVertNormals().
| typedef unsigned char byte |
Common type definitions.
Definition at line 33 of file CCGSubSurf_intern.h.
| typedef void(* EHEntryFreeFP) (EHEntry *, void *) |
Definition at line 52 of file CCGSubSurf_intern.h.
| anonymous enum |
Catmull-Clark Gridding Subdivision Surface.
| Enumerator | |
|---|---|
| Vert_eEffected | |
| Vert_eChanged | |
| Vert_eSeam | |
Definition at line 87 of file CCGSubSurf_intern.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Edge_eEffected | |
Definition at line 93 of file CCGSubSurf_intern.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Face_eEffected | |
Definition at line 97 of file CCGSubSurf_intern.h.
| enum SyncState |
| Enumerator | |
|---|---|
| eSyncState_None | |
| eSyncState_Vert | |
| eSyncState_Edge | |
| eSyncState_Face | |
| eSyncState_Partial | |
Definition at line 142 of file CCGSubSurf_intern.h.
| void ccg_ehash_free | ( | EHash * | eh, |
| EHEntryFreeFP | freeEntry, | ||
| void * | user_data ) |
Definition at line 54 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 74 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 121 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 105 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 35 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 157 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 141 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 175 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 162 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 201 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 868 of file CCGSubSurf.cc.
References _EHash::buckets, _EHash::curSize, CCGSubSurf::fMap, MEM_mallocN, CCGFace::next, 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 894 of file CCGSubSurf.cc.
References _EHash::buckets, _EHash::curSize, e, Edge_eEffected, CCGSubSurf::eMap, Face_eEffected, CCGFace::flags, MEM_mallocN, _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 1012 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, MEM_freeN(), MEM_mallocN, 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().