Fix linux build.

This commit is contained in:
James Grogan 2023-02-06 12:00:10 +00:00
parent 8192ef78e8
commit c5363327e8
9 changed files with 31 additions and 29 deletions

View file

@ -24,7 +24,7 @@ Matrix<T, M, N>::Matrix(T value, InputType inputType)
}
template<typename T, std::size_t M, std::size_t N>
void Matrix<T, M, N>::applyTo(Vector<T, N>& v) const
void Matrix<T, M, N>::applyTo(Vector<T, N>&) const
{
}

View file

@ -75,7 +75,7 @@ bool Vector<T, DIM>::equals(const Vector<T, DIM>& v) const
}
template<typename T, std::size_t DIM>
void Vector<T, DIM>::inPlaceMultiply(double v)
void Vector<T, DIM>::inPlaceMultiply(double)
{
//std::transform(mData.begin(), mData.end(), mData.begin(), std::bind(std::multiplies<double>(), std::placeholders::_1, v));
}
@ -118,14 +118,14 @@ double Vector<T, DIM>::getSelfInnerProduct() const
}
template<typename T, std::size_t DIM>
double Vector<T, DIM>::innerPoduct(const Vector<T, DIM>& v) const
double Vector<T, DIM>::innerPoduct(const Vector<T, DIM>&) const
{
return 0.0;
//return std::inner_product(mData.begin(), mData.end(), v.mData.begin(), 0.0);
}
template<typename T, std::size_t DIM>
Vector<T, DIM> Vector<T, DIM>::crossProduct(const Vector<T, DIM>& v) const
Vector<T, DIM> Vector<T, DIM>::crossProduct(const Vector<T, DIM>&) const
{
return Vector<T, DIM>();
//return Vector(v.mY * mZ - v.mZ * mY, v.mZ * mX - v.mX * mZ, v.mX * mY - v.mY * mX);
@ -143,7 +143,7 @@ Vector<T, DIM> Vector<T, DIM>::getNormalized() const
}
template<typename T, std::size_t DIM>
void Vector<T, DIM>::scale(const std::vector<double>& factors)
void Vector<T, DIM>::scale(const std::vector<double>&)
{
//std::transform(mData.begin(), mData.end(), factors.begin(), mData.begin(), std::multiplies<double>());
}

View file

@ -7,30 +7,30 @@ namespace ntk{
class Arc : public Curve<2>
{
public:
Arc(const Vector2& endoffset, double rX, double rY, double rotation = 0, bool largeArc = false, bool sweep = false);
Arc(const Vector2& endoffset, double rX, double rY, double rotation = 0, bool largeArc = false, bool sweep = false);
Vector2 getEndOffset() const override;
Vector2 getEndOffset() const override;
Bounds getBounds() const override;
Bounds getBounds() const override;
CurveType getCurveType() const override;
CurveType getCurveType() const override;
double getRx() const;
double getRx() const;
double getRy() const;
double getRy() const;
double getRotation() const;
double getRotation() const;
bool getUseLargeArc() const;
bool getUseLargeArc() const;
bool getSweepParam() const;
bool getSweepParam() const;
private:
Vector2 mEndOffset;
double mRx{ 0.0 };
double mRy{ 0.0 };
double mRotation{ 0 };
bool mLargeArc{ false };
bool mSweep{ false };
Vector2 mEndOffset;
double mRx{ 0.0 };
double mRy{ 0.0 };
double mRotation{ 0 };
bool mLargeArc{ false };
bool mSweep{ false };
};
}

View file

@ -14,7 +14,7 @@ template<std::size_t DIM>
class Curve : public PathElement<DIM>
{
public:
Curve::Type getType() const override
AbstractGeometricItem::Type getType() const override
{
return Curve::Type::CURVE;
}

View file

@ -17,6 +17,8 @@ public:
Point(const Point<2>& p);
Point(const Point<DIM>& p) = default;
Point(const DiscretePoint& point);
Point(const Point<DIM>& reference, double offSetX, double offSetY, double offSetZ = 0);

View file

@ -14,7 +14,7 @@ LineNode::Type LineNode::getType()
return Type::Line;
}
void LineNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
void LineNode::createOrUpdateGeometry(SceneInfo*)
{
auto line = std::make_unique<Line2>(mPoints);
mBackgroundItem = std::make_unique<SceneModel>(std::move(line));

View file

@ -26,7 +26,7 @@ void PolygonNode::setPoints(const std::vector<Point2>& points)
mGeometryIsDirty = true;
}
void PolygonNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
void PolygonNode::createOrUpdateGeometry(SceneInfo*)
{
auto polygon = std::make_unique<Polygon2>(mPoints);

View file

@ -33,7 +33,7 @@ void PathNode::setPathString(const std::string& psPath)
mPathString = psPath;
}
void PathNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
void PathNode::createOrUpdateGeometry(SceneInfo*)
{
auto path = std::make_unique<GeometryPath>();
PostscriptReader reader;

View file

@ -75,7 +75,7 @@ void SvgPainter::paintMesh(SvgDocument* document, SceneModel* model, bool showOu
{
const auto x = loc.getX() * transform.getScale().mX + transform.getLocation().getX();
const auto y = loc.getY() * transform.getScale().mY + transform.getLocation().getY();
points[count] = { x, y };
points.push_back({x, y});
count++;
}
svg_tri->setPoints(points);