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 WEMNode * getOther(WEMNode *, WEMNode *) const override
Returns the node incident to this face that is not given as a parameter.
virtual void setNumNodes(unsigned int numNodes)
Sets the number of nodes.
~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 * getEdgeNotContaining(WEMNode *) override
Returns the edge not containing given node.
void computeNormal() override
Computes the normal.
WEMEdge * getOther(WEMEdge *, WEMEdge *) override
Returns the edge incident to this face that is not given as a parameter.
void clone(WEMPolygon *polygon)
Clones given triangle.
WEMPolygon()
Standard constructor.
void replace(WEMEdge *orig, WEMEdge *replacement) override
Replaces the given orig node by the given replace edge.
const WEMEdge * getEdgeAt(unsigned int index) const override
Returns the edge at the given index in this face.
const WEMEdge * getEdgeNotContaining(WEMNode *) const override
Returns the edge not containing given node.
WEMNode * getNodeAt(unsigned int index) override
Returns the node at the given index in the face.
const WEMNode * getNodeAt(unsigned int index) const override
Returns the node at the given index in the face.
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).
WEMEdge * getEdgeAt(unsigned int index) override
Returns the edge at the given index in this face.
unsigned int getNumNodes() const override
Returns the number of nodes.
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.
WEMNode * getOther(WEMNode *, WEMNode *) override
Returns the node incident to this face that is not given as a parameter.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.