ml::WEMTriangle Class Reference

Defines the mesh component: triangle. More...

#include <WEMTriangle.h>

Inheritance diagram for ml::WEMTriangle:

ml::WEMFace ml::WEMPrimitive

List of all members.

Public Member Functions

 WEMTriangle ()
 Standard constructor.
 WEMTriangle (const WEMTriangle &t)
 Standard copy constructor.
virtual ~WEMTriangle ()
 Standard destructor.
void clone (WEMTriangle *triangle)
 Clone given triangle.
virtual void computeNormal ()
 Compute normal.
virtual unsigned int getNumNodes () const
 Get number of nodes.
virtual int getIndex (WEMNode *node) const
 Get index of given node.
virtual WEMNodegetNodeAt (unsigned int index)
 Get node at given index in face.
virtual const WEMNodegetNodeAt (unsigned int index) const
 Get node at given index in face.
virtual void setNode (unsigned int index, WEMNode *node)
 Set given node to given index in face.
virtual void setNodes (WEMNode *node1, WEMNode *node2, WEMNode *node3)
 Set nodes.
virtual void replace (WEMNode *orig, WEMNode *replacement)
 Replace given orig node by given replace node.
virtual bool contains (WEMNode *node) const
 Does this face contain the given node?
virtual Vector3 getNodePositionAt (unsigned int index) const
 Get the position of a node at the given index.
virtual int getIndex (WEMEdge *edge) const
 Get index of given edge.
virtual WEMEdgegetEdgeAt (unsigned int index)
 Get edge at given index in face.
virtual const WEMEdgegetEdgeAt (unsigned int index) const
 Get edge at given index in face.
virtual void setEdge (unsigned int index, WEMEdge *edge)
 Set given edge to given index in face.
virtual void setEdges (WEMEdge *edge1, WEMEdge *edge2, WEMEdge *edge3)
 Set edges.
virtual void replace (WEMEdge *orig, WEMEdge *replacement)
 Replace given orig node by given replace edge.
virtual bool contains (WEMEdge *edge) const
 Does this face contain the given edge?
virtual Vector3 getCentroid () const
 Returns the geometric centroid of a face.
virtual double getPerimeter () const
 Calculate perimeter of face.
virtual double getArea () const
 Calculate area of face.
virtual WEMNodegetOther (WEMNode *n1, WEMNode *n2)
 Returns the node incident to this face that is not given as a parameter.
virtual const WEMNodegetOther (WEMNode *n1, WEMNode *n2) const
 Returns the node incident to this face that is not given as a parameter.
virtual WEMEdgegetOther (WEMEdge *e1, WEMEdge *e2)
 Returns the edge incident to this face that is not given as a parameter.
virtual const WEMEdgegetOther (WEMEdge *e1, WEMEdge *e2) const
 Returns the edge incident to this face that is not given as a parameter.
virtual WEMEdgegetEdgeNotContaining (WEMNode *n)
 Returns the edge not containing given node.
virtual const WEMEdgegetEdgeNotContaining (WEMNode *n) const
 Returns the edge not containing given node.
virtual double getQuality () const
 Calculate quality of face.
virtual int isConcave () const
 Is this face a concave polygon? Return number of concavities.
virtual bool isFolding (WEMNode *node, const Vector3 &position) const
 Is this face folding?
virtual bool pointInTriangle (const Vector3 &position) const
 Point in triangle test.
virtual bool rayIntersect (const Vector3 &origin, const Vector3 &direction) const
 Does given ray intersect triangle?
virtual void mirror ()
 Mirror face -> edge information gets corrupted!!! Use WEM::buildEdgeConnectivity afterwards.


Detailed Description

Defines the mesh component: triangle.

Definition at line 21 of file WEMTriangle.h.


Constructor & Destructor Documentation

ml::WEMTriangle::WEMTriangle (  ) 

Standard constructor.

ml::WEMTriangle::WEMTriangle ( const WEMTriangle t  ) 

Standard copy constructor.

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

Standard destructor.


Member Function Documentation

void ml::WEMTriangle::clone ( WEMTriangle triangle  ) 

Clone given triangle.

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

Compute normal.

Implements ml::WEMFace.

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

Does this face contain the given edge?

Implements ml::WEMFace.

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

Does this face contain the given node?

Implements ml::WEMFace.

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

Calculate area of face.

Implements ml::WEMFace.

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

Returns the geometric centroid of a face.

Implements ml::WEMFace.

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

Get edge at given index in face.

Reimplemented from ml::WEMFace.

Definition at line 62 of file WEMTriangle.h.

References getEdgeAt().

Referenced by getEdgeAt().

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

Get edge at given index in face.

Reimplemented from ml::WEMFace.

Definition at line 60 of file WEMTriangle.h.

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

Returns the edge not containing given node.

Implements ml::WEMFace.

Definition at line 91 of file WEMTriangle.h.

References getEdgeNotContaining().

Referenced by getEdgeNotContaining().

virtual WEMEdge* ml::WEMTriangle::getEdgeNotContaining ( WEMNode n  )  [virtual]

Returns the edge not containing given node.

Implements ml::WEMFace.

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

Get index of given edge.

Implements ml::WEMFace.

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

Get index of given node.

Implements ml::WEMFace.

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

Get node at given index in face.

Implements ml::WEMFace.

Definition at line 43 of file WEMTriangle.h.

References getNodeAt().

Referenced by getNodeAt().

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

Get node at given index in face.

Implements ml::WEMFace.

Definition at line 41 of file WEMTriangle.h.

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

Get the position of a node at the given index.

Implements ml::WEMFace.

Definition at line 55 of file WEMTriangle.h.

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

Get number of nodes.

Implements ml::WEMFace.

Definition at line 37 of file WEMTriangle.h.

virtual const WEMEdge* ml::WEMTriangle::getOther ( WEMEdge e1,
WEMEdge e2 
) const [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 87 of file WEMTriangle.h.

References getOther().

Referenced by getOther().

virtual WEMEdge* ml::WEMTriangle::getOther ( WEMEdge e1,
WEMEdge e2 
) [virtual]

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

Implements ml::WEMFace.

virtual const WEMNode* ml::WEMTriangle::getOther ( WEMNode n1,
WEMNode n2 
) const [inline, virtual]

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

Implements ml::WEMFace.

Definition at line 83 of file WEMTriangle.h.

References getOther().

Referenced by getOther().

virtual WEMNode* ml::WEMTriangle::getOther ( WEMNode n1,
WEMNode n2 
) [virtual]

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

Implements ml::WEMFace.

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

Calculate perimeter of face.

Implements ml::WEMFace.

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

Calculate quality of 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::WEMTriangle::isConcave (  )  const [inline, virtual]

Is this face a concave polygon? Return number of concavities.

Implements ml::WEMFace.

Definition at line 100 of file WEMTriangle.h.

virtual bool ml::WEMTriangle::isFolding ( WEMNode node,
const Vector3 position 
) const [virtual]

Is this face folding?

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

Mirror face -> edge information gets corrupted!!! Use WEM::buildEdgeConnectivity afterwards.

Implements ml::WEMFace.

virtual bool ml::WEMTriangle::pointInTriangle ( const Vector3 position  )  const [virtual]

Point in triangle test.

virtual bool ml::WEMTriangle::rayIntersect ( const Vector3 origin,
const Vector3 direction 
) const [virtual]

Does given ray intersect triangle?

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

Replace given orig node by given replace edge.

Implements ml::WEMFace.

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

Replace given orig node by given replace node.

Implements ml::WEMFace.

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

Set given edge to given index in face.

Reimplemented from ml::WEMFace.

Definition at line 64 of file WEMTriangle.h.

virtual void ml::WEMTriangle::setEdges ( WEMEdge edge1,
WEMEdge edge2,
WEMEdge edge3 
) [inline, virtual]

Set edges.

Definition at line 66 of file WEMTriangle.h.

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

Set given node to given index in face.

Reimplemented from ml::WEMFace.

Definition at line 45 of file WEMTriangle.h.

virtual void ml::WEMTriangle::setNodes ( WEMNode node1,
WEMNode node2,
WEMNode node3 
) [inline, virtual]

Set nodes.

Definition at line 47 of file WEMTriangle.h.


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

Generated on Sat Sep 3 18:39:41 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8