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

mesh_validate.c File Reference

#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)

Detailed Description

Definition in file mesh_validate.c.


Define Documentation

#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; }
#define REMOVE_FACE_TAG (   _mf)    { _mf->v3=0; do_face_free= 1; }
#define SELECT   1

Definition at line 50 of file mesh_validate.c.

Referenced by BKE_mesh_calc_edges().


Typedef Documentation

typedef struct SortFace SortFace

Function Documentation

void BKE_mesh_calc_edges ( Mesh mesh,
int  update 
)
int BKE_mesh_validate ( Mesh me,
int  do_verbose 
)
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 
)
int BKE_mesh_validate_dm ( DerivedMesh dm)
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().

static void edge_store_from_mface_quad ( EdgeUUID  es[4],
MFace mf 
) [static]

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().

static void edge_store_from_mface_tri ( EdgeUUID  es[4],
MFace mf 
) [static]
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]
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().