ClippingRegionNode --> ClippingRectangleNode

This commit is contained in:
SunLightJuly 2014-10-11 11:49:01 +08:00
parent 88acc56e56
commit a36dbf5362
12 changed files with 45 additions and 45 deletions

View File

@ -1811,10 +1811,10 @@
B60C5BD519AC68B10056FBDE /* CCBillBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */; };
B60C5BD619AC68B10056FBDE /* CCBillBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = B60C5BD319AC68B10056FBDE /* CCBillBoard.h */; };
B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = B60C5BD319AC68B10056FBDE /* CCBillBoard.h */; };
DABC9FA919E7DFA900FA252C /* CCClippingRegionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRegionNode.cpp */; };
DABC9FAA19E7DFA900FA252C /* CCClippingRegionNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRegionNode.cpp */; };
DABC9FAB19E7DFA900FA252C /* CCClippingRegionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRegionNode.h */; };
DABC9FAC19E7DFA900FA252C /* CCClippingRegionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRegionNode.h */; };
DABC9FA919E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */; };
DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */; };
DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */; };
DABC9FAC19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */; };
ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; };
ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; };
ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; };
@ -2800,8 +2800,8 @@
B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MotorJoint.h; sourceTree = "<group>"; };
B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBillBoard.cpp; sourceTree = "<group>"; };
B60C5BD319AC68B10056FBDE /* CCBillBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBillBoard.h; sourceTree = "<group>"; };
DABC9FA719E7DFA900FA252C /* CCClippingRegionNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCClippingRegionNode.cpp; sourceTree = "<group>"; };
DABC9FA819E7DFA900FA252C /* CCClippingRegionNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCClippingRegionNode.h; sourceTree = "<group>"; };
DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCClippingRectangleNode.cpp; sourceTree = "<group>"; };
DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCClippingRectangleNode.h; sourceTree = "<group>"; };
ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCNodeGrid.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeGrid.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -3204,8 +3204,8 @@
1A5701FF180BCBBD0088DEC7 /* misc-nodes */ = {
isa = PBXGroup;
children = (
DABC9FA719E7DFA900FA252C /* CCClippingRegionNode.cpp */,
DABC9FA819E7DFA900FA252C /* CCClippingRegionNode.h */,
DABC9FA719E7DFA900FA252C /* CCClippingRectangleNode.cpp */,
DABC9FA819E7DFA900FA252C /* CCClippingRectangleNode.h */,
ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */,
ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */,
1A57020C180BCBF40088DEC7 /* CCProgressTimer.cpp */,
@ -4848,7 +4848,7 @@
15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */,
46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */,
15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */,
DABC9FAB19E7DFA900FA252C /* CCClippingRegionNode.h in Headers */,
DABC9FAB19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */,
50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */,
15AE19EB19AAD3A700C27E9E /* SlotData.h in Headers */,
B276EF631988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */,
@ -5353,7 +5353,7 @@
1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */,
15AE195C19AAD35100C27E9E /* CCSGUIReader.h in Headers */,
5034CA3A191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */,
DABC9FAC19E7DFA900FA252C /* CCClippingRegionNode.h in Headers */,
DABC9FAC19E7DFA900FA252C /* CCClippingRectangleNode.h in Headers */,
50ABBEC41925AB6F00A911A9 /* CCVector.h in Headers */,
50ABBE501925AB6F00A911A9 /* CCEventCustom.h in Headers */,
15AE1AD719AAD40300C27E9E /* b2WheelJoint.h in Headers */,
@ -6182,7 +6182,7 @@
15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */,
1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */,
50ABBD541925AB0000A911A9 /* TransformUtils.cpp in Sources */,
DABC9FA919E7DFA900FA252C /* CCClippingRegionNode.cpp in Sources */,
DABC9FA919E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */,
3E2F27A619CFBFE100E7C490 /* AudioEngine.cpp in Sources */,
15AE1A3619AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */,
50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */,
@ -6317,7 +6317,7 @@
1A570072180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */,
15AE1ABC19AAD40300C27E9E /* b2PolygonAndCircleContact.cpp in Sources */,
15AE1ADA19AAD41000C27E9E /* b2Rope.cpp in Sources */,
DABC9FAA19E7DFA900FA252C /* CCClippingRegionNode.cpp in Sources */,
DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */,
15AE1BF119AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */,
15AE1B8419AADA9A00C27E9E /* UITextField.cpp in Sources */,
15AE198E19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */,

View File

@ -1,5 +1,5 @@
#include "CCClippingRegionNode.h"
#include "CCClippingRectangleNode.h"
#include "base/CCDirector.h"
#include "renderer/CCRenderer.h"
#include "math/Vec2.h"
@ -7,9 +7,9 @@
NS_CC_BEGIN
ClippingRegionNode* ClippingRegionNode::create(const Rect& clippingRegion)
ClippingRectangleNode* ClippingRectangleNode::create(const Rect& clippingRegion)
{
ClippingRegionNode* node = new ClippingRegionNode();
ClippingRectangleNode* node = new ClippingRectangleNode();
if (node && node->init()) {
node->setClippingRegion(clippingRegion);
node->autorelease();
@ -20,9 +20,9 @@ ClippingRegionNode* ClippingRegionNode::create(const Rect& clippingRegion)
return node;
}
ClippingRegionNode* ClippingRegionNode::create()
ClippingRectangleNode* ClippingRectangleNode::create()
{
ClippingRegionNode* node = new ClippingRegionNode();
ClippingRectangleNode* node = new ClippingRectangleNode();
if (node && node->init()) {
node->autorelease();
} else {
@ -32,12 +32,12 @@ ClippingRegionNode* ClippingRegionNode::create()
return node;
}
void ClippingRegionNode::setClippingRegion(const Rect &clippingRegion)
void ClippingRectangleNode::setClippingRegion(const Rect &clippingRegion)
{
_clippingRegion = clippingRegion;
}
void ClippingRegionNode::onBeforeVisitScissor()
void ClippingRectangleNode::onBeforeVisitScissor()
{
if (_clippingEnabled) {
glEnable(GL_SCISSOR_TEST);
@ -60,7 +60,7 @@ void ClippingRegionNode::onBeforeVisitScissor()
}
}
void ClippingRegionNode::onAfterVisitScissor()
void ClippingRectangleNode::onAfterVisitScissor()
{
if (_clippingEnabled)
{
@ -68,16 +68,16 @@ void ClippingRegionNode::onAfterVisitScissor()
}
}
void ClippingRegionNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
void ClippingRectangleNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
_beforeVisitCmdScissor.init(_globalZOrder);
_beforeVisitCmdScissor.func = CC_CALLBACK_0(ClippingRegionNode::onBeforeVisitScissor, this);
_beforeVisitCmdScissor.func = CC_CALLBACK_0(ClippingRectangleNode::onBeforeVisitScissor, this);
renderer->addCommand(&_beforeVisitCmdScissor);
Node::visit(renderer, parentTransform, parentFlags);
_afterVisitCmdScissor.init(_globalZOrder);
_afterVisitCmdScissor.func = CC_CALLBACK_0(ClippingRegionNode::onAfterVisitScissor, this);
_afterVisitCmdScissor.func = CC_CALLBACK_0(ClippingRectangleNode::onAfterVisitScissor, this);
renderer->addCommand(&_afterVisitCmdScissor);
}

View File

@ -25,8 +25,8 @@
*
*/
#ifndef __MISCNODE_CCCLIPPING_REGION_NODE_H__
#define __MISCNODE_CCCLIPPING_REGION_NODE_H__
#ifndef __MISCNODE_CCCLIPPING_RECTANGLE_NODE_H__
#define __MISCNODE_CCCLIPPING_RECTANGLE_NODE_H__
#include "2d/CCNode.h"
#include "renderer/CCCustomCommand.h"
@ -34,11 +34,11 @@
NS_CC_BEGIN
class CC_DLL ClippingRegionNode : public Node
class CC_DLL ClippingRectangleNode : public Node
{
public:
static ClippingRegionNode* create(const Rect& clippingRegion);
static ClippingRegionNode* create();
static ClippingRectangleNode* create(const Rect& clippingRegion);
static ClippingRectangleNode* create();
const Rect& getClippingRegion() const {
return _clippingRegion;
@ -56,7 +56,7 @@ public:
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
protected:
ClippingRegionNode()
ClippingRectangleNode()
: _clippingEnabled(true)
{
}

View File

@ -455,7 +455,7 @@
<ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="CCClippingRegionNode.cpp" />
<ClCompile Include="CCClippingRectangleNode.cpp" />
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
<ClCompile Include="CCDrawingPrimitives.cpp" />
@ -673,7 +673,7 @@
<ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="CCClippingNode.h" />
<ClInclude Include="CCClippingRegionNode.h" />
<ClInclude Include="CCClippingRectangleNode.h" />
<ClInclude Include="CCComponent.h" />
<ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="CCDrawingPrimitives.h" />

View File

@ -155,7 +155,7 @@
<ClCompile Include="CCClippingNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCClippingRegionNode.cpp">
<ClCompile Include="CCClippingRectangleNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCComponent.cpp">
@ -726,7 +726,7 @@
<ClInclude Include="CCClippingNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCClippingRegionNode.h">
<ClInclude Include="CCClippingRectangleNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCComponent.h">

View File

@ -389,7 +389,7 @@
<ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="CCClippingRegionNode.cpp" />
<ClCompile Include="CCClippingRectangleNode.cpp" />
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
<ClCompile Include="CCDrawingPrimitives.cpp" />
@ -626,7 +626,7 @@
<ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="CCClippingNode.h" />
<ClInclude Include="CCClippingRegionNode.h" />
<ClInclude Include="CCClippingRectangleNode.h" />
<ClInclude Include="CCComponent.h" />
<ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="CCDrawingPrimitives.h" />

View File

@ -166,7 +166,7 @@
<ClCompile Include="CCClippingNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCClippingRegionNode.cpp">
<ClCompile Include="CCClippingRectangleNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCComponent.cpp">
@ -787,7 +787,7 @@
<ClInclude Include="CCClippingNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCClippingRegionNode.h">
<ClInclude Include="CCClippingRectangleNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCComponent.h">

View File

@ -448,7 +448,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="CCClippingRegionNode.cpp" />
<ClCompile Include="CCClippingRectangleNode.cpp" />
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
<ClCompile Include="CCDrawingPrimitives.cpp" />
@ -829,7 +829,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="CCClippingNode.h" />
<ClInclude Include="CCClippingRegionNode.h" />
<ClInclude Include="CCClippingRectangleNode.h" />
<ClInclude Include="CCComponent.h" />
<ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="CCDrawingPrimitives.h" />

View File

@ -322,7 +322,7 @@
<ClCompile Include="CCClippingNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCClippingRegionNode.cpp">
<ClCompile Include="CCClippingRectangleNode.cpp">
<Filter>2d</Filter>
</ClCompile>
<ClCompile Include="CCComponent.cpp">
@ -1297,7 +1297,7 @@
<ClInclude Include="CCClippingNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCClippingRegionNode.h">
<ClInclude Include="CCClippingRectangleNode.h">
<Filter>2d</Filter>
</ClInclude>
<ClInclude Include="CCComponent.h">

View File

@ -25,7 +25,7 @@ cocos2d.cpp \
2d/CCAnimationCache.cpp \
2d/CCAtlasNode.cpp \
2d/CCClippingNode.cpp \
2d/CCClippingRegionNode.cpp \
2d/CCClippingRectangleNode.cpp \
2d/CCComponent.cpp \
2d/CCComponentContainer.cpp \
2d/CCDrawNode.cpp \

View File

@ -125,7 +125,7 @@ THE SOFTWARE.
#include "2d/CCMenu.h"
#include "2d/CCMenuItem.h"
#include "2d/CCClippingNode.h"
#include "2d/CCClippingRegionNode.h"
#include "2d/CCClippingRectangleNode.h"
#include "2d/CCMotionStreak.h"
#include "2d/CCProgressTimer.h"
#include "2d/CCRenderTexture.h"

View File

@ -81,8 +81,8 @@
"cocos/2d/CCAtlasNode.h",
"cocos/2d/CCClippingNode.cpp",
"cocos/2d/CCClippingNode.h",
"cocos/2d/CCClippingRegionNode.cpp",
"cocos/2d/CCClippingRegionNode.h",
"cocos/2d/CCClippingRectangleNode.cpp",
"cocos/2d/CCClippingRectangleNode.h",
"cocos/2d/CCComponent.cpp",
"cocos/2d/CCComponent.h",
"cocos/2d/CCComponentContainer.cpp",