Clean up use of transforms in scene graph.

This commit is contained in:
jmsgrogan 2023-01-19 17:37:26 +00:00
parent 3915a40c96
commit f26ee2ebc4
37 changed files with 238 additions and 242 deletions

View file

@ -7,6 +7,14 @@ class Transform
public:
Transform(const Point& location = {}, double scaleX = 1.0, double scaleY = 1.0, double scaleZ = 1.0);
void applyPre(const Transform& transform)
{
mLocation.move(transform.getLocation().getX(), transform.getLocation().getY(), transform.getLocation().getZ());
mScaleX *= transform.getScaleX();
mScaleY *= transform.getScaleY();
mScaleZ *= transform.getScaleZ();
}
void setLocation(const Point& loc);
void setScale(double scaleX, double scaleY = 1.0, double scaleZ = 1.0);