Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_sys_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BKE_ccg.h"
#include "BKE_subsurf.h"
#include "CCGSubSurf.h"
#include "CCGSubSurf_intern.h"
Go to the source code of this file.
|
static |
Definition at line 148 of file CCGSubSurf.c.
References CCGSUBSURF_realloc, and e.
Referenced by _face_new().
|
static |
Definition at line 163 of file CCGSubSurf.c.
References CCGSUBSURF_free, and e.
Referenced by _edge_unlinkMarkAndFree(), ccgSubSurf_free(), and ccgSubSurf_setSubdivisionLevels().
Definition at line 154 of file CCGSubSurf.c.
References ccg_edgebase(), e, EDGE_getLevelData(), v, and x.
Referenced by ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
|
static |
Definition at line 114 of file CCGSubSurf.c.
References _vert_addEdge(), ccg_edgebase(), CCGSUBSURF_alloc, ccgSubSurf_getEdgeUserData(), CCGSubSurf::currentAge, e, CCGSubSurf::edgeUserAgeOffset, CCGMeshIFC::edgeUserSize, CCGSubSurf::meshIFC, NULL, CCGSubSurf::subdivLevels, CCGSubSurf::useAgeCounts, v1, and CCGMeshIFC::vertDataSize.
Referenced by ccgSubSurf_syncEdge(), and ccgSubSurf_syncFace().
|
static |
Definition at line 171 of file CCGSubSurf.c.
References _edge_free(), _vert_remEdge(), e, and Vert_eEffected.
Referenced by ccgSubSurf_processSync(), ccgSubSurf_syncEdge(), and ccgSubSurf_syncEdgeDel().
|
static |
Definition at line 210 of file CCGSubSurf.c.
References CCGSUBSURF_free.
Referenced by _face_unlinkMarkAndFree(), ccgSubSurf_free(), and ccgSubSurf_setSubdivisionLevels().
|
static |
Definition at line 180 of file CCGSubSurf.c.
References _edge_addFace(), _vert_addFace(), ccg_gridsize(), CCGSUBSURF_alloc, ccgSubSurf_getFaceUserData(), CCGSubSurf::currentAge, FACE_getEdges(), FACE_getVerts(), CCGSubSurf::faceUserAgeOffset, CCGMeshIFC::faceUserSize, CCGFace::fHDL, CCGFace::flags, CCGSubSurf::meshIFC, CCGFace::numVerts, CCGSubSurf::subdivLevels, CCGSubSurf::useAgeCounts, CCGMeshIFC::vertDataSize, and verts.
Referenced by ccgSubSurf_syncFace().
|
static |
Definition at line 214 of file CCGSubSurf.c.
References _edge_remFace(), _face_free(), _vert_remFace(), FACE_getEdges(), FACE_getVerts(), CCGVert::flags, CCGFace::numVerts, and Vert_eEffected.
Referenced by ccgSubSurf_processSync(), ccgSubSurf_syncFace(), and ccgSubSurf_syncFaceDel().
|
static |
Definition at line 77 of file CCGSubSurf.c.
References CCGSUBSURF_realloc, e, and v.
Referenced by _edge_new().
|
static |
Definition at line 83 of file CCGSubSurf.c.
References CCGSUBSURF_realloc, and v.
Referenced by _face_new().
Definition at line 89 of file CCGSubSurf.c.
Referenced by ccgSubSurf_syncFace().
|
static |
Definition at line 99 of file CCGSubSurf.c.
References CCGSUBSURF_free, and v.
Referenced by ccgSubSurf_free(), ccgSubSurf_processSync(), ccgSubSurf_setSubdivisionLevels(), and ccgSubSurf_syncVertDel().
|
static |
Definition at line 38 of file CCGSubSurf.c.
References CCGSUBSURF_alloc, ccgSubSurf_getVertUserData(), CCGSubSurf::currentAge, CCGSubSurf::meshIFC, NULL, CCGSubSurf::subdivLevels, CCGSubSurf::useAgeCounts, v, CCGMeshIFC::vertDataSize, CCGSubSurf::vertUserAgeOffset, and CCGMeshIFC::vertUserSize.
Referenced by ccgSubSurf_syncVert().
Definition at line 59 of file CCGSubSurf.c.
Referenced by _edge_unlinkMarkAndFree().
int BKE_ccg_factor | ( | int | low_level, |
int | high_level | ||
) |
X/Y grid coordinates at 'low_level' can be multiplied by the result of this function to convert to grid coordinates at 'high_level'.
Definition at line 28 of file CCGSubSurf.c.
References BLI_assert.
Referenced by multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), and paint_grid_paint_mask().
int BKE_ccg_gridsize | ( | int | level | ) |
Get grid-size from 'level', level must be greater than zero.
Definition at line 23 of file CCGSubSurf.c.
References ccg_gridsize().
Referenced by BKE_sculpt_mask_layers_ensure(), multires_create_grids_in_unsubdivided_base_mesh(), multires_grid_paint_mask_downsample(), multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), multires_unsubdivide_extract_single_grid_from_face_edge(), paint_grid_paint_mask(), store_grid_data(), and write_grid_paint_mask().
void CCG_key | ( | CCGKey * | key, |
const CCGSubSurf * | ss, | ||
int | level | ||
) |
Definition at line 1511 of file CCGSubSurf.c.
References CCGSubSurf::allocMask, CCGSubSurf::calcVertNormals, ccgSubSurf_getGridLevelSize(), CCGKey::elem_size, CCGKey::grid_area, CCGKey::grid_bytes, CCGKey::grid_size, CCGKey::has_mask, CCGKey::has_normals, CCGKey::level, CCGKey::mask_offset, CCGSubSurf::maskDataOffset, CCGSubSurf::meshIFC, CCGKey::normal_offset, and CCGMeshIFC::vertDataSize.
Referenced by CCG_key_top_level().
void CCG_key_top_level | ( | CCGKey * | key, |
const CCGSubSurf * | ss | ||
) |
Definition at line 1540 of file CCGSubSurf.c.
References CCG_key(), and ccgSubSurf_getSubdivisionLevels().
CCGEdge* ccgEdgeIterator_getCurrent | ( | CCGEdgeIterator * | ei | ) |
Definition at line 1456 of file CCGSubSurf.c.
References ccg_ehashIterator_getCurrent().
Referenced by ccgDM_getMinMax(), and create_ccgdm_maps().
int ccgEdgeIterator_isStopped | ( | CCGEdgeIterator * | ei | ) |
Definition at line 1460 of file CCGSubSurf.c.
References ccg_ehashIterator_isStopped().
Referenced by ccgDM_getMinMax(), and create_ccgdm_maps().
void ccgEdgeIterator_next | ( | CCGEdgeIterator * | ei | ) |
Definition at line 1464 of file CCGSubSurf.c.
References ccg_ehashIterator_next().
Referenced by ccgDM_getMinMax(), and create_ccgdm_maps().
CCGFace* ccgFaceIterator_getCurrent | ( | CCGFaceIterator * | fi | ) |
Definition at line 1469 of file CCGSubSurf.c.
References ccg_ehashIterator_getCurrent().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and set_subsurf_legacy_uv().
int ccgFaceIterator_isStopped | ( | CCGFaceIterator * | fi | ) |
Definition at line 1473 of file CCGSubSurf.c.
References ccg_ehashIterator_isStopped().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and set_subsurf_legacy_uv().
void ccgFaceIterator_next | ( | CCGFaceIterator * | fi | ) |
Definition at line 1477 of file CCGSubSurf.c.
References ccg_ehashIterator_next().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and set_subsurf_legacy_uv().
void ccgSubSurf__allFaces | ( | CCGSubSurf * | ss, |
CCGFace *** | faces, | ||
int * | numFaces, | ||
int * | freeFaces | ||
) |
Definition at line 842 of file CCGSubSurf.c.
References _EHash::buckets, _EHash::curSize, faces, CCGSubSurf::fMap, MEM_mallocN, CCGFace::next, NULL, 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 867 of file CCGSubSurf.c.
References _EHash::buckets, _EHash::curSize, e, Edge_eEffected, CCGSubSurf::eMap, Face_eEffected, faces, CCGFace::flags, MEM_mallocN, _EHash::numEntries, v, Vert_eEffected, verts, and CCGSubSurf::vMap.
Referenced by ccgSubSurf_stitchFaces(), ccgSubSurf_updateLevels(), and ccgSubSurf_updateNormals().
|
static |
Definition at line 806 of file CCGSubSurf.c.
References ccgSubSurf__sync_legacy().
Referenced by ccgSubSurf_processSync().
void ccgSubSurf_free | ( | CCGSubSurf * | ss | ) |
Definition at line 281 of file CCGSubSurf.c.
References _edge_free(), _face_free(), _vert_free(), CCGSubSurf::allocator, CCGSubSurf::allocatorIFC, ccg_ehash_free(), CCGSUBSURF_free, CCGSubSurf::defaultEdgeUserData, CCGSubSurf::eMap, CCGSubSurf::fMap, MEM_freeN, CCGSubSurf::oldEMap, CCGSubSurf::oldFMap, CCGSubSurf::oldVMap, CCGSubSurf::q, CCGSubSurf::r, CCGAllocatorIFC::release, CCGSubSurf::syncState, CCGSubSurf::tempEdges, CCGSubSurf::tempVerts, and CCGSubSurf::vMap.
Referenced by _getSubSurf(), ccgDM_release(), freeData(), set_subsurf_legacy_uv(), subsurf_calculate_limit_positions(), and subsurf_make_derived_from_derived().
void ccgSubSurf_getAllowEdgeCreation | ( | CCGSubSurf * | ss, |
int * | allowEdgeCreation_r, | ||
float * | defaultCreaseValue_r, | ||
void * | defaultUserData_r | ||
) |
Definition at line 334 of file CCGSubSurf.c.
References CCGSubSurf::allowEdgeCreation, CCGSubSurf::defaultCreaseValue, CCGSubSurf::defaultEdgeUserData, CCGMeshIFC::edgeUserSize, and CCGSubSurf::meshIFC.
CCGEdge* ccgSubSurf_getEdge | ( | CCGSubSurf * | ss, |
CCGEdgeHDL | e | ||
) |
Definition at line 1207 of file CCGSubSurf.c.
References ccg_ehash_lookup(), e, and CCGSubSurf::eMap.
int ccgSubSurf_getEdgeAge | ( | CCGSubSurf * | ss, |
CCGEdge * | e | ||
) |
Definition at line 1306 of file CCGSubSurf.c.
References ccgSubSurf_getEdgeUserData(), CCGSubSurf::currentAge, e, CCGSubSurf::edgeUserAgeOffset, and CCGSubSurf::useAgeCounts.
void* ccgSubSurf_getEdgeData | ( | CCGSubSurf * | ss, |
CCGEdge * | e, | ||
int | x | ||
) |
Definition at line 1341 of file CCGSubSurf.c.
References ccgSubSurf_getEdgeLevelData(), e, CCGSubSurf::subdivLevels, and x.
Referenced by ccgDM_copyFinalVertArray(), ccgSubSurf_getEdgeDataArray(), get_vertex_elem(), and subsurf_calculate_limit_positions().
void* ccgSubSurf_getEdgeDataArray | ( | CCGSubSurf * | ss, |
CCGEdge * | e | ||
) |
Definition at line 1337 of file CCGSubSurf.c.
References ccgSubSurf_getEdgeData(), and e.
Referenced by ccgDM_getMinMax().
CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle | ( | CCGEdge * | e | ) |
Definition at line 1302 of file CCGSubSurf.c.
References e.
Referenced by ccgDM_copyFinalEdgeArray(), create_ccgdm_maps(), and set_ccgdm_all_geometry().
Definition at line 1322 of file CCGSubSurf.c.
void* ccgSubSurf_getEdgeLevelData | ( | CCGSubSurf * | ss, |
CCGEdge * | e, | ||
int | x, | ||
int | level | ||
) |
Definition at line 1345 of file CCGSubSurf.c.
References ccg_edge_getCo(), e, CCGSubSurf::meshIFC, NULL, CCGSubSurf::subdivLevels, CCGMeshIFC::vertDataSize, and x.
Referenced by ccgSubSurf_getEdgeData().
int ccgSubSurf_getEdgeLevelSize | ( | const CCGSubSurf * | ss, |
int | level | ||
) |
Definition at line 1224 of file CCGSubSurf.c.
References ccg_edgesize(), and CCGSubSurf::subdivLevels.
Referenced by ccgSubSurf_getEdgeSize().
int ccgSubSurf_getEdgeNumFaces | ( | CCGEdge * | e | ) |
Definition at line 1318 of file CCGSubSurf.c.
References e.
Referenced by ccgDM_copyFinalEdgeArray().
int ccgSubSurf_getEdgeSize | ( | const CCGSubSurf * | ss | ) |
Definition at line 1220 of file CCGSubSurf.c.
References ccgSubSurf_getEdgeLevelSize(), and CCGSubSurf::subdivLevels.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalLoopArray(), ccgDM_copyFinalVertArray(), ccgDM_get_edge_data_layer(), ccgDM_getMinMax(), and set_ccgdm_all_geometry().
void* ccgSubSurf_getEdgeUserData | ( | CCGSubSurf * | ss, |
CCGEdge * | e | ||
) |
Definition at line 1314 of file CCGSubSurf.c.
References ccg_edgebase(), e, EDGE_getLevelData(), CCGSubSurf::meshIFC, CCGSubSurf::subdivLevels, and CCGMeshIFC::vertDataSize.
Referenced by _edge_new(), ccgDM_getEdgeMapIndex(), ccgSubSurf__sync_legacy(), ccgSubSurf_getEdgeAge(), ccgSubSurf_syncFace(), getEdgeIndex(), getFaceIndex(), set_ccgdm_all_geometry(), and ss_sync_ccg_from_derivedmesh().
Definition at line 1329 of file CCGSubSurf.c.
References e.
Referenced by getEdgeIndex(), getFaceIndex(), and set_ccgdm_all_geometry().
Definition at line 1333 of file CCGSubSurf.c.
References e.
Referenced by getEdgeIndex(), and set_ccgdm_all_geometry().
CCGFace* ccgSubSurf_getFace | ( | CCGSubSurf * | ss, |
CCGFaceHDL | f | ||
) |
Definition at line 1211 of file CCGSubSurf.c.
References ccg_ehash_lookup(), and CCGSubSurf::fMap.
Referenced by ss_sync_from_uv().
int ccgSubSurf_getFaceAge | ( | CCGSubSurf * | ss, |
CCGFace * | f | ||
) |
Definition at line 1363 of file CCGSubSurf.c.
References ccgSubSurf_getFaceUserData(), CCGSubSurf::currentAge, CCGSubSurf::faceUserAgeOffset, and CCGSubSurf::useAgeCounts.
Definition at line 1405 of file CCGSubSurf.c.
References FACE_getCenterData().
Referenced by ccgDM_copyFinalVertArray(), get_vertex_elem(), and subsurf_calculate_limit_positions().
Definition at line 1389 of file CCGSubSurf.c.
References FACE_getEdges(), NULL, and CCGFace::numVerts.
Referenced by getFaceIndex(), and ss_sync_from_uv().
Definition at line 1396 of file CCGSubSurf.c.
References e, FACE_getEdges(), and CCGFace::numVerts.
CCGFaceHDL ccgSubSurf_getFaceFaceHandle | ( | CCGFace * | f | ) |
Definition at line 1359 of file CCGSubSurf.c.
References CCGFace::fHDL.
Referenced by create_ccgdm_maps(), set_ccgdm_all_geometry(), and set_subsurf_legacy_uv().
void* ccgSubSurf_getFaceGridData | ( | CCGSubSurf * | ss, |
CCGFace * | f, | ||
int | gridIndex, | ||
int | x, | ||
int | y | ||
) |
Definition at line 1422 of file CCGSubSurf.c.
References ccg_face_getIFCo(), CCGSubSurf::meshIFC, CCGSubSurf::subdivLevels, CCGMeshIFC::vertDataSize, x, and y.
Referenced by ccgDM_copyFinalVertArray(), ccgSubSurf_getFaceGridDataArray(), and get_vertex_elem().
void* ccgSubSurf_getFaceGridDataArray | ( | CCGSubSurf * | ss, |
CCGFace * | f, | ||
int | gridIndex | ||
) |
Definition at line 1418 of file CCGSubSurf.c.
References ccgSubSurf_getFaceGridData().
Referenced by ccgdm_create_grids(), ccgDM_getMinMax(), and set_subsurf_legacy_uv().
void* ccgSubSurf_getFaceGridEdgeData | ( | CCGSubSurf * | ss, |
CCGFace * | f, | ||
int | gridIndex, | ||
int | x | ||
) |
Definition at line 1413 of file CCGSubSurf.c.
References ccg_face_getIECo(), CCGSubSurf::meshIFC, CCGSubSurf::subdivLevels, CCGMeshIFC::vertDataSize, and x.
Referenced by ccgDM_copyFinalVertArray(), ccgSubSurf_getFaceGridEdgeDataArray(), and get_vertex_elem().
void* ccgSubSurf_getFaceGridEdgeDataArray | ( | CCGSubSurf * | ss, |
CCGFace * | f, | ||
int | gridIndex | ||
) |
Definition at line 1409 of file CCGSubSurf.c.
References ccgSubSurf_getFaceGridEdgeData().
int ccgSubSurf_getFaceNumVerts | ( | CCGFace * | f | ) |
Definition at line 1378 of file CCGSubSurf.c.
References CCGFace::numVerts.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalPolyArray(), ccgDM_copyFinalVertArray(), ccgdm_create_grids(), ccgDM_get_poly_data_layer(), ccgDM_getMinMax(), ccgDM_getNumGrids(), copyFinalLoopArray_task_cb(), get_vertex_elem(), getFaceIndex(), set_ccgdm_all_geometry(), and set_subsurf_legacy_uv().
void* ccgSubSurf_getFaceUserData | ( | CCGSubSurf * | ss, |
CCGFace * | f | ||
) |
Definition at line 1371 of file CCGSubSurf.c.
References ccg_gridsize(), FACE_getCenterData(), CCGSubSurf::meshIFC, CCGFace::numVerts, CCGSubSurf::subdivLevels, and CCGMeshIFC::vertDataSize.
Referenced by _face_new(), ccgDM_getFaceMapIndex(), ccgSubSurf__sync_legacy(), ccgSubSurf_getFaceAge(), getFaceIndex(), set_ccgdm_all_geometry(), and ss_sync_ccg_from_derivedmesh().
Definition at line 1382 of file CCGSubSurf.c.
References FACE_getVerts(), NULL, and CCGFace::numVerts.
Referenced by getFaceIndex(), and set_ccgdm_all_geometry().
int ccgSubSurf_getGridLevelSize | ( | const CCGSubSurf * | ss, |
int | level | ||
) |
Definition at line 1235 of file CCGSubSurf.c.
References ccg_gridsize(), and CCGSubSurf::subdivLevels.
Referenced by CCG_key(), and ccgSubSurf_getGridSize().
int ccgSubSurf_getGridSize | ( | const CCGSubSurf * | ss | ) |
Definition at line 1231 of file CCGSubSurf.c.
References ccgSubSurf_getGridLevelSize(), and CCGSubSurf::subdivLevels.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalLoopArray(), ccgDM_copyFinalPolyArray(), ccgDM_copyFinalVertArray(), ccgDM_get_poly_data_layer(), ccgDM_getGridSize(), ccgDM_getMinMax(), get_vertex_elem(), set_ccgdm_all_geometry(), and set_subsurf_legacy_uv().
int ccgSubSurf_getNumEdges | ( | const CCGSubSurf * | ss | ) |
Definition at line 1194 of file CCGSubSurf.c.
References CCGSubSurf::eMap, and _EHash::numEntries.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalVertArray(), ccgDM_get_edge_data_layer(), create_ccgdm_maps(), get_vertex_elem(), getCCGDerivedMesh(), and set_ccgdm_all_geometry().
int ccgSubSurf_getNumFaces | ( | const CCGSubSurf * | ss | ) |
Definition at line 1198 of file CCGSubSurf.c.
References CCGSubSurf::fMap, and _EHash::numEntries.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalLoopArray(), ccgDM_copyFinalPolyArray(), ccgDM_copyFinalVertArray(), ccgdm_create_grids(), ccgDM_get_poly_data_layer(), ccgDM_getNumGrids(), create_ccgdm_maps(), get_vertex_elem(), getCCGDerivedMesh(), set_ccgdm_all_geometry(), and set_subsurf_legacy_uv().
int ccgSubSurf_getNumFinalEdges | ( | const CCGSubSurf * | ss | ) |
Definition at line 1494 of file CCGSubSurf.c.
References ccg_edgesize(), ccg_gridsize(), CCGSubSurf::eMap, _EHash::numEntries, CCGSubSurf::numGrids, and CCGSubSurf::subdivLevels.
Referenced by ccgDM_getNumEdges(), getCCGDerivedMesh(), and set_ccgdm_all_geometry().
int ccgSubSurf_getNumFinalFaces | ( | const CCGSubSurf * | ss | ) |
Definition at line 1502 of file CCGSubSurf.c.
References ccg_gridsize(), CCGSubSurf::numGrids, and CCGSubSurf::subdivLevels.
Referenced by ccgDM_getNumLoops(), ccgDM_getNumPolys(), getCCGDerivedMesh(), and set_ccgdm_all_geometry().
int ccgSubSurf_getNumFinalVerts | ( | const CCGSubSurf * | ss | ) |
Definition at line 1484 of file CCGSubSurf.c.
References ccg_edgesize(), ccg_gridsize(), CCGSubSurf::eMap, CCGSubSurf::fMap, _EHash::numEntries, CCGSubSurf::numGrids, CCGSubSurf::subdivLevels, and CCGSubSurf::vMap.
Referenced by ccgDM_getNumVerts(), getCCGDerivedMesh(), and set_ccgdm_all_geometry().
int ccgSubSurf_getNumVerts | ( | const CCGSubSurf * | ss | ) |
Definition at line 1190 of file CCGSubSurf.c.
References _EHash::numEntries, and CCGSubSurf::vMap.
Referenced by ccgDM_copyFinalVertArray(), ccgDM_get_vert_data_layer(), ccgDM_getMinMax(), create_ccgdm_maps(), and set_ccgdm_all_geometry().
int ccgSubSurf_getSimpleSubdiv | ( | const CCGSubSurf * | ss | ) |
Definition at line 1243 of file CCGSubSurf.c.
References CCGSubSurf::meshIFC, and CCGMeshIFC::simpleSubdiv.
Referenced by _getSubSurf().
int ccgSubSurf_getSubdivisionLevels | ( | const CCGSubSurf * | ss | ) |
Definition at line 1216 of file CCGSubSurf.c.
References CCGSubSurf::subdivLevels.
Referenced by CCG_key_top_level(), set_subsurf_legacy_uv(), and ss_sync_ccg_from_derivedmesh().
void ccgSubSurf_getUseAgeCounts | ( | CCGSubSurf * | ss, |
int * | useAgeCounts_r, | ||
int * | vertUserOffset_r, | ||
int * | edgeUserOffset_r, | ||
int * | faceUserOffset_r | ||
) |
Definition at line 371 of file CCGSubSurf.c.
References CCGSubSurf::edgeUserAgeOffset, CCGSubSurf::faceUserAgeOffset, CCGSubSurf::useAgeCounts, and CCGSubSurf::vertUserAgeOffset.
Referenced by _getSubSurf().
CCGVert* ccgSubSurf_getVert | ( | CCGSubSurf * | ss, |
CCGVertHDL | v | ||
) |
Definition at line 1203 of file CCGSubSurf.c.
References ccg_ehash_lookup(), v, and CCGSubSurf::vMap.
int ccgSubSurf_getVertAge | ( | CCGSubSurf * | ss, |
CCGVert * | v | ||
) |
Definition at line 1254 of file CCGSubSurf.c.
References ccgSubSurf_getVertUserData(), CCGSubSurf::currentAge, CCGSubSurf::useAgeCounts, v, and CCGSubSurf::vertUserAgeOffset.
void* ccgSubSurf_getVertData | ( | CCGSubSurf * | ss, |
CCGVert * | v | ||
) |
Definition at line 1288 of file CCGSubSurf.c.
References ccgSubSurf_getVertLevelData(), CCGSubSurf::subdivLevels, and v.
Referenced by ccgDM_copyFinalVertArray(), ccgDM_getMinMax(), get_vertex_elem(), and subsurf_calculate_limit_positions().
Definition at line 1281 of file CCGSubSurf.c.
Referenced by subsurf_calculate_limit_positions().
Definition at line 1270 of file CCGSubSurf.c.
Referenced by subsurf_calculate_limit_positions().
void* ccgSubSurf_getVertLevelData | ( | CCGSubSurf * | ss, |
CCGVert * | v, | ||
int | level | ||
) |
Definition at line 1292 of file CCGSubSurf.c.
References ccg_vert_getCo(), CCGSubSurf::meshIFC, NULL, CCGSubSurf::subdivLevels, v, and CCGMeshIFC::vertDataSize.
Referenced by ccgSubSurf_getVertData().
int ccgSubSurf_getVertNumEdges | ( | CCGVert * | v | ) |
Definition at line 1277 of file CCGSubSurf.c.
References v.
Referenced by subsurf_calculate_limit_positions().
int ccgSubSurf_getVertNumFaces | ( | CCGVert * | v | ) |
Definition at line 1266 of file CCGSubSurf.c.
References v.
Referenced by subsurf_calculate_limit_positions().
void* ccgSubSurf_getVertUserData | ( | CCGSubSurf * | ss, |
CCGVert * | v | ||
) |
Definition at line 1262 of file CCGSubSurf.c.
References CCGSubSurf::meshIFC, CCGSubSurf::subdivLevels, v, VERT_getLevelData(), and CCGMeshIFC::vertDataSize.
Referenced by _vert_new(), ccgDM_getVertMapIndex(), ccgSubSurf__sync_legacy(), ccgSubSurf_getVertAge(), getEdgeIndex(), getFaceIndex(), set_ccgdm_all_geometry(), and ss_sync_ccg_from_derivedmesh().
CCGVertHDL ccgSubSurf_getVertVertHandle | ( | CCGVert * | v | ) |
Definition at line 1250 of file CCGSubSurf.c.
References v.
Referenced by create_ccgdm_maps(), set_ccgdm_all_geometry(), and subsurf_calculate_limit_positions().
void ccgSubSurf_initEdgeIterator | ( | CCGSubSurf * | ss, |
CCGEdgeIterator * | eiter | ||
) |
Definition at line 1434 of file CCGSubSurf.c.
References ccg_ehashIterator_init(), and CCGSubSurf::eMap.
Referenced by ccgDM_getMinMax(), and create_ccgdm_maps().
void ccgSubSurf_initFaceIterator | ( | CCGSubSurf * | ss, |
CCGFaceIterator * | fiter | ||
) |
Definition at line 1438 of file CCGSubSurf.c.
References ccg_ehashIterator_init(), and CCGSubSurf::fMap.
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and set_subsurf_legacy_uv().
CCGError ccgSubSurf_initFullSync | ( | CCGSubSurf * | ss | ) |
Definition at line 442 of file CCGSubSurf.c.
References CCGSubSurf::allocator, CCGSubSurf::allocatorIFC, ccg_ehash_new(), CCGSubSurf::currentAge, eCCGError_InvalidSyncState, eCCGError_None, CCGSubSurf::eMap, eSyncState_None, eSyncState_Vert, CCGSubSurf::fMap, CCGSubSurf::lenTempArrays, MEM_mallocN, CCGSubSurf::numGrids, CCGSubSurf::oldEMap, CCGSubSurf::oldFMap, CCGSubSurf::oldVMap, CCGSubSurf::syncState, CCGSubSurf::tempEdges, CCGSubSurf::tempVerts, and CCGSubSurf::vMap.
Referenced by ss_sync_ccg_from_derivedmesh(), and ss_sync_from_uv().
CCGError ccgSubSurf_initPartialSync | ( | CCGSubSurf * | ss | ) |
Definition at line 469 of file CCGSubSurf.c.
References CCGSubSurf::currentAge, eCCGError_InvalidSyncState, eCCGError_None, eSyncState_None, eSyncState_Partial, and CCGSubSurf::syncState.
void ccgSubSurf_initVertIterator | ( | CCGSubSurf * | ss, |
CCGVertIterator * | viter | ||
) |
Definition at line 1430 of file CCGSubSurf.c.
References ccg_ehashIterator_init(), and CCGSubSurf::vMap.
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and subsurf_calculate_limit_positions().
CCGSubSurf* ccgSubSurf_new | ( | CCGMeshIFC * | ifc, |
int | subdivLevels, | ||
CCGAllocatorIFC * | allocatorIFC, | ||
CCGAllocatorHDL | allocator | ||
) |
Definition at line 227 of file CCGSubSurf.c.
References CCGAllocatorIFC::alloc, CCGSubSurf::allocator, CCGSubSurf::allocatorIFC, CCGSubSurf::allocMask, CCGSubSurf::allowEdgeCreation, CCGSubSurf::calcVertNormals, ccg_ehash_new(), ccg_getStandardAllocatorIFC(), CCGSUBSURF_alloc, CCGSubSurf::currentAge, CCGSubSurf::defaultCreaseValue, CCGSubSurf::defaultEdgeUserData, CCGSubSurf::edgeUserAgeOffset, CCGSubSurf::eMap, eSyncState_None, CCGSubSurf::faceUserAgeOffset, CCGSubSurf::fMap, CCGSubSurf::lenTempArrays, CCGSubSurf::meshIFC, CCGSubSurf::normalDataOffset, NULL, CCGSubSurf::numGrids, CCGSubSurf::oldEMap, CCGSubSurf::oldFMap, CCGSubSurf::oldVMap, CCGSubSurf::q, CCGSubSurf::r, CCGSubSurf::subdivLevels, CCGSubSurf::syncState, CCGSubSurf::tempEdges, CCGSubSurf::tempVerts, CCGSubSurf::useAgeCounts, CCGMeshIFC::vertDataSize, CCGSubSurf::vertUserAgeOffset, and CCGSubSurf::vMap.
Referenced by _getSubSurf().
CCGError ccgSubSurf_processSync | ( | CCGSubSurf * | ss | ) |
Definition at line 811 of file CCGSubSurf.c.
References _edge_unlinkMarkAndFree(), _face_unlinkMarkAndFree(), _vert_free(), ccg_ehash_free(), ccgSubSurf__sync(), eCCGError_InvalidSyncState, eCCGError_None, eSyncState_None, eSyncState_Partial, CCGSubSurf::lenTempArrays, MEM_freeN, NULL, CCGSubSurf::oldEMap, CCGSubSurf::oldFMap, CCGSubSurf::oldVMap, CCGSubSurf::syncState, CCGSubSurf::tempEdges, and CCGSubSurf::tempVerts.
Referenced by ss_sync_ccg_from_derivedmesh(), and ss_sync_from_uv().
void ccgSubSurf_setAllocMask | ( | CCGSubSurf * | ss, |
int | allocMask, | ||
int | maskOffset | ||
) |
Definition at line 429 of file CCGSubSurf.c.
References CCGSubSurf::allocMask, and CCGSubSurf::maskDataOffset.
Referenced by _getSubSurf().
CCGError ccgSubSurf_setAllowEdgeCreation | ( | CCGSubSurf * | ss, |
int | allowEdgeCreation, | ||
float | defaultCreaseValue, | ||
void * | defaultUserData | ||
) |
Definition at line 312 of file CCGSubSurf.c.
References CCGSubSurf::allowEdgeCreation, CCGSUBSURF_alloc, CCGSUBSURF_free, CCGSubSurf::defaultCreaseValue, CCGSubSurf::defaultEdgeUserData, eCCGError_None, CCGMeshIFC::edgeUserSize, and CCGSubSurf::meshIFC.
CCGError ccgSubSurf_setCalcVertexNormals | ( | CCGSubSurf * | ss, |
int | useVertNormals, | ||
int | normalDataOffset | ||
) |
Definition at line 412 of file CCGSubSurf.c.
References CCGSubSurf::calcVertNormals, eCCGError_InvalidValue, eCCGError_None, CCGSubSurf::meshIFC, CCGSubSurf::normalDataOffset, and CCGMeshIFC::vertDataSize.
Referenced by _getSubSurf().
void ccgSubSurf_setNumLayers | ( | CCGSubSurf * | ss, |
int | numLayers | ||
) |
Definition at line 435 of file CCGSubSurf.c.
References CCGSubSurf::meshIFC, and CCGMeshIFC::numLayers.
Referenced by subsurf_make_derived_from_derived().
CCGError ccgSubSurf_setSubdivisionLevels | ( | CCGSubSurf * | ss, |
int | subdivisionLevels | ||
) |
Definition at line 352 of file CCGSubSurf.c.
References _edge_free(), _face_free(), _vert_free(), CCGSubSurf::allocator, CCGSubSurf::allocatorIFC, ccg_ehash_free(), ccg_ehash_new(), eCCGError_InvalidValue, eCCGError_None, CCGSubSurf::eMap, CCGSubSurf::fMap, CCGSubSurf::numGrids, CCGSubSurf::subdivLevels, and CCGSubSurf::vMap.
Referenced by _getSubSurf().
CCGError ccgSubSurf_setUseAgeCounts | ( | CCGSubSurf * | ss, |
int | useAgeCounts, | ||
int | vertUserOffset, | ||
int | edgeUserOffset, | ||
int | faceUserOffset | ||
) |
Definition at line 390 of file CCGSubSurf.c.
References eCCGError_InvalidValue, eCCGError_None, CCGSubSurf::edgeUserAgeOffset, CCGMeshIFC::edgeUserSize, CCGSubSurf::faceUserAgeOffset, CCGMeshIFC::faceUserSize, CCGSubSurf::meshIFC, CCGSubSurf::useAgeCounts, CCGSubSurf::vertUserAgeOffset, and CCGMeshIFC::vertUserSize.
Referenced by _getSubSurf().
CCGError ccgSubSurf_stitchFaces | ( | CCGSubSurf * | ss, |
int | lvl, | ||
CCGFace ** | effectedF, | ||
int | numEffectedF | ||
) |
Stitch together face grids, averaging coordinates at edges and vertices, for multi-res displacements.
Definition at line 1022 of file CCGSubSurf.c.
References _edge_getCoVert(), ccg_edgesize(), ccg_gridsize(), ccgSubSurf__allFaces(), ccgSubSurf__effectedFaceNeighbors(), e, eCCGError_None, Edge_eEffected, EDGE_getCo, FACE_getCenterData(), FACE_getEdges(), FACE_getIECo, FACE_getIFCo, FACE_getVerts(), CCGVert::flags, CCGEdge::flags, CCGFace::flags, MEM_freeN, CCGSubSurf::meshIFC, CCGFace::numVerts, CCGSubSurf::subdivLevels, v, Vert_eEffected, VERT_getCo, VertDataAdd(), VertDataCopy(), VertDataMulN(), CCGMeshIFC::vertDataSize, VertDataZero(), and x.
Referenced by multiresModifier_disp_run().
CCGError ccgSubSurf_syncEdge | ( | CCGSubSurf * | ss, |
CCGEdgeHDL | eHDL, | ||
CCGVertHDL | e_vHDL0, | ||
CCGVertHDL | e_vHDL1, | ||
float | crease, | ||
CCGEdge ** | e_r | ||
) |
Definition at line 606 of file CCGSubSurf.c.
References _edge_new(), _edge_unlinkMarkAndFree(), ccg_ehash_insert(), ccg_ehash_lookup(), ccg_ehash_lookupWithPrev(), e, eCCGError_InvalidSyncState, eCCGError_None, CCGSubSurf::eMap, eSyncState_Edge, eSyncState_Partial, eSyncState_Vert, NULL, CCGSubSurf::oldEMap, CCGSubSurf::syncState, v1, Vert_eChanged, Vert_eEffected, and CCGSubSurf::vMap.
Referenced by ss_sync_ccg_from_derivedmesh(), and ss_sync_from_uv().
CCGError ccgSubSurf_syncEdgeDel | ( | CCGSubSurf * | ss, |
CCGEdgeHDL | eHDL | ||
) |
Definition at line 501 of file CCGSubSurf.c.
References _edge_unlinkMarkAndFree(), ccg_ehash_lookupWithPrev(), e, eCCGError_InvalidSyncState, eCCGError_InvalidValue, eCCGError_None, CCGSubSurf::eMap, eSyncState_Partial, and CCGSubSurf::syncState.
CCGError ccgSubSurf_syncFace | ( | CCGSubSurf * | ss, |
CCGFaceHDL | fHDL, | ||
int | numVerts, | ||
CCGVertHDL * | vHDLs, | ||
CCGFace ** | f_r | ||
) |
Definition at line 672 of file CCGSubSurf.c.
References _edge_new(), _face_new(), _face_unlinkMarkAndFree(), _vert_findEdgeTo(), CCGSubSurf::allowEdgeCreation, ccg_ehash_insert(), ccg_ehash_lookup(), ccg_ehash_lookupWithPrev(), ccgSubSurf_getEdgeUserData(), CCGSubSurf::defaultCreaseValue, CCGSubSurf::defaultEdgeUserData, e, eCCGError_InvalidSyncState, eCCGError_InvalidValue, eCCGError_None, CCGMeshIFC::edgeUserSize, ELEM, CCGSubSurf::eMap, eSyncState_Edge, eSyncState_Face, eSyncState_Partial, eSyncState_Vert, FACE_getEdges(), FACE_getVerts(), CCGVert::flags, CCGSubSurf::fMap, CCGSubSurf::lenTempArrays, MEM_reallocN, CCGSubSurf::meshIFC, CCGFace::next, NULL, CCGSubSurf::numGrids, CCGFace::numVerts, CCGSubSurf::oldFMap, CCGSubSurf::syncState, CCGSubSurf::tempEdges, CCGSubSurf::tempVerts, UNLIKELY, Vert_eChanged, Vert_eEffected, and CCGSubSurf::vMap.
Referenced by ss_sync_ccg_from_derivedmesh(), and ss_sync_from_uv().
CCGError ccgSubSurf_syncFaceDel | ( | CCGSubSurf * | ss, |
CCGFaceHDL | fHDL | ||
) |
Definition at line 520 of file CCGSubSurf.c.
References _face_unlinkMarkAndFree(), ccg_ehash_lookupWithPrev(), eCCGError_InvalidSyncState, eCCGError_InvalidValue, eCCGError_None, eSyncState_Partial, CCGSubSurf::fMap, CCGFace::next, and CCGSubSurf::syncState.
CCGError ccgSubSurf_syncVert | ( | CCGSubSurf * | ss, |
CCGVertHDL | vHDL, | ||
const void * | vertData, | ||
int | seam, | ||
CCGVert ** | v_r | ||
) |
Definition at line 539 of file CCGSubSurf.c.
References _vert_new(), ccg_ehash_insert(), ccg_ehash_lookupWithPrev(), ccg_vert_getCo(), e, eCCGError_InvalidSyncState, eCCGError_None, eSyncState_Partial, eSyncState_Vert, FACE_getVerts(), CCGVert::flags, CCGSubSurf::meshIFC, NULL, CCGFace::numVerts, CCGSubSurf::oldVMap, CCGSubSurf::syncState, v, Vert_eChanged, Vert_eEffected, Vert_eSeam, VertDataCopy(), VertDataEqual(), CCGMeshIFC::vertDataSize, and CCGSubSurf::vMap.
Referenced by ss_sync_ccg_from_derivedmesh(), and ss_sync_from_uv().
CCGError ccgSubSurf_syncVertDel | ( | CCGSubSurf * | ss, |
CCGVertHDL | vHDL | ||
) |
Definition at line 482 of file CCGSubSurf.c.
References _vert_free(), ccg_ehash_lookupWithPrev(), eCCGError_InvalidSyncState, eCCGError_InvalidValue, eCCGError_None, eSyncState_Partial, CCGSubSurf::syncState, v, and CCGSubSurf::vMap.
CCGError ccgSubSurf_updateFromFaces | ( | CCGSubSurf * | ss, |
int | lvl, | ||
CCGFace ** | effectedF, | ||
int | numEffectedF | ||
) |
Copy face grid coordinates to other places.
Definition at line 928 of file CCGSubSurf.c.
References _edge_getCoVert(), ccg_gridsize(), ccgSubSurf__allFaces(), e, eCCGError_None, FACE_getCenterData(), FACE_getEdges(), FACE_getIECo, FACE_getIFCo, FACE_getVerts(), MEM_freeN, CCGSubSurf::meshIFC, CCGFace::numVerts, CCGSubSurf::subdivLevels, VERT_getCo, VertDataCopy(), CCGMeshIFC::vertDataSize, and x.
Referenced by multires_modifier_update_mdisps().
CCGError ccgSubSurf_updateToFaces | ( | CCGSubSurf * | ss, |
int | lvl, | ||
CCGFace ** | effectedF, | ||
int | numEffectedF | ||
) |
Copy other places to face grid coordinates.
Definition at line 974 of file CCGSubSurf.c.
References _edge_getCoVert(), ccg_gridsize(), ccgSubSurf__allFaces(), e, eCCGError_None, FACE_getCenterData(), FACE_getEdges(), FACE_getIECo, FACE_getIFCo, FACE_getVerts(), MEM_freeN, CCGSubSurf::meshIFC, CCGFace::numVerts, CCGSubSurf::subdivLevels, VERT_getCo, VertDataCopy(), CCGMeshIFC::vertDataSize, and x.
CCGVert* ccgVertIterator_getCurrent | ( | CCGVertIterator * | vi | ) |
Definition at line 1443 of file CCGSubSurf.c.
References ccg_ehashIterator_getCurrent().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and subsurf_calculate_limit_positions().
int ccgVertIterator_isStopped | ( | CCGVertIterator * | vi | ) |
Definition at line 1447 of file CCGSubSurf.c.
References ccg_ehashIterator_isStopped().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and subsurf_calculate_limit_positions().
void ccgVertIterator_next | ( | CCGVertIterator * | vi | ) |
Definition at line 1451 of file CCGSubSurf.c.
References ccg_ehashIterator_next().
Referenced by ccgDM_getMinMax(), create_ccgdm_maps(), and subsurf_calculate_limit_positions().