Start adding grid
This commit is contained in:
parent
9301769d58
commit
f04d86e0ad
37 changed files with 709 additions and 211 deletions
|
@ -0,0 +1,40 @@
|
|||
#include "AbstractMesh.h"
|
||||
|
||||
void AbstractMesh::addConstantNodeVectorAttribute(const std::string& tag, const std::vector<double>& values)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::vector<double> > AbstractMesh::getNodeVectorAttributes(const std::string& tag)
|
||||
{
|
||||
std::vector<std::vector<double> > attribs(mNodes.size());
|
||||
return attribs;
|
||||
}
|
||||
|
||||
void AbstractMesh::addVectorAttribute(const std::string& tag, const std::vector<double>& values)
|
||||
{
|
||||
mVectorAttributes[tag] = values;
|
||||
}
|
||||
|
||||
bool AbstractMesh::hasVectorAttribute(const std::string& tag) const
|
||||
{
|
||||
return mVectorAttributes.find(tag) != mVectorAttributes.end();
|
||||
}
|
||||
|
||||
std::vector<double> AbstractMesh::getVectorAttribute(const std::string& tag) const
|
||||
{
|
||||
auto iter = mVectorAttributes.find(tag);
|
||||
if (iter != mVectorAttributes.end())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void AbstractMesh::scale(double scaleX, double scaleY)
|
||||
{
|
||||
for (auto& node : mNodes)
|
||||
{
|
||||
node->scale(scaleX, scaleY);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue