void TransformHelp::transformToParent(BaseData &node, const BaseData &parentNode) { nodeToMatrix(node, m_tHelpMatrix1); nodeToMatrix(parentNode, m_tHelpMatrix2); m_tHelpMatrix1 = AffineTransformConcat(m_tHelpMatrix1, m_tHelpMatrix2); matrixToNode(m_tHelpMatrix1, node); }
void TransformHelp::transformToParent(Node &node, const Node &parentNode) { nodeToMatrix(node, helpMatrix1); nodeToMatrix(parentNode, helpMatrix2); helpMatrix1 = CCAffineTransformConcat(helpMatrix1, helpMatrix2); matrixToNode(helpMatrix1, node); }
void TransformHelp::transformFromParent(BaseData &node, const BaseData &parentNode) { nodeToMatrix(node, helpMatrix1); nodeToMatrix(parentNode, helpMatrix2); helpMatrix2 = AffineTransformInvert(helpMatrix2); helpMatrix1 = AffineTransformConcat(helpMatrix1, helpMatrix2); matrixToNode(helpMatrix1, node); }
void TransformHelp::transformToParentWithoutScale(BaseData &node, const BaseData &parentNode) { helpParentNode.copy(&parentNode); helpParentNode.m_fScaleX = 1; helpParentNode.m_fScaleY = 1; nodeToMatrix(node, m_tHelpMatrix1); nodeToMatrix(helpParentNode, m_tHelpMatrix2); m_tHelpMatrix1 = AffineTransformConcat(m_tHelpMatrix1, m_tHelpMatrix2); matrixToNode(m_tHelpMatrix1, node); }
void TransformHelp::transformToParentWithoutScale(Node &node, const Node &parentNode) { helpParentNode.copy(&parentNode); helpParentNode.scaleX = 1; helpParentNode.scaleY = 1; nodeToMatrix(node, helpMatrix1); nodeToMatrix(helpParentNode, helpMatrix2); helpMatrix1 = CCAffineTransformConcat(helpMatrix1, helpMatrix2); matrixToNode(helpMatrix1, node); }
void TransformHelp::transformFromParentWithoutScale(BaseData &node, const BaseData &parentNode) { helpParentNode.copy(&parentNode); helpParentNode.scaleX = 1; helpParentNode.scaleY = 1; nodeToMatrix(node, helpMatrix1); nodeToMatrix(helpParentNode, helpMatrix2); helpMatrix2 = AffineTransformInvert(helpMatrix2); helpMatrix1 = AffineTransformConcat(helpMatrix1, helpMatrix2); matrixToNode(helpMatrix1, node); }