OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Mesher Class Reference

#include <Mesher.h>

Collaboration diagram for Mesher:

Public Member Functions

 Mesher (std::vector< Vector_t< double, 3 > > &vertices)
std::vector< mslang::TrianglegetTriangles () const

Private Member Functions

void orientVerticesCCW ()
bool isConvex (unsigned int i) const
double crossProduct (const Vector_t< double, 3 > &a, const Vector_t< double, 3 > &b) const
bool isPointOnLine (unsigned int i, unsigned int j, const Vector_t< double, 3 > &pt) const
bool isPointRightOfLine (unsigned int i, unsigned int j, const Vector_t< double, 3 > &pt) const
bool lineSegmentTouchesOrCrossesLine (unsigned int i, unsigned int j, unsigned int k, unsigned int l) const
bool isPotentialEdgeIntersected (unsigned int i) const
double dotProduct (unsigned int i, unsigned int j, const Vector_t< double, 3 > &pt) const
bool isPointInsideCone (unsigned int i, unsigned int j, unsigned int jPlusOne, unsigned int jMinusOne) const
bool isEar (unsigned int i) const
std::vector< unsigned int > findAllEars () const
double computeMinimumAngle (unsigned int i) const
unsigned int selectBestEar (std::vector< unsigned int > &ears) const
void apply ()

Private Attributes

std::vector< mslang::Triangletriangles_m
std::vector< Vector_t< double, 3 > > vertices_m

Detailed Description

Definition at line 7 of file Mesher.h.

Constructor & Destructor Documentation

◆ Mesher()

Mesher::Mesher ( std::vector< Vector_t< double, 3 > > & vertices)

Definition at line 3 of file Mesher.cpp.

References apply(), and vertices_m.

Here is the call graph for this function:

Member Function Documentation

◆ apply()

void Mesher::apply ( )
private

Definition at line 219 of file Mesher.cpp.

References findAllEars(), mslang::Triangle::nodes_m, orientVerticesCCW(), selectBestEar(), triangles_m, and vertices_m.

Referenced by Mesher().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeMinimumAngle()

double Mesher::computeMinimumAngle ( unsigned int i) const
private

Definition at line 182 of file Mesher.cpp.

References mslang::euclidean_norm2D(), and vertices_m.

Referenced by selectBestEar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ crossProduct()

double Mesher::crossProduct ( const Vector_t< double, 3 > & a,
const Vector_t< double, 3 > & b ) const
private

Definition at line 44 of file Mesher.cpp.

Referenced by isPointOnLine(), and isPointRightOfLine().

Here is the caller graph for this function:

◆ dotProduct()

double Mesher::dotProduct ( unsigned int i,
unsigned int j,
const Vector_t< double, 3 > & pt ) const
private

Definition at line 124 of file Mesher.cpp.

References vertices_m.

Referenced by isPointInsideCone().

Here is the caller graph for this function:

◆ findAllEars()

std::vector< unsigned int > Mesher::findAllEars ( ) const
private

Definition at line 169 of file Mesher.cpp.

References isEar(), and vertices_m.

Referenced by apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTriangles()

std::vector< mslang::Triangle > Mesher::getTriangles ( ) const

Definition at line 9 of file Mesher.cpp.

References triangles_m.

Referenced by mslang::Polygon::triangulize().

Here is the caller graph for this function:

◆ isConvex()

bool Mesher::isConvex ( unsigned int i) const
private

Definition at line 30 of file Mesher.cpp.

References vertices_m.

Referenced by isEar().

Here is the caller graph for this function:

◆ isEar()

bool Mesher::isEar ( unsigned int i) const
private

Definition at line 150 of file Mesher.cpp.

References isConvex(), isPointInsideCone(), isPotentialEdgeIntersected(), and vertices_m.

Referenced by findAllEars().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPointInsideCone()

bool Mesher::isPointInsideCone ( unsigned int i,
unsigned int j,
unsigned int jPlusOne,
unsigned int jMinusOne ) const
private

Definition at line 138 of file Mesher.cpp.

References dotProduct(), isPointRightOfLine(), and vertices_m.

Referenced by isEar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPointOnLine()

bool Mesher::isPointOnLine ( unsigned int i,
unsigned int j,
const Vector_t< double, 3 > & pt ) const
private

Definition at line 49 of file Mesher.cpp.

References crossProduct(), and vertices_m.

Referenced by lineSegmentTouchesOrCrossesLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPointRightOfLine()

bool Mesher::isPointRightOfLine ( unsigned int i,
unsigned int j,
const Vector_t< double, 3 > & pt ) const
private

Definition at line 60 of file Mesher.cpp.

References crossProduct(), and vertices_m.

Referenced by isPointInsideCone(), and lineSegmentTouchesOrCrossesLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPotentialEdgeIntersected()

bool Mesher::isPotentialEdgeIntersected ( unsigned int i) const
private

Definition at line 79 of file Mesher.cpp.

References mslang::BoundingBox2D::center_m, mslang::BoundingBox2D::doesIntersect(), mslang::BoundingBox2D::height_m, lineSegmentTouchesOrCrossesLine(), vertices_m, and mslang::BoundingBox2D::width_m.

Referenced by isEar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lineSegmentTouchesOrCrossesLine()

bool Mesher::lineSegmentTouchesOrCrossesLine ( unsigned int i,
unsigned int j,
unsigned int k,
unsigned int l ) const
private

Definition at line 69 of file Mesher.cpp.

References isPointOnLine(), isPointRightOfLine(), and vertices_m.

Referenced by isPotentialEdgeIntersected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orientVerticesCCW()

void Mesher::orientVerticesCCW ( )
private

Definition at line 13 of file Mesher.cpp.

References vertices_m.

Referenced by apply().

Here is the caller graph for this function:

◆ selectBestEar()

unsigned int Mesher::selectBestEar ( std::vector< unsigned int > & ears) const
private

Definition at line 201 of file Mesher.cpp.

References computeMinimumAngle().

Referenced by apply().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ triangles_m

std::vector<mslang::Triangle> Mesher::triangles_m
private

Definition at line 42 of file Mesher.h.

Referenced by apply(), and getTriangles().

◆ vertices_m


The documentation for this class was generated from the following files: