37 inline unsigned int getNumNodes()
const override {
return _numNodes; }
39 virtual inline void setNumNodes(
unsigned int numNodes) { _numNodes = numNodes; }
65 inline void setEdge(
unsigned int index,
WEMEdge* edge)
override { _edges[index] = edge;}
110 unsigned int _numNodes;
const unsigned int WEM_MAX_NUM_NODES
Maximum number of nodes for polygons.
Defines the mesh component: edge.
Defines the mesh component: face.
void invalidateBoundingBox()
Defines the mesh component: node.
Defines the mesh component: polygon.
Vector3 getNodePositionAt(unsigned int index) const override
Returns the world position of a node at the given index.
void removeEdges() override
Removes all edge pointers of this face.
const WEMEdge * getEdgeNotContaining(WEMNode *) const override
Returns the edge not containing given node.
virtual void setNumNodes(unsigned int numNodes)
Sets the number of nodes.
WEMNode * getNodeAt(unsigned int index) override
Returns the node at the given index in the face.
~WEMPolygon() override
Standard destructor.
double getQuality() const override
Calculates the quality of this face.
int getIndex(WEMEdge *edge) const override
Returns the index of the given edge.
WEMEdge * getEdgeAt(unsigned int index) override
Returns the edge at the given index in this face.
void computeNormal() override
Computes the normal.
const WEMNode * getNodeAt(unsigned int index) const override
Returns the node at the given index in the face.
void clone(WEMPolygon *polygon)
Clones given triangle.
WEMPolygon()
Standard constructor.
const WEMNode * getOther(WEMNode *, WEMNode *) const override
Returns the node incident to this face that is not given as a parameter.
void replace(WEMEdge *orig, WEMEdge *replacement) override
Replaces the given orig node by the given replace edge.
WEMEdge * getOther(WEMEdge *, WEMEdge *) override
Returns the edge incident to this face that is not given as a parameter.
WEMPolygon(const WEMPolygon &p)
Standard copy constructor.
double getPerimeter() const override
Calculates the perimeter of this face.
void getCentroid(Vector3 ¢roid) const override
virtual void addNode(WEMNode *node)
Adds the given node (dynamic).
const WEMEdge * getEdgeAt(unsigned int index) const override
Returns the edge at the given index in this face.
WEMEdge * getEdgeNotContaining(WEMNode *) override
Returns the edge not containing given node.
unsigned int getNumNodes() const override
Returns the number of nodes.
WEMNode * getOther(WEMNode *, WEMNode *) override
Returns the node incident to this face that is not given as a parameter.
Vector3 getCentroid() const override
Returns the geometric centroid of this face.
int getIndex(WEMNode *node) const override
Returns the index of the given node.
bool contains(WEMEdge *edge) const override
Returns whether this face contains the given edge.
const WEMEdge * getOther(WEMEdge *, WEMEdge *) const override
Returns the edge incident to this face that is not given as a parameter.
int isConcave() const override
Checks whether this face is concave and returns the number of concavities.
void mirror() override
Mirrors this face.
void replace(WEMNode *orig, WEMNode *replacement) override
Replaces the given orig node by the given replace node.
bool contains(WEMNode *node) const override
Returns whether this face contains the given node.
double getArea() const override
Calculates the area of this face.
void setEdge(unsigned int index, WEMEdge *edge) override
Sets the given edge to the given index in this face.
void setNode(unsigned int index, WEMNode *node) override
Sets the given node to the given index in face.