MeVisLabToolboxReference
ml::WEMPolygon Class Reference

Defines the mesh component: polygon. More...

#include <WEMPolygon.h>

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

List of all members.

Public Member Functions

 WEMPolygon ()
 Standard constructor.
 WEMPolygon (const WEMPolygon &p)
 Standard copy constructor.
virtual ~WEMPolygon ()
 Standard destructor.
void clone (WEMPolygon *polygon)
 Clones given triangle.
virtual void computeNormal ()
 Computes the normal.
virtual unsigned int getNumNodes () const
 Returns the number of nodes.
virtual void setNumNodes (unsigned int numNodes)
 Sets the number of nodes.
virtual int getIndex (WEMNode *node) const
 Returns the index of the given node.
virtual WEMNodegetNodeAt (unsigned int index)
 Returns the node at the given index in the face.
virtual const WEMNodegetNodeAt (unsigned int index) const
 Returns the node at the given index in the face.
virtual void setNode (unsigned int index, WEMNode *node)
 Sets the given node to the given index in face.
virtual void replace (WEMNode *orig, WEMNode *replacement)
 Replaces the given orig node by the given replace node.
virtual bool contains (WEMNode *node) const
 Returns whether this face contains the given node.
virtual void addNode (WEMNode *node)
 Adds the given node (dynamic).
virtual Vector3 getNodePositionAt (unsigned int index) const
 Returns the world position of a node at the given index.
virtual int getIndex (WEMEdge *edge) const
 Returns the index of the given edge.
virtual WEMEdgegetEdgeAt (unsigned int index)
 Returns the edge at the given index in this face.
virtual const WEMEdgegetEdgeAt (unsigned int index) const
 Returns the edge at the given index in this face.
virtual void setEdge (unsigned int index, WEMEdge *edge)
 Sets the given edge to the given index in this face.
virtual void replace (WEMEdge *orig, WEMEdge *replacement)
 Replaces the given orig node by the given replace edge.
virtual bool contains (WEMEdge *edge) const
 Returns whether this face contains the given edge.
virtual Vector3 getCentroid () const
 Returns the geometric centroid of this face.
virtual double getPerimeter () const
 Calculates the perimeter of this face.
virtual double getArea () const
 Calculates the area of this face.
virtual WEMNodegetOther (WEMNode *, WEMNode *)
 Returns the node incident to this face that is not given as a parameter.
virtual const WEMNodegetOther (WEMNode *, WEMNode *) const
 Returns the node incident to this face that is not given as a parameter.
virtual WEMEdgegetOther (WEMEdge *, WEMEdge *)
 Returns the edge incident to this face that is not given as a parameter.
virtual const WEMEdgegetOther (WEMEdge *, WEMEdge *) const
 Returns the edge incident to this face that is not given as a parameter.
virtual WEMEdgegetEdgeNotContaining (WEMNode *)
 Returns the edge not containing given node.
virtual const WEMEdgegetEdgeNotContaining (WEMNode *) const
 Returns the edge not containing given node.
virtual double getQuality () const
 Calculates the quality of this face.
virtual int isConcave () const
 Checks whether this face is concave and returns the number of concavities.
virtual void mirror ()
 Mirrors this face.

Detailed Description

Defines the mesh component: polygon.

Definition at line 20 of file WEMPolygon.h.


Constructor & Destructor Documentation

ml::WEMPolygon::WEMPolygon ( )

Standard constructor.

ml::WEMPolygon::WEMPolygon ( const WEMPolygon p)

Standard copy constructor.

virtual ml::WEMPolygon::~WEMPolygon ( ) [virtual]

Standard destructor.


Member Function Documentation

virtual void ml::WEMPolygon::addNode ( WEMNode node) [inline, virtual]

Adds the given node (dynamic).

Definition at line 54 of file WEMPolygon.h.

void ml::WEMPolygon::clone ( WEMPolygon polygon)

Clones given triangle.

virtual void ml::WEMPolygon::computeNormal ( ) [virtual]

Computes the normal.

Implements ml::WEMFace.

virtual bool ml::WEMPolygon::contains ( WEMEdge edge) const [virtual]

Returns whether this face contains the given edge.

Implements ml::WEMFace.

virtual bool ml::WEMPolygon::contains ( WEMNode node) const [virtual]

Returns whether this face contains the given node.

Implements ml::WEMFace.

virtual double ml::WEMPolygon::getArea ( ) const [virtual]

Calculates the area of this face.

Implements ml::WEMFace.

virtual Vector3 ml::WEMPolygon::getCentroid ( ) const [virtual]

Returns the geometric centroid of this face.

Implements ml::WEMFace.

virtual WEMEdge* ml::WEMPolygon::getEdgeAt ( unsigned int  index) [inline, virtual]

Returns the edge at the given index in this face.

Reimplemented from ml::WEMFace.

Definition at line 61 of file WEMPolygon.h.

virtual const WEMEdge* ml::WEMPolygon::getEdgeAt ( unsigned int  index) const [inline, virtual]

Returns the edge at the given index in this face.

Reimplemented from ml::WEMFace.

Definition at line 63 of file WEMPolygon.h.

References getEdgeAt().

Referenced by getEdgeAt().

virtual WEMEdge* ml::WEMPolygon::getEdgeNotContaining ( WEMNode ) [inline, virtual]

Returns the edge not containing given node.

Implements ml::WEMFace.

Definition at line 86 of file WEMPolygon.h.

virtual const WEMEdge* ml::WEMPolygon::getEdgeNotContaining ( WEMNode ) const [inline, virtual]

Returns the edge not containing given node.

Implements ml::WEMFace.

Definition at line 88 of file WEMPolygon.h.

virtual int ml::WEMPolygon::getIndex ( WEMNode node) const [virtual]

Returns the index of the given node.

Implements ml::WEMFace.

virtual int ml::WEMPolygon::getIndex ( WEMEdge edge) const [virtual]

Returns the index of the given edge.

Implements ml::WEMFace.

virtual WEMNode* ml::WEMPolygon::getNodeAt ( unsigned int  index) [inline, virtual]

Returns the node at the given index in the face.

Implements ml::WEMFace.

Definition at line 43 of file WEMPolygon.h.

virtual const WEMNode* ml::WEMPolygon::getNodeAt ( unsigned int  index) const [inline, virtual]

Returns the node at the given index in the face.

Implements ml::WEMFace.

Definition at line 45 of file WEMPolygon.h.

References getNodeAt().

Referenced by getNodeAt().

virtual Vector3 ml::WEMPolygon::getNodePositionAt ( unsigned int  index) const [inline, virtual]

Returns the world position of a node at the given index.

Implements ml::WEMFace.

Definition at line 56 of file WEMPolygon.h.

virtual unsigned int ml::WEMPolygon::getNumNodes ( ) const [inline, virtual]

Returns the number of nodes.

Implements ml::WEMFace.

Definition at line 37 of file WEMPolygon.h.

virtual const WEMEdge* ml::WEMPolygon::getOther ( WEMEdge ,
WEMEdge  
) const [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 84 of file WEMPolygon.h.

virtual WEMNode* ml::WEMPolygon::getOther ( WEMNode ,
WEMNode  
) [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 78 of file WEMPolygon.h.

virtual const WEMNode* ml::WEMPolygon::getOther ( WEMNode ,
WEMNode  
) const [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 80 of file WEMPolygon.h.

virtual WEMEdge* ml::WEMPolygon::getOther ( WEMEdge ,
WEMEdge  
) [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 82 of file WEMPolygon.h.

virtual double ml::WEMPolygon::getPerimeter ( ) const [virtual]

Calculates the perimeter of this face.

Implements ml::WEMFace.

virtual double ml::WEMPolygon::getQuality ( ) const [virtual]

Calculates the quality of this 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.

virtual int ml::WEMPolygon::isConcave ( ) const [virtual]

Checks whether this face is concave and returns the number of concavities.

Implements ml::WEMFace.

virtual void ml::WEMPolygon::mirror ( ) [virtual]

Mirrors this face.

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

Implements ml::WEMFace.

virtual void ml::WEMPolygon::replace ( WEMEdge orig,
WEMEdge replacement 
) [virtual]

Replaces the given orig node by the given replace edge.

Implements ml::WEMFace.

virtual void ml::WEMPolygon::replace ( WEMNode orig,
WEMNode replacement 
) [virtual]

Replaces the given orig node by the given replace node.

Implements ml::WEMFace.

virtual void ml::WEMPolygon::setEdge ( unsigned int  index,
WEMEdge edge 
) [inline, virtual]

Sets the given edge to the given index in this face.

Reimplemented from ml::WEMFace.

Definition at line 65 of file WEMPolygon.h.

virtual void ml::WEMPolygon::setNode ( unsigned int  index,
WEMNode node 
) [inline, virtual]

Sets the given node to the given index in face.

Note that the number of nodes is not changed here!

Reimplemented from ml::WEMFace.

Definition at line 48 of file WEMPolygon.h.

virtual void ml::WEMPolygon::setNumNodes ( unsigned int  numNodes) [inline, virtual]

Sets the number of nodes.

Definition at line 39 of file WEMPolygon.h.


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