Start building mesh primitives.
This commit is contained in:
parent
a20c0183df
commit
fcd90b5db4
30 changed files with 856 additions and 97 deletions
|
@ -42,4 +42,75 @@ std::vector<double> Node::getVectorAttribute(const std::string& tag) const
|
|||
return {};
|
||||
}
|
||||
|
||||
const Point& Node::getPoint() const
|
||||
{
|
||||
return mPoint;
|
||||
}
|
||||
|
||||
void Node::scale(double x, double y)
|
||||
{
|
||||
mPoint.scale(x, y);
|
||||
}
|
||||
|
||||
void Node::translate(double x, double y, double z)
|
||||
{
|
||||
mPoint.translate(x, y, z);
|
||||
}
|
||||
|
||||
bool Node::isCoincident(Node* node) const
|
||||
{
|
||||
return node->getPoint() == mPoint;
|
||||
}
|
||||
|
||||
void Node::setState(State state)
|
||||
{
|
||||
mState = state;
|
||||
}
|
||||
|
||||
Node::State Node::getState() const
|
||||
{
|
||||
return mState;
|
||||
}
|
||||
|
||||
void Node::clearConnectivity()
|
||||
{
|
||||
mAssociatedEdgeIds.clear();
|
||||
mAssociatedFaceIds.clear();
|
||||
}
|
||||
|
||||
unsigned Node::getNumConnectedEdges() const
|
||||
{
|
||||
return mAssociatedEdgeIds.size();
|
||||
}
|
||||
|
||||
unsigned Node::getNumConnectedFaces() const
|
||||
{
|
||||
return mAssociatedFaceIds.size();
|
||||
}
|
||||
|
||||
void Node::associateEdge(unsigned edgeId)
|
||||
{
|
||||
mAssociatedEdgeIds.push_back(edgeId);
|
||||
}
|
||||
|
||||
void Node::associateFace(unsigned faceId)
|
||||
{
|
||||
mAssociatedFaceIds.push_back(faceId);
|
||||
}
|
||||
|
||||
unsigned Node::getConnectedEdgeId(std::size_t idx) const
|
||||
{
|
||||
return mAssociatedEdgeIds[idx];
|
||||
}
|
||||
|
||||
unsigned Node::getConnectedFaceId(std::size_t idx) const
|
||||
{
|
||||
return mAssociatedFaceIds[idx];
|
||||
}
|
||||
|
||||
void Node::setIndex(std::size_t idx)
|
||||
{
|
||||
mIndex = idx;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue