Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions

CCGSubSurf.h File Reference

Go to the source code of this file.

Classes

struct  _CCGMeshIFC
struct  _CCGAllocatorIFC

Defines

#define CCG_OMP_LIMIT   1000000

Typedefs

typedef void * CCGMeshHDL
typedef void * CCGVertHDL
typedef void * CCGEdgeHDL
typedef void * CCGFaceHDL
typedef struct _CCGVert CCGVert
typedef struct _CCGEdge CCGEdge
typedef struct _CCGFace CCGFace
typedef struct _CCGMeshIFC CCGMeshIFC
typedef void * CCGAllocatorHDL
typedef struct _CCGAllocatorIFC CCGAllocatorIFC
typedef struct _CCGSubSurf CCGSubSurf
typedef struct _CCGVertIterator CCGVertIterator
typedef struct _CCGEdgeIterator CCGEdgeIterator
typedef struct _CCGFaceIterator CCGFaceIterator

Enumerations

enum  CCGError { eCCGError_None = 0, eCCGError_InvalidSyncState, eCCGError_InvalidValue }

Functions

CCGSubSurfccgSubSurf_new (CCGMeshIFC *ifc, int subdivisionLevels, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
void ccgSubSurf_free (CCGSubSurf *ss)
CCGError ccgSubSurf_sync (CCGSubSurf *ss)
CCGError ccgSubSurf_initFullSync (CCGSubSurf *ss)
CCGError ccgSubSurf_initPartialSync (CCGSubSurf *ss)
CCGError ccgSubSurf_syncVert (CCGSubSurf *ss, CCGVertHDL vHDL, const void *vertData, int seam, CCGVert **v_r)
CCGError ccgSubSurf_syncEdge (CCGSubSurf *ss, CCGEdgeHDL eHDL, CCGVertHDL e_vHDL0, CCGVertHDL e_vHDL1, float crease, CCGEdge **e_r)
CCGError ccgSubSurf_syncFace (CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGVertHDL *vHDLs, CCGFace **f_r)
CCGError ccgSubSurf_syncVertDel (CCGSubSurf *ss, CCGVertHDL vHDL)
CCGError ccgSubSurf_syncEdgeDel (CCGSubSurf *ss, CCGEdgeHDL eHDL)
CCGError ccgSubSurf_syncFaceDel (CCGSubSurf *ss, CCGFaceHDL fHDL)
CCGError ccgSubSurf_processSync (CCGSubSurf *ss)
CCGError ccgSubSurf_updateFromFaces (CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces)
CCGError ccgSubSurf_updateToFaces (CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces)
CCGError ccgSubSurf_updateNormals (CCGSubSurf *ss, CCGFace **faces, int numFaces)
CCGError ccgSubSurf_updateLevels (CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces)
CCGError ccgSubSurf_stitchFaces (CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces)
CCGError ccgSubSurf_setSubdivisionLevels (CCGSubSurf *ss, int subdivisionLevels)
CCGError ccgSubSurf_setAllowEdgeCreation (CCGSubSurf *ss, int allowEdgeCreation, float defaultCreaseValue, void *defaultUserData)
void ccgSubSurf_getAllowEdgeCreation (CCGSubSurf *ss, int *allowEdgeCreation_r, float *defaultCreaseValue_r, void *defaultUserData_r)
void ccgSubSurf_getUseAgeCounts (CCGSubSurf *ss, int *useAgeCounts_r, int *vertUserOffset_r, int *edgeUserOffset_r, int *faceUserOffset_r)
CCGError ccgSubSurf_setUseAgeCounts (CCGSubSurf *ss, int useAgeCounts, int vertUserOffset, int edgeUserOffset, int faceUserOffset)
CCGError ccgSubSurf_setCalcVertexNormals (CCGSubSurf *ss, int useVertNormals, int normalDataOffset)
int ccgSubSurf_getNumVerts (const CCGSubSurf *ss)
int ccgSubSurf_getNumEdges (const CCGSubSurf *ss)
int ccgSubSurf_getNumFaces (const CCGSubSurf *ss)
int ccgSubSurf_getSubdivisionLevels (const CCGSubSurf *ss)
int ccgSubSurf_getEdgeSize (const CCGSubSurf *ss)
int ccgSubSurf_getEdgeLevelSize (const CCGSubSurf *ss, int level)
int ccgSubSurf_getGridSize (const CCGSubSurf *ss)
int ccgSubSurf_getGridLevelSize (const CCGSubSurf *ss, int level)
CCGVertccgSubSurf_getVert (CCGSubSurf *ss, CCGVertHDL v)
CCGVertHDL ccgSubSurf_getVertVertHandle (CCGVert *v)
int ccgSubSurf_getVertNumFaces (CCGVert *v)
CCGFaceccgSubSurf_getVertFace (CCGVert *v, int index)
int ccgSubSurf_getVertNumEdges (CCGVert *v)
CCGEdgeccgSubSurf_getVertEdge (CCGVert *v, int index)
int ccgSubSurf_getVertAge (CCGSubSurf *ss, CCGVert *v)
void * ccgSubSurf_getVertUserData (CCGSubSurf *ss, CCGVert *v)
void * ccgSubSurf_getVertData (CCGSubSurf *ss, CCGVert *v)
void * ccgSubSurf_getVertLevelData (CCGSubSurf *ss, CCGVert *v, int level)
CCGEdgeccgSubSurf_getEdge (CCGSubSurf *ss, CCGEdgeHDL e)
CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle (CCGEdge *e)
int ccgSubSurf_getEdgeNumFaces (CCGEdge *e)
CCGFaceccgSubSurf_getEdgeFace (CCGEdge *e, int index)
CCGVertccgSubSurf_getEdgeVert0 (CCGEdge *e)
CCGVertccgSubSurf_getEdgeVert1 (CCGEdge *e)
float ccgSubSurf_getEdgeCrease (CCGEdge *e)
int ccgSubSurf_getEdgeAge (CCGSubSurf *ss, CCGEdge *e)
void * ccgSubSurf_getEdgeUserData (CCGSubSurf *ss, CCGEdge *e)
void * ccgSubSurf_getEdgeDataArray (CCGSubSurf *ss, CCGEdge *e)
void * ccgSubSurf_getEdgeData (CCGSubSurf *ss, CCGEdge *e, int x)
void * ccgSubSurf_getEdgeLevelData (CCGSubSurf *ss, CCGEdge *e, int x, int level)
CCGFaceccgSubSurf_getFace (CCGSubSurf *ss, CCGFaceHDL f)
CCGFaceHDL ccgSubSurf_getFaceFaceHandle (CCGSubSurf *ss, CCGFace *f)
int ccgSubSurf_getFaceNumVerts (CCGFace *f)
CCGVertccgSubSurf_getFaceVert (CCGSubSurf *ss, CCGFace *f, int index)
CCGEdgeccgSubSurf_getFaceEdge (CCGSubSurf *ss, CCGFace *f, int index)
int ccgSubSurf_getFaceEdgeIndex (CCGFace *f, CCGEdge *e)
int ccgSubSurf_getFaceAge (CCGSubSurf *ss, CCGFace *f)
void * ccgSubSurf_getFaceUserData (CCGSubSurf *ss, CCGFace *f)
void * ccgSubSurf_getFaceCenterData (CCGFace *f)
void * ccgSubSurf_getFaceGridEdgeDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex)
void * ccgSubSurf_getFaceGridEdgeData (CCGSubSurf *ss, CCGFace *f, int gridIndex, int x)
void * ccgSubSurf_getFaceGridDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex)
void * ccgSubSurf_getFaceGridData (CCGSubSurf *ss, CCGFace *f, int gridIndex, int x, int y)
int ccgSubSurf_getNumFinalVerts (const CCGSubSurf *ss)
int ccgSubSurf_getNumFinalEdges (const CCGSubSurf *ss)
int ccgSubSurf_getNumFinalFaces (const CCGSubSurf *ss)
CCGVertIteratorccgSubSurf_getVertIterator (CCGSubSurf *ss)
CCGEdgeIteratorccgSubSurf_getEdgeIterator (CCGSubSurf *ss)
CCGFaceIteratorccgSubSurf_getFaceIterator (CCGSubSurf *ss)
CCGVertccgVertIterator_getCurrent (CCGVertIterator *vi)
int ccgVertIterator_isStopped (CCGVertIterator *vi)
void ccgVertIterator_next (CCGVertIterator *vi)
void ccgVertIterator_free (CCGVertIterator *vi)
CCGEdgeccgEdgeIterator_getCurrent (CCGEdgeIterator *ei)
int ccgEdgeIterator_isStopped (CCGEdgeIterator *ei)
void ccgEdgeIterator_next (CCGEdgeIterator *ei)
void ccgEdgeIterator_free (CCGEdgeIterator *ei)
CCGFaceccgFaceIterator_getCurrent (CCGFaceIterator *fi)
int ccgFaceIterator_isStopped (CCGFaceIterator *fi)
void ccgFaceIterator_next (CCGFaceIterator *fi)
void ccgFaceIterator_free (CCGFaceIterator *fi)

Detailed Description

Definition in file CCGSubSurf.h.


Define Documentation

#define CCG_OMP_LIMIT   1000000

Definition at line 45 of file CCGSubSurf.h.


Typedef Documentation

typedef void* CCGAllocatorHDL

Definition at line 24 of file CCGSubSurf.h.

Definition at line 26 of file CCGSubSurf.h.

typedef struct _CCGEdge CCGEdge

Definition at line 12 of file CCGSubSurf.h.

typedef void* CCGEdgeHDL

Definition at line 8 of file CCGSubSurf.h.

typedef struct _CCGEdgeIterator CCGEdgeIterator

Definition at line 145 of file CCGSubSurf.h.

typedef struct _CCGFace CCGFace

Definition at line 13 of file CCGSubSurf.h.

typedef void* CCGFaceHDL

Definition at line 9 of file CCGSubSurf.h.

typedef struct _CCGFaceIterator CCGFaceIterator

Definition at line 146 of file CCGSubSurf.h.

typedef void* CCGMeshHDL

Definition at line 6 of file CCGSubSurf.h.

typedef struct _CCGMeshIFC CCGMeshIFC

Definition at line 15 of file CCGSubSurf.h.

typedef struct _CCGSubSurf CCGSubSurf

Definition at line 49 of file CCGSubSurf.h.

