MeVisLabToolboxReference
|
Defines the mesh component: triangle. More...
#include <WEMTriangle.h>
Public Member Functions | |
WEMTriangle () | |
Standard constructor. | |
WEMTriangle (const WEMTriangle &t) | |
Standard copy constructor. | |
virtual | ~WEMTriangle () |
Standard destructor. | |
void | clone (WEMTriangle *triangle) |
Clones given triangle. | |
virtual void | computeNormal () |
Computes the normal. | |
virtual unsigned int | getNumNodes () const |
Returns the number of nodes. | |
virtual int | getIndex (WEMNode *node) const |
Returns the index of the given node. | |
virtual WEMNode * | getNodeAt (unsigned int index) |
Returns the node at the given index in this face. | |
virtual const WEMNode * | getNodeAt (unsigned int index) const |
Returns the node at the given index in this face. | |
virtual void | setNode (unsigned int index, WEMNode *node) |
Sets the given node to the given index in this face. | |
virtual void | setNodes (WEMNode *node1, WEMNode *node2, WEMNode *node3) |
Sets the given nodes. | |
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 Vector3 | getNodePositionAt (unsigned int index) const |
Returns the position of a node at the given index. | |
virtual int | getIndex (WEMEdge *edge) const |
Returns the index of the given edge. | |
virtual WEMEdge * | getEdgeAt (unsigned int index) |
Returns the edge at the given index in this face. | |
virtual const WEMEdge * | getEdgeAt (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 | setEdges (WEMEdge *edge1, WEMEdge *edge2, WEMEdge *edge3) |
Sets the given edges. | |
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 WEMNode * | getOther (WEMNode *n1, WEMNode *n2) |
Returns the node incident to this face that is not given as a parameter. | |
virtual const WEMNode * | getOther (WEMNode *n1, WEMNode *n2) const |
Returns the node incident to this face that is not given as a parameter. | |
virtual WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2) |
Returns the edge incident to this face that is not given as a parameter. | |
virtual const WEMEdge * | getOther (WEMEdge *e1, WEMEdge *e2) const |
Returns the edge incident to this face that is not given as a parameter. | |
virtual WEMEdge * | getEdgeNotContaining (WEMNode *n) |
Returns the edge not containing given node. | |
virtual const WEMEdge * | getEdgeNotContaining (WEMNode *n) const |
Returns the edge not containing given node. | |
virtual double | getQuality () const |
Calculates the quality of the face. | |
virtual int | isConcave () const |
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? | |
virtual void | mirror () |
Mirrors this face. Note that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards! |
Defines the mesh component: triangle.
Definition at line 21 of file WEMTriangle.h.
ml::WEMTriangle::WEMTriangle | ( | ) |
Standard constructor.
ml::WEMTriangle::WEMTriangle | ( | const WEMTriangle & | t | ) |
Standard copy constructor.
virtual ml::WEMTriangle::~WEMTriangle | ( | ) | [virtual] |
Standard destructor.
void ml::WEMTriangle::clone | ( | WEMTriangle * | triangle | ) |
Clones given triangle.
virtual void ml::WEMTriangle::computeNormal | ( | ) | [virtual] |
Computes the normal.
Implements ml::WEMFace.
virtual bool ml::WEMTriangle::contains | ( | WEMEdge * | edge | ) | const [virtual] |
Returns whether this face contains the given edge.
Implements ml::WEMFace.
virtual bool ml::WEMTriangle::contains | ( | WEMNode * | node | ) | const [virtual] |
Returns whether this face contains the given node.
Implements ml::WEMFace.
virtual double ml::WEMTriangle::getArea | ( | ) | const [virtual] |
Calculates the area of this face.
Implements ml::WEMFace.
virtual Vector3 ml::WEMTriangle::getCentroid | ( | ) | const [virtual] |
Returns the geometric centroid of this face.
Implements ml::WEMFace.
virtual WEMEdge* ml::WEMTriangle::getEdgeAt | ( | unsigned int | index | ) | [inline, virtual] |
Returns the edge at the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 60 of file WEMTriangle.h.
virtual const WEMEdge* ml::WEMTriangle::getEdgeAt | ( | unsigned int | index | ) | const [inline, virtual] |
Returns the edge at the given index in this face.
Reimplemented from ml::WEMFace.
Definition at line 62 of file WEMTriangle.h.
References getEdgeAt().
Referenced by getEdgeAt().
Returns the edge not containing given node.
Implements ml::WEMFace.
Returns the edge not containing given node.
Implements ml::WEMFace.
Definition at line 91 of file WEMTriangle.h.
References getEdgeNotContaining().
Referenced by getEdgeNotContaining().
virtual int ml::WEMTriangle::getIndex | ( | WEMNode * | node | ) | const [virtual] |
Returns the index of the given node.
Implements ml::WEMFace.
virtual int ml::WEMTriangle::getIndex | ( | WEMEdge * | edge | ) | const [virtual] |
Returns the index of the given edge.
Implements ml::WEMFace.
virtual WEMNode* ml::WEMTriangle::getNodeAt | ( | unsigned int | index | ) | [inline, virtual] |
Returns the node at the given index in this face.
Implements ml::WEMFace.
Definition at line 41 of file WEMTriangle.h.
virtual const WEMNode* ml::WEMTriangle::getNodeAt | ( | unsigned int | index | ) | const [inline, virtual] |
Returns the node at the given index in this face.
Implements ml::WEMFace.
Definition at line 43 of file WEMTriangle.h.
References getNodeAt().
Referenced by getNodeAt().
virtual Vector3 ml::WEMTriangle::getNodePositionAt | ( | unsigned int | index | ) | const [inline, virtual] |
Returns 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] |
Returns the node incident to this face that is not given as a parameter.
Implements ml::WEMFace.
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 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 double ml::WEMTriangle::getPerimeter | ( | ) | const [virtual] |
Calculates the perimeter of this face.
Implements ml::WEMFace.
virtual double ml::WEMTriangle::getQuality | ( | ) | const [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.
Implements ml::WEMFace.
virtual int ml::WEMTriangle::isConcave | ( | ) | const [inline, virtual] |
Checks whether this face a concave polygon. Return the 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] |
Returns whether this face is folding?
virtual void ml::WEMTriangle::mirror | ( | ) | [virtual] |
Mirrors this face. Note that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards!
Implements ml::WEMFace.
virtual bool ml::WEMTriangle::pointInTriangle | ( | const Vector3 & | position | ) | const [virtual] |
Returns whether the given point is in this triangle.
virtual bool ml::WEMTriangle::rayIntersect | ( | const Vector3 & | origin, |
const Vector3 & | direction | ||
) | const [virtual] |
Returns whether the given ray intersects this triangle?
Replaces the given orig node by the given replace node.
Implements ml::WEMFace.
Replaces the given orig node by the given replace edge.
Implements ml::WEMFace.
virtual void ml::WEMTriangle::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 64 of file WEMTriangle.h.
virtual void ml::WEMTriangle::setEdges | ( | WEMEdge * | edge1, |
WEMEdge * | edge2, | ||
WEMEdge * | edge3 | ||
) | [inline, virtual] |
Sets the given edges.
Definition at line 66 of file WEMTriangle.h.
virtual void ml::WEMTriangle::setNode | ( | unsigned int | index, |
WEMNode * | node | ||
) | [inline, virtual] |
Sets the given node to the given index in this 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] |
Sets the given nodes.
Definition at line 47 of file WEMTriangle.h.