MeVisLab Toolbox Reference
|
Defines the mesh component: triangle. More...
#include <WEMTriangle.h>
Public Member Functions | |
WEMTriangle () | |
Standard constructor. | |
WEMTriangle (const WEMTriangle &t) | |
Standard copy constructor. | |
WEMTriangle (WEMTriangle &&t) noexcept | |
Move constructor. | |
WEMTriangle & | operator= (WEMTriangle &&t) noexcept |
Move assignment operator. | |
~WEMTriangle () override | |
Standard destructor. | |
void | reset () |
Resets the object to default constructed state. | |
void | clone (WEMTriangle *triangle) |
Clones given triangle. | |
void | computeNormal () override |
Computes the normal. | |
unsigned int | getNumNodes () const override |
Returns the number of nodes. | |
int | getIndex (WEMNode *node) const override |
Returns the index of the given node. | |
WEMNode * | getNodeAt (unsigned int index) override |
Returns the node at the given index in this face. | |
const WEMNode * | getNodeAt (unsigned int index) const override |
Returns the node at the given index in this face. | |
void | setNode (unsigned int index, WEMNode *node) override |
Sets the given node to the given index in this face. | |
virtual void | setNodes (WEMNode *node1, WEMNode *node2, WEMNode *node3) |
Sets the given nodes. | |
void | replace (WEMNode *orig, WEMNode *replacement) override |
Replaces the given orig node by the given replace node. | |
bool | contains (WEMNode *node) const override |
Returns whether this face contains the given node. | |
Vector3 | getNodePositionAt (unsigned int index) const override |
Returns the position of a node at the given index. | |
int | getIndex (WEMEdge *edge) const override |
Returns the index of the given edge. | |
WEMEdge * | getEdgeAt (unsigned int index) override |
Returns the edge at the given index in this face. | |
const WEMEdge * | getEdgeAt (unsigned int index) const override |
Returns the edge at the given index in this face. | |
void | setEdge (unsigned int index, WEMEdge *edge) override |
Sets the given edge to the given index in this face. | |
virtual void | setEdges (WEMEdge *edge1, WEMEdge *edge2, WEMEdge *edge3) |
Sets the given edges. | |
void | replace (WEMEdge *orig, WEMEdge *replacement) override |
Replaces the given orig node by the given replace edge. | |
bool | contains (WEMEdge *edge) const override |
Returns whether this face contains the given edge. | |
void | removeEdges () override |
Removes all edge pointers of this face. | |
Vector3 | getCentroid () const override |
Returns the geometric centroid of this face. | |
void | getCentroid (Vector3 ¢roid) const override |
double | getPerimeter () const override |
Calculates the perimeter of this face. | |
double | getArea () const override |
Calculates the area of this face. | |
WEMNode * | getOther (WEMNode *n1, WEMNode *n2) override |
Returns the node incident to this face that is not given as a parameter. | |
const WEMNode * | getOther (WEMNode *n1, WEMNode *n2) const override |
Returns the node incident to this face that is not given as a parameter. | |
WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2) override |
Returns the edge incident to this face that is not given as a parameter. | |
const WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2) const override |
Returns the edge incident to this face that is not given as a parameter. | |
WEMEdge * | getEdgeNotContaining (WEMNode *n) override |
Returns the edge not containing given node. | |
const WEMEdge * | getEdgeNotContaining (WEMNode *n) const override |
Returns the edge not containing given node. | |
double | getQuality () const override |
Calculates the quality of the face. | |
int | isConcave () const override |
Checks whether this face a concave polygon. Return the number of concavities. | |
virtual bool | isFolding (WEMNode *node, const Vector3 &position) const |
Returns whether this face is folding? | |
virtual bool | pointInTriangle (const Vector3 &position) const |
Returns whether the given point is in this triangle. | |
virtual bool | rayIntersect (const Vector3 &origin, const Vector3 &direction) const |
Returns whether the given ray intersects this triangle? | |
void | mirror () override |
Mirrors this face. Note that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards! | |
Public Member Functions inherited from ml::WEMFace | |
WEMFace () | |
Standard constructor. | |
WEMFace (const WEMFace &f) | |
Standard copy constructor. | |
WEMFace (WEMFace &&f) noexcept | |
WEMFace & | operator= (WEMFace &&f) noexcept |
~WEMFace () override | |
Standard destructor. | |
void | reset () |
Resets the object to default constructed state. | |
void | clone (WEMFace *face) |
Clones given face. | |
Vector3 | getNormal () const |
Returns the normal. | |
void | setNormal (const Vector3 &normal) |
Sets the normal. | |
virtual WEMBoundingBox | getBoundingBox () |
Calculates the bounding box of face. | |
bool | isBoundingBoxValid () const |
void | invalidateBoundingBox () |
Public Member Functions inherited from ml::WEMPrimitive | |
WEMPrimitive () | |
WEMPrimitive (const WEMPrimitive &)=default | |
WEMPrimitive (WEMPrimitive &&p) noexcept | |
WEMPrimitive & | operator= (const WEMPrimitive &)=default |
WEMPrimitive & | operator= (WEMPrimitive &&p) noexcept |
virtual | ~WEMPrimitive ()=default |
Standard destructor. | |
void | resetPrimitive () |
Resets the object to its default constructed state. | |
int | getEntryNumber () const |
Returns the entry number. | |
void | setEntryNumber (int e) |
Sets the entry number. | |
bool | isSet (unsigned int bit) const |
Returns whether the bit-flag is set. | |
void | setFlag (unsigned int bit) |
Sets the given bit-flag. | |
void | unsetFlag (unsigned int bit) |
Unsets the given bit-flag. | |
void | clearFlag () |
Clears the bit-flag. | |
bool | isTraversed () const |
Returns whether this primitive has been traversed. | |
void | setTraversed (bool traversed) |
Sets the traversed flag. | |
int | getHeapPosition () const |
Returns the heap position. | |
bool | inHeap () const |
Returns whether this primitive is in the heap. | |
void | setHeapPosition (int heapPosition) |
Sets the heap position. | |
double | getHeapValue () const |
Returns the heap value. | |
void | setHeapValue (double heapValue) |
Sets the heap value. | |
Public Attributes | |
std::array< WEMNode *, 3 > | _nodes |
Node pointers. | |
std::array< WEMEdge *, 3 > | _edges |
Edge pointers. | |
Friends | |
bool MLWEM_EXPORT | operator== (const WEMTriangle &x, const WEMTriangle &y) |
Operator for equality. Currently only the node positions of the triangles and their orientation are compared. | |
bool MLWEM_EXPORT | operator!= (const WEMTriangle &x, const WEMTriangle &y) |
Operator for not equality. | |
Additional Inherited Members | |
Protected Attributes inherited from ml::WEMFace | |
Vector3 | _normal |
Normal. | |
WEMBoundingBox | _boundingBox |
Bounding Box. | |
bool | _isBoundingBoxValid |
Is the bounding box valid? | |
Protected Attributes inherited from ml::WEMPrimitive | |
unsigned int | _bitFlag |
Bit-wise flag for custom use. | |
int | _entryNumber |
Entry number in index vector, for easy deletion and reference. | |
int | _heapPosition |
Heap position, same like entryNumber but for heaps. | |
double | _heapValue |
Element value, used for heap sorting. | |
Defines the mesh component: triangle.
Definition at line 26 of file WEMTriangle.h.
ml::WEMTriangle::WEMTriangle | ( | ) |
Standard constructor.
ml::WEMTriangle::WEMTriangle | ( | const WEMTriangle & | t | ) |
Standard copy constructor.
|
noexcept |
Move constructor.
|
override |
Standard destructor.
void ml::WEMTriangle::clone | ( | WEMTriangle * | triangle | ) |
Clones given triangle.
|
overridevirtual |
Computes the normal.
Implements ml::WEMFace.
Returns whether this face contains the given edge.
Implements ml::WEMFace.
Returns whether this face contains the given node.
Implements ml::WEMFace.
|
overridevirtual |
Calculates the area of this face.
Implements ml::WEMFace.
|
overridevirtual |
Returns the geometric centroid of this face.
Implements ml::WEMFace.
Implements ml::WEMFace.
Returns the edge at the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 76 of file WEMTriangle.h.
References getEdgeAt().
Referenced by getEdgeAt().
Returns the edge at the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 74 of file WEMTriangle.h.
Returns the edge not containing given node.
Implements ml::WEMFace.
Definition at line 111 of file WEMTriangle.h.
References getEdgeNotContaining(), and mlrange_cast().
Referenced by getEdgeNotContaining().
Returns the edge not containing given node.
Implements ml::WEMFace.
Returns the index of the given edge.
Implements ml::WEMFace.
Returns the index of the given node.
Implements ml::WEMFace.
Returns the node at the given index in this face.
Implements ml::WEMFace.
Definition at line 56 of file WEMTriangle.h.
References getNodeAt().
Referenced by getNodeAt().
Returns the node at the given index in this face.
Implements ml::WEMFace.
Definition at line 54 of file WEMTriangle.h.
Returns the position of a node at the given index.
Implements ml::WEMFace.
Definition at line 69 of file WEMTriangle.h.
|
inlineoverridevirtual |
Returns the edge incident to this face that is not given as a parameter.
Implements ml::WEMFace.
Definition at line 107 of file WEMTriangle.h.
References getOther(), and mlrange_cast().
Referenced by getOther().
Returns the edge incident to this face that is not given as a parameter.
Implements ml::WEMFace.
|
inlineoverridevirtual |
Returns the node incident to this face that is not given as a parameter.
Implements ml::WEMFace.
Definition at line 103 of file WEMTriangle.h.
References getOther(), and mlrange_cast().
Referenced by getOther().
Returns the node incident to this face that is not given as a parameter.
Implements ml::WEMFace.
|
overridevirtual |
Calculates the perimeter of this face.
Implements ml::WEMFace.
|
overridevirtual |
Calculates the quality of the face.
The quality of a triangle is defined as the ratio of the square root of its surface area to its perimeter relative to this same ratio for an equilateral triangle with the same area. The quality is then one for an equilateral triangle and tends to zero for a very stretched triangle.
Implements ml::WEMFace.
|
inlineoverridevirtual |
Checks whether this face a concave polygon. Return the number of concavities.
Implements ml::WEMFace.
Definition at line 120 of file WEMTriangle.h.
Returns whether this face is folding?
|
overridevirtual |
Mirrors this face. Note that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards!
Implements ml::WEMFace.
|
noexcept |
Move assignment operator.
Returns whether the given point is in this triangle.
|
virtual |
Returns whether the given ray intersects this triangle?
|
overridevirtual |
Removes all edge pointers of this face.
Implements ml::WEMFace.
Replaces the given orig node by the given replace edge.
Implements ml::WEMFace.
Replaces the given orig node by the given replace node.
Implements ml::WEMFace.
void ml::WEMTriangle::reset | ( | ) |
Resets the object to default constructed state.
Sets the given edge to the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 78 of file WEMTriangle.h.
References ml::WEMFace::invalidateBoundingBox().
|
inlinevirtual |
Sets the given edges.
Definition at line 80 of file WEMTriangle.h.
References ml::WEMFace::invalidateBoundingBox(), and mlrange_cast().
Sets the given node to the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 58 of file WEMTriangle.h.
References ml::WEMFace::invalidateBoundingBox().
|
inlinevirtual |
Sets the given nodes.
Definition at line 60 of file WEMTriangle.h.
References ml::WEMFace::invalidateBoundingBox(), and mlrange_cast().
|
friend |
Operator for not equality.
|
friend |
Operator for equality. Currently only the node positions of the triangles and their orientation are compared.
std::array<WEMEdge*, 3> ml::WEMTriangle::_edges |
Edge pointers.
Definition at line 141 of file WEMTriangle.h.
std::array<WEMNode*, 3> ml::WEMTriangle::_nodes |
Node pointers.
Definition at line 139 of file WEMTriangle.h.