Example #1
0
  private void nodeToWorldTransform(CGAffineTransform ret) {
    ret.setTransform(nodeToParentTransform());

    for (CCNode p = parent_; p != null; p = p.parent_) {
      CGAffineTransformUtil.preConcate(ret, p.nodeToParentTransform());
    }
  }
Example #2
0
  /**
   * Returns the inverse local affine transform matrix
   *
   * @since v0.7.1
   */
  public CGAffineTransform parentToNodeTransform() {
    if (isInverseDirty_) {
      CGAffineTransformUtil.inverse(nodeToParentTransform(), inverse_);

      isInverseDirty_ = false;
    }

    return inverse_;
  }
Example #3
0
 /** This is analog method, result is written to ret. No garbage. */
 private void worldToNodeTransform(CGAffineTransform ret) {
   nodeToWorldTransform(ret);
   CGAffineTransformUtil.inverse(ret);
 }