MeVisLabToolboxReference
|
Defines the mesh component: face. More...
#include <WEMFace.h>
Public Member Functions | |
WEMFace () | |
Standard constructor. | |
WEMFace (const WEMFace &f) | |
Standard copy constructor. | |
virtual | ~WEMFace () |
Standard destructor. | |
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 Vector3 | getCentroid () const =0 |
Returns the geometric centroid of a face. | |
virtual double | getPerimeter () const =0 |
Calculates the perimeter of face. | |
virtual double | getArea () const =0 |
Calculates the area of face. | |
virtual WEMBoundingBox | getBoundingBox () const |
Calculates the bounding box of face. | |
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. | |
Protected Attributes | |
Vector3 | _normal |
Normal. |
ml::WEMFace::WEMFace | ( | ) |
Standard constructor.
ml::WEMFace::WEMFace | ( | const WEMFace & | f | ) |
Standard copy constructor.
virtual ml::WEMFace::~WEMFace | ( | ) | [virtual] |
Standard destructor.
void ml::WEMFace::clone | ( | WEMFace * | face | ) |
Clones given face.
virtual void ml::WEMFace::computeNormal | ( | ) | [pure virtual] |
Computes the normal.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual bool ml::WEMFace::contains | ( | WEMEdge * | edge | ) | const [pure virtual] |
Returns whether this face contains the given edge.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual bool ml::WEMFace::contains | ( | WEMNode * | node | ) | const [pure virtual] |
Returns whether this face contains the given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual double ml::WEMFace::getArea | ( | ) | const [pure virtual] |
Calculates the area of face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual WEMBoundingBox ml::WEMFace::getBoundingBox | ( | ) | const [virtual] |
Calculates the bounding box of face.
virtual Vector3 ml::WEMFace::getCentroid | ( | ) | const [pure virtual] |
Returns the geometric centroid of a face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual WEMEdge* ml::WEMFace::getEdgeAt | ( | unsigned int | ) | [inline, virtual] |
Returns the edge at the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual const WEMEdge* ml::WEMFace::getEdgeAt | ( | unsigned int | ) | const [inline, virtual] |
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.
virtual int ml::WEMFace::getIndex | ( | WEMEdge * | edge | ) | const [pure virtual] |
Returns the index of the given edge.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual int ml::WEMFace::getIndex | ( | WEMNode * | node | ) | const [pure virtual] |
Returns the index of the given node.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual const WEMNode* ml::WEMFace::getNodeAt | ( | unsigned int | index | ) | const [pure virtual] |
Returns the node at the given index in face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual WEMNode* ml::WEMFace::getNodeAt | ( | unsigned int | index | ) | [pure virtual] |
Returns the node at the given index in face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual Vector3 ml::WEMFace::getNodePositionAt | ( | unsigned int | index | ) | const [pure virtual] |
Returns a position of a node at a given index.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
Vector3 ml::WEMFace::getNormal | ( | ) | const [inline] |
virtual unsigned int ml::WEMFace::getNumNodes | ( | ) | const [pure virtual] |
Returns the number of nodes.
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 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 edge incident to this face that is not given as a parameter.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual double ml::WEMFace::getPerimeter | ( | ) | const [pure virtual] |
Calculates the perimeter of face.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
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::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual int ml::WEMFace::isConcave | ( | ) | const [pure virtual] |
Checks whether this face is concave.
Returns the number of concavities.
Implemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual void ml::WEMFace::mirror | ( | ) | [pure virtual] |
Mirrors the face.
NOTE that the edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwards!
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.
virtual void ml::WEMFace::setEdge | ( | unsigned int | , |
WEMEdge * | |||
) | [inline, virtual] |
Sets the given edge to the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
virtual void ml::WEMFace::setNode | ( | unsigned int | , |
WEMNode * | |||
) | [inline, virtual] |
Sets the given node to the given index in face.
Reimplemented in ml::WEMPolygon, ml::WEMQuad, and ml::WEMTriangle.
void ml::WEMFace::setNormal | ( | const Vector3 & | normal | ) | [inline] |
Vector3 ml::WEMFace::_normal [protected] |