42 inline unsigned int getNumNodes()
const override {
return 4; }
54 _nodes[0] = node1; _nodes[1] = node2; _nodes[2] = node3; _nodes[3] = node4;
71 inline void setEdge(
unsigned int index,
WEMEdge* edge)
override { _edges[index] = edge; }
74 _edges[0] = edge1; _edges[1] = edge2; _edges[2] = edge3; _edges[3] = edge4;
Defines the mesh component: edge.
Defines the mesh component: face.
void invalidateBoundingBox()
Defines the mesh component: node.
Defines the mesh component: quad.
WEMQuad(const WEMQuad &q)
Standard copy constructor.
bool contains(WEMEdge *edge) const override
Returns whether this face contains the given edge.
WEMNode * getOther(WEMNode *, WEMNode *) override
Returns the node incident to this face that is not given as a parameter.
bool contains(WEMNode *node) const override
Returns whether this face contains the given node.
const WEMEdge * getEdgeNotContaining(WEMNode *) const override
Returns the edge not containing given node.
void replace(WEMEdge *orig, WEMEdge *replacement) override
Replaces the given orig edge by the given replace edge.
void mirror() override
Mirrors this face. Note that edge information gets corrupted! Use WEM::buildEdgeConnectivity afterwar...
WEMEdge * getEdgeAt(unsigned int index) override
Returns the node at the given index in this face.
void removeEdges() override
Removes all edge pointers of this face.
Vector3 getCentroid() const override
Returns the geometric centroid of this face.
WEMEdge * getEdgeNotContaining(WEMNode *) override
Returns the edge not containing given node.
const WEMNode * getOther(WEMNode *, WEMNode *) const override
Returns the node incident to this face that is not given as a parameter.
virtual void setNodes(WEMNode *node1, WEMNode *node2, WEMNode *node3, WEMNode *node4)
Sets the given nodes.
WEMEdge * getOther(WEMEdge *, WEMEdge *) override
Returns the edge incident to this face that is not given as a parameter.
void computeNormal() override
Computes the normal.
void setNode(unsigned int index, WEMNode *node) override
Sets the given node to the given index in this face.
int getIndex(WEMNode *node) const override
Returns the index of the given node.
int getIndex(WEMEdge *edge) const override
Returns the index of the given node.
WEMNode * getNodeAt(unsigned int index) override
Returns the node at the given index in this face.
const WEMNode * getNodeAt(unsigned int index) const override
Returns the node at the given index in this face.
const WEMEdge * getOther(WEMEdge *, WEMEdge *) const override
Returns the edge incident to this face that is not given as a parameter.
void setEdge(unsigned int index, WEMEdge *edge) override
Sets the given edge to the given index in this face.
double getPerimeter() const override
Calculates the perimeter of this face.
WEMQuad()
Standard constructor.
double getQuality() const override
Calculates the quality of face.
void replace(WEMNode *orig, WEMNode *replacement) override
Replaces the given orig node by the given replace node.
const WEMEdge * getEdgeAt(unsigned int index) const override
Returns the node at the given index in this face.
void getCentroid(Vector3 ¢roid) const override
Vector3 getNodePositionAt(unsigned int index) const override
Returns the position of a node at the given index.
unsigned int getNumNodes() const override
Returns the number of nodes.
~WEMQuad() override
Standard destructor.
double getArea() const override
Calculates the area of this face.
int isConcave() const override
Checks whether this face a concave polygon.
void clone(WEMQuad *quad)
Clones the given quad.
virtual void setEdges(WEMEdge *edge1, WEMEdge *edge2, WEMEdge *edge3, WEMEdge *edge4)
Sets the given edges.