MeVisLab Toolbox Reference
ml::WEMFace Class Referenceabstract

Defines the mesh component: face. More...

#include <WEMFace.h>

Inheritance diagram for ml::WEMFace:
ml::WEMPrimitive ml::WEMPolygon ml::WEMQuad ml::WEMTriangle

Public Member Functions

 WEMFace ()
 Standard constructor. More...
 
 WEMFace (const WEMFace &f)
 Standard copy constructor. More...
 
 WEMFace (WEMFace &&f) noexcept
 
WEMFaceoperator= (WEMFace &&f) noexcept
 
 ~WEMFace () override
 Standard destructor. More...
 
void reset ()
 Resets the object to default constructed state. More...
 
void clone (WEMFace *face)
 Clones given face. More...
 
Vector3 getNormal () const
 Returns the normal. More...
 
void setNormal (const Vector3 &normal)
 Sets the normal. More...
 
virtual void computeNormal ()=0
 Computes the normal. More...
 
virtual unsigned int getNumNodes () const =0
 Returns the number of nodes. More...
 
virtual int getIndex (WEMNode *node) const =0
 Returns the index of the given node. More...
 
virtual WEMNodegetNodeAt (unsigned int index)=0
 Returns the node at the given index in face. More...
 
virtual const WEMNodegetNodeAt (unsigned int index) const =0
 Returns the node at the given index in face. More...
 
virtual void setNode (unsigned int, WEMNode *)
 Sets the given node to the given index in face. More...
 
virtual void replace (WEMNode *orig, WEMNode *replace)=0
 Replaces the given orig node by the given replace node. More...
 
virtual bool contains (WEMNode *node) const =0
 Returns whether this face contains the given node. More...
 
virtual Vector3 getNodePositionAt (unsigned int index) const =0
 Returns a position of a node at a given index. More...
 
virtual int getIndex (WEMEdge *edge) const =0
 Returns the index of the given edge. More...
 
virtual WEMEdgegetEdgeAt (unsigned int)
 Returns the edge at the given index in face. More...
 
virtual const WEMEdgegetEdgeAt (unsigned int) const
 Returns the edge at the given index in face. More...
 
virtual void setEdge (unsigned int, WEMEdge *)
 Sets the given edge to the given index in face. More...
 
virtual void replace (WEMEdge *orig, WEMEdge *replace)=0
 Replaces the given orig node by the given replace edge. More...
 
virtual bool contains (WEMEdge *edge) const =0
 Returns whether this face contains the given edge. More...
 
virtual void removeEdges ()=0
 Removes all edge pointers of this face. More...
 
virtual Vector3 getCentroid () const =0
 Returns the geometric centroid of a face. More...
 
virtual void getCentroid (Vector3 &centroid) const =0
 
virtual double getPerimeter () const =0
 Calculates the perimeter of face. More...
 
virtual double getArea () const =0
 Calculates the area of face. More...
 
virtual WEMBoundingBox getBoundingBox ()
 Calculates the bounding box of face. More...
 
bool isBoundingBoxValid () const
 
void invalidateBoundingBox ()
 
virtual WEMNodegetOther (WEMNode *n1, WEMNode *n2)=0
 Returns the node incident to this face that is not given as a parameter. More...
 
virtual const WEMNodegetOther (WEMNode *n1, WEMNode *n2) const =0
 Returns the node incident to this face that is not given as a parameter. More...
 
virtual WEMEdgegetOther (WEMEdge *e1, WEMEdge *e2)=0
 Returns the edge incident to this face that is not given as a parameter. More...
 
virtual const WEMEdgegetOther (WEMEdge *e1, WEMEdge *e2) const =0
 Returns the edge incident to this face that is not given as a parameter. More...
 
virtual WEMEdgegetEdgeNotContaining (WEMNode *n)=0
 Returns the edge not containing given node. More...
 
virtual const WEMEdgegetEdgeNotContaining (WEMNode *n) const =0
 Returns the edge not containing given node. More...
 
virtual double getQuality () const =0
 Calculates the quality of the face. More...
 
virtual int isConcave () const =0
 Checks whether this face is concave. More...
 
virtual void mirror ()=0
 Mirrors the face. More...
 
- Public Member Functions inherited from ml::WEMPrimitive
 WEMPrimitive ()
 
 WEMPrimitive (const WEMPrimitive &)=default
 
 WEMPrimitive (WEMPrimitive &&p) noexcept
 
WEMPrimitiveoperator= (const WEMPrimitive &)=default
 
WEMPrimitiveoperator= (WEMPrimitive &&p) noexcept
 
virtual ~WEMPrimitive ()=default
 Standard destructor. More...
 
void resetPrimitive ()
 Resets the object to its default constructed state. More...
 
int getEntryNumber () const
 Returns the entry number. More...
 
void setEntryNumber (int e)
 Sets the entry number. More...
 
bool isSet (unsigned int bit) const
 Returns whether the bit-flag is set. More...
 
void setFlag (unsigned int bit)
 Sets the given bit-flag. More...
 
void unsetFlag (unsigned int bit)
 Unsets the given bit-flag. More...
 
void clearFlag ()
 Clears the bit-flag. More...
 
bool isTraversed () const
 Returns whether this primitive has been traversed. More...
 
void setTraversed (bool traversed)
 Sets the traversed flag. More...
 
int getHeapPosition () const
 Returns the heap position. More...
 
bool inHeap () const
 Returns whether this primitive is in the heap. More...
 
void setHeapPosition (int heapPosition)
 Sets the heap position. More...
 
double getHeapValue () const
 Returns the heap value. More...
 
void setHeapValue (double heapValue)
 Sets the heap value. More...
 

Protected Attributes

Vector3 _normal
 Normal. More...
 
WEMBoundingBox _boundingBox
 Bounding Box. More...
 
bool _isBoundingBoxValid
 Is the bounding box valid? More...
 
- Protected Attributes inherited from ml::WEMPrimitive
unsigned int _bitFlag
 Bit-wise flag for custom use. More...
 
int _entryNumber
 Entry number in index vector, for easy deletion and reference. More...
 
int _heapPosition
 Heap position, same like entryNumber but for heaps. More...
 
double _heapValue
 Element value, used for heap sorting. More...
 

Detailed Description

Defines the mesh component: face.

Definition at line 29 of file WEMFace.h.

Constructor & Destructor Documentation

◆ WEMFace() [1/3]

ml::WEMFace::WEMFace ( )

Standard constructor.

◆ WEMFace() [2/3]

ml::WEMFace::WEMFace ( const WEMFace f)

Standard copy constructor.

◆ WEMFace() [3/3]

ml::WEMFace::WEMFace ( WEMFace &&  f)
noexcept

◆ ~WEMFace()

ml::WEMFace::~WEMFace ( )
override

Standard destructor.

Member Function Documentation

◆ clone()

void ml::WEMFace::clone ( WEMFace face)

Clones given face.

◆ computeNormal()

virtual void ml::WEMFace::computeNormal ( )
pure virtual

Computes the normal.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ contains() [1/2]

virtual bool ml::WEMFace::contains ( WEMEdge edge) const
pure virtual

Returns whether this face contains the given edge.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ contains() [2/2]

virtual bool ml::WEMFace::contains ( WEMNode node) const
pure virtual

Returns whether this face contains the given node.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getArea()

virtual double ml::WEMFace::getArea ( ) const
pure virtual

Calculates the area of face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getBoundingBox()

virtual WEMBoundingBox ml::WEMFace::getBoundingBox ( )
virtual

Calculates the bounding box of face.

◆ getCentroid() [1/2]

virtual Vector3 ml::WEMFace::getCentroid ( ) const
pure virtual

Returns the geometric centroid of a face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getCentroid() [2/2]

virtual void ml::WEMFace::getCentroid ( Vector3 centroid) const
pure virtual

◆ getEdgeAt() [1/2]

virtual WEMEdge* ml::WEMFace::getEdgeAt ( unsigned int  )
inlinevirtual

Returns the edge at the given index in face.

Reimplemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

Definition at line 76 of file WEMFace.h.

◆ getEdgeAt() [2/2]

virtual const WEMEdge* ml::WEMFace::getEdgeAt ( unsigned int  ) const
inlinevirtual

Returns the edge at the given index in face.

Reimplemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

Definition at line 78 of file WEMFace.h.

◆ getEdgeNotContaining() [1/2]

virtual const WEMEdge* ml::WEMFace::getEdgeNotContaining ( WEMNode n) const
pure virtual

Returns the edge not containing given node.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getEdgeNotContaining() [2/2]

virtual WEMEdge* ml::WEMFace::getEdgeNotContaining ( WEMNode n)
pure virtual

Returns the edge not containing given node.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getIndex() [1/2]

virtual int ml::WEMFace::getIndex ( WEMEdge edge) const
pure virtual

Returns the index of the given edge.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getIndex() [2/2]

virtual int ml::WEMFace::getIndex ( WEMNode node) const
pure virtual

Returns the index of the given node.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getNodeAt() [1/2]

virtual const WEMNode* ml::WEMFace::getNodeAt ( unsigned int  index) const
pure virtual

Returns the node at the given index in face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getNodeAt() [2/2]

virtual WEMNode* ml::WEMFace::getNodeAt ( unsigned int  index)
pure virtual

Returns the node at the given index in face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getNodePositionAt()

virtual Vector3 ml::WEMFace::getNodePositionAt ( unsigned int  index) const
pure virtual

Returns a position of a node at a given index.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getNormal()

Vector3 ml::WEMFace::getNormal ( ) const
inline

Returns the normal.

Definition at line 50 of file WEMFace.h.

◆ getNumNodes()

virtual unsigned int ml::WEMFace::getNumNodes ( ) const
pure virtual

Returns the number of nodes.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getOther() [1/4]

virtual const WEMEdge* ml::WEMFace::getOther ( WEMEdge e1,
WEMEdge e2 
) const
pure virtual

Returns the edge incident to this face that is not given as a parameter.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getOther() [2/4]

virtual WEMEdge* ml::WEMFace::getOther ( WEMEdge e1,
WEMEdge e2 
)
pure virtual

Returns the edge incident to this face that is not given as a parameter.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getOther() [3/4]

virtual const WEMNode* ml::WEMFace::getOther ( WEMNode n1,
WEMNode n2 
) const
pure virtual

Returns the node incident to this face that is not given as a parameter.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getOther() [4/4]

virtual WEMNode* ml::WEMFace::getOther ( WEMNode n1,
WEMNode n2 
)
pure virtual

Returns the node incident to this face that is not given as a parameter.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getPerimeter()

virtual double ml::WEMFace::getPerimeter ( ) const
pure virtual

Calculates the perimeter of face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ getQuality()

virtual double ml::WEMFace::getQuality ( ) const
pure virtual

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::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ invalidateBoundingBox()

◆ isBoundingBoxValid()

bool ml::WEMFace::isBoundingBoxValid ( ) const
inline

Definition at line 97 of file WEMFace.h.

◆ isConcave()

virtual int ml::WEMFace::isConcave ( ) const
pure virtual

Checks whether this face is concave.

Returns the number of concavities.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ mirror()

virtual void ml::WEMFace::mirror ( )
pure virtual

Mirrors the face.

NOTE that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards!

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ operator=()

WEMFace& ml::WEMFace::operator= ( WEMFace &&  f)
noexcept

◆ removeEdges()

virtual void ml::WEMFace::removeEdges ( )
pure virtual

Removes all edge pointers of this face.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ replace() [1/2]

virtual void ml::WEMFace::replace ( WEMEdge orig,
WEMEdge replace 
)
pure virtual

Replaces the given orig node by the given replace edge.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ replace() [2/2]

virtual void ml::WEMFace::replace ( WEMNode orig,
WEMNode replace 
)
pure virtual

Replaces the given orig node by the given replace node.

Implemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

◆ reset()

void ml::WEMFace::reset ( )

Resets the object to default constructed state.

◆ setEdge()

virtual void ml::WEMFace::setEdge ( unsigned int  ,
WEMEdge  
)
inlinevirtual

Sets the given edge to the given index in face.

Reimplemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

Definition at line 80 of file WEMFace.h.

◆ setNode()

virtual void ml::WEMFace::setNode ( unsigned int  ,
WEMNode  
)
inlinevirtual

Sets the given node to the given index in face.

Reimplemented in ml::WEMTriangle, ml::WEMQuad, and ml::WEMPolygon.

Definition at line 65 of file WEMFace.h.

◆ setNormal()

void ml::WEMFace::setNormal ( const Vector3 normal)
inline

Sets the normal.

Definition at line 52 of file WEMFace.h.

Member Data Documentation

◆ _boundingBox

WEMBoundingBox ml::WEMFace::_boundingBox
protected

Bounding Box.

Definition at line 132 of file WEMFace.h.

◆ _isBoundingBoxValid

bool ml::WEMFace::_isBoundingBoxValid
protected

Is the bounding box valid?

Definition at line 135 of file WEMFace.h.

◆ _normal

Vector3 ml::WEMFace::_normal
protected

Normal.

Definition at line 129 of file WEMFace.h.


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