diff --git a/transform.go b/transform.go index f567aa034130c5664637c09317ca53ed3deba608..2d73b56307a4950ba3cbcba88fc3405b725723f3 100644 --- a/transform.go +++ b/transform.go @@ -27,6 +27,26 @@ func Position(position Vec) Transform { } } +// GetPosition returns the position of a transform. +func (t Transform) GetPosition() Vec { + return t.pos +} + +// GetAnchor returns the anchor of a transform. +func (t Transform) GetAnchor() Vec { + return t.anc +} + +// GetScale returns the scale (2 dimensional) of transform. +func (t Transform) GetScale() Vec { + return t.sca +} + +// GetRotation returns the rotation of a transform (in radians). +func (t Transform) GetRotation() float64 { + return t.rot +} + // Position sets position. func (t Transform) Position(position Vec) Transform { t.pos = position