3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Enumerations | Functions | Variables
mesh.cpp File Reference
#include "mesh.h"
#include <string>
#include <algorithm>
#include <limits>
#include <list>
#include <utility>
#include <deque>
Include dependency graph for mesh.cpp:

Enumerations

enum  {
  MESH_LOAD_UNSPECIFIED_ERROR =1, MESH_LOAD_BAD_NODECOUNT, MESH_LOAD_BAD_ELEMENTCOUNT, MESH_LOAD_IS_INSANE,
  MESH_LOAD_ENUM_END
}
 

Functions

float signVal (unsigned int val)
 
size_t findMaxLessThanOrEq (const vector< std::pair< size_t, size_t > > &v, size_t value)
 
float Determinant (float **a, int n)
 
float fourDeterminant (const Point3D &a, const Point3D &b, const Point3D &c, const Point3D &d)
 
unsigned int edgeIdx (unsigned int i, unsigned int j)
 
int intersect_RayTriangle (const Point3D &rayStart, const Point3D &rayEnd, Point3D *tri, Point3D &I)
 
void findNearVerticies (float tolerance, const vector< Point3D > &ptVec, vector< std::pair< size_t, vector< size_t > > > &clusterList)
 
void findNearVerticies (float tolerance, const vector< Point3D > &ptVec, std::list< std::pair< size_t, vector< size_t > > > &clusterList)
 

Variables

const char * MESH_LOAD_ERRS []
 
const size_t PROGRESS_REDUCE =500
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MESH_LOAD_UNSPECIFIED_ERROR 
MESH_LOAD_BAD_NODECOUNT 
MESH_LOAD_BAD_ELEMENTCOUNT 
MESH_LOAD_IS_INSANE 
MESH_LOAD_ENUM_END 

Function Documentation

◆ Determinant()

float Determinant ( float **  a,
int  n 
)

References ASSERT, and signVal().

Referenced by fourDeterminant().

Here is the caller graph for this function:

◆ edgeIdx()

unsigned int edgeIdx ( unsigned int  i,
unsigned int  j 
)

References ASSERT.

Referenced by Mesh::removeStrayTris().

Here is the caller graph for this function:

◆ findMaxLessThanOrEq()

size_t findMaxLessThanOrEq ( const vector< std::pair< size_t, size_t > > &  v,
size_t  value 
)

References ASSERT.

◆ findNearVerticies() [1/2]

void findNearVerticies ( float  tolerance,
const vector< Point3D > &  ptVec,
vector< std::pair< size_t, vector< size_t > > > &  clusterList 
)

References ASSERT.

Referenced by Mesh::mergeDuplicateVertices(), and Mesh::setTriangleMesh().

Here is the caller graph for this function:

◆ findNearVerticies() [2/2]

void findNearVerticies ( float  tolerance,
const vector< Point3D > &  ptVec,
std::list< std::pair< size_t, vector< size_t > > > &  clusterList 
)

References ASSERT.

◆ fourDeterminant()

float fourDeterminant ( const Point3D a,
const Point3D b,
const Point3D c,
const Point3D d 
)

References Determinant().

Referenced by Mesh::print().

Here is the caller graph for this function:

◆ intersect_RayTriangle()

int intersect_RayTriangle ( const Point3D rayStart,
const Point3D rayEnd,
Point3D tri,
Point3D I 
)

References Point3D::crossProd(), Point3D::dotProd(), Point3D::normalise(), and Point3D::sqrMag().

Referenced by Mesh::pointsInside().

Here is the caller graph for this function:

◆ signVal()

float signVal ( unsigned int  val)

Referenced by Determinant().

Here is the caller graph for this function:

Variable Documentation

◆ MESH_LOAD_ERRS

const char* MESH_LOAD_ERRS[]
Initial value:
= { "",
"Missing error message. This is a bug, please report it",
"Node count was different to number of present nodes",
"Element count was less than number of present elements",
"Mesh loaded, but failed to pass sanity checks"
}

◆ PROGRESS_REDUCE

const size_t PROGRESS_REDUCE =500

Referenced by Mesh::pointsInside().