Fix linux build.
This commit is contained in:
parent
c5363327e8
commit
198caa700b
16 changed files with 34 additions and 24 deletions
|
@ -27,6 +27,15 @@ Transform::Transform(const Point3& location, const Scale& scale, const Rotation&
|
|||
|
||||
}
|
||||
|
||||
Transform::Transform(const Point2& location, const Scale& scale, const Rotation& rotation)
|
||||
: mLocation(Point<3>::from(location)),
|
||||
mScale(scale),
|
||||
mRotation(rotation),
|
||||
mMatrix()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Transform::applyPre(const Transform& transform)
|
||||
{
|
||||
mLocation.moveBy(transform.getLocation().getX(), transform.getLocation().getY(), transform.getLocation().getZ());
|
||||
|
|
|
@ -37,6 +37,8 @@ class Transform
|
|||
public:
|
||||
Transform(const Point3& location = {}, const Scale& scale = {}, const Rotation& rotation = {});
|
||||
|
||||
Transform(const Point2& location, const Scale& scale = {}, const Rotation& rotation = {});
|
||||
|
||||
void applyPre(const Transform& transform);
|
||||
|
||||
const Point3& getLocation() const;
|
||||
|
|
|
@ -7,10 +7,9 @@
|
|||
#include <numeric>
|
||||
|
||||
template<std::size_t DIM>
|
||||
Point<DIM>::Point(const Point<2>& p)
|
||||
: Point(p.getX(), p.getY())
|
||||
Point<DIM> Point<DIM>::from(const Point<2>& p)
|
||||
{
|
||||
|
||||
return Point<DIM>(p.getX(), p.getY());
|
||||
}
|
||||
|
||||
template<std::size_t DIM>
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
Point(const Vector<double, DIM>& v);
|
||||
|
||||
Point(const Point<2>& p);
|
||||
static Point<DIM> from(const Point<2>& p);
|
||||
|
||||
Point(const Point<DIM>& p) = default;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue