Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
CCGSubSurf_intern.h File Reference
#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)   ((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)   ccg_vert_getCo(v, lvl, vertDataSize)
 
#define VERT_getNo(v, lvl)   ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)
 
#define EDGE_getCo(e, lvl, x)   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)   ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize)
 
#define FACE_getIFCo(f, lvl, S, x, y)   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 *userData)
 
void ccg_ehash_insert (EHash *eh, EHEntry *entry)
 
voidccg_ehash_lookupWithPrev (EHash *eh, void *key, void ***prevp_r)
 
voidccg_ehash_lookup (EHash *eh, void *key)
 
void ccg_ehashIterator_init (EHash *eh, EHashIterator *ehi)
 
voidccg_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)
 
void ccgSubSurf__sync_opensubdiv (CCGSubSurf *ss)
 
void ccgSubSurf_converter_setup_from_derivedmesh (CCGSubSurf *ss, struct DerivedMesh *dm, struct OpenSubdiv_Converter *converter)
 
void ccgSubSurf_converter_setup_from_ccg (CCGSubSurf *ss, struct OpenSubdiv_Converter *converter)
 
void ccgSubSurf_converter_free (struct OpenSubdiv_Converter *converter)
 

Macro Definition Documentation

◆ CCGSUBSURF_alloc

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

Definition at line 191 of file CCGSubSurf_intern.h.

◆ CCGSUBSURF_free

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

Definition at line 194 of file CCGSubSurf_intern.h.

◆ CCGSUBSURF_LEVEL_MAX

#define CCGSUBSURF_LEVEL_MAX   11

Definition at line 21 of file CCGSubSurf_intern.h.

◆ CCGSUBSURF_realloc

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

Definition at line 192 of file CCGSubSurf_intern.h.

◆ EDGE_getCo

#define EDGE_getCo (   e,
  lvl,
  x 
)    ccg_edge_getCo(e, lvl, x, vertDataSize)

Definition at line 198 of file CCGSubSurf_intern.h.

◆ EDGE_getNo

#define EDGE_getNo (   e,
  lvl,
  x 
)    ccg_edge_getNo(e, lvl, x, vertDataSize, normalDataOffset)

Definition at line 199 of file CCGSubSurf_intern.h.

◆ EHASH_alloc

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

Definition at line 48 of file CCGSubSurf_intern.h.

◆ EHASH_free

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

Definition at line 49 of file CCGSubSurf_intern.h.

◆ EHASH_hash

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

Definition at line 50 of file CCGSubSurf_intern.h.

◆ EPSILON

#define EPSILON   (1.0e-35f)

Definitions which defines internal behavior of CCGSubSurf.

Definition at line 18 of file CCGSubSurf_intern.h.

◆ FACE_getIECo

#define FACE_getIECo (   f,
  lvl,
  S,
  x 
)    ccg_face_getIECo(f, lvl, S, x, subdivLevels, vertDataSize)

Definition at line 208 of file CCGSubSurf_intern.h.

◆ FACE_getIENo

#define FACE_getIENo (   f,
  lvl,
  S,
  x 
)     ccg_face_getIENo(f, lvl, S, x, subdivLevels, vertDataSize, normalDataOffset)

Definition at line 206 of file CCGSubSurf_intern.h.

◆ FACE_getIFCo

#define FACE_getIFCo (   f,
  lvl,
  S,
  x,
  y 
)    ccg_face_getIFCo(f, lvl, S, x, y, subdivLevels, vertDataSize)

Definition at line 209 of file CCGSubSurf_intern.h.

◆ FACE_getIFNo

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

Definition at line 200 of file CCGSubSurf_intern.h.

◆ NormAdd

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

Definition at line 225 of file CCGSubSurf_intern.h.

◆ NormCopy

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

Definition at line 217 of file CCGSubSurf_intern.h.

◆ NormZero

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

Definition at line 211 of file CCGSubSurf_intern.h.

◆ VERT_getCo

#define VERT_getCo (   v,
  lvl 
)    ccg_vert_getCo(v, lvl, vertDataSize)

Definition at line 196 of file CCGSubSurf_intern.h.

◆ VERT_getNo

#define VERT_getNo (   v,
  lvl 
)    ccg_vert_getNo(v, lvl, vertDataSize, normalDataOffset)

Definition at line 197 of file CCGSubSurf_intern.h.

Typedef Documentation

◆ byte

typedef unsigned char byte

Common type definitions.

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Vert_eEffected 
Vert_eChanged 
Vert_eSeam 

Definition at line 84 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Edge_eEffected 

Definition at line 90 of file CCGSubSurf_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
Face_eEffected 

Definition at line 94 of file CCGSubSurf_intern.h.

◆ SyncState

enum SyncState
Enumerator
eSyncState_None 
eSyncState_Vert 
eSyncState_Edge 
eSyncState_Face 
eSyncState_Partial 

Definition at line 139 of file CCGSubSurf_intern.h.

Function Documentation

◆ ccg_ehash_free()

void ccg_ehash_free ( EHash eh,
EHEntryFreeFP  freeEntry,
void userData 
)

◆ ccg_ehash_insert()

void ccg_ehash_insert ( EHash eh,
EHEntry entry 
)

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

EHash* ccg_ehash_new ( int  estimatedNumEntries,
CCGAllocatorIFC allocatorIFC,
CCGAllocatorHDL  allocator 
)

◆ ccg_ehashIterator_getCurrent()

void* ccg_ehashIterator_getCurrent ( EHashIterator ehi)

◆ ccg_ehashIterator_init()

void ccg_ehashIterator_init ( EHash eh,
EHashIterator ehi 
)

◆ ccg_ehashIterator_isStopped()

int ccg_ehashIterator_isStopped ( EHashIterator ehi)

◆ ccg_ehashIterator_next()

void ccg_ehashIterator_next ( EHashIterator ehi)

◆ ccg_getStandardAllocatorIFC()

CCGAllocatorIFC* ccg_getStandardAllocatorIFC ( void  )

◆ ccgSubSurf__allFaces()

void ccgSubSurf__allFaces ( CCGSubSurf ss,
CCGFace ***  faces,
int *  numFaces,
int *  freeFaces 
)

◆ ccgSubSurf__effectedFaceNeighbors()

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

◆ ccgSubSurf__sync_legacy()

void ccgSubSurf__sync_legacy ( CCGSubSurf ss)

◆ ccgSubSurf__sync_opensubdiv()

void ccgSubSurf__sync_opensubdiv ( CCGSubSurf ss)

◆ ccgSubSurf_converter_free()

void ccgSubSurf_converter_free ( struct OpenSubdiv_Converter converter)

◆ ccgSubSurf_converter_setup_from_ccg()

void ccgSubSurf_converter_setup_from_ccg ( CCGSubSurf ss,
struct OpenSubdiv_Converter converter 
)

◆ ccgSubSurf_converter_setup_from_derivedmesh()

void ccgSubSurf_converter_setup_from_derivedmesh ( CCGSubSurf ss,
struct DerivedMesh dm,
struct OpenSubdiv_Converter converter 
)