In file SM2/SM2TopologyConstraint.h:

namespace yav class SM2TopologyConstraint : public Constraint

a position constraint that modify a 2-simplex mesh topology when an intersection between two pieces of mesh is detected

Inheritance:


Public Classes

enum EdgeIntersectionType
the different types of edge intersection
enum TriangleIntersectionType
the different types of edge intersection
enum FaceType
the different types of faces
enum IntersectionType
the two types of intersection detected
class MissingMesh : public Exception
an exception class thrown when the mesh contour is not valid
struct EdgeIntersection
a class describing the intersection point between and edge and a plane normal to X, Y or Z direction
Vec3 position
the intersection position
EdgeIntersectionType edgeIntersectionType
the edge type
struct EdgeIntersectionData
a class describing the intersection point between and edge and a plane normal to X, Y or Z direction
SM2Edge* edge
the intersection position
std::list <EdgeIntersection *> intersectionList
the edge type
constructor
EdgeIntersectionData (SM2Edge *e)
basic constructor
destructor
virtual ~EdgeIntersectionData ()
dummy destructor
struct TriangleIntersection
a class describing the intersection point between a triangle and a line along X, Y or Z direction
SM2Vertex* v
vertex attached with triangle intersection
Vec3 position
the intersection position
TriangleIntersectionType triangleIntersectionType
the edge type
class FaceEdge
a class describing the intersection point between a triangle and a line along X, Y or Z direction
TriangleIntersection* ti [2]
array of triangle Intersections
EdgeIntersection* ei [2]
array of edge Intersections
constructor
FaceEdge (TriangleIntersection *, TriangleIntersection *)
constructor from 2 triangle intersections
FaceEdge (EdgeIntersection *, EdgeIntersection *)
constructor from 2 edge intersections
FaceEdge (TriangleIntersection *, EdgeIntersection *)
constructor from 1 triangle intersection and 1 edge intersection
FaceEdge (EdgeIntersection *, TriangleIntersection *)
constructor from 1 edge intersection and 1 triangle intersection
destructor
virtual ~FaceEdge ()
dummy destructor
Vec3 getPosition (const unsigned int j) const
return vertex position
class Face
a class describing all the intersections between triangle and a face (square) in the 3D regular grid
FaceType faceType
the face type
int row
row index
int col
column index
std::list <FaceEdge *> edgeList
the list of face edges in the face
std::list TriangleIntersection *,TriangleIntersection *> > simpleEdgeList
the list of simplified face edges consisting of two triangle intersections *
constructor
Face (FaceType ft, int fi, int r, int c)
basic constructor
destructor
virtual ~Face ()
dummy destructor
struct SimpleEdgeIntersection
a class describing an intersection between two pairs of simplified face edges
bool processed
whether this intersection has been already processed
std::pair <TriangleIntersection *,TriangleIntersection *> edge [2]
the two intersecting edges
Face* face
the face where the edges intersect
bool isVertexInIntersection (TriangleIntersection *i) const
test if a vertex is in the intersection
int getEdgeIndex (TriangleIntersection *i) const
returns the edge index that contains one vertex
struct IntersectionVoxel
a class for storing edge intersections
Vec3 position
the x,y, z coordinate of the voxel
unsigned int nbIntersections
number of edge intersections occuring in this voxel
unsigned int nbValidIntersections
number of edge intersections that have not been already processed
std::multimap SimpleEdgeIntersection *> intersectionList
list of intersections for each of the 6 faces
SimpleEdgeIntersection* getIntersectionWithVertex (TriangleIntersection *i, unsigned int &faceIndexVoxel, SimpleEdgeIntersection *inter) const
returns the intersections stored in a given voxel that contain a given vertex
int getFaceIndex ( SimpleEdgeIntersection *inter) const
return the face index of an intersection stored in a given voxel
struct IntersectionContour
a class that stores the contour corresponding to intersections or auto-intersections
IntersectionType intersectionType
the nature of the intersection
std::list <TriangleIntersection *> contour [2]
the two contours describing the intersection: if it is an auto-intersection then only one contour is stored

