Blender V4.5
CCGSubSurf_intern.h File Reference
#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

EHashccg_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)
CCGAllocatorIFCccg_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)

Macro Definition Documentation

◆ CCGSUBSURF_alloc

#define CCGSUBSURF_alloc ( ss,
nb )
Value:
((ss)->allocatorIFC.alloc((ss)->allocator, nb))

Definition at line 190 of file CCGSubSurf_intern.h.

Referenced by _edge_new(), _face_new(), _vert_new(), ccgSubSurf_new(), and ccgSubSurf_setAllowEdgeCreation().

◆ CCGSUBSURF_free

#define CCGSUBSURF_free ( ss,
ptr )
Value:
((ss)->allocatorIFC.free((ss)->allocator, ptr))
PointerRNA * ptr
Definition wm_files.cc:4227

Definition at line 193 of file CCGSubSurf_intern.h.

Referenced by _edge_free(), _face_free(), _vert_free(), ccgSubSurf_free(), and ccgSubSurf_setAllowEdgeCreation().

◆ CCGSUBSURF_LEVEL_MAX

#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().

◆ CCGSUBSURF_realloc

#define CCGSUBSURF_realloc ( ss,
ptr,
nb,
ob )
Value:
((ss)->allocatorIFC.realloc((ss)->allocator, ptr, nb, ob))

Definition at line 191 of file CCGSubSurf_intern.h.

Referenced by _edge_addFace(), _vert_addEdge(), and _vert_addFace().

◆ EDGE_getCo

#define EDGE_getCo ( e,
lvl,
x )
Value:
(float *)ccg_edge_getCo(e, lvl, x, vertDataSize)
BLI_INLINE void * ccg_edge_getCo(CCGEdge *e, int lvl, int x, int dataSize)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e

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().

◆ EDGE_getNo

#define EDGE_getNo ( e,
lvl,
x )
Value:
ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset)
BLI_INLINE float * ccg_edge_getNo(CCGEdge *e, int lvl, int x, int dataSize, int normalDataOffset)

Definition at line 198 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals().

◆ EHASH_alloc

#define EHASH_alloc ( eh,
nb )
Value:
(EHEntry **)((eh)->allocatorIFC.alloc((eh)->allocator, nb))

Definition at line 50 of file CCGSubSurf_intern.h.

Referenced by ccg_ehash_insert(), and ccg_ehash_new().

◆ EHASH_free

#define EHASH_free ( eh,
ptr )
Value:
((eh)->allocatorIFC.free((eh)->allocator, ptr))

Definition at line 51 of file CCGSubSurf_intern.h.

Referenced by ccg_ehash_free(), and ccg_ehash_insert().

◆ EHASH_hash

#define EHASH_hash ( eh,
item )
Value:
(((uintptr_t)(item)) % ((unsigned int)(eh)->curSize))

Definition at line 52 of file CCGSubSurf_intern.h.

Referenced by ccg_ehash_insert(), ccg_ehash_lookup(), and ccg_ehash_lookupWithPrev().

◆ EPSILON

#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().

◆ FACE_getIECo

#define FACE_getIECo ( f,
lvl,
S,
x )

◆ FACE_getIENo

#define FACE_getIENo ( f,
lvl,
S,
x )
Value:
ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset)
BLI_INLINE void * ccg_face_getIENo(CCGFace *f, int lvl, int S, int x, int levels, int dataSize, int normalDataOffset)

Definition at line 205 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals_faces_finalize_cb().

◆ FACE_getIFCo

#define FACE_getIFCo ( f,
lvl,
S,
x,
y )

◆ FACE_getIFNo

#define FACE_getIFNo ( f,
lvl,
S,
x,
y )
Value:
ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset)
BLI_INLINE float * ccg_face_getIFNo(CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize, int normalDataOffset)

Definition at line 199 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_finalize_cb().

◆ NormAdd

#define NormAdd ( av,
bv )
Value:
{ \
float *_a = (float *)av; \
const float *_b = (const float *)bv; \
_a[0] += _b[0]; \
_a[1] += _b[1]; \
_a[2] += _b[2]; \
} \
(void)0

Definition at line 227 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_edges_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_accumulate_cb().

◆ NormCopy

#define NormCopy ( av,
bv )
Value:
{ \
float *_a = (float *)av; \
const float *_b = (const float *)bv; \
_a[0] = _b[0]; \
_a[1] = _b[1]; \
_a[2] = _b[2]; \
} \
(void)0

Definition at line 218 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_edges_accumulate_cb(), and ccgSubSurf__calcVertNormals_faces_finalize_cb().

◆ NormZero

#define NormZero ( av)
Value:
{ \
float *_a = (float *)av; \
_a[0] = _a[1] = _a[2] = 0.0f; \
} \
(void)0

Definition at line 212 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), and Normalize().

◆ VERT_getCo

#define VERT_getCo ( v,
lvl )
Value:
(float *)ccg_vert_getCo(v, lvl, vertDataSize)
BLI_INLINE void * ccg_vert_getCo(CCGVert *v, int lvl, int dataSize)
ATTR_WARN_UNUSED_RESULT const BMVert * v

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().

◆ VERT_getNo

#define VERT_getNo ( v,
lvl )
Value:
ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)
BLI_INLINE float * ccg_vert_getNo(CCGVert *v, int lvl, int dataSize, int normalDataOffset)

Definition at line 196 of file CCGSubSurf_intern.h.

Referenced by ccgSubSurf__calcVertNormals().

Typedef Documentation

◆ EHEntryFreeFP

using EHEntryFreeFP = void (*)(EHEntry *, void *)

Definition at line 48 of file CCGSubSurf_intern.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Catmull-Clark Gridding Subdivision Surface.

Enumerator
Vert_eEffected 
Vert_eChanged 
Vert_eSeam 

Definition at line 83 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Face_eEffected 

Definition at line 93 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Edge_eEffected 

Definition at line 89 of file CCGSubSurf_intern.h.

◆ SyncState

enum SyncState
Enumerator
eSyncState_None 
eSyncState_Vert 
eSyncState_Edge 
eSyncState_Face 
eSyncState_Partial 

Definition at line 138 of file CCGSubSurf_intern.h.

Function Documentation

◆ ccg_ehash_free()

void ccg_ehash_free ( EHash * eh,
EHEntryFreeFP freeEntry,
void * user_data )

◆ ccg_ehash_insert()

◆ ccg_ehash_lookup()

void * ccg_ehash_lookup ( EHash * eh,
void * key )

◆ ccg_ehash_lookupWithPrev()

void * ccg_ehash_lookupWithPrev ( EHash * eh,
void * key,
void *** prevp_r )

◆ ccg_ehash_new()

◆ ccg_ehashIterator_getCurrent()

void * ccg_ehashIterator_getCurrent ( EHashIterator * ehi)

◆ ccg_ehashIterator_init()

◆ ccg_ehashIterator_isStopped()

int ccg_ehashIterator_isStopped ( EHashIterator * ehi)

◆ ccg_ehashIterator_next()

◆ ccg_getStandardAllocatorIFC()

CCGAllocatorIFC * ccg_getStandardAllocatorIFC ( void )

◆ ccgSubSurf__allFaces()

◆ ccgSubSurf__effectedFaceNeighbors()

void ccgSubSurf__effectedFaceNeighbors ( CCGSubSurf * ss,
CCGFace ** faces,
int numFaces,
CCGVert *** verts,
int * numVerts,
CCGEdge *** edges,
int * numEdges )

◆ ccgSubSurf__sync_legacy()