Blender V2.61 - r43446
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BLO_sys_types.h"
#include "BLI_utildefines.h"
#include "BLI_edgehash.h"
#include "BLI_math_base.h"
#include "BKE_DerivedMesh.h"
#include "MEM_guardedalloc.h"
#include "BKE_mesh.h"
#include "BKE_deform.h"
Go to the source code of this file.
Classes | |
union | EdgeUUID |
struct | SortFace |
Defines | |
#define | SELECT 1 |
#define | PRINT if(do_verbose) printf |
#define | REMOVE_EDGE_TAG(_med) { _med->v2= _med->v1; do_edge_free= 1; } |
#define | REMOVE_FACE_TAG(_mf) { _mf->v3=0; do_face_free= 1; } |
Typedefs | |
typedef struct SortFace | SortFace |
Functions | |
static void | edge_store_assign (uint32_t verts[2], const uint32_t v1, const uint32_t v2) |
static void | edge_store_from_mface_quad (EdgeUUID es[4], MFace *mf) |
static void | edge_store_from_mface_tri (EdgeUUID es[4], MFace *mf) |
static int | int64_cmp (const void *v1, const void *v2) |
static int | search_face_cmp (const void *v1, const void *v2) |
int | BKE_mesh_validate_arrays (Mesh *me, MVert *mverts, unsigned int totvert, MEdge *medges, unsigned int totedge, MFace *mfaces, unsigned int totface, MDeformVert *dverts, const short do_verbose, const short do_fixes) |
static int | mesh_validate_customdata (CustomData *data, short do_verbose, const short do_fixes) |
static int | BKE_mesh_validate_all_customdata (CustomData *vdata, CustomData *edata, CustomData *fdata, short do_verbose, const short do_fixes) |
int | BKE_mesh_validate (Mesh *me, int do_verbose) |
int | BKE_mesh_validate_dm (DerivedMesh *dm) |
void | BKE_mesh_calc_edges (Mesh *mesh, int update) |
Definition in file mesh_validate.c.
#define PRINT if(do_verbose) printf |
Definition at line 120 of file mesh_validate.c.
Referenced by BKE_mesh_validate_arrays(), and mesh_validate_customdata().
#define REMOVE_EDGE_TAG | ( | _med | ) | { _med->v2= _med->v1; do_edge_free= 1; } |
Referenced by BKE_mesh_validate_arrays().
#define REMOVE_FACE_TAG | ( | _mf | ) | { _mf->v3=0; do_face_free= 1; } |
Referenced by BKE_mesh_validate_arrays().
#define SELECT 1 |
Definition at line 50 of file mesh_validate.c.
Referenced by BKE_mesh_calc_edges().
void BKE_mesh_calc_edges | ( | Mesh * | mesh, |
int | update | ||
) |
Definition at line 461 of file mesh_validate.c.
References BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_new(), BLI_edgehash_size(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_getValue(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), CD_CALLOC, CD_MEDGE, CustomData_add_layer(), CustomData_free(), CustomData_get_layer(), MEdge::flag, i, ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, Mesh::mface, NULL, SELECT, Mesh::totedge, Mesh::totface, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, and MFace::v4.
Referenced by BKE_mesh_validate_arrays(), and ED_mesh_update().
int BKE_mesh_validate | ( | Mesh * | me, |
int | do_verbose | ||
) |
Definition at line 432 of file mesh_validate.c.
References BKE_mesh_validate_all_customdata(), BKE_mesh_validate_arrays(), Mesh::dvert, Mesh::fdata, Mesh::id, Mesh::medge, Mesh::mface, Mesh::mvert, ID::name, Mesh::totedge, Mesh::totface, Mesh::totvert, and TRUE.
static int BKE_mesh_validate_all_customdata | ( | CustomData * | vdata, |
CustomData * | edata, | ||
CustomData * | fdata, | ||
short | do_verbose, | ||
const short | do_fixes | ||
) | [static] |
Definition at line 420 of file mesh_validate.c.
References mesh_validate_customdata().
Referenced by BKE_mesh_validate().
int BKE_mesh_validate_arrays | ( | Mesh * | me, |
MVert * | mverts, | ||
unsigned int | totvert, | ||
MEdge * | medges, | ||
unsigned int | totedge, | ||
MFace * | mfaces, | ||
unsigned int | totface, | ||
MDeformVert * | dverts, | ||
const short | do_verbose, | ||
const short | do_fixes | ||
) |
Definition at line 122 of file mesh_validate.c.
References BKE_mesh_calc_edges(), BLI_assert, BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_lookup(), BLI_edgehash_new(), CLAMP(), MVert::co, MDeformWeight::def_nr, defvert_remove_group(), MDeformVert::dw, edge_store_from_mface_quad(), edge_store_from_mface_tri(), SortFace::es, FALSE, GET_INT_FROM_POINTER, i, SortFace::index, int64_cmp(), MEM_callocN(), MEM_freeN(), mesh_strip_loose_edges(), mesh_strip_loose_faces(), MVert::no, NULL, PRINT, REMOVE_EDGE_TAG, REMOVE_FACE_TAG, search_face_cmp(), SET_INT_IN_POINTER, TRUE, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, MDeformWeight::weight, and zero_v3().
Referenced by BKE_mesh_validate(), and BKE_mesh_validate_dm().
int BKE_mesh_validate_dm | ( | DerivedMesh * | dm | ) |
Definition at line 451 of file mesh_validate.c.
References BKE_mesh_validate_arrays(), CD_MDEFORMVERT, FALSE, DerivedMesh::getEdgeArray, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, NULL, and TRUE.
static void edge_store_assign | ( | uint32_t | verts[2], |
const uint32_t | v1, | ||
const uint32_t | v2 | ||
) | [static] |
Definition at line 63 of file mesh_validate.c.
Referenced by edge_store_from_mface_quad(), and edge_store_from_mface_tri().
Definition at line 75 of file mesh_validate.c.
References edge_store_assign(), MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by BKE_mesh_validate_arrays().
Definition at line 83 of file mesh_validate.c.
References edge_store_assign(), UINT_MAX, MFace::v1, MFace::v2, MFace::v3, and EdgeUUID::verts.
Referenced by BKE_mesh_validate_arrays().
static int int64_cmp | ( | const void * | v1, |
const void * | v2 | ||
) | [static] |
Definition at line 91 of file mesh_validate.c.
Referenced by BKE_mesh_validate_arrays().
static int mesh_validate_customdata | ( | CustomData * | data, |
short | do_verbose, | ||
const short | do_fixes | ||
) | [static] |
Definition at line 392 of file mesh_validate.c.
References CD_MASK_MESH, CD_TYPE_AS_MASK, CustomData_free_layer(), i, CustomData::layers, PRINT, and CustomDataLayer::type.
Referenced by BKE_mesh_validate_all_customdata().
static int search_face_cmp | ( | const void * | v1, |
const void * | v2 | ||
) | [static] |
Definition at line 101 of file mesh_validate.c.
References EdgeUUID::edval, and SortFace::es.
Referenced by BKE_mesh_validate_arrays().