Public Methods

void freeDataStructure ()
free all data structures stored in the object
void buildDataStructure ()
creates face data structure on a regular grid
void findIntersections ()
find intersections between face edges
void processIntersections ()
modifies the 2-simplex mesh given the contour intersections
virtual void apply ()
the apply fonction that modifies the mesh topology when an intersection between two pieces of mesh is detected
SM2* getMesh () const
returns the 2-simplex mesh involved in the constraint
double getGridSize () const
returns the grid size used for the topology constraint
void setGridSize (const double gs)
sets the grid size used for the topology constraint

Public

constructor
destructor
virtual ~SM2TopologyConstraint ()
delete the constraint and reset mesh metric parameters

Private Fields

SM2* mesh
pointer of the 2 simplex mesh
Vec3 origin
the origin of the regular grid
Vec3 offset
the min voxel index in the row, col, z directions
double gridSize
the grid size
Vec3 arraySize
the number of rows, columns and planes in the regular grid
std::list <TriangleIntersection *> triangleIntersectionList
list of triangle intersections
std::map Face *> faceMap [3]
map of faces where intersection edges and triangles are present
std::map SimpleEdgeIntersection *> simpleEdgeIntersectionMap
hash table of intersections between two simple edges belonging to the same face
std::list <IntersectionContour *> intersectionContourList
the list of contour intersections
std::map IntersectionVoxel *> voxelMap
hash table of voxel intersections

Private Methods

unsigned int complement (unsigned int i, unsigned int j)
return a value (either 0,1 or 2 ) that is different from i and j
TriangleIntersection* getNextVertex (TriangleIntersection *currentVertex, unsigned int currentFaceIndex, IntersectionVoxel *v, unsigned int &nextFaceIndex)
returns the vertex that inside a given voxel with a given face index and that is connected to a given vertex; it also updates the nextFace index

Documentation

a position constraint that modify a 2-simplex mesh topology when an intersection between two pieces of mesh is detected
enum EdgeIntersectionType
the different types of edge intersection

enum TriangleIntersectionType
the different types of edge intersection

enum FaceType
the different types of faces

enum IntersectionType
the two types of intersection detected

class MissingMesh: public Exception
an exception class thrown when the mesh contour is not valid

struct EdgeIntersection
a class describing the intersection point between and edge and a plane normal to X, Y or Z direction

Vec3 position
the intersection position

EdgeIntersectionType edgeIntersectionType
the edge type

struct EdgeIntersectionData
a class describing the intersection point between and edge and a plane normal to X, Y or Z direction

SM2Edge* edge
the intersection position

std::list <EdgeIntersection *> intersectionList
the edge type

constructor

EdgeIntersectionData(SM2Edge *e)
basic constructor

destructor

virtual ~EdgeIntersectionData()
dummy destructor

struct TriangleIntersection
a class describing the intersection point between a triangle and a line along X, Y or Z direction

SM2Vertex* v
vertex attached with triangle intersection

Vec3 position
the intersection position

TriangleIntersectionType triangleIntersectionType
the edge type

class FaceEdge
a class describing the intersection point between a triangle and a line along X, Y or Z direction

TriangleIntersection* ti[2]
array of triangle Intersections

EdgeIntersection* ei[2]
array of edge Intersections

constructor

FaceEdge(TriangleIntersection *, TriangleIntersection *)
constructor from 2 triangle intersections

FaceEdge(EdgeIntersection *, EdgeIntersection *)
constructor from 2 edge intersections

FaceEdge(TriangleIntersection *, EdgeIntersection *)
constructor from 1 triangle intersection and 1 edge intersection

FaceEdge(EdgeIntersection *, TriangleIntersection *)
constructor from 1 edge intersection and 1 triangle intersection

destructor

virtual ~FaceEdge()
dummy destructor

Vec3 getPosition(const unsigned int j) const
return vertex position

class Face
a class describing all the intersections between triangle and a face (square) in the 3D regular grid

FaceType faceType
the face type

