|
Blender V4.5
|
#include "BLI_assert.h"#include "BLI_compiler_compat.h"#include "CCGSubSurf_intern.h"#include <cmath>#include <cstdint>#include <cstring>Go to the source code of this file.
Functions | |
| BLI_INLINE int | ccg_gridsize (int level) |
| BLI_INLINE int | ccg_edgesize (int level) |
| BLI_INLINE int | ccg_spacing (int high_level, int low_level) |
| BLI_INLINE int | ccg_edgebase (int level) |
| BLI_INLINE uint8_t * | VERT_getLevelData (CCGVert *v) |
| BLI_INLINE uint8_t * | EDGE_getLevelData (CCGEdge *e) |
| BLI_INLINE CCGVert ** | FACE_getVerts (CCGFace *f) |
| BLI_INLINE CCGEdge ** | FACE_getEdges (CCGFace *f) |
| BLI_INLINE uint8_t * | FACE_getCenterData (CCGFace *f) |
| BLI_INLINE void * | ccg_vert_getCo (CCGVert *v, int lvl, int dataSize) |
| BLI_INLINE float * | ccg_vert_getNo (CCGVert *v, int lvl, int dataSize, int normalDataOffset) |
| BLI_INLINE void * | ccg_edge_getCo (CCGEdge *e, int lvl, int x, int dataSize) |
| BLI_INLINE float * | ccg_edge_getNo (CCGEdge *e, int lvl, int x, int dataSize, int normalDataOffset) |
| BLI_INLINE void * | ccg_face_getIECo (CCGFace *f, int lvl, int S, int x, int levels, int dataSize) |
| BLI_INLINE void * | ccg_face_getIENo (CCGFace *f, int lvl, int S, int x, int levels, int dataSize, int normalDataOffset) |
| BLI_INLINE void * | ccg_face_getIFCo (CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize) |
| BLI_INLINE float * | ccg_face_getIFNo (CCGFace *f, int lvl, int S, int x, int y, int levels, int dataSize, int normalDataOffset) |
| BLI_INLINE int | ccg_face_getVertIndex (CCGFace *f, CCGVert *v) |
| BLI_INLINE int | ccg_face_getEdgeIndex (CCGFace *f, CCGEdge *e) |
| BLI_INLINE void * | ccg_face_getIFCoEdge (CCGFace *f, CCGEdge *e, int f_ed_idx, int lvl, int eX, int eY, int levels, int dataSize) |
| BLI_INLINE void | Normalize (float no[3]) |
| BLI_INLINE bool | VertDataEqual (const float a[], const float b[], const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataZero (float v[], const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataCopy (float dst[], const float src[], const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataAdd (float a[], const float b[], const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataSub (float a[], const float b[], const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataMulN (float v[], float f, const CCGSubSurf *ss) |
| BLI_INLINE void | VertDataAvg4 (float v[], const float a[], const float b[], const float c[], const float d[], const CCGSubSurf *ss) |
| BLI_INLINE void * ccg_edge_getCo | ( | CCGEdge * | e, |
| int | lvl, | ||
| int | x, | ||
| int | dataSize ) |
Definition at line 88 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_edgebase(), e, EDGE_getLevelData(), and x.
Referenced by ccgSubSurf_getEdgeLevelData().
| BLI_INLINE float * ccg_edge_getNo | ( | CCGEdge * | e, |
| int | lvl, | ||
| int | x, | ||
| int | dataSize, | ||
| int | normalDataOffset ) |
Definition at line 94 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_edgebase(), e, EDGE_getLevelData(), and x.
| BLI_INLINE int ccg_edgebase | ( | int | level | ) |
Definition at line 42 of file CCGSubSurf_inline.h.
References BLI_assert, BLI_INLINE, and CCGSUBSURF_LEVEL_MAX.
Referenced by _edge_getCoVert(), _edge_getCoVert(), _edge_new(), ccg_edge_getCo(), ccg_edge_getNo(), and ccgSubSurf_getEdgeUserData().
| BLI_INLINE int ccg_edgesize | ( | int | level | ) |
Definition at line 27 of file CCGSubSurf_inline.h.
References BLI_assert, BLI_INLINE, and CCGSUBSURF_LEVEL_MAX.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_edges_accumulate_cb(), ccgSubSurf_getEdgeLevelSize(), ccgSubSurf_getNumFinalEdges(), ccgSubSurf_getNumFinalVerts(), and ccgSubSurf_stitchFaces().
| BLI_INLINE int ccg_face_getEdgeIndex | ( | CCGFace * | f, |
| CCGEdge * | e ) |
Definition at line 150 of file CCGSubSurf_inline.h.
References BLI_INLINE, e, FACE_getEdges(), i, and CCGFace::numVerts.
Referenced by ccg_face_getIFCoEdge(), ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcVertNormals(), and ccgSubSurf__calcVertNormals_edges_accumulate_cb().
| BLI_INLINE void * ccg_face_getIECo | ( | CCGFace * | f, |
| int | lvl, | ||
| int | S, | ||
| int | x, | ||
| int | levels, | ||
| int | dataSize ) |
Definition at line 100 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_gridsize(), ccg_spacing(), FACE_getCenterData(), and x.
Referenced by ccgSubSurf_getFaceGridEdgeData().
| BLI_INLINE void * ccg_face_getIENo | ( | CCGFace * | f, |
| int | lvl, | ||
| int | S, | ||
| int | x, | ||
| int | levels, | ||
| int | dataSize, | ||
| int | normalDataOffset ) |
Definition at line 109 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_gridsize(), ccg_spacing(), FACE_getCenterData(), and x.
| BLI_INLINE void * ccg_face_getIFCo | ( | CCGFace * | f, |
| int | lvl, | ||
| int | S, | ||
| int | x, | ||
| int | y, | ||
| int | levels, | ||
| int | dataSize ) |
Definition at line 119 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_gridsize(), ccg_spacing(), FACE_getCenterData(), x, and y.
Referenced by _face_calcIFNo(), ccg_face_getIFCoEdge(), and ccgSubSurf_getFaceGridData().
| BLI_INLINE void * ccg_face_getIFCoEdge | ( | CCGFace * | f, |
| CCGEdge * | e, | ||
| int | f_ed_idx, | ||
| int | lvl, | ||
| int | eX, | ||
| int | eY, | ||
| int | levels, | ||
| int | dataSize ) |
Definition at line 160 of file CCGSubSurf_inline.h.
References BLI_assert, BLI_INLINE, ccg_face_getEdgeIndex(), ccg_face_getIFCo(), ccg_gridsize(), ccg_spacing(), e, FACE_getVerts(), CCGFace::numVerts, x, and y.
Referenced by _face_getIFNoEdge(), and ccgSubSurf__calcSubdivLevel().
| 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 129 of file CCGSubSurf_inline.h.
References BLI_INLINE, ccg_gridsize(), ccg_spacing(), FACE_getCenterData(), x, and y.
| BLI_INLINE int ccg_face_getVertIndex | ( | CCGFace * | f, |
| CCGVert * | v ) |
Definition at line 140 of file CCGSubSurf_inline.h.
References BLI_INLINE, FACE_getVerts(), i, CCGFace::numVerts, and v.
Referenced by ccgSubSurf__calcSubdivLevel(), and ccgSubSurf__calcVertNormals().
| BLI_INLINE int ccg_gridsize | ( | int | level | ) |
Definition at line 20 of file CCGSubSurf_inline.h.
References BLI_assert, BLI_INLINE, and CCGSUBSURF_LEVEL_MAX.
Referenced by _face_new(), BKE_ccg_gridsize(), ccg_face_getIECo(), ccg_face_getIENo(), ccg_face_getIFCo(), ccg_face_getIFCoEdge(), ccg_face_getIFNo(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), ccgSubSurf__calcVertNormals_faces_finalize_cb(), ccgSubSurf_getFaceUserData(), ccgSubSurf_getGridLevelSize(), ccgSubSurf_getNumFinalEdges(), ccgSubSurf_getNumFinalFaces(), ccgSubSurf_getNumFinalVerts(), ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
| BLI_INLINE int ccg_spacing | ( | int | high_level, |
| int | low_level ) |
Definition at line 34 of file CCGSubSurf_inline.h.
References BLI_assert, BLI_INLINE, and CCGSUBSURF_LEVEL_MAX.
Referenced by ccg_face_getIECo(), ccg_face_getIENo(), ccg_face_getIFCo(), ccg_face_getIFCoEdge(), and ccg_face_getIFNo().
| BLI_INLINE void * ccg_vert_getCo | ( | CCGVert * | v, |
| int | lvl, | ||
| int | dataSize ) |
Definition at line 78 of file CCGSubSurf_inline.h.
References BLI_INLINE, v, and VERT_getLevelData().
Referenced by ccgSubSurf_getVertLevelData(), and ccgSubSurf_syncVert().
| BLI_INLINE float * ccg_vert_getNo | ( | CCGVert * | v, |
| int | lvl, | ||
| int | dataSize, | ||
| int | normalDataOffset ) |
Definition at line 83 of file CCGSubSurf_inline.h.
References BLI_INLINE, v, and VERT_getLevelData().
| BLI_INLINE uint8_t * EDGE_getLevelData | ( | CCGEdge * | e | ) |
Definition at line 56 of file CCGSubSurf_inline.h.
References BLI_INLINE, and e.
Referenced by _edge_getCoVert(), _edge_getCoVert(), ccg_edge_getCo(), ccg_edge_getNo(), and ccgSubSurf_getEdgeUserData().
| BLI_INLINE uint8_t * FACE_getCenterData | ( | CCGFace * | f | ) |
Definition at line 71 of file CCGSubSurf_inline.h.
References BLI_INLINE, and FACE_getEdges().
Referenced by ccg_face_getIECo(), ccg_face_getIENo(), ccg_face_getIFCo(), ccg_face_getIFNo(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals_faces_finalize_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getFaceUserData(), ccgSubSurf_stitchFaces(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
| BLI_INLINE CCGEdge ** FACE_getEdges | ( | CCGFace * | f | ) |
Definition at line 66 of file CCGSubSurf_inline.h.
References BLI_INLINE, FACE_getVerts(), and CCGFace::numVerts.
Referenced by _face_new(), _face_unlinkMarkAndFree(), ccg_face_getEdgeIndex(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_getFaceEdge(), ccgSubSurf_getFaceEdgeIndex(), ccgSubSurf_stitchFaces(), ccgSubSurf_syncFace(), ccgSubSurf_updateFromFaces(), ccgSubSurf_updateToFaces(), and FACE_getCenterData().
| BLI_INLINE CCGVert ** FACE_getVerts | ( | CCGFace * | f | ) |
Definition at line 61 of file CCGSubSurf_inline.h.
References BLI_INLINE.
Referenced by _face_new(), _face_unlinkMarkAndFree(), ccg_face_getIFCoEdge(), ccg_face_getVertIndex(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals_faces_accumulate_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_getFaceVert(), ccgSubSurf_stitchFaces(), ccgSubSurf_syncFace(), ccgSubSurf_syncVert(), ccgSubSurf_updateFromFaces(), ccgSubSurf_updateToFaces(), and FACE_getEdges().
| BLI_INLINE void Normalize | ( | float | no[3] | ) |
Definition at line 193 of file CCGSubSurf_inline.h.
References BLI_INLINE, EPSILON, length(), NormZero, and sqrtf.
Referenced by _face_calcIFNo(), ccgSubSurf__calcVertNormals(), and ccgSubSurf__calcVertNormals_faces_finalize_cb().
| BLI_INLINE uint8_t * VERT_getLevelData | ( | CCGVert * | v | ) |
Definition at line 51 of file CCGSubSurf_inline.h.
References BLI_INLINE, and v.
Referenced by ccg_vert_getCo(), ccg_vert_getNo(), and ccgSubSurf_getVertUserData().
| BLI_INLINE void VertDataAdd | ( | float | a[], |
| const float | b[], | ||
| const CCGSubSurf * | ss ) |
Definition at line 233 of file CCGSubSurf_inline.h.
References b, BLI_INLINE, i, CCGSubSurf::meshIFC, and CCGMeshIFC::numLayers.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__sync_legacy(), and ccgSubSurf_stitchFaces().
| BLI_INLINE void VertDataAvg4 | ( | float | v[], |
| const float | a[], | ||
| const float | b[], | ||
| const float | c[], | ||
| const float | d[], | ||
| const CCGSubSurf * | ss ) |
Definition at line 254 of file CCGSubSurf_inline.h.
References b, BLI_INLINE, i, CCGSubSurf::meshIFC, CCGMeshIFC::numLayers, and v.
Referenced by ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), and ccgSubSurf__calcSubdivLevel_interior_faces_edges_midpoints_cb().
| BLI_INLINE void VertDataCopy | ( | float | dst[], |
| const float | src[], | ||
| const CCGSubSurf * | ss ) |
Definition at line 226 of file CCGSubSurf_inline.h.
References BLI_INLINE, i, CCGSubSurf::meshIFC, and CCGMeshIFC::numLayers.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__calcSubdivLevel_verts_copydata_cb(), ccgSubSurf__calcVertNormals_faces_finalize_cb(), ccgSubSurf__sync_legacy(), ccgSubSurf_stitchFaces(), ccgSubSurf_syncVert(), ccgSubSurf_updateFromFaces(), and ccgSubSurf_updateToFaces().
| BLI_INLINE bool VertDataEqual | ( | const float | a[], |
| const float | b[], | ||
| const CCGSubSurf * | ss ) |
Definition at line 211 of file CCGSubSurf_inline.h.
References b, BLI_INLINE, i, CCGSubSurf::meshIFC, and CCGMeshIFC::numLayers.
Referenced by ccgSubSurf_syncVert().
| BLI_INLINE void VertDataMulN | ( | float | v[], |
| float | f, | ||
| const CCGSubSurf * | ss ) |
Definition at line 247 of file CCGSubSurf_inline.h.
References BLI_INLINE, i, CCGSubSurf::meshIFC, CCGMeshIFC::numLayers, and v.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__sync_legacy(), and ccgSubSurf_stitchFaces().
| BLI_INLINE void VertDataSub | ( | float | a[], |
| const float | b[], | ||
| const CCGSubSurf * | ss ) |
Definition at line 240 of file CCGSubSurf_inline.h.
References b, BLI_INLINE, i, CCGSubSurf::meshIFC, and CCGMeshIFC::numLayers.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), and ccgSubSurf__sync_legacy().
| BLI_INLINE void VertDataZero | ( | float | v[], |
| const CCGSubSurf * | ss ) |
Definition at line 221 of file CCGSubSurf_inline.h.
References BLI_INLINE, CCGSubSurf::meshIFC, CCGMeshIFC::numLayers, and v.
Referenced by ccgSubSurf__calcSubdivLevel(), ccgSubSurf__calcSubdivLevel_interior_faces_edges_centerpoints_shift_cb(), ccgSubSurf__sync_legacy(), and ccgSubSurf_stitchFaces().