typedef struct _CCGVert CCGVert

Definition at line 11 of file CCGSubSurf.h.

typedef void* CCGVertHDL

Definition at line 7 of file CCGSubSurf.h.

typedef struct _CCGVertIterator CCGVertIterator

Definition at line 144 of file CCGSubSurf.h.


Enumeration Type Documentation

enum CCGError
Enumerator:
eCCGError_None 
eCCGError_InvalidSyncState 
eCCGError_InvalidValue 

Definition at line 36 of file CCGSubSurf.h.


Function Documentation

void ccgEdgeIterator_free ( CCGEdgeIterator ei)
CCGEdge* ccgEdgeIterator_getCurrent ( CCGEdgeIterator ei)
int ccgEdgeIterator_isStopped ( CCGEdgeIterator ei)
void ccgEdgeIterator_next ( CCGEdgeIterator ei)
void ccgFaceIterator_free ( CCGFaceIterator fi)
CCGFace* ccgFaceIterator_getCurrent ( CCGFaceIterator fi)
int ccgFaceIterator_isStopped ( CCGFaceIterator fi)
void ccgFaceIterator_next ( CCGFaceIterator fi)
void ccgSubSurf_free ( CCGSubSurf ss)
void ccgSubSurf_getAllowEdgeCreation ( CCGSubSurf ss,
int *  allowEdgeCreation_r,
float *  defaultCreaseValue_r,
void *  defaultUserData_r 
)
CCGEdge* ccgSubSurf_getEdge ( CCGSubSurf ss,
CCGEdgeHDL  e 
)

