children.end();
}
/** Returns the transform for this group's coordinate system. */
protected Matrix4 computeTransform () {
Matrix3 worldTransform = this.worldTransform;
Matrix3 localTransform = this.localTransform;
float originX = this.originX;
float originY = this.originY;
float rotation = this.rotation;
float scaleX = this.scaleX;
float scaleY = this.scaleY;
if (originX != 0 || originY != 0)
localTransform.setToTranslation(originX, originY);
else
localTransform.idt();
if (rotation != 0) localTransform.rotate(rotation);
if (scaleX != 1 || scaleY != 1) localTransform.scale(scaleX, scaleY);
if (originX != 0 || originY != 0) localTransform.translate(-originX, -originY);
localTransform.trn(x, y);
// Find the first parent that transforms.
Group parentGroup = parent;
while (parentGroup != null) {
if (parentGroup.transform) break;