Switch to template types for vectors
This commit is contained in:
parent
9f036d6438
commit
8192ef78e8
105 changed files with 1614 additions and 1424 deletions
|
@ -18,22 +18,22 @@ bool Scale::isEqual(const Scale& scale) const
|
|||
return mX == scale.mX && mY == scale.mY && mZ == scale.mZ;
|
||||
}
|
||||
|
||||
Transform::Transform(const Point& location, const Scale& scale, const Rotation& rotation)
|
||||
Transform::Transform(const Point3& location, const Scale& scale, const Rotation& rotation)
|
||||
: mLocation(location),
|
||||
mScale(scale),
|
||||
mRotation(rotation),
|
||||
mMatrix(4, 4)
|
||||
mMatrix()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Transform::applyPre(const Transform& transform)
|
||||
{
|
||||
mLocation.move(transform.getLocation().getX(), transform.getLocation().getY(), transform.getLocation().getZ());
|
||||
mLocation.moveBy(transform.getLocation().getX(), transform.getLocation().getY(), transform.getLocation().getZ());
|
||||
mScale *= transform.getScale();
|
||||
}
|
||||
|
||||
const Point& Transform::getLocation() const
|
||||
const Point3& Transform::getLocation() const
|
||||
{
|
||||
return mLocation;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ bool Transform::isIdentityTransform() const
|
|||
return mLocation.isAtOrigin() && mScale.isIdentity();
|
||||
}
|
||||
|
||||
void Transform::setLocation(const Point& loc)
|
||||
void Transform::setLocation(const Point3& loc)
|
||||
{
|
||||
if (mLocation != loc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue