Clean up use of transforms in scene graph.
This commit is contained in:
parent
3915a40c96
commit
f26ee2ebc4
37 changed files with 238 additions and 242 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue