Blender V4.3
CCGSubSurf_intern.h File Reference

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

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 )   ((ss)->allocatorIFC.alloc((ss)->allocator, nb))

◆ CCGSUBSURF_free

#define CCGSUBSURF_free ( ss,
ptr )   ((ss)->allocatorIFC.free((ss)->allocator, ptr))

◆ CCGSUBSURF_LEVEL_MAX

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

◆ CCGSUBSURF_realloc

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

◆ EDGE_getCo

◆ EDGE_getNo

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

◆ EHASH_alloc

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

Definition at line 54 of file CCGSubSurf_intern.h.

Referenced by ccg_ehash_insert(), and ccg_ehash_new().

◆ EHASH_free

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

◆ EHASH_hash

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

◆ EPSILON

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

◆ FACE_getIECo

◆ FACE_getIENo

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

◆ FACE_getIFCo

◆ FACE_getIFNo

#define FACE_getIFNo ( f,
lvl,
S,
x,
y )    ccg_face_getIFNo(f, lvl, S, x, y, subdivLevels, vertDataSize, normalDataOffset)

◆ 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 231 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 222 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 216 of file CCGSubSurf_intern.h.

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

◆ VERT_getCo

◆ VERT_getNo

#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 Documentation

◆ byte

typedef unsigned char byte

Common type definitions.

Definition at line 33 of file CCGSubSurf_intern.h.

◆ EHash

typedef struct _EHash EHash

◆ EHEntry

typedef struct _EHEntry EHEntry

Hash implementation.

◆ EHEntryFreeFP

typedef void(* EHEntryFreeFP) (EHEntry *, void *)

Definition at line 52 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 87 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Edge_eEffected 

Definition at line 93 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Face_eEffected 

Definition at line 97 of file CCGSubSurf_intern.h.

◆ SyncState

enum SyncState
Enumerator
eSyncState_None 
eSyncState_Vert 
eSyncState_Edge 
eSyncState_Face 
eSyncState_Partial 

Definition at line 142 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()