int row
row index

int col
column index

std::list <FaceEdge *> edgeList
the list of face edges in the face

std::list TriangleIntersection *,TriangleIntersection *> > simpleEdgeList
the list of simplified face edges consisting of two triangle intersections *

constructor

Face(FaceType ft, int fi, int r, int c)
basic constructor

destructor

virtual ~Face()
dummy destructor

struct SimpleEdgeIntersection
a class describing an intersection between two pairs of simplified face edges

bool processed
whether this intersection has been already processed

std::pair <TriangleIntersection *,TriangleIntersection *> edge[2]
the two intersecting edges

Face* face
the face where the edges intersect

bool isVertexInIntersection(TriangleIntersection *i) const
test if a vertex is in the intersection

int getEdgeIndex(TriangleIntersection *i) const
returns the edge index that contains one vertex

struct IntersectionVoxel
a class for storing edge intersections

Vec3 position
the x,y, z coordinate of the voxel

unsigned int nbIntersections
number of edge intersections occuring in this voxel

unsigned int nbValidIntersections
number of edge intersections that have not been already processed

std::multimap SimpleEdgeIntersection *> intersectionList
list of intersections for each of the 6 faces

SimpleEdgeIntersection* getIntersectionWithVertex(TriangleIntersection *i, unsigned int &faceIndexVoxel, SimpleEdgeIntersection *inter) const
returns the intersections stored in a given voxel that contain a given vertex. If inter is not null, then do not test that intersection
Parameters:
i - the vertex that is tested
faceIndexVoxel - if an intersection is found then this variable is set to the face index of the intersection
inter - if not null then avoid then this intersection is not tested for inclusion

int getFaceIndex( SimpleEdgeIntersection *inter) const
return the face index of an intersection stored in a given voxel. returns -1 if not present

struct IntersectionContour
a class that stores the contour corresponding to intersections or auto-intersections

IntersectionType intersectionType
the nature of the intersection

std::list <TriangleIntersection *> contour[2]
the two contours describing the intersection: if it is an auto-intersection then only one contour is stored

SM2* mesh
pointer of the 2 simplex mesh

Vec3 origin
the origin of the regular grid

Vec3 offset
the min voxel index in the row, col, z directions

double gridSize
the grid size

Vec3 arraySize
the number of rows, columns and planes in the regular grid

std::list <TriangleIntersection *> triangleIntersectionList
list of triangle intersections

std::map Face *> faceMap[3]
map of faces where intersection edges and triangles are present

std::map SimpleEdgeIntersection *> simpleEdgeIntersectionMap
hash table of intersections between two simple edges belonging to the same face

std::list <IntersectionContour *> intersectionContourList
the list of contour intersections

std::map IntersectionVoxel *> voxelMap
hash table of voxel intersections

unsigned int complement(unsigned int i, unsigned int j)
return a value (either 0,1 or 2 ) that is different from i and j

TriangleIntersection* getNextVertex(TriangleIntersection *currentVertex, unsigned int currentFaceIndex, IntersectionVoxel *v, unsigned int &nextFaceIndex)
returns the vertex that inside a given voxel with a given face index and that is connected to a given vertex; it also updates the nextFace index
Returns:
the vertex connected to currentVertex, lying inside the voxel v on the face currentFaceIndex
Parameters:
currentVertex - the current vertex st which the searched vertex is adjacent

void freeDataStructure()
free all data structures stored in the object

void buildDataStructure()
creates face data structure on a regular grid

void findIntersections()
find intersections between face edges

void processIntersections()
modifies the 2-simplex mesh given the contour intersections

virtual void apply()
the apply fonction that modifies the mesh topology when an intersection between two pieces of mesh is detected

SM2* getMesh() const
returns the 2-simplex mesh involved in the constraint

constructor

destructor

virtual ~SM2TopologyConstraint()
delete the constraint and reset mesh metric parameters

double getGridSize() const
returns the grid size used for the topology constraint

void setGridSize(const double gs)
sets the grid size used for the topology constraint


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de