From b9af1004939f8d064cd2774968e80526eddb4244 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Tue, 8 Apr 2014 21:45:54 +0800 Subject: [PATCH] visit() using Matrix instead of kmMat4 --- cocos/2d/CCClippingNode.cpp | 2 +- cocos/2d/CCClippingNode.h | 2 +- cocos/2d/CCLabel.cpp | 2 +- cocos/2d/CCLabel.h | 2 +- cocos/2d/CCLabelTTF.cpp | 2 +- cocos/2d/CCLabelTTF.h | 2 +- cocos/2d/CCNode.cpp | 2 +- cocos/2d/CCNode.h | 2 +- cocos/2d/CCNodeGrid.cpp | 2 +- cocos/2d/CCNodeGrid.h | 2 +- cocos/2d/CCParallaxNode.cpp | 2 +- cocos/2d/CCParallaxNode.h | 2 +- cocos/2d/CCParticleBatchNode.cpp | 2 +- cocos/2d/CCParticleBatchNode.h | 2 +- cocos/2d/CCRenderTexture.cpp | 2 +- cocos/2d/CCRenderTexture.h | 2 +- cocos/2d/CCSpriteBatchNode.cpp | 2 +- cocos/2d/CCSpriteBatchNode.h | 2 +- cocos/2d/CCTextFieldTTF.cpp | 2 +- cocos/2d/CCTextFieldTTF.h | 2 +- cocos/editor-support/cocostudio/CCArmature.cpp | 2 +- cocos/editor-support/cocostudio/CCArmature.h | 2 +- cocos/editor-support/cocostudio/CCBatchNode.cpp | 2 +- cocos/editor-support/cocostudio/CCBatchNode.h | 4 +++- cocos/ui/CCProtectedNode.cpp | 2 +- cocos/ui/CCProtectedNode.h | 2 +- cocos/ui/UILayout.cpp | 2 +- cocos/ui/UILayout.h | 2 +- cocos/ui/UIRichText.cpp | 2 +- cocos/ui/UIRichText.h | 2 +- cocos/ui/UIWidget.cpp | 2 +- cocos/ui/UIWidget.h | 2 +- extensions/GUI/CCControlExtension/CCScale9Sprite.cpp | 2 +- extensions/GUI/CCControlExtension/CCScale9Sprite.h | 2 +- extensions/GUI/CCEditBox/CCEditBox.cpp | 2 +- extensions/GUI/CCEditBox/CCEditBox.h | 2 +- extensions/GUI/CCScrollView/CCScrollView.cpp | 2 +- extensions/GUI/CCScrollView/CCScrollView.h | 2 +- 38 files changed, 40 insertions(+), 38 deletions(-) diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 0dd9086c18..6111de4b13 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -200,7 +200,7 @@ void ClippingNode::drawFullScreenQuadClearStencil() } -void ClippingNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void ClippingNode::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if(!_visible) return; diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 5d9d05b632..29431ee4a3 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -95,7 +95,7 @@ public: * @lua NA */ virtual void onExit() override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; CC_CONSTRUCTOR_ACCESS: ClippingNode(); diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 40594f95d5..5b8c0bb231 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -1098,7 +1098,7 @@ void Label::drawTextSprite(Renderer *renderer, bool parentTransformUpdated) _textSprite->visit(renderer, _modelViewTransform, parentTransformUpdated); } -void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Label::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (! _visible || _originalUTF8String.empty()) { diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 1dcab8ea88..b6f9af71a2 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -240,7 +240,7 @@ public: virtual Rect getBoundingBox() const override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** Listen "come to background" message diff --git a/cocos/2d/CCLabelTTF.cpp b/cocos/2d/CCLabelTTF.cpp index 581d52274b..d374baa1be 100644 --- a/cocos/2d/CCLabelTTF.cpp +++ b/cocos/2d/CCLabelTTF.cpp @@ -262,7 +262,7 @@ void LabelTTF::setFlippedY(bool flippedY) } } -void LabelTTF::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void LabelTTF::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (_contentDirty) { diff --git a/cocos/2d/CCLabelTTF.h b/cocos/2d/CCLabelTTF.h index a480ba5542..898ca8f6be 100644 --- a/cocos/2d/CCLabelTTF.h +++ b/cocos/2d/CCLabelTTF.h @@ -150,7 +150,7 @@ public: * @lua NA */ virtual std::string getDescription() const override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual const Size& getContentSize() const override; protected: Label* _renderLabel; diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 410d37f8d7..38ffd5e77f 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -938,7 +938,7 @@ void Node::visit() visit(renderer, parentTransform, true); } -void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Node::visit(Renderer* renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 37b1e37b72..09a5121c53 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -929,7 +929,7 @@ public: /** * Visits this node's children and draw them recursively. */ - virtual void visit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformUpdated); + virtual void visit(Renderer *renderer, const Matrix& parentTransform, bool parentTransformUpdated); virtual void visit() final; diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index d772f06ecf..b74bc1d4f7 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -82,7 +82,7 @@ void NodeGrid::onGridEndDraw() } } -void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void NodeGrid::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) diff --git a/cocos/2d/CCNodeGrid.h b/cocos/2d/CCNodeGrid.h index 626b2d43e8..de7e2faf52 100644 --- a/cocos/2d/CCNodeGrid.h +++ b/cocos/2d/CCNodeGrid.h @@ -55,7 +55,7 @@ public: void setTarget(Node *target); // overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; protected: NodeGrid(); diff --git a/cocos/2d/CCParallaxNode.cpp b/cocos/2d/CCParallaxNode.cpp index 19b3b6b96d..b0d8bd9e85 100644 --- a/cocos/2d/CCParallaxNode.cpp +++ b/cocos/2d/CCParallaxNode.cpp @@ -145,7 +145,7 @@ The positions are updated at visit because: - using a timer is not guaranteed that it will called after all the positions were updated - overriding "draw" will only precise if the children have a z > 0 */ -void ParallaxNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void ParallaxNode::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // Point pos = position_; // Point pos = [self convertToWorldSpace:Point::ZERO]; diff --git a/cocos/2d/CCParallaxNode.h b/cocos/2d/CCParallaxNode.h index 7f74bba10c..235cf4aaf2 100644 --- a/cocos/2d/CCParallaxNode.h +++ b/cocos/2d/CCParallaxNode.h @@ -67,7 +67,7 @@ public: virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; protected: /** Adds a child to the container with a z-order, a parallax ratio and a position offset diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 2dd6fb05bf..8d904be6d4 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -120,7 +120,7 @@ bool ParticleBatchNode::initWithFile(const std::string& fileImage, int capacity) // override visit. // Don't call visit on it's children -void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void ParticleBatchNode::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // CAREFUL: // This visit is almost identical to Node#visit diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index c8a1c2116c..b07f008253 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -91,7 +91,7 @@ public: inline void setTextureAtlas(TextureAtlas* atlas) { _textureAtlas = atlas; }; // Overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 96dd498fcc..486ab6e313 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -383,7 +383,7 @@ void RenderTexture::clearStencil(int stencilValue) glClearStencil(stencilClearValue); } -void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void RenderTexture::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // override visit. // Don't call visit on its children diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 2ca4a53f92..140dafb45b 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -154,7 +154,7 @@ public: }; // Overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; //flag: use stack matrix computed from scene hierarchy or generate new modelView and projection matrix diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index be75f11f69..845cd901f0 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -131,7 +131,7 @@ SpriteBatchNode::~SpriteBatchNode() // override visit // don't call visit on it's children -void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void SpriteBatchNode::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { CC_PROFILER_START_CATEGORY(kProfilerCategoryBatchSprite, "CCSpriteBatchNode - visit"); diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index b35b0fe610..ade6d387c2 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -155,7 +155,7 @@ public: */ virtual const BlendFunc& getBlendFunc() const override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index b12bd2dd8a..0c2138aae5 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -263,7 +263,7 @@ void TextFieldTTF::setTextColor(const Color4B &color) Label::setTextColor(_colorText); } -void TextFieldTTF::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void TextFieldTTF::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (_delegate && _delegate->onVisit(this,renderer,parentTransform,parentTransformUpdated)) { diff --git a/cocos/2d/CCTextFieldTTF.h b/cocos/2d/CCTextFieldTTF.h index 0d14ab4e31..e2acc31c16 100644 --- a/cocos/2d/CCTextFieldTTF.h +++ b/cocos/2d/CCTextFieldTTF.h @@ -165,7 +165,7 @@ public: virtual void setSecureTextEntry(bool value); virtual bool isSecureTextEntry(); - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; protected: ////////////////////////////////////////////////////////////////////////// diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index ccc6a38219..8f8b0a4e09 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -445,7 +445,7 @@ void Armature::onExit() } -void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Armature::visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) diff --git a/cocos/editor-support/cocostudio/CCArmature.h b/cocos/editor-support/cocostudio/CCArmature.h index 19c2ff5aa9..591ef46719 100644 --- a/cocos/editor-support/cocostudio/CCArmature.h +++ b/cocos/editor-support/cocostudio/CCArmature.h @@ -159,7 +159,7 @@ public: * @js NA * @lua NA */ - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void update(float dt) override; diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 0e70acb721..342311e06f 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -101,7 +101,7 @@ void BatchNode::removeChild(Node* child, bool cleanup) Node::removeChild(child, cleanup); } -void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void BatchNode::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) diff --git a/cocos/editor-support/cocostudio/CCBatchNode.h b/cocos/editor-support/cocostudio/CCBatchNode.h index 56acaf0f15..88dae9973f 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.h +++ b/cocos/editor-support/cocostudio/CCBatchNode.h @@ -34,6 +34,8 @@ namespace cocos2d { namespace cocostudio { +USING_NS_CC_MATH; + class BatchNode : public cocos2d::Node { public: @@ -56,7 +58,7 @@ public: virtual void addChild(cocos2d::Node *pChild, int zOrder) override; virtual void addChild(cocos2d::Node *pChild, int zOrder, int tag) override; virtual void removeChild(cocos2d::Node* child, bool cleanup) override; - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: diff --git a/cocos/ui/CCProtectedNode.cpp b/cocos/ui/CCProtectedNode.cpp index 812af89a26..e7ebbf564b 100644 --- a/cocos/ui/CCProtectedNode.cpp +++ b/cocos/ui/CCProtectedNode.cpp @@ -272,7 +272,7 @@ void ProtectedNode::reorderProtectedChild(cocos2d::Node *child, int localZOrder) child->_setLocalZOrder(localZOrder); } -void ProtectedNode::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void ProtectedNode::visit(Renderer* renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) diff --git a/cocos/ui/CCProtectedNode.h b/cocos/ui/CCProtectedNode.h index df96cd463c..b46c4b6452 100644 --- a/cocos/ui/CCProtectedNode.h +++ b/cocos/ui/CCProtectedNode.h @@ -127,7 +127,7 @@ public: /// @} end of Children and Parent - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool transformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool transformUpdated) override; virtual void cleanup() override; diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 074cc7855f..66afaa03db 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -712,7 +712,7 @@ bool Layout::hitTest(const Point &pt) return false; } -void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Layout::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (!_enabled) { diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index 8d56d44610..8df850d708 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -240,7 +240,7 @@ public: */ virtual void addChild(Node* child, int zOrder, int tag) override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void removeChild(Node* child, bool cleanup = true) override; diff --git a/cocos/ui/UIRichText.cpp b/cocos/ui/UIRichText.cpp index 178ca2870e..a0d46239f7 100644 --- a/cocos/ui/UIRichText.cpp +++ b/cocos/ui/UIRichText.cpp @@ -420,7 +420,7 @@ void RichText::pushToContainer(cocos2d::Node *renderer) _elementRenders[_elementRenders.size()-1]->pushBack(renderer); } -void RichText::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void RichText::visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (_enabled) { diff --git a/cocos/ui/UIRichText.h b/cocos/ui/UIRichText.h index d5e0f176b2..5a0b1ca37a 100644 --- a/cocos/ui/UIRichText.h +++ b/cocos/ui/UIRichText.h @@ -102,7 +102,7 @@ public: void pushBackElement(RichElement* element); void removeElement(int index); void removeElement(RichElement* element); - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; void setVerticalSpace(float space); virtual void setAnchorPoint(const Point &pt); virtual const Size& getContentSize() const; diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp index d35c7b38a2..eaeccdda36 100644 --- a/cocos/ui/UIWidget.cpp +++ b/cocos/ui/UIWidget.cpp @@ -108,7 +108,7 @@ void Widget::onExit() ProtectedNode::onExit(); } -void Widget::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Widget::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if (_enabled) { diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index 0f2aa4d40c..5e790df5a1 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -208,7 +208,7 @@ public: */ virtual Widget* getChildByName(const char* name); - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(cocos2d::Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; /** * Sets the touch event target/selector of the menu item diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp index 2f8437cd19..269c49e14d 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp @@ -764,7 +764,7 @@ void Scale9Sprite::setInsetBottom(float insetBottom) this->updateCapInset(); } -void Scale9Sprite::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void Scale9Sprite::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { if(this->_positionsAreDirty) { diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/extensions/GUI/CCControlExtension/CCScale9Sprite.h index 14cc00c402..25a126868f 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.h @@ -261,7 +261,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; virtual void setOpacityModifyRGB(bool bValue) override; virtual bool isOpacityModifyRGB(void) const override; virtual void setOpacity(GLubyte opacity) override; diff --git a/extensions/GUI/CCEditBox/CCEditBox.cpp b/extensions/GUI/CCEditBox/CCEditBox.cpp index 32f37f6e4f..6f00a086ff 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.cpp +++ b/extensions/GUI/CCEditBox/CCEditBox.cpp @@ -318,7 +318,7 @@ void EditBox::setAnchorPoint(const Point& anchorPoint) } } -void EditBox::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void EditBox::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { ControlButton::visit(renderer, parentTransform, parentTransformUpdated); if (_editBoxImpl != NULL) diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h index 5ecb9cca27..7d7bef3061 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ b/extensions/GUI/CCEditBox/CCEditBox.h @@ -379,7 +379,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; /** * @js NA * @lua NA diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index 3fa1da9a81..99518576e2 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -553,7 +553,7 @@ void ScrollView::onAfterDraw() } } -void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) +void ScrollView::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) { // quick return if not visible if (!isVisible()) diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index 4dc5871bc9..d3863dc479 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -225,7 +225,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override;