Switch to template types for vectors

This commit is contained in:
jmsgrogan 2023-01-30 14:53:49 +00:00
parent 9f036d6438
commit 8192ef78e8
105 changed files with 1614 additions and 1424 deletions

View file

@ -14,7 +14,7 @@ void WireNode::setContent(Wire* wire)
mContentDirty = true;
}
void WireNode::setInputLocation(const Point& point)
void WireNode::setInputLocation(const Point2& point)
{
if (mInputLocation != point)
{
@ -23,7 +23,7 @@ void WireNode::setInputLocation(const Point& point)
}
}
void WireNode::setOutputLocation(const Point& point)
void WireNode::setOutputLocation(const Point2& point)
{
if (mOutputLocation != point)
{
@ -46,9 +46,9 @@ void WireNode::createOrUpdateGeometry(SceneInfo*)
if (!mLine)
{
auto loc = mOutputLocation;
loc.move(-mInputLocation.getX(), -mInputLocation.getY(), -mInputLocation.getZ());
loc.moveBy(-mInputLocation.getX(), -mInputLocation.getY(), -mInputLocation.getZ());
std::vector<Point> points;
std::vector<Point2> points;
if (loc.getY() == 0.0)
{
@ -56,8 +56,8 @@ void WireNode::createOrUpdateGeometry(SceneInfo*)
}
else
{
auto join0 = Point(loc.getX() * 3.0 / 4.0, 0.0);
auto join1 = Point(loc.getX() * 3.0 / 4.0, loc.getY());
auto join0 = Point2(loc.getX() * 3.0 / 4.0, 0.0);
auto join1 = Point2(loc.getX() * 3.0 / 4.0, loc.getY());
points = { join0, join1 , loc};
}