private void nodeToWorldTransform(CGAffineTransform ret) { ret.setTransform(nodeToParentTransform()); for (CCNode p = parent_; p != null; p = p.parent_) { CGAffineTransformUtil.preConcate(ret, p.nodeToParentTransform()); } }
/** * Returns the inverse local affine transform matrix * * @since v0.7.1 */ public CGAffineTransform parentToNodeTransform() { if (isInverseDirty_) { CGAffineTransformUtil.inverse(nodeToParentTransform(), inverse_); isInverseDirty_ = false; } return inverse_; }
/** This is analog method, result is written to ret. No garbage. */ private void worldToNodeTransform(CGAffineTransform ret) { nodeToWorldTransform(ret); CGAffineTransformUtil.inverse(ret); }