Definition at line 2500 of file CCGSubSurf.c.

References _ehash_lookup(), and _CCGSubSurf::eMap.

int ccgSubSurf_getEdgeAge ( CCGSubSurf ss,
CCGEdge e 
)
float ccgSubSurf_getEdgeCrease ( CCGEdge e)

Definition at line 2623 of file CCGSubSurf.c.

References _CCGEdge::crease.

Referenced by ss_sync_from_uv().

void* ccgSubSurf_getEdgeData ( CCGSubSurf ss,
CCGEdge e,
int  x 
)
void* ccgSubSurf_getEdgeDataArray ( CCGSubSurf ss,
CCGEdge e 
)
CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle ( CCGEdge e)

Definition at line 2580 of file CCGSubSurf.c.

References _CCGEdge::eHDL.

Referenced by ccgDM_copyFinalEdgeArray(), ccgdm_getVertCos(), and getCCGDerivedMesh().

CCGFace* ccgSubSurf_getEdgeFace ( CCGEdge e,
int  index 
)

Definition at line 2597 of file CCGSubSurf.c.

References _CCGEdge::faces, NULL, and _CCGEdge::numFaces.

Referenced by ccgdm_adjacent_grid().

CCGEdgeIterator* ccgSubSurf_getEdgeIterator ( CCGSubSurf ss)
void* ccgSubSurf_getEdgeLevelData ( CCGSubSurf ss,
CCGEdge e,
int  x,
int  level 
)
int ccgSubSurf_getEdgeLevelSize ( const CCGSubSurf ss,
int  level 
)

Definition at line 2513 of file CCGSubSurf.c.

References _CCGSubSurf::subdivLevels.

Referenced by ccgSubSurf_getEdgeSize().

int ccgSubSurf_getEdgeNumFaces ( CCGEdge e)
int ccgSubSurf_getEdgeSize ( const CCGSubSurf ss)
void* ccgSubSurf_getEdgeUserData ( CCGSubSurf ss,
CCGEdge e 
)
CCGVert* ccgSubSurf_getEdgeVert0 ( CCGEdge e)

Definition at line 2604 of file CCGSubSurf.c.

References _CCGEdge::v0.

Referenced by getCCGDerivedMesh(), getEdgeIndex(), and getFaceIndex().

CCGVert* ccgSubSurf_getEdgeVert1 ( CCGEdge e)

Definition at line 2607 of file CCGSubSurf.c.

References _CCGEdge::v1.

Referenced by getCCGDerivedMesh(), and getEdgeIndex().

CCGFace* ccgSubSurf_getFace ( CCGSubSurf ss,
CCGFaceHDL  f 
)

Definition at line 2503 of file CCGSubSurf.c.

References _ehash_lookup(), and _CCGSubSurf::fMap.

Referenced by ss_sync_from_uv().

int ccgSubSurf_getFaceAge ( CCGSubSurf ss,
CCGFace f 
)
void* ccgSubSurf_getFaceCenterData ( CCGFace f)
CCGEdge* ccgSubSurf_getFaceEdge ( CCGSubSurf ss,
CCGFace f,
int  index 
)
int ccgSubSurf_getFaceEdgeIndex ( CCGFace f,
CCGEdge e 
)

Definition at line 2661 of file CCGSubSurf.c.

References FACE_getEdges, i, and _CCGFace::numVerts.

CCGFaceHDL ccgSubSurf_getFaceFaceHandle ( CCGSubSurf ss,
CCGFace f 
)
void* ccgSubSurf_getFaceGridData ( CCGSubSurf ss,
CCGFace f,
int  gridIndex,
int  x,
int  y 
)
void* ccgSubSurf_getFaceGridDataArray ( CCGSubSurf ss,
CCGFace f,
int  gridIndex 
)
void* ccgSubSurf_getFaceGridEdgeData ( CCGSubSurf ss,
CCGFace f,
int  gridIndex,
int  x 
)
void* ccgSubSurf_getFaceGridEdgeDataArray ( CCGSubSurf ss,
CCGFace f,
int  gridIndex 
)

Definition at line 2673 of file CCGSubSurf.c.

References ccgSubSurf_getFaceGridEdgeData().

CCGFaceIterator* ccgSubSurf_getFaceIterator ( CCGSubSurf ss)
int ccgSubSurf_getFaceNumVerts ( CCGFace f)
void* ccgSubSurf_getFaceUserData ( CCGSubSurf ss,
CCGFace f 
)
CCGVert* ccgSubSurf_getFaceVert ( CCGSubSurf ss,
CCGFace f,
int  index 
)
int ccgSubSurf_getGridLevelSize ( const CCGSubSurf ss,
int  level 
)

Definition at line 2523 of file CCGSubSurf.c.

References _CCGSubSurf::subdivLevels.

Referenced by ccgSubSurf_getGridSize().

int ccgSubSurf_getGridSize ( const CCGSubSurf ss)
int ccgSubSurf_getNumEdges ( const CCGSubSurf ss)
int ccgSubSurf_getNumFaces ( const CCGSubSurf ss)
int ccgSubSurf_getNumFinalEdges ( const CCGSubSurf ss)
int ccgSubSurf_getNumFinalFaces ( const CCGSubSurf ss)

Definition at line 2751 of file CCGSubSurf.c.

References _CCGSubSurf::numGrids, and _CCGSubSurf::subdivLevels.

Referenced by ccgDM_getNumFaces(), and getCCGDerivedMesh().

int ccgSubSurf_getNumFinalVerts ( const CCGSubSurf ss)
int ccgSubSurf_getNumVerts ( const CCGSubSurf ss)
int ccgSubSurf_getSubdivisionLevels ( const CCGSubSurf ss)

Definition at line 2507 of file CCGSubSurf.c.

References _CCGSubSurf::subdivLevels.

Referenced by set_subsurf_uv(), ss_sync_from_derivedmesh(), and ss_sync_from_uv().

void ccgSubSurf_getUseAgeCounts ( CCGSubSurf ss,
int *  useAgeCounts_r,
int *  vertUserOffset_r,
int *  edgeUserOffset_r,
int *  faceUserOffset_r 
)
CCGVert* ccgSubSurf_getVert ( CCGSubSurf ss,
CCGVertHDL  v 
)

Definition at line 2497 of file CCGSubSurf.c.

References _ehash_lookup(), and _CCGSubSurf::vMap.

int ccgSubSurf_getVertAge ( CCGSubSurf ss,
CCGVert v 
)
void* ccgSubSurf_getVertData ( CCGSubSurf ss,
CCGVert v 
)
CCGEdge* ccgSubSurf_getVertEdge ( CCGVert v,
int  index 
)

Definition at line 2560 of file CCGSubSurf.c.

References _CCGVert::edges, NULL, and _CCGVert::numEdges.

Referenced by subsurf_calculate_limit_positions().

CCGFace* ccgSubSurf_getVertFace ( CCGVert v,
int  index 
)

Definition at line 2550 of file CCGSubSurf.c.

References _CCGVert::faces, NULL, and _CCGVert::numFaces.

Referenced by subsurf_calculate_limit_positions().

CCGVertIterator* ccgSubSurf_getVertIterator ( CCGSubSurf ss)
void* ccgSubSurf_getVertLevelData ( CCGSubSurf ss,
CCGVert v,
int  level 
)
int ccgSubSurf_getVertNumEdges ( CCGVert v)

Definition at line 2557 of file CCGSubSurf.c.

References _CCGVert::numEdges.

Referenced by subsurf_calculate_limit_positions().

int ccgSubSurf_getVertNumFaces ( CCGVert v)

Definition at line 2547 of file CCGSubSurf.c.

References _CCGVert::numFaces.

Referenced by subsurf_calculate_limit_positions().

void* ccgSubSurf_getVertUserData ( CCGSubSurf ss,
CCGVert v 
)
CCGVertHDL ccgSubSurf_getVertVertHandle ( CCGVert v)

Definition at line 2533 of file CCGSubSurf.c.

References _CCGVert::vHDL.

Referenced by ccgdm_getVertCos(), getCCGDerivedMesh(), and subsurf_calculate_limit_positions().

CCGError ccgSubSurf_initFullSync ( CCGSubSurf ss)
CCGError ccgSubSurf_initPartialSync ( CCGSubSurf ss)
CCGSubSurf* ccgSubSurf_new ( CCGMeshIFC ifc,
int  subdivisionLevels,
CCGAllocatorIFC allocatorIFC,
CCGAllocatorHDL  allocator 
)
CCGError ccgSubSurf_processSync ( CCGSubSurf ss)
CCGError ccgSubSurf_setAllowEdgeCreation ( CCGSubSurf ss,
int  allowEdgeCreation,
float  defaultCreaseValue,
void *  defaultUserData 
)
CCGError ccgSubSurf_setCalcVertexNormals ( CCGSubSurf ss,
int  useVertNormals,
int  normalDataOffset 
)
CCGError ccgSubSurf_setSubdivisionLevels ( CCGSubSurf ss,
int  subdivisionLevels 
)
CCGError ccgSubSurf_setUseAgeCounts ( CCGSubSurf ss,
int  useAgeCounts,
int  vertUserOffset,
int  edgeUserOffset,
int  faceUserOffset 
)
CCGError ccgSubSurf_stitchFaces ( CCGSubSurf ss,
int  lvl,
CCGFace **  faces,
int  numFaces 
)
CCGError ccgSubSurf_sync ( CCGSubSurf ss)
CCGError ccgSubSurf_syncEdge ( CCGSubSurf ss,
CCGEdgeHDL  eHDL,
CCGVertHDL  e_vHDL0,
CCGVertHDL  e_vHDL1,
float  crease,
CCGEdge **  e_r 
)
CCGError ccgSubSurf_syncEdgeDel ( CCGSubSurf ss,
CCGEdgeHDL  eHDL 
)
CCGError ccgSubSurf_syncFace ( CCGSubSurf ss,
CCGFaceHDL  fHDL,
int  numVerts,
CCGVertHDL vHDLs,
CCGFace **  f_r 
)
CCGError ccgSubSurf_syncFaceDel ( CCGSubSurf ss,
CCGFaceHDL  fHDL 
)
CCGError ccgSubSurf_syncVert ( CCGSubSurf ss,
CCGVertHDL  vHDL,
const void *  vertData,
int  seam,
CCGVert **  v_r 
)
CCGError ccgSubSurf_syncVertDel ( CCGSubSurf ss,
CCGVertHDL  vHDL 
)
CCGError ccgSubSurf_updateFromFaces ( CCGSubSurf ss,
int  lvl,
CCGFace **  faces,
int  numFaces 
)
CCGError ccgSubSurf_updateLevels ( CCGSubSurf ss,
int  lvl,
CCGFace **  faces,
int  numFaces 
)
CCGError ccgSubSurf_updateNormals ( CCGSubSurf ss,
CCGFace **  faces,
int  numFaces 
)
CCGError ccgSubSurf_updateToFaces ( CCGSubSurf ss,
int  lvl,
CCGFace **  faces,
int  numFaces 
)
void ccgVertIterator_free ( CCGVertIterator vi)
CCGVert* ccgVertIterator_getCurrent ( CCGVertIterator vi)
int ccgVertIterator_isStopped ( CCGVertIterator vi)
void ccgVertIterator_next ( CCGVertIterator vi)