MeVisLab Toolbox Reference
|
Defines the mesh component: face. More...
#include <WEMFace.h>
Public Member Functions | |
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 void | computeNormal ()=0 |
Computes the normal. | |
virtual unsigned int | getNumNodes () const =0 |
Returns the number of nodes. | |
virtual int | getIndex (WEMNode *node) const =0 |
Returns the index of the given node. | |
virtual WEMNode * | getNodeAt (unsigned int index)=0 |
Returns the node at the given index in face. | |
virtual const WEMNode * | getNodeAt (unsigned int index) const =0 |
Returns the node at the given index in face. | |
virtual void | setNode (unsigned int, WEMNode *) |
Sets the given node to the given index in face. | |
virtual void | replace (WEMNode *orig, WEMNode *replace)=0 |
Replaces the given orig node by the given replace node. | |
virtual bool | contains (WEMNode *node) const =0 |
Returns whether this face contains the given node. | |
virtual Vector3 | getNodePositionAt (unsigned int index) const =0 |
Returns a position of a node at a given index. | |
virtual int | getIndex (WEMEdge *edge) const =0 |
Returns the index of the given edge. | |
virtual WEMEdge * | getEdgeAt (unsigned int) |
Returns the edge at the given index in face. | |
virtual const WEMEdge * | getEdgeAt (unsigned int) const |
Returns the edge at the given index in face. | |
virtual void | setEdge (unsigned int, WEMEdge *) |
Sets the given edge to the given index in face. | |
virtual void | replace (WEMEdge *orig, WEMEdge *replace)=0 |
Replaces the given orig node by the given replace edge. | |
virtual bool | contains (WEMEdge *edge) const =0 |
Returns whether this face contains the given edge. | |
virtual void | removeEdges ()=0 |
Removes all edge pointers of this face. | |
virtual Vector3 | getCentroid () const =0 |
Returns the geometric centroid of a face. | |
virtual void | getCentroid (Vector3 ¢roid) const =0 |
virtual double | getPerimeter () const =0 |
Calculates the perimeter of face. | |
virtual double | getArea () const =0 |
Calculates the area of face. | |
virtual WEMBoundingBox | getBoundingBox () |
Calculates the bounding box of face. | |
bool | isBoundingBoxValid () const |
void | invalidateBoundingBox () |
virtual WEMNode * | getOther (WEMNode *n1, WEMNode *n2)=0 |
Returns the node incident to this face that is not given as a parameter. | |
virtual const WEMNode * | getOther (WEMNode *n1, WEMNode *n2) const =0 |
Returns the node incident to this face that is not given as a parameter. | |
virtual WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2)=0 |
Returns the edge incident to this face that is not given as a parameter. | |
virtual const WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2) const =0 |
Returns the edge incident to this face that is not given as a parameter. | |
virtual WEMEdge * | getEdgeNotContaining (WEMNode *n)=0 |
Returns the edge not containing given node. | |
virtual const WEMEdge * | getEdgeNotContaining (WEMNode *n) const =0 |
Returns the edge not containing given node. | |
virtual double | getQuality () const =0 |
Calculates the quality of the face. | |
virtual int | isConcave () const =0 |
Checks whether this face is concave. | |
virtual void | mirror ()=0 |
Mirrors the face. | |
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. | |
Protected Attributes | |
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. | |
ml::WEMFace::WEMFace | ( | ) |
Standard constructor.
|
noexcept |
|
override |
Standard destructor.
Computes the normal.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns whether this face contains the given edge.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns whether this face contains the given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Calculates the area of face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
|
virtual |
Calculates the bounding box of face.
Returns the geometric centroid of a face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge at the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge at the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge not containing given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge not containing given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the index of the given edge.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the index of the given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the node at the given index in face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the node at the given index in face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns a position of a node at a given index.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
|
inline |
Returns the number of nodes.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge incident to this face that is not given as a parameter.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the edge incident to this face that is not given as a parameter.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the node incident to this face that is not given as a parameter.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Returns the node incident to this face that is not given as a parameter.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Calculates the perimeter of face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
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.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
|
inline |
Definition at line 98 of file WEMFace.h.
Referenced by ml::WEMPolygon::addNode(), ml::WEMTriangle::setEdge(), ml::WEMTriangle::setEdges(), ml::WEMQuad::setEdges(), ml::WEMPolygon::setNode(), ml::WEMQuad::setNode(), ml::WEMTriangle::setNode(), ml::WEMTriangle::setNodes(), and ml::WEMQuad::setNodes().
Checks whether this face is concave.
Returns the number of concavities.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Mirrors the face.
NOTE that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards!
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Removes all edge pointers of this face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Replaces the given orig node by the given replace edge.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Replaces the given orig node by the given replace node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
void ml::WEMFace::reset | ( | ) |
Resets the object to default constructed state.
Sets the given edge to the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Sets the given node to the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
|
protected |
|
protected |