Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_pbvh.h"
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_scene.h"
#include "BKE_subsurf.h"
#include "GL/glew.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_material.h"
#include "CCGSubSurf.h"
Go to the source code of this file.
Defines | |
#define | PASSATTRIB(dx, dy, vert) |
#define | PASSATTRIB(dx, dy, vert) |
Functions | |
static int | ccgDM_getVertMapIndex (CCGSubSurf *ss, CCGVert *v) |
static int | ccgDM_getEdgeMapIndex (CCGSubSurf *ss, CCGEdge *e) |
static int | ccgDM_getFaceMapIndex (CCGSubSurf *ss, CCGFace *f) |
static int | ccgDM_use_grid_pbvh (CCGDerivedMesh *ccgdm) |
static void * | arena_alloc (CCGAllocatorHDL a, int numBytes) |
static void * | arena_realloc (CCGAllocatorHDL a, void *ptr, int newSize, int oldSize) |
static void | arena_free (CCGAllocatorHDL UNUSED(a), void *UNUSED(ptr)) |
static void | arena_release (CCGAllocatorHDL a) |
static CCGSubSurf * | _getSubSurf (CCGSubSurf *prevSS, int subdivLevels, int useAging, int useArena, int UNUSED(useFlatSubdiv)) |
static int | getEdgeIndex (CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) |
static int | getFaceIndex (CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edgeSize, int gridSize) |
static void | get_face_uv_map_vert (UvVertMap *vmap, struct MFace *mf, int fi, CCGVertHDL *fverts) |
static int | ss_sync_from_uv (CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, MTFace *tface) |
static void | set_subsurf_uv (CCGSubSurf *ss, DerivedMesh *dm, DerivedMesh *result, int n) |
static void | calc_ss_weights (int gridFaces, FaceVertWeight **qweight, FaceVertWeight **tweight) |
static void | ss_sync_from_derivedmesh (CCGSubSurf *ss, DerivedMesh *dm, float(*vertexCos)[3], int useFlatSubdiv) |
static void | ccgDM_getMinMax (DerivedMesh *dm, float min_r[3], float max_r[3]) |
static int | ccgDM_getNumVerts (DerivedMesh *dm) |
static int | ccgDM_getNumEdges (DerivedMesh *dm) |
static int | ccgDM_getNumFaces (DerivedMesh *dm) |
static void | ccgDM_getFinalVert (DerivedMesh *dm, int vertNum, MVert *mv) |
static void | ccgDM_getFinalVertCo (DerivedMesh *dm, int vertNum, float co_r[3]) |
static void | ccgDM_getFinalVertNo (DerivedMesh *dm, int vertNum, float no_r[3]) |
static void | ccgDM_getFinalEdge (DerivedMesh *dm, int edgeNum, MEdge *med) |
static void | ccgDM_getFinalFace (DerivedMesh *dm, int faceNum, MFace *mf) |
static void | ccgDM_copyFinalVertArray (DerivedMesh *dm, MVert *mvert) |
static void | ccgDM_copyFinalEdgeArray (DerivedMesh *dm, MEdge *medge) |
static void | ccgDM_copyFinalFaceArray (DerivedMesh *dm, MFace *mface) |
static void | ccgdm_getVertCos (DerivedMesh *dm, float(*cos)[3]) |
static void | ccgDM_foreachMappedVert (DerivedMesh *dm, void(*func)(void *userData, int index, float *co, float *no_f, short *no_s), void *userData) |
static void | ccgDM_foreachMappedEdge (DerivedMesh *dm, void(*func)(void *userData, int index, float *v0co, float *v1co), void *userData) |
static void | ccgDM_drawVerts (DerivedMesh *dm) |
static void | ccgdm_pbvh_update (CCGDerivedMesh *ccgdm) |
static void | ccgDM_drawEdges (DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) |
static void | ccgDM_drawLooseEdges (DerivedMesh *dm) |
static void | ccgDM_glNormalFast (float *a, float *b, float *c, float *d) |
static void | ccgDM_drawFacesSolid (DerivedMesh *dm, float(*partial_redraw_planes)[4], int fast, int(*setMaterial)(int, void *attribs)) |
static void | ccgDM_drawMappedFacesGLSL (DerivedMesh *dm, int(*setMaterial)(int, void *attribs), int(*setDrawOptions)(void *userData, int index), void *userData) |
static void | ccgDM_drawFacesGLSL (DerivedMesh *dm, int(*setMaterial)(int, void *attribs)) |
static void | ccgDM_drawMappedFacesMat (DerivedMesh *dm, void(*setMaterial)(void *userData, int, void *attribs), int(*setFace)(void *userData, int index), void *userData) |
static void | ccgDM_drawFacesColored (DerivedMesh *dm, int UNUSED(useTwoSided), unsigned char *col1, unsigned char *col2) |
static void | ccgDM_drawFacesTex_common (DerivedMesh *dm, int(*drawParams)(MTFace *tface, int has_mcol, int matnr), int(*drawParamsMapped)(void *userData, int index), int(*compareDrawOptions)(void *userData, int cur_index, int next_index), void *userData) |
static void | ccgDM_drawFacesTex (DerivedMesh *dm, int(*setDrawOptions)(MTFace *tface, int has_mcol, int matnr), int(*compareDrawOptions)(void *userData, int cur_index, int next_index), void *userData) |
static void | ccgDM_drawMappedFacesTex (DerivedMesh *dm, int(*setDrawOptions)(void *userData, int index), int(*compareDrawOptions)(void *userData, int cur_index, int next_index), void *userData) |
static void | ccgDM_drawUVEdges (DerivedMesh *dm) |
static void | ccgDM_drawMappedFaces (DerivedMesh *dm, int(*setDrawOptions)(void *userData, int index, int *drawSmooth_r), int(*setMaterial)(int, void *attribs), int(*compareDrawOptions)(void *userData, int cur_index, int next_index), void *userData, int useColors) |
static void | ccgDM_drawMappedEdges (DerivedMesh *dm, int(*setDrawOptions)(void *userData, int index), void *userData) |
static void | ccgDM_drawMappedEdgesInterp (DerivedMesh *dm, int(*setDrawOptions)(void *userData, int index), void(*setDrawInterpOptions)(void *userData, int index, float t), void *userData) |
static void | ccgDM_foreachMappedFaceCenter (DerivedMesh *dm, void(*func)(void *userData, int index, float *co, float *no), void *userData) |
static void | ccgDM_release (DerivedMesh *dm) |
static void * | ccgDM_get_vert_data_layer (DerivedMesh *dm, int type) |
static void * | ccgDM_get_edge_data_layer (DerivedMesh *dm, int type) |
static void * | ccgDM_get_face_data_layer (DerivedMesh *dm, int type) |
static int | ccgDM_getNumGrids (DerivedMesh *dm) |
static int | ccgDM_getGridSize (DerivedMesh *dm) |
static int | ccgdm_adjacent_grid (CCGSubSurf *ss, int *gridOffset, CCGFace *f, int S, int offset) |
static void | ccgdm_create_grids (DerivedMesh *dm) |
static DMGridData ** | ccgDM_getGridData (DerivedMesh *dm) |
static DMGridAdjacency * | ccgDM_getGridAdjacency (DerivedMesh *dm) |
static int * | ccgDM_getGridOffset (DerivedMesh *dm) |
static ListBase * | ccgDM_getFaceMap (Object *ob, DerivedMesh *dm) |
static struct PBVH * | ccgDM_getPBVH (Object *ob, DerivedMesh *dm) |
static CCGDerivedMesh * | getCCGDerivedMesh (CCGSubSurf *ss, int drawInteriorEdges, int useSubsurfUv, DerivedMesh *dm) |
struct DerivedMesh * | subsurf_make_derived_from_derived (struct DerivedMesh *dm, struct SubsurfModifierData *smd, int useRenderParams, float(*vertCos)[3], int isFinalCalc, int forEditMode, int inEditMode) |
void | subsurf_calculate_limit_positions (Mesh *me, float(*positions_r)[3]) |
Variables | |
GLubyte | stipple_quarttone [128] |
Definition in file subsurf_ccg.c.
#define PASSATTRIB | ( | dx, | |
dy, | |||
vert | |||
) |
{ \ if(attribs.totorco) { \ index = getFaceIndex(ss, f, S, x+dx, y+dy, edgeSize, gridSize); \ glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \ } \ for(b = 0; b < attribs.tottface; b++) { \ MTFace *tf = &attribs.tface[b].array[a]; \ glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \ } \ for(b = 0; b < attribs.totmcol; b++) { \ MCol *cp = &attribs.mcol[b].array[a*4 + vert]; \ GLubyte col[4]; \ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a; \ glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \ } \ if(attribs.tottang) { \ float *tang = attribs.tang.array[a*4 + vert]; \ glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \ } \ }
#define PASSATTRIB | ( | dx, | |
dy, | |||
vert | |||
) |
{ \ if(attribs.totorco) { \ index = getFaceIndex(ss, f, S, x+dx, y+dy, edgeSize, gridSize); \ if(attribs.orco.glTexco) \ glTexCoord3fv(attribs.orco.array[index]); \ else \ glVertexAttrib3fvARB(attribs.orco.glIndex, attribs.orco.array[index]); \ } \ for(b = 0; b < attribs.tottface; b++) { \ MTFace *tf = &attribs.tface[b].array[a]; \ if(attribs.tface[b].glTexco) \ glTexCoord2fv(tf->uv[vert]); \ else \ glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \ } \ for(b = 0; b < attribs.totmcol; b++) { \ MCol *cp = &attribs.mcol[b].array[a*4 + vert]; \ GLubyte col[4]; \ col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a; \ glVertexAttrib4ubvARB(attribs.mcol[b].glIndex, col); \ } \ if(attribs.tottang) { \ float *tang = attribs.tang.array[a*4 + vert]; \ glVertexAttrib4fvARB(attribs.tang.glIndex, tang); \ } \ }
static CCGSubSurf* _getSubSurf | ( | CCGSubSurf * | prevSS, |
int | subdivLevels, | ||
int | useAging, | ||
int | useArena, | ||
int | UNUSEDuseFlatSubdiv | ||
) | [static] |
Definition at line 95 of file subsurf_ccg.c.
References _CCGAllocatorIFC::alloc, arena_alloc(), arena_free(), arena_realloc(), arena_release(), BLI_memarena_new(), ccgSubSurf_free(), ccgSubSurf_getUseAgeCounts(), ccgSubSurf_new(), ccgSubSurf_setCalcVertexNormals(), ccgSubSurf_setSubdivisionLevels(), ccgSubSurf_setUseAgeCounts(), _CCGMeshIFC::edgeUserSize, _CCGMeshIFC::faceUserSize, _CCGAllocatorIFC::free, MAX2, NULL, _CCGAllocatorIFC::realloc, _CCGAllocatorIFC::release, _CCGMeshIFC::vertDataSize, and _CCGMeshIFC::vertUserSize.
Referenced by set_subsurf_uv(), subsurf_calculate_limit_positions(), and subsurf_make_derived_from_derived().
static void* arena_alloc | ( | CCGAllocatorHDL | a, |
int | numBytes | ||
) | [static] |
Definition at line 79 of file subsurf_ccg.c.
References BLI_memarena_alloc().
Referenced by _getSubSurf().
static void arena_free | ( | CCGAllocatorHDL | UNUSEDa, |
void * | UNUSEDptr | ||
) | [static] |
Definition at line 89 of file subsurf_ccg.c.
Referenced by _getSubSurf().
static void* arena_realloc | ( | CCGAllocatorHDL | a, |
void * | ptr, | ||
int | newSize, | ||
int | oldSize | ||
) | [static] |
Definition at line 82 of file subsurf_ccg.c.
References BLI_memarena_alloc().
Referenced by _getSubSurf().
static void arena_release | ( | CCGAllocatorHDL | a | ) | [static] |
Definition at line 91 of file subsurf_ccg.c.
References BLI_memarena_free().
Referenced by _getSubSurf().
static void calc_ss_weights | ( | int | gridFaces, |
FaceVertWeight ** | qweight, | ||
FaceVertWeight ** | tweight | ||
) | [static] |
Definition at line 376 of file subsurf_ccg.c.
References MEM_mallocN().
Referenced by getCCGDerivedMesh().
static int ccgdm_adjacent_grid | ( | CCGSubSurf * | ss, |
int * | gridOffset, | ||
CCGFace * | f, | ||
int | S, | ||
int | offset | ||
) | [static] |
Definition at line 2270 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeFace(), ccgSubSurf_getEdgeNumFaces(), ccgSubSurf_getFaceEdge(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceNumVerts(), credits_svn_gen::e, GET_INT_FROM_POINTER, and i.
Referenced by ccgdm_create_grids().
static void ccgDM_copyFinalEdgeArray | ( | DerivedMesh * | dm, |
MEdge * | medge | ||
) | [static] |
Definition at line 866 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeEdgeHandle(), ccgSubSurf_getEdgeNumFaces(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), CCGDerivedMesh::drawInteriorEdges, credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeFlags, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, MEdge::flag, GET_INT_FROM_POINTER, getEdgeIndex(), getFaceIndex(), i, ME_EDGEDRAW, ME_EDGERENDER, ME_LOOSEEDGE, ME_SEAM, ME_SHARP, CCGDerivedMesh::ss, MEdge::v1, and MEdge::v2.
Referenced by getCCGDerivedMesh().
static void ccgDM_copyFinalFaceArray | ( | DerivedMesh * | dm, |
MFace * | mface | ||
) | [static] |
Definition at line 947 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, MFace::flag, getFaceIndex(), i, MFace::mat_nr, ME_SMOOTH, CCGDerivedMesh::ss, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by getCCGDerivedMesh().
static void ccgDM_copyFinalVertArray | ( | DerivedMesh * | dm, |
MVert * | mvert | ||
) | [static] |
Definition at line 798 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeData(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getFaceGridData(), ccgSubSurf_getFaceGridEdgeData(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), ccgSubSurf_getNumVerts(), ccgSubSurf_getVertData(), DMGridData::co, co, copy_v3_v3(), credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, i, DMGridData::no, normal_float_to_short_v3(), CCGDerivedMesh::ss, CCGDerivedMesh::vert, and CCGDerivedMesh::vertMap.
Referenced by getCCGDerivedMesh().
static void ccgdm_create_grids | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2304 of file subsurf_ccg.c.
References ccgdm_adjacent_grid(), ccgDM_getNumGrids(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getNumFaces(), CCGDerivedMesh::face, CCGDerivedMesh::faceMap, CCGDerivedMesh::gridAdjacency, CCGDerivedMesh::gridData, CCGDerivedMesh::gridFaces, CCGDerivedMesh::gridOffset, DMGridAdjacency::index, MEM_mallocN(), DMGridAdjacency::rotation, and CCGDerivedMesh::ss.
Referenced by ccgDM_getGridAdjacency(), ccgDM_getGridData(), ccgDM_getGridOffset(), and ccgDM_getPBVH().
static void ccgDM_drawEdges | ( | DerivedMesh * | dm, |
int | drawLooseEdges, | ||
int | UNUSEDdrawAllEdges | ||
) | [static] |
Definition at line 1166 of file subsurf_ccg.c.
References ccgdm_pbvh_update(), ccgSubSurf_getEdgeAge(), ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeNumFaces(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), ccgSubSurf_getUseAgeCounts(), co, CCGDerivedMesh::drawInteriorEdges, credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeFlags, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, G, G_BACKBUFSEL, i, ME_EDGEDRAW, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawFacesColored | ( | DerivedMesh * | dm, |
int | UNUSEDuseTwoSided, | ||
unsigned char * | col1, | ||
unsigned char * | col2 | ||
) | [static] |
Definition at line 1655 of file subsurf_ccg.c.
References ccgdm_pbvh_update(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), co, simple_enum_gen::d, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, i, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawFacesGLSL | ( | DerivedMesh * | dm, |
int(*)(int, void *attribs) | setMaterial | ||
) | [static] |
Definition at line 1505 of file subsurf_ccg.c.
References DerivedMesh::drawMappedFacesGLSL, and NULL.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawFacesSolid | ( | DerivedMesh * | dm, |
float(*) | partial_redraw_planes[4], | ||
int | fast, | ||
int(*)(int, void *attribs) | setMaterial | ||
) | [static] |
Definition at line 1271 of file subsurf_ccg.c.
References BLI_pbvh_draw(), ccgDM_glNormalFast(), ccgdm_pbvh_update(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), co, DMGridData::co, simple_enum_gen::d, CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, GET_INT_FROM_POINTER, i, ME_SMOOTH, CCGDerivedMesh::mmd, CCGDerivedMesh::multires, DMGridData::no, NULL, DerivedMesh::numFaceData, CCGDerivedMesh::pbvh, CCGDerivedMesh::ss, and step().
Referenced by getCCGDerivedMesh().
static void ccgDM_drawFacesTex | ( | DerivedMesh * | dm, |
int(*)(MTFace *tface, int has_mcol, int matnr) | setDrawOptions, | ||
int(*)(void *userData, int cur_index, int next_index) | compareDrawOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 1868 of file subsurf_ccg.c.
References ccgDM_drawFacesTex_common(), compareDrawOptions(), and NULL.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawFacesTex_common | ( | DerivedMesh * | dm, |
int(*)(MTFace *tface, int has_mcol, int matnr) | drawParams, | ||
int(*)(void *userData, int index) | drawParamsMapped, | ||
int(*)(void *userData, int cur_index, int next_index) | compareDrawOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 1722 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgDM_glNormalFast(), ccgdm_pbvh_update(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), CD_MCOL, CD_MTFACE, CD_TEXTURE_MCOL, CD_WEIGHT_MCOL, co, DMGridData::co, compareDrawOptions(), DM_get_face_data_layer(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, GET_INT_FROM_POINTER, DerivedMesh::getFaceDataArray, GPU_enable_material(), i, ME_SMOOTH, DMGridData::no, NULL, ORIGINDEX_NONE, CCGDerivedMesh::ss, and MTFace::uv.
Referenced by ccgDM_drawFacesTex(), and ccgDM_drawMappedFacesTex().
static void ccgDM_drawLooseEdges | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 1235 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeNumFaces(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getNumEdges(), co, credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeMap, i, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedEdges | ( | DerivedMesh * | dm, |
int(*)(void *userData, int index) | setDrawOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 2043 of file subsurf_ccg.c.
References ccgDM_getEdgeMapIndex(), ccgEdgeIterator_free(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgSubSurf_getEdgeAge(), ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getUseAgeCounts(), co, credits_svn_gen::e, G, G_BACKBUFSEL, i, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedEdgesInterp | ( | DerivedMesh * | dm, |
int(*)(void *userData, int index) | setDrawOptions, | ||
void(*)(void *userData, int index, float t) | setDrawInterpOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 2073 of file subsurf_ccg.c.
References ccgDM_getEdgeMapIndex(), ccgEdgeIterator_free(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgSubSurf_getEdgeAge(), ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getUseAgeCounts(), co, credits_svn_gen::e, G, G_BACKBUFSEL, i, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedFaces | ( | DerivedMesh * | dm, |
int(*)(void *userData, int index, int *drawSmooth_r) | setDrawOptions, | ||
int(*)(int, void *attribs) | setMaterial, | ||
int(*)(void *userData, int cur_index, int next_index) | compareDrawOptions, | ||
void * | userData, | ||
int | useColors | ||
) | [static] |
Definition at line 1917 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgDM_glNormalFast(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), CD_MCOL, CD_WEIGHT_MCOL, co, DMGridData::co, compareDrawOptions(), simple_enum_gen::d, addon::engine::draw(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, GET_INT_FROM_POINTER, DerivedMesh::getFaceDataArray, i, ME_SMOOTH, DMGridData::no, NULL, ORIGINDEX_NONE, CCGDerivedMesh::ss, and stipple_quarttone.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedFacesGLSL | ( | DerivedMesh * | dm, |
int(*)(int, void *attribs) | setMaterial, | ||
int(*)(void *userData, int index) | setDrawOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 1364 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgDM_glNormalFast(), ccgdm_pbvh_update(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), co, DMGridData::co, DM_vertex_attributes_from_gpu(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, GET_INT_FROM_POINTER, i, ME_SMOOTH, DMGridData::no, NULL, ORIGINDEX_NONE, PASSATTRIB, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedFacesMat | ( | DerivedMesh * | dm, |
void(*)(void *userData, int, void *attribs) | setMaterial, | ||
int(*)(void *userData, int index) | setFace, | ||
void * | userData | ||
) | [static] |
Definition at line 1510 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgDM_glNormalFast(), ccgdm_pbvh_update(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), co, DMGridData::co, DM_vertex_attributes_from_gpu(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, GET_INT_FROM_POINTER, i, ME_SMOOTH, DMGridData::no, NULL, ORIGINDEX_NONE, PASSATTRIB, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawMappedFacesTex | ( | DerivedMesh * | dm, |
int(*)(void *userData, int index) | setDrawOptions, | ||
int(*)(void *userData, int cur_index, int next_index) | compareDrawOptions, | ||
void * | userData | ||
) | [static] |
Definition at line 1876 of file subsurf_ccg.c.
References ccgDM_drawFacesTex_common(), compareDrawOptions(), and NULL.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawUVEdges | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 1884 of file subsurf_ccg.c.
References CD_MTFACE, DM_get_face_data_layer(), DerivedMesh::getFaceArray, i, ME_HIDE, DerivedMesh::numFaceData, and MTFace::uv.
Referenced by getCCGDerivedMesh().
static void ccgDM_drawVerts | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 1106 of file subsurf_ccg.c.
References ccgEdgeIterator_free(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_getEdgeData(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getFaceGridData(), ccgSubSurf_getFaceGridEdgeData(), ccgSubSurf_getFaceIterator(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getVertData(), ccgSubSurf_getVertIterator(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), credits_svn_gen::e, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_foreachMappedEdge | ( | DerivedMesh * | dm, |
void(*)(void *userData, int index, float *v0co, float *v1co) | func, | ||
void * | userData | ||
) | [static] |
Definition at line 1086 of file subsurf_ccg.c.
References ccgDM_getEdgeMapIndex(), ccgEdgeIterator_free(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), co, credits_svn_gen::e, i, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_foreachMappedFaceCenter | ( | DerivedMesh * | dm, |
void(*)(void *userData, int index, float *co, float *no) | func, | ||
void * | userData | ||
) | [static] |
Definition at line 2104 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_getFaceGridData(), ccgSubSurf_getFaceIterator(), DMGridData::co, DMGridData::no, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void ccgDM_foreachMappedVert | ( | DerivedMesh * | dm, |
void(*)(void *userData, int index, float *co, float *no_f, short *no_s) | func, | ||
void * | userData | ||
) | [static] |
Definition at line 1071 of file subsurf_ccg.c.
References ccgDM_getVertMapIndex(), ccgSubSurf_getVertData(), ccgSubSurf_getVertIterator(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), DMGridData::co, DMGridData::no, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void* ccgDM_get_edge_data_layer | ( | DerivedMesh * | dm, |
int | type | ||
) | [static] |
Definition at line 2183 of file subsurf_ccg.c.
References ccgDM_getEdgeMapIndex(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getNumEdges(), CD_CALLOC, CD_ORIGINDEX, DM_add_edge_layer(), DM_get_edge_data_layer(), credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeMap, i, NULL, DerivedMesh::numEdgeData, ORIGINDEX_NONE, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void* ccgDM_get_face_data_layer | ( | DerivedMesh * | dm, |
int | type | ||
) | [static] |
Definition at line 2218 of file subsurf_ccg.c.
References ccgDM_getFaceMapIndex(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), CD_CALLOC, CD_ORIGINDEX, DM_add_face_layer(), DM_get_face_data_layer(), CCGDerivedMesh::face, CCGDerivedMesh::faceMap, i, NULL, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static void* ccgDM_get_vert_data_layer | ( | DerivedMesh * | dm, |
int | type | ||
) | [static] |
Definition at line 2153 of file subsurf_ccg.c.
References ccgDM_getVertMapIndex(), ccgSubSurf_getNumVerts(), CD_CALLOC, CD_ORIGINDEX, DM_add_vert_layer(), DM_get_vert_data_layer(), NULL, DerivedMesh::numVertData, ORIGINDEX_NONE, CCGDerivedMesh::ss, CCGDerivedMesh::vert, and CCGDerivedMesh::vertMap.
Referenced by getCCGDerivedMesh().
static int ccgDM_getEdgeMapIndex | ( | CCGSubSurf * | ss, |
CCGEdge * | e | ||
) | [static] |
Definition at line 507 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeUserData().
Referenced by ccgDM_drawMappedEdges(), ccgDM_drawMappedEdgesInterp(), ccgDM_foreachMappedEdge(), and ccgDM_get_edge_data_layer().
static ListBase* ccgDM_getFaceMap | ( | Object * | ob, |
DerivedMesh * | dm | ||
) | [static] |
Definition at line 2391 of file subsurf_ccg.c.
References create_vert_face_map(), Object::data, CCGDerivedMesh::fmap, CCGDerivedMesh::fmap_mem, Mesh::mface, CCGDerivedMesh::mmd, CCGDerivedMesh::multires, OB_MESH, Mesh::totface, Mesh::totvert, and Object::type.
Referenced by getCCGDerivedMesh().
static int ccgDM_getFaceMapIndex | ( | CCGSubSurf * | ss, |
CCGFace * | f | ||
) | [static] |
Definition at line 511 of file subsurf_ccg.c.
References ccgSubSurf_getFaceUserData().
Referenced by ccgDM_drawFacesTex_common(), ccgDM_drawMappedFaces(), ccgDM_drawMappedFacesGLSL(), ccgDM_drawMappedFacesMat(), ccgDM_foreachMappedFaceCenter(), and ccgDM_get_face_data_layer().
static void ccgDM_getFinalEdge | ( | DerivedMesh * | dm, |
int | edgeNum, | ||
MEdge * | med | ||
) | [static] |
Definition at line 675 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeNumFaces(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeFlags, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, MEdge::flag, getEdgeIndex(), getFaceIndex(), i, ME_EDGEDRAW, ME_EDGERENDER, ME_LOOSEEDGE, ME_SEAM, ME_SHARP, NULL, CCGDerivedMesh::ss, CCGDerivedMesh::startEdge, MEdge::v1, and MEdge::v2.
Referenced by getCCGDerivedMesh().
static void ccgDM_getFinalFace | ( | DerivedMesh * | dm, |
int | faceNum, | ||
MFace * | mf | ||
) | [static] |
Definition at line 754 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeSize(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), CCGDerivedMesh::face, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, MFace::flag, getFaceIndex(), i, MFace::mat_nr, ME_SMOOTH, CCGDerivedMesh::ss, CCGDerivedMesh::startFace, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by getCCGDerivedMesh().
static void ccgDM_getFinalVert | ( | DerivedMesh * | dm, |
int | vertNum, | ||
MVert * | mv | ||
) | [static] |
Definition at line 575 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeData(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getFaceGridData(), ccgSubSurf_getFaceGridEdgeData(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), ccgSubSurf_getVertData(), DMGridData::co, MVert::co, copy_v3_v3(), credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, CCGDerivedMesh::faceMap, i, DMGridData::no, MVert::no, normal_float_to_short_v3(), CCGDerivedMesh::ss, CCGDerivedMesh::startVert, CCGDerivedMesh::vert, and CCGDerivedMesh::vertMap.
Referenced by ccgDM_getFinalVertCo(), ccgDM_getFinalVertNo(), and getCCGDerivedMesh().
static void ccgDM_getFinalVertCo | ( | DerivedMesh * | dm, |
int | vertNum, | ||
float | co_r[3] | ||
) | [static] |
Definition at line 659 of file subsurf_ccg.c.
References ccgDM_getFinalVert(), MVert::co, and copy_v3_v3().
Referenced by getCCGDerivedMesh().
static void ccgDM_getFinalVertNo | ( | DerivedMesh * | dm, |
int | vertNum, | ||
float | no_r[3] | ||
) | [static] |
Definition at line 667 of file subsurf_ccg.c.
References ccgDM_getFinalVert(), MVert::no, and normal_short_to_float_v3().
Referenced by getCCGDerivedMesh().
static DMGridAdjacency* ccgDM_getGridAdjacency | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2375 of file subsurf_ccg.c.
References ccgdm_create_grids(), and CCGDerivedMesh::gridAdjacency.
Referenced by getCCGDerivedMesh().
static DMGridData** ccgDM_getGridData | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2367 of file subsurf_ccg.c.
References ccgdm_create_grids(), and CCGDerivedMesh::gridData.
Referenced by getCCGDerivedMesh().
static int* ccgDM_getGridOffset | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2383 of file subsurf_ccg.c.
References ccgdm_create_grids(), and CCGDerivedMesh::gridOffset.
Referenced by getCCGDerivedMesh().
static int ccgDM_getGridSize | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2264 of file subsurf_ccg.c.
References ccgSubSurf_getGridSize(), and CCGDerivedMesh::ss.
Referenced by ccgDM_getPBVH(), and getCCGDerivedMesh().
static void ccgDM_getMinMax | ( | DerivedMesh * | dm, |
float | min_r[3], | ||
float | max_r[3] | ||
) | [static] |
Definition at line 515 of file subsurf_ccg.c.
References ccgEdgeIterator_free(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_getEdgeDataArray(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceIterator(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumVerts(), ccgSubSurf_getVertData(), ccgSubSurf_getVertIterator(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), co, DO_MINMAX, credits_svn_gen::e, i, and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static int ccgDM_getNumEdges | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 564 of file subsurf_ccg.c.
References ccgSubSurf_getNumFinalEdges(), and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static int ccgDM_getNumFaces | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 569 of file subsurf_ccg.c.
References ccgSubSurf_getNumFinalFaces(), and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static int ccgDM_getNumGrids | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2248 of file subsurf_ccg.c.
References ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getNumFaces(), CCGDerivedMesh::face, CCGDerivedMesh::faceMap, and CCGDerivedMesh::ss.
Referenced by ccgdm_create_grids(), ccgDM_getPBVH(), and getCCGDerivedMesh().
static int ccgDM_getNumVerts | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 559 of file subsurf_ccg.c.
References ccgSubSurf_getNumFinalVerts(), and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static struct PBVH* ccgDM_getPBVH | ( | Object * | ob, |
DerivedMesh * | dm | ||
) | [static, read] |
Definition at line 2417 of file subsurf_ccg.c.
References BLI_pbvh_build_grids(), BLI_pbvh_build_mesh(), BLI_pbvh_grids_update(), BLI_pbvh_new(), ccgdm_create_grids(), ccgDM_getGridSize(), ccgDM_getNumGrids(), ccgDM_use_grid_pbvh(), Object::data, CCGDerivedMesh::gridAdjacency, CCGDerivedMesh::gridData, CCGDerivedMesh::gridFaces, Mesh::mface, Mesh::mvert, NULL, OB_MESH, SculptSession::pbvh, CCGDerivedMesh::pbvh, Object::sculpt, Mesh::totface, Mesh::totvert, and Object::type.
Referenced by getCCGDerivedMesh().
static void ccgdm_getVertCos | ( | DerivedMesh * | dm, |
float(*) | cos[3] | ||
) | [static] |
Definition at line 988 of file subsurf_ccg.c.
References ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_getEdgeData(), ccgSubSurf_getEdgeEdgeHandle(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridData(), ccgSubSurf_getFaceGridEdgeData(), ccgSubSurf_getFaceIterator(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), ccgSubSurf_getNumVerts(), ccgSubSurf_getVertData(), ccgSubSurf_getVertIterator(), ccgSubSurf_getVertVertHandle(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), copy_v3_v3(), cos(), credits_svn_gen::e, GET_INT_FROM_POINTER, i, MEM_freeN(), MEM_mallocN(), and CCGDerivedMesh::ss.
Referenced by getCCGDerivedMesh().
static int ccgDM_getVertMapIndex | ( | CCGSubSurf * | ss, |
CCGVert * | v | ||
) | [static] |
Definition at line 503 of file subsurf_ccg.c.
References ccgSubSurf_getVertUserData().
Referenced by ccgDM_foreachMappedVert(), and ccgDM_get_vert_data_layer().
static void ccgDM_glNormalFast | ( | float * | a, |
float * | b, | ||
float * | c, | ||
float * | d | ||
) | [static] |
Definition at line 1256 of file subsurf_ccg.c.
Referenced by ccgDM_drawFacesSolid(), ccgDM_drawFacesTex_common(), ccgDM_drawMappedFaces(), ccgDM_drawMappedFacesGLSL(), and ccgDM_drawMappedFacesMat().
static void ccgdm_pbvh_update | ( | CCGDerivedMesh * | ccgdm | ) | [static] |
Definition at line 1151 of file subsurf_ccg.c.
References BLI_pbvh_get_grid_updates(), ccgDM_use_grid_pbvh(), ccgSubSurf_updateFromFaces(), ccgSubSurf_updateNormals(), MEM_freeN(), CCGDerivedMesh::pbvh, and CCGDerivedMesh::ss.
Referenced by ccgDM_drawEdges(), ccgDM_drawFacesColored(), ccgDM_drawFacesSolid(), ccgDM_drawFacesTex_common(), ccgDM_drawMappedFacesGLSL(), and ccgDM_drawMappedFacesMat().
static void ccgDM_release | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 2124 of file subsurf_ccg.c.
References BLI_findindex(), ccgSubSurf_free(), DM_release(), CCGDerivedMesh::edgeFlags, CCGDerivedMesh::edgeMap, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, CCGDerivedMesh::fmap, CCGDerivedMesh::fmap_mem, CCGDerivedMesh::freeSS, CCGDerivedMesh::gridAdjacency, CCGDerivedMesh::gridData, CCGDerivedMesh::gridFaces, CCGDerivedMesh::gridOffset, CCGDerivedMesh::local_mmd, MEM_freeN(), CCGDerivedMesh::mmd, CCGDerivedMesh::modified, Object::modifiers, CCGDerivedMesh::multires, NULL, CCGDerivedMesh::ob, CCGDerivedMesh::ss, CCGDerivedMesh::update, and CCGDerivedMesh::vertMap.
Referenced by getCCGDerivedMesh().
static int ccgDM_use_grid_pbvh | ( | CCGDerivedMesh * | ccgdm | ) | [static] |
Definition at line 2405 of file subsurf_ccg.c.
References CCGDerivedMesh::mmd, and CCGDerivedMesh::multires.
Referenced by ccgDM_getPBVH(), and ccgdm_pbvh_update().
static void get_face_uv_map_vert | ( | UvVertMap * | vmap, |
struct MFace * | mf, | ||
int | fi, | ||
CCGVertHDL * | fverts | ||
) | [static] |
Definition at line 199 of file subsurf_ccg.c.
References UvMapVert::f, get_uv_map_vert(), UvMapVert::next, UvMapVert::separate, SET_INT_IN_POINTER, UvMapVert::tfindex, MFace::v1, and MFace::v4.
Referenced by ss_sync_from_uv().
static CCGDerivedMesh* getCCGDerivedMesh | ( | CCGSubSurf * | ss, |
int | drawInteriorEdges, | ||
int | useSubsurfUv, | ||
DerivedMesh * | dm | ||
) | [static] |
Definition at line 2470 of file subsurf_ccg.c.
References calc_ss_weights(), ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalFaceArray(), ccgDM_copyFinalVertArray(), ccgDM_drawEdges(), ccgDM_drawFacesColored(), ccgDM_drawFacesGLSL(), ccgDM_drawFacesSolid(), ccgDM_drawFacesTex(), ccgDM_drawLooseEdges(), ccgDM_drawMappedEdges(), ccgDM_drawMappedEdgesInterp(), ccgDM_drawMappedFaces(), ccgDM_drawMappedFacesGLSL(), ccgDM_drawMappedFacesMat(), ccgDM_drawMappedFacesTex(), ccgDM_drawUVEdges(), ccgDM_drawVerts(), ccgDM_foreachMappedEdge(), ccgDM_foreachMappedFaceCenter(), ccgDM_foreachMappedVert(), ccgDM_get_edge_data_layer(), ccgDM_get_face_data_layer(), ccgDM_get_vert_data_layer(), ccgDM_getFaceMap(), ccgDM_getFinalEdge(), ccgDM_getFinalFace(), ccgDM_getFinalVert(), ccgDM_getFinalVertCo(), ccgDM_getFinalVertNo(), ccgDM_getGridAdjacency(), ccgDM_getGridData(), ccgDM_getGridOffset(), ccgDM_getGridSize(), ccgDM_getMinMax(), ccgDM_getNumEdges(), ccgDM_getNumFaces(), ccgDM_getNumGrids(), ccgDM_getNumVerts(), ccgDM_getPBVH(), ccgdm_getVertCos(), ccgDM_release(), ccgEdgeIterator_getCurrent(), ccgEdgeIterator_isStopped(), ccgEdgeIterator_next(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_getEdgeEdgeHandle(), ccgSubSurf_getEdgeIterator(), ccgSubSurf_getEdgeSize(), ccgSubSurf_getEdgeUserData(), ccgSubSurf_getEdgeVert0(), ccgSubSurf_getEdgeVert1(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceIterator(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getFaceUserData(), ccgSubSurf_getFaceVert(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumEdges(), ccgSubSurf_getNumFaces(), ccgSubSurf_getNumFinalEdges(), ccgSubSurf_getNumFinalFaces(), ccgSubSurf_getNumFinalVerts(), ccgSubSurf_getNumVerts(), ccgSubSurf_getVertIterator(), ccgSubSurf_getVertUserData(), ccgSubSurf_getVertVertHandle(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), CD_MTFACE, CD_ORIGINDEX, DerivedMesh::copyEdgeArray, DerivedMesh::copyFaceArray, DerivedMesh::copyVertArray, CustomData_number_of_layers(), CCGDerivedMesh::dm, DM_copy_vert_data(), DM_from_template(), DM_get_edge_data(), DM_get_face_data(), DM_get_vert_data(), DM_interp_face_data(), DM_interp_vert_data(), DM_TYPE_CCGDM, DerivedMesh::drawEdges, DerivedMesh::drawFacesColored, DerivedMesh::drawFacesGLSL, DerivedMesh::drawFacesSolid, DerivedMesh::drawFacesTex, CCGDerivedMesh::drawInteriorEdges, DerivedMesh::drawLooseEdges, DerivedMesh::drawMappedEdges, DerivedMesh::drawMappedEdgesInterp, DerivedMesh::drawMappedFaces, DerivedMesh::drawMappedFacesGLSL, DerivedMesh::drawMappedFacesMat, DerivedMesh::drawMappedFacesTex, DerivedMesh::drawUVEdges, DerivedMesh::drawVerts, credits_svn_gen::e, CCGDerivedMesh::edge, CCGDerivedMesh::edgeFlags, CCGDerivedMesh::edgeMap, CCGDerivedMesh::face, DerivedMesh::faceData, CCGDerivedMesh::faceFlags, CCGDerivedMesh::faceMap, MEdge::flag, MFace::flag, DerivedMesh::foreachMappedEdge, DerivedMesh::foreachMappedFaceCenter, DerivedMesh::foreachMappedVert, GET_INT_FROM_POINTER, DerivedMesh::getEdge, DerivedMesh::getEdgeArray, DerivedMesh::getEdgeData, DerivedMesh::getEdgeDataArray, DerivedMesh::getFace, DerivedMesh::getFaceArray, DerivedMesh::getFaceData, DerivedMesh::getFaceDataArray, DerivedMesh::getFaceMap, DerivedMesh::getGridAdjacency, DerivedMesh::getGridData, DerivedMesh::getGridOffset, DerivedMesh::getGridSize, DerivedMesh::getMinMax, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumGrids, DerivedMesh::getNumVerts, DerivedMesh::getPBVH, DerivedMesh::getVert, DerivedMesh::getVertCo, DerivedMesh::getVertCos, DerivedMesh::getVertData, DerivedMesh::getVertDataArray, DerivedMesh::getVertNo, i, MFace::mat_nr, MEM_callocN(), MEM_freeN(), MEM_mallocN(), NULL, DerivedMesh::release, set_subsurf_uv(), CCGDerivedMesh::ss, CCGDerivedMesh::startEdge, CCGDerivedMesh::startFace, CCGDerivedMesh::startVert, PBVH::totvert, CCGDerivedMesh::useSubsurfUv, CCGDerivedMesh::vert, CCGDerivedMesh::vertMap, and simple_enum_gen::w.
Referenced by subsurf_make_derived_from_derived().
static int getEdgeIndex | ( | CCGSubSurf * | ss, |
CCGEdge * | e, | ||
int | x, | ||
int | edgeSize | ||
) | [static] |
Definition at line 147 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeUserData(), ccgSubSurf_getEdgeVert0(), ccgSubSurf_getEdgeVert1(), and ccgSubSurf_getVertUserData().
Referenced by ccgDM_copyFinalEdgeArray(), and ccgDM_getFinalEdge().
static int getFaceIndex | ( | CCGSubSurf * | ss, |
CCGFace * | f, | ||
int | S, | ||
int | x, | ||
int | y, | ||
int | edgeSize, | ||
int | gridSize | ||
) | [static] |
Definition at line 162 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeUserData(), ccgSubSurf_getEdgeVert0(), ccgSubSurf_getFaceEdge(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getFaceUserData(), ccgSubSurf_getFaceVert(), ccgSubSurf_getVertUserData(), and credits_svn_gen::e.
Referenced by ccgDM_copyFinalEdgeArray(), ccgDM_copyFinalFaceArray(), ccgDM_getFinalEdge(), and ccgDM_getFinalFace().
static void set_subsurf_uv | ( | CCGSubSurf * | ss, |
DerivedMesh * | dm, | ||
DerivedMesh * | result, | ||
int | n | ||
) | [static] |
Definition at line 311 of file subsurf_ccg.c.
References _getSubSurf(), ccgFaceIterator_free(), ccgFaceIterator_getCurrent(), ccgFaceIterator_isStopped(), ccgFaceIterator_next(), ccgSubSurf_free(), ccgSubSurf_getFaceFaceHandle(), ccgSubSurf_getFaceGridDataArray(), ccgSubSurf_getFaceIterator(), ccgSubSurf_getFaceNumVerts(), ccgSubSurf_getGridSize(), ccgSubSurf_getNumFaces(), ccgSubSurf_getSubdivisionLevels(), CD_MTFACE, DMGridData::co, copy_v2_v2(), CustomData_get_layer_n(), DerivedMesh::faceData, faceMap, GET_INT_FROM_POINTER, MEM_freeN(), MEM_mallocN(), NULL, ss_sync_from_uv(), and MTFace::uv.
Referenced by getCCGDerivedMesh().
static void ss_sync_from_derivedmesh | ( | CCGSubSurf * | ss, |
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | useFlatSubdiv | ||
) | [static] |
Definition at line 419 of file subsurf_ccg.c.
References ccgSubSurf_getEdgeUserData(), ccgSubSurf_getFaceUserData(), ccgSubSurf_getSubdivisionLevels(), ccgSubSurf_getVertUserData(), ccgSubSurf_initFullSync(), ccgSubSurf_processSync(), ccgSubSurf_syncEdge(), ccgSubSurf_syncFace(), ccgSubSurf_syncVert(), CD_ORIGINDEX, MVert::co, MEdge::crease, credits_svn_gen::e, eCCGError_InvalidValue, DerivedMesh::getEdgeArray, DerivedMesh::getEdgeDataArray, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, i, SET_INT_IN_POINTER, MFace::v1, MEdge::v1, MFace::v2, MEdge::v2, MFace::v3, and MFace::v4.
Referenced by subsurf_calculate_limit_positions(), and subsurf_make_derived_from_derived().
static int ss_sync_from_uv | ( | CCGSubSurf * | ss, |
CCGSubSurf * | origss, | ||
DerivedMesh * | dm, | ||
MTFace * | tface | ||
) | [static] |
Definition at line 216 of file subsurf_ccg.c.
References BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_new(), ccgSubSurf_getEdgeCrease(), ccgSubSurf_getFace(), ccgSubSurf_getFaceEdge(), ccgSubSurf_getSubdivisionLevels(), ccgSubSurf_initFullSync(), ccgSubSurf_processSync(), ccgSubSurf_syncEdge(), ccgSubSurf_syncFace(), ccgSubSurf_syncVert(), copy_v2_v2(), credits_svn_gen::e, UvMapVert::f, MVert::flag, free_uv_vert_map(), get_face_uv_map_vert(), GET_INT_FROM_POINTER, get_uv_map_vert(), DerivedMesh::getFaceArray, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, make_uv_vert_map(), ME_VERT_MERGED, UvMapVert::next, next, NULL, UvMapVert::separate, SET_INT_IN_POINTER, STD_UV_CONNECT_LIMIT, UvMapVert::tfindex, MFace::v1, and MFace::v4.
Referenced by set_subsurf_uv().
void subsurf_calculate_limit_positions | ( | Mesh * | me, |
float(*) | positions_r[3] | ||
) |
Definition at line 2859 of file subsurf_ccg.c.
References _getSubSurf(), add_v3_v3(), add_v3_v3v3(), ccgSubSurf_free(), ccgSubSurf_getEdgeData(), ccgSubSurf_getFaceCenterData(), ccgSubSurf_getVertData(), ccgSubSurf_getVertEdge(), ccgSubSurf_getVertFace(), ccgSubSurf_getVertIterator(), ccgSubSurf_getVertNumEdges(), ccgSubSurf_getVertNumFaces(), ccgSubSurf_getVertVertHandle(), ccgVertIterator_free(), ccgVertIterator_getCurrent(), ccgVertIterator_isStopped(), ccgVertIterator_next(), CDDM_from_mesh(), co, credits_svn_gen::e, GET_INT_FROM_POINTER, i, mul_v3_fl(), N, NULL, DerivedMesh::release, and ss_sync_from_derivedmesh().
Referenced by add_verts_to_dgroups().
struct DerivedMesh* subsurf_make_derived_from_derived | ( | struct DerivedMesh * | dm, |
struct SubsurfModifierData * | smd, | ||
int | useRenderParams, | ||
float(*) | vertCos[3], | ||
int | isFinalCalc, | ||
int | forEditMode, | ||
int | inEditMode | ||
) | [read] |
Definition at line 2769 of file subsurf_ccg.c.
References _getSubSurf(), ccgSubSurf_free(), SubsurfModifierData::emCache, eSubsurfModifierFlag_ControlEdges, eSubsurfModifierFlag_DebugIncr, eSubsurfModifierFlag_Incremental, eSubsurfModifierFlag_SubsurfUv, SubsurfModifierData::flags, CCGDerivedMesh::freeSS, get_render_subsurf_level(), getCCGDerivedMesh(), SubsurfModifierData::levels, SubsurfModifierData::mCache, ME_SIMPLE_SUBSURF, SubsurfModifierData::modifier, NULL, Scene::r, SubsurfModifierData::renderLevels, ModifierData::scene, ss_sync_from_derivedmesh(), and SubsurfModifierData::subdivType.
Referenced by applyModifier(), applyModifierEM(), init_heights_data(), shrinkwrapModifier_deform(), and subsurf_dm_create_local().
GLubyte stipple_quarttone[128] |