merge v3 to v3_glviewattrs

This commit is contained in:
huangshiwu 2014-08-21 10:18:55 +08:00
commit 2369a5900d
238 changed files with 11171 additions and 3479 deletions

12
AUTHORS
View File

@ -804,6 +804,9 @@ Developers:
Android jni error clear & more readable log
Add support of software PVRTC v1 decompression
Fixed a bug that ttf font have not effect on Mac OS X
Fixed a bug that before touchMove Touch::_prevPoint contains junk
Added Device::setKeepScreenOn()
Fixed Label performance problem
youknowone
Adds iOS-like elastic bounceback support for cocos2d::extension::ScrollView
@ -914,12 +917,15 @@ Developers:
Fix a bug that crash happened when try to remove videoView(STATE_PLAYBACK_COMPLETED) in android
Fix video scale issue in iOS
Fix iOS VideoPlayer memory leak
Added c++11 random library support
billtt
Fixed a bug that Node::setScale(float) may not work properly
Teivaz
Custom uniform search optimization
Fixed compiling error on WP8.
Added method for custom precompiled shader program loading on WP8
chareice
Make `setup.py` work on zsh
@ -974,6 +980,12 @@ Developers:
DavidPartouche
Fixed the bug that video player not showing on iOS if it's not in FullScreen mode
zaWasp
Added support for applicationDidEnterBackground / applicationWillEnterForeground on win32
xiangxw
Fixed the bug that Console::sendPrompt() will send extra `\0`
Retired Core Developers:
WenSheng Yang

View File

@ -1,18 +1,31 @@
cocos2d-x-3.3 ??
[NEW] Added submesh support, and support attaching a Sprite3D object to a bone
[NEW] Added UIScale9Sprite
[NEW] Added Camera
[NEW] Added Camera, AABB, OBB and Ray
[NEW] Added render primitive and render primitive command, support passing point, line and triangle data
[NEW] Added support for applicationDidEnterBackground / applicationWillEnterForeground on desktop
[NEW] Added method for custom precompiled shader program loading on WP8
[NEW] Added c++11 random support
[NEW] Device: added setKeepScreenOn() for iOS and Android
[NEW] EventMouse: support getDelta, getDeltaX, getDeltaY functions
[NEW] FileUtils: add isDirectoryExist(), createDirectory(), removeDirectory(), removeFile(), renameFile()
getFileSize()
[NEW] FileUtilsApple: allow setting bundle to use in file utils on iOS and Mac OS X
[NEW] Image: support of software PVRTC v1 decompression
[NEW] Lua-binding: added release_print that can print log even in release mode
[NEW] Physics Integration: can invoke update in demand
[NEW] RenderTexture: add a call back function for saveToFile()
[NEW] RotateTo: added 3D rotation support
[NEW] ScrollView: added `setMinScale()` and `setMaxScale()`
[NEW] Sprite3D: added setCullFace() and setCullFaceEnabled()
[NEW] Sprite3D: added getBoundingBox() and getAABB()
[NEW] SpriteFrameCache: load from plist file content data
[NEW] utils: added gettime()
[NEW] TextField: support utf8
[NEW] ui::Button: support customize how much zoom scale is when pressing a button
[NEW] ui::PageView: added `customScrollThreshold`, could determine the swipe distance to trigger a PageView scroll event
[NEW] ui::TextField: support utf8
[NEW] ui::TextField: support set color and placehold color
[NEW] ui::Widget: support swallowing touch events
[NEW] Text: added getter and setter for TextColor
[FIX] EditBox: font size is not scaled when glview is scaled on Mac OS X
@ -21,6 +34,7 @@ cocos2d-x-3.3 ??
[FIX] Label: setTextColor does not have any effect on Mac OS X
[FIX] Label: result of LabelTTF::getBoundingBox() is wrong
[FIX] Label: can not set outline color correctly if using system font on iOS
[FIX] Label: character edeg will be cut a little if character size is small
[FIX] LabelBMFont: result of LabelBMFont::getBoundingBox() is wrong
[FIX] ListView: can not insert an item in specific position, it is added at bottom
[FIX] LoadingBar: position is changed if changing direction

View File

@ -204,6 +204,9 @@ add_subdirectory(cocos/audio)
# cocos2d library
add_subdirectory(cocos)
# cocos3d library
add_subdirectory(cocos/3d)
# network library
add_subdirectory(cocos/network)

View File

@ -45,6 +45,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluaextension", "..\cocos
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluaspine", "..\cocos\scripting\lua-bindings\proj.win32\libluaspine.vcxproj", "{31EF6AB1-0D9A-4BC6-99B8-2C482EA373C4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos3d", "..\cocos\3d\proj.win32\libcocos3d.vcxproj", "{E24950FA-5BC1-4AEE-A900-4F0259354BF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos3d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos3d.vcxproj", "{06840490-14A4-43D6-88BC-AAFA44D043EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -139,6 +143,14 @@ Global
{31EF6AB1-0D9A-4BC6-99B8-2C482EA373C4}.Debug|Win32.Build.0 = Debug|Win32
{31EF6AB1-0D9A-4BC6-99B8-2C482EA373C4}.Release|Win32.ActiveCfg = Release|Win32
{31EF6AB1-0D9A-4BC6-99B8-2C482EA373C4}.Release|Win32.Build.0 = Release|Win32
{E24950FA-5BC1-4AEE-A900-4F0259354BF0}.Debug|Win32.ActiveCfg = Debug|Win32
{E24950FA-5BC1-4AEE-A900-4F0259354BF0}.Debug|Win32.Build.0 = Debug|Win32
{E24950FA-5BC1-4AEE-A900-4F0259354BF0}.Release|Win32.ActiveCfg = Release|Win32
{E24950FA-5BC1-4AEE-A900-4F0259354BF0}.Release|Win32.Build.0 = Release|Win32
{06840490-14A4-43D6-88BC-AAFA44D043EB}.Debug|Win32.ActiveCfg = Debug|Win32
{06840490-14A4-43D6-88BC-AAFA44D043EB}.Debug|Win32.Build.0 = Debug|Win32
{06840490-14A4-43D6-88BC-AAFA44D043EB}.Release|Win32.ActiveCfg = Release|Win32
{06840490-14A4-43D6-88BC-AAFA44D043EB}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -13,6 +13,7 @@
buildPhases = (
);
dependencies = (
1516202F199E76D9006099B8 /* PBXTargetDependency */,
B2F0AFEC198794EE002FE562 /* PBXTargetDependency */,
B2F0AFEE198794EE002FE562 /* PBXTargetDependency */,
B2F0AFF0198794EE002FE562 /* PBXTargetDependency */,
@ -33,6 +34,7 @@
buildPhases = (
);
dependencies = (
15162225199E7B9E006099B8 /* PBXTargetDependency */,
B2F0AFF619879508002FE562 /* PBXTargetDependency */,
B2F0AFF819879508002FE562 /* PBXTargetDependency */,
B2F0AFFA19879508002FE562 /* PBXTargetDependency */,
@ -50,6 +52,76 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
1516200C199E75C2006099B8 /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105175199CB1A600DC41CE /* CCAABB.cpp */; };
1516200D199E75C2006099B8 /* CCOBB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105177199CB1A600DC41CE /* CCOBB.cpp */; };
1516200E199E75C2006099B8 /* CCRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105179199CB1A600DC41CE /* CCRay.cpp */; };
1516200F199E75C2006099B8 /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA2A83E1987A6810077B3D4 /* CCSkeleton3D.cpp */; };
15162010199E75C2006099B8 /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E3198639EF00FA95D0 /* CCAttachNode.cpp */; };
15162011199E75C2006099B8 /* CCSubMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E5198639EF00FA95D0 /* CCSubMesh.cpp */; };
15162012199E75C2006099B8 /* CCSubMeshState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E7198639EF00FA95D0 /* CCSubMeshState.cpp */; };
15162013199E75C2006099B8 /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA4786E195478E00068D9D1 /* CCBundleReader.cpp */; };
15162014199E75C2006099B8 /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6AAF83F19404E0D0069DE01 /* CCBundle3D.cpp */; };
15162015199E75C2006099B8 /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD89C193DC0CC005E0B8A /* CCAnimate3D.cpp */; };
15162016199E75C2006099B8 /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD895193D6693005E0B8A /* CCMeshSkin.cpp */; };
15162017199E75C2006099B8 /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6B26341193884D60088FE25 /* CCAnimation3D.cpp */; };
15162018199E75C2006099B8 /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B91926D61F003EEF37 /* CCMesh.cpp */; };
15162019199E75C2006099B8 /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BB1926D61F003EEF37 /* CCObjLoader.cpp */; };
1516201A199E75C2006099B8 /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BD1926D61F003EEF37 /* CCSprite3D.cpp */; };
1516201B199E75C2006099B8 /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BF1926D61F003EEF37 /* CCSprite3DMaterial.cpp */; };
1516201C199E75FE006099B8 /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = B6105176199CB1A600DC41CE /* CCAABB.h */; };
1516201D199E75FE006099B8 /* CCOBB.h in Headers */ = {isa = PBXBuildFile; fileRef = B6105178199CB1A600DC41CE /* CCOBB.h */; };
1516201E199E75FE006099B8 /* CCRay.h in Headers */ = {isa = PBXBuildFile; fileRef = B610517A199CB1A600DC41CE /* CCRay.h */; };
1516201F199E75FE006099B8 /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA2A83F1987A6810077B3D4 /* CCSkeleton3D.h */; };
15162020199E75FE006099B8 /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E4198639EF00FA95D0 /* CCAttachNode.h */; };
15162021199E75FE006099B8 /* CCSubMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E6198639EF00FA95D0 /* CCSubMesh.h */; };
15162022199E75FF006099B8 /* CCSubMeshState.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E8198639EF00FA95D0 /* CCSubMeshState.h */; };
15162023199E75FF006099B8 /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA4786F195478E00068D9D1 /* CCBundleReader.h */; };
15162024199E75FF006099B8 /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6AAF84019404E0D0069DE01 /* CCBundle3D.h */; };
15162025199E75FF006099B8 /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD89D193DC0CC005E0B8A /* CCAnimate3D.h */; };
15162026199E75FF006099B8 /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD896193D6693005E0B8A /* CCMeshSkin.h */; };
15162027199E75FF006099B8 /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B26342193884D60088FE25 /* CCAnimation3D.h */; };
15162028199E75FF006099B8 /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B2633C19381FBF0088FE25 /* CCAnimationCurve.h */; };
15162029199E75FF006099B8 /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BA1926D61F003EEF37 /* CCMesh.h */; };
1516202A199E75FF006099B8 /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BC1926D61F003EEF37 /* CCObjLoader.h */; };
1516202B199E75FF006099B8 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BE1926D61F003EEF37 /* CCSprite3D.h */; };
1516202C199E75FF006099B8 /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594C01926D61F003EEF37 /* CCSprite3DMaterial.h */; };
1516202D199E75FF006099B8 /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3D3B81948613300BA4831 /* CCBundle3DData.h */; };
15162202199E7874006099B8 /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105175199CB1A600DC41CE /* CCAABB.cpp */; };
15162203199E7874006099B8 /* CCOBB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105177199CB1A600DC41CE /* CCOBB.cpp */; };
15162204199E7874006099B8 /* CCRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6105179199CB1A600DC41CE /* CCRay.cpp */; };
15162205199E7874006099B8 /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA2A83E1987A6810077B3D4 /* CCSkeleton3D.cpp */; };
15162206199E7874006099B8 /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E3198639EF00FA95D0 /* CCAttachNode.cpp */; };
15162207199E7874006099B8 /* CCSubMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E5198639EF00FA95D0 /* CCSubMesh.cpp */; };
15162208199E7874006099B8 /* CCSubMeshState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E7198639EF00FA95D0 /* CCSubMeshState.cpp */; };
15162209199E7874006099B8 /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA4786E195478E00068D9D1 /* CCBundleReader.cpp */; };
1516220A199E7874006099B8 /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6AAF83F19404E0D0069DE01 /* CCBundle3D.cpp */; };
1516220B199E7874006099B8 /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD89C193DC0CC005E0B8A /* CCAnimate3D.cpp */; };
1516220C199E7874006099B8 /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD895193D6693005E0B8A /* CCMeshSkin.cpp */; };
1516220D199E7874006099B8 /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6B26341193884D60088FE25 /* CCAnimation3D.cpp */; };
1516220E199E7874006099B8 /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B91926D61F003EEF37 /* CCMesh.cpp */; };
1516220F199E7874006099B8 /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BB1926D61F003EEF37 /* CCObjLoader.cpp */; };
15162210199E7874006099B8 /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BD1926D61F003EEF37 /* CCSprite3D.cpp */; };
15162211199E7874006099B8 /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BF1926D61F003EEF37 /* CCSprite3DMaterial.cpp */; };
15162212199E7A32006099B8 /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = B6105176199CB1A600DC41CE /* CCAABB.h */; };
15162213199E7A32006099B8 /* CCOBB.h in Headers */ = {isa = PBXBuildFile; fileRef = B6105178199CB1A600DC41CE /* CCOBB.h */; };
15162214199E7A32006099B8 /* CCRay.h in Headers */ = {isa = PBXBuildFile; fileRef = B610517A199CB1A600DC41CE /* CCRay.h */; };
15162215199E7A32006099B8 /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA2A83F1987A6810077B3D4 /* CCSkeleton3D.h */; };
15162216199E7A32006099B8 /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E4198639EF00FA95D0 /* CCAttachNode.h */; };
15162217199E7A32006099B8 /* CCSubMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E6198639EF00FA95D0 /* CCSubMesh.h */; };
15162218199E7A32006099B8 /* CCSubMeshState.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E8198639EF00FA95D0 /* CCSubMeshState.h */; };
15162219199E7A32006099B8 /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA4786F195478E00068D9D1 /* CCBundleReader.h */; };
1516221A199E7A32006099B8 /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6AAF84019404E0D0069DE01 /* CCBundle3D.h */; };
1516221B199E7A32006099B8 /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD89D193DC0CC005E0B8A /* CCAnimate3D.h */; };
1516221C199E7A32006099B8 /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD896193D6693005E0B8A /* CCMeshSkin.h */; };
1516221D199E7A32006099B8 /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B26342193884D60088FE25 /* CCAnimation3D.h */; };
1516221E199E7A32006099B8 /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B2633C19381FBF0088FE25 /* CCAnimationCurve.h */; };
1516221F199E7A32006099B8 /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BA1926D61F003EEF37 /* CCMesh.h */; };
15162220199E7A32006099B8 /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BC1926D61F003EEF37 /* CCObjLoader.h */; };
15162221199E7A32006099B8 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BE1926D61F003EEF37 /* CCSprite3D.h */; };
15162222199E7A32006099B8 /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594C01926D61F003EEF37 /* CCSprite3DMaterial.h */; };
15162223199E7A32006099B8 /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3D3B81948613300BA4831 /* CCBundle3DData.h */; };
15162237199F9EEA006099B8 /* cocos3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 15162236199F9EEA006099B8 /* cocos3d.h */; };
15162238199F9EEA006099B8 /* cocos3d.h in Headers */ = {isa = PBXBuildFile; fileRef = 15162236199F9EEA006099B8 /* cocos3d.h */; };
15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; };
15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */; };
15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */; };
@ -575,6 +647,10 @@
299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; };
299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 299754F3193EC95400A54AC3 /* ObjectFactory.h */; };
299754F7193EC95400A54AC3 /* ObjectFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 299754F3193EC95400A54AC3 /* ObjectFactory.h */; };
299CF1FB19A434BC00C378C1 /* ccRandom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299CF1F919A434BC00C378C1 /* ccRandom.cpp */; };
299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299CF1F919A434BC00C378C1 /* ccRandom.cpp */; };
299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; };
299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; };
3E6176681960F89B00DE83F5 /* CCController-iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176551960F89B00DE83F5 /* CCController-iOS.mm */; };
3E6176691960F89B00DE83F5 /* CCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176561960F89B00DE83F5 /* CCController.h */; };
3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176611960F89B00DE83F5 /* CCEventController.cpp */; };
@ -583,30 +659,10 @@
3E6176771960F89B00DE83F5 /* CCEventListenerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176641960F89B00DE83F5 /* CCEventListenerController.h */; };
3E6176781960F89B00DE83F5 /* CCGameController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176651960F89B00DE83F5 /* CCGameController.h */; };
3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E61781C1966A5A300DE83F5 /* CCController.cpp */; };
3E9E80E9198639EF00FA95D0 /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E3198639EF00FA95D0 /* CCAttachNode.cpp */; };
3E9E80EA198639EF00FA95D0 /* CCAttachNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E3198639EF00FA95D0 /* CCAttachNode.cpp */; };
3E9E80EB198639EF00FA95D0 /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E4198639EF00FA95D0 /* CCAttachNode.h */; };
3E9E80EC198639EF00FA95D0 /* CCAttachNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E4198639EF00FA95D0 /* CCAttachNode.h */; };
3E9E80ED198639EF00FA95D0 /* CCSubMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E5198639EF00FA95D0 /* CCSubMesh.cpp */; };
3E9E80EE198639EF00FA95D0 /* CCSubMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E5198639EF00FA95D0 /* CCSubMesh.cpp */; };
3E9E80EF198639EF00FA95D0 /* CCSubMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E6198639EF00FA95D0 /* CCSubMesh.h */; };
3E9E80F0198639EF00FA95D0 /* CCSubMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E6198639EF00FA95D0 /* CCSubMesh.h */; };
3E9E80F1198639EF00FA95D0 /* CCSubMeshState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E7198639EF00FA95D0 /* CCSubMeshState.cpp */; };
3E9E80F2198639EF00FA95D0 /* CCSubMeshState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9E80E7198639EF00FA95D0 /* CCSubMeshState.cpp */; };
3E9E80F3198639EF00FA95D0 /* CCSubMeshState.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E8198639EF00FA95D0 /* CCSubMeshState.h */; };
3E9E80F4198639EF00FA95D0 /* CCSubMeshState.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9E80E8198639EF00FA95D0 /* CCSubMeshState.h */; };
3EA2A8401987A6810077B3D4 /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA2A83E1987A6810077B3D4 /* CCSkeleton3D.cpp */; };
3EA2A8411987A6810077B3D4 /* CCSkeleton3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA2A83E1987A6810077B3D4 /* CCSkeleton3D.cpp */; };
3EA2A8421987A6810077B3D4 /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA2A83F1987A6810077B3D4 /* CCSkeleton3D.h */; };
3EA2A8431987A6810077B3D4 /* CCSkeleton3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA2A83F1987A6810077B3D4 /* CCSkeleton3D.h */; };
3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA3EDBA1991CDFA00645534 /* CCCamera.cpp */; };
3EA3EDBD1991CDFA00645534 /* CCCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA3EDBA1991CDFA00645534 /* CCCamera.cpp */; };
3EA3EDBE1991CDFA00645534 /* CCCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA3EDBB1991CDFA00645534 /* CCCamera.h */; };
3EA3EDBF1991CDFA00645534 /* CCCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA3EDBB1991CDFA00645534 /* CCCamera.h */; };
3EA47870195478E00068D9D1 /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA4786E195478E00068D9D1 /* CCBundleReader.cpp */; };
3EA47871195478E00068D9D1 /* CCBundleReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA4786E195478E00068D9D1 /* CCBundleReader.cpp */; };
3EA47872195478E00068D9D1 /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA4786F195478E00068D9D1 /* CCBundleReader.h */; };
3EA47873195478E00068D9D1 /* CCBundleReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA4786F195478E00068D9D1 /* CCBundleReader.h */; };
460E468118080832000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; };
460E468218080836000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; };
460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; };
@ -690,6 +746,10 @@
464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 464AD6E3197EBB1400E502D8 /* pvr.cpp */; };
464AD6E7197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; };
464AD6E8197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; };
46633BC4199DDB2F00F6E838 /* CCModuleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */; };
46633BC5199DDB2F00F6E838 /* CCModuleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */; };
46633BC6199DDB2F00F6E838 /* CCModuleManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46633BC3199DDB2F00F6E838 /* CCModuleManager.h */; };
46633BC7199DDB2F00F6E838 /* CCModuleManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46633BC3199DDB2F00F6E838 /* CCModuleManager.h */; };
46A160421807A5D4005B8026 /* Export.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE11807A56F005B8026 /* Export.h */; };
46A160431807A5D4005B8026 /* SimpleAudioEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FE21807A56F005B8026 /* SimpleAudioEngine.h */; };
46A160441807A5D4005B8026 /* CDAudioManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A15FF41807A56F005B8026 /* CDAudioManager.h */; };
@ -1297,22 +1357,6 @@
B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; };
B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; };
B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; };
B29594C21926D61F003EEF37 /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B91926D61F003EEF37 /* CCMesh.cpp */; };
B29594C31926D61F003EEF37 /* CCMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B91926D61F003EEF37 /* CCMesh.cpp */; };
B29594C41926D61F003EEF37 /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BA1926D61F003EEF37 /* CCMesh.h */; };
B29594C51926D61F003EEF37 /* CCMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BA1926D61F003EEF37 /* CCMesh.h */; };
B29594C61926D61F003EEF37 /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BB1926D61F003EEF37 /* CCObjLoader.cpp */; };
B29594C71926D61F003EEF37 /* CCObjLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BB1926D61F003EEF37 /* CCObjLoader.cpp */; };
B29594C81926D61F003EEF37 /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BC1926D61F003EEF37 /* CCObjLoader.h */; };
B29594C91926D61F003EEF37 /* CCObjLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BC1926D61F003EEF37 /* CCObjLoader.h */; };
B29594CA1926D61F003EEF37 /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BD1926D61F003EEF37 /* CCSprite3D.cpp */; };
B29594CB1926D61F003EEF37 /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BD1926D61F003EEF37 /* CCSprite3D.cpp */; };
B29594CC1926D61F003EEF37 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BE1926D61F003EEF37 /* CCSprite3D.h */; };
B29594CD1926D61F003EEF37 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594BE1926D61F003EEF37 /* CCSprite3D.h */; };
B29594CE1926D61F003EEF37 /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BF1926D61F003EEF37 /* CCSprite3DMaterial.cpp */; };
B29594CF1926D61F003EEF37 /* CCSprite3DMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594BF1926D61F003EEF37 /* CCSprite3DMaterial.cpp */; };
B29594D01926D61F003EEF37 /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594C01926D61F003EEF37 /* CCSprite3DMaterial.h */; };
B29594D11926D61F003EEF37 /* CCSprite3DMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594C01926D61F003EEF37 /* CCSprite3DMaterial.h */; };
B2C599BF1977703300B452DF /* CCBAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFB180E26E600808F54 /* CCBAnimationManager.h */; };
B2C599C01977703300B452DF /* CCBFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFD180E26E600808F54 /* CCBFileLoader.h */; };
B2C599C11977703300B452DF /* CCBKeyframe.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71CFF180E26E600808F54 /* CCBKeyframe.h */; };
@ -1583,8 +1627,6 @@
B2CC507719776C340041958E /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA4180E26E600808F54 /* SlotData.cpp */; };
B2CC507819776C340041958E /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71DA6180E26E600808F54 /* spine-cocos2dx.cpp */; };
B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A170721807CE7A005B8026 /* CCPhysicsJoint.cpp */; };
B2D3D3B91948613300BA4831 /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3D3B81948613300BA4831 /* CCBundle3DData.h */; };
B2D3D3BA1948613300BA4831 /* CCBundle3DData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3D3B81948613300BA4831 /* CCBundle3DData.h */; };
B2DB4764197661D500411E16 /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; };
B2DB4765197661E400411E16 /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D32E18E174130051CA34 /* UIHBox.cpp */; };
B2DB4766197661EE00411E16 /* UILayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9F818CF08D000240AA3 /* UILayout.cpp */; };
@ -1871,24 +1913,6 @@
B3AF01A31842FBA400A98B85 /* b2MotorJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */; };
B3B12A5A17E7F44000026B4A /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A03F2CB81780BD04006731B9 /* libchipmunk Mac.a */; };
B3B12A5B17E7F45C00026B4A /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A07A4F3B178387670073F6A7 /* libchipmunk iOS.a */; };
B6AAF84119404E0D0069DE01 /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6AAF83F19404E0D0069DE01 /* CCBundle3D.cpp */; };
B6AAF84219404E0D0069DE01 /* CCBundle3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6AAF83F19404E0D0069DE01 /* CCBundle3D.cpp */; };
B6AAF84319404E0D0069DE01 /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6AAF84019404E0D0069DE01 /* CCBundle3D.h */; };
B6AAF84419404E0D0069DE01 /* CCBundle3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6AAF84019404E0D0069DE01 /* CCBundle3D.h */; };
B6ACD897193D6693005E0B8A /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD895193D6693005E0B8A /* CCMeshSkin.cpp */; };
B6ACD898193D6693005E0B8A /* CCMeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD895193D6693005E0B8A /* CCMeshSkin.cpp */; };
B6ACD899193D6693005E0B8A /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD896193D6693005E0B8A /* CCMeshSkin.h */; };
B6ACD89A193D6693005E0B8A /* CCMeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD896193D6693005E0B8A /* CCMeshSkin.h */; };
B6ACD89E193DC0CC005E0B8A /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD89C193DC0CC005E0B8A /* CCAnimate3D.cpp */; };
B6ACD89F193DC0CC005E0B8A /* CCAnimate3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6ACD89C193DC0CC005E0B8A /* CCAnimate3D.cpp */; };
B6ACD8A0193DC0CC005E0B8A /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD89D193DC0CC005E0B8A /* CCAnimate3D.h */; };
B6ACD8A1193DC0CC005E0B8A /* CCAnimate3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6ACD89D193DC0CC005E0B8A /* CCAnimate3D.h */; };
B6B2633F19381FBF0088FE25 /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B2633C19381FBF0088FE25 /* CCAnimationCurve.h */; };
B6B2634019381FBF0088FE25 /* CCAnimationCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B2633C19381FBF0088FE25 /* CCAnimationCurve.h */; };
B6B26343193884D60088FE25 /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6B26341193884D60088FE25 /* CCAnimation3D.cpp */; };
B6B26344193884D60088FE25 /* CCAnimation3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6B26341193884D60088FE25 /* CCAnimation3D.cpp */; };
B6B26345193884D60088FE25 /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B26342193884D60088FE25 /* CCAnimation3D.h */; };
B6B26346193884D60088FE25 /* CCAnimation3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B26342193884D60088FE25 /* CCAnimation3D.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 */; };
@ -1898,6 +1922,20 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
1516202E199E76D9006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1551A336158F2AB200E66CFE /* Project object */;
proxyType = 1;
remoteGlobalIDString = 15161E42199E7362006099B8;
remoteInfo = "libcocos3d Mac";
};
15162224199E7B9E006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1551A336158F2AB200E66CFE /* Project object */;
proxyType = 1;
remoteGlobalIDString = 15162030199E7810006099B8;
remoteInfo = "libcocos3d iOS";
};
460E44F31807E241000CDD6D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1551A336158F2AB200E66CFE /* Project object */;
@ -2072,6 +2110,9 @@
06CAAABF186AD63B0012A414 /* TriggerMng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerMng.h; sourceTree = "<group>"; };
06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerObj.cpp; sourceTree = "<group>"; };
06CAAAC1186AD63B0012A414 /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = "<group>"; };
1516200B199E7363006099B8 /* libcocos3d Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos3d Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; };
15162201199E7810006099B8 /* libcocos3d iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos3d iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
15162236199F9EEA006099B8 /* cocos3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocos3d.h; sourceTree = "<group>"; };
1551A33F158F2AB200E66CFE /* libcocos2d Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2d Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1551A342158F2AB200E66CFE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCProtectedNode.cpp; sourceTree = "<group>"; };
@ -2457,6 +2498,8 @@
2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = "<group>"; };
299754F2193EC95400A54AC3 /* ObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFactory.cpp; path = ../base/ObjectFactory.cpp; sourceTree = "<group>"; };
299754F3193EC95400A54AC3 /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFactory.h; path = ../base/ObjectFactory.h; sourceTree = "<group>"; };
299CF1F919A434BC00C378C1 /* ccRandom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccRandom.cpp; path = ../base/ccRandom.cpp; sourceTree = "<group>"; };
299CF1FA19A434BC00C378C1 /* ccRandom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccRandom.h; path = ../base/ccRandom.h; sourceTree = "<group>"; };
29BDBA52195D597A003225C9 /* UIDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIDeprecated.cpp; sourceTree = "<group>"; };
29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutManager.cpp; sourceTree = "<group>"; };
29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutManager.h; sourceTree = "<group>"; };
@ -2505,6 +2548,8 @@
3EA4786F195478E00068D9D1 /* CCBundleReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBundleReader.h; sourceTree = "<group>"; };
464AD6E3197EBB1400E502D8 /* pvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pvr.cpp; path = ../base/pvr.cpp; sourceTree = "<group>"; };
464AD6E4197EBB1400E502D8 /* pvr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pvr.h; path = ../base/pvr.h; sourceTree = "<group>"; };
46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCModuleManager.cpp; path = ../base/CCModuleManager.cpp; sourceTree = "<group>"; };
46633BC3199DDB2F00F6E838 /* CCModuleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCModuleManager.h; path = ../base/CCModuleManager.h; sourceTree = "<group>"; };
46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = "<group>"; };
46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
@ -3065,6 +3110,12 @@
B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorldInfo_chipmunk.h; sourceTree = "<group>"; };
B3AF019E1842FBA400A98B85 /* b2MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MotorJoint.cpp; sourceTree = "<group>"; };
B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MotorJoint.h; sourceTree = "<group>"; };
B6105175199CB1A600DC41CE /* CCAABB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAABB.cpp; sourceTree = "<group>"; };
B6105176199CB1A600DC41CE /* CCAABB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAABB.h; sourceTree = "<group>"; };
B6105177199CB1A600DC41CE /* CCOBB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCOBB.cpp; sourceTree = "<group>"; };
B6105178199CB1A600DC41CE /* CCOBB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCOBB.h; sourceTree = "<group>"; };
B6105179199CB1A600DC41CE /* CCRay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCRay.cpp; sourceTree = "<group>"; };
B610517A199CB1A600DC41CE /* CCRay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRay.h; sourceTree = "<group>"; };
B6AAF83F19404E0D0069DE01 /* CCBundle3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBundle3D.cpp; sourceTree = "<group>"; };
B6AAF84019404E0D0069DE01 /* CCBundle3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBundle3D.h; sourceTree = "<group>"; };
B6ACD895193D6693005E0B8A /* CCMeshSkin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshSkin.cpp; sourceTree = "<group>"; };
@ -3080,6 +3131,20 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
15161F0B199E7362006099B8 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
15162101199E7810006099B8 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
1551A33C158F2AB200E66CFE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -3318,6 +3383,8 @@
B24EEA7619775ECE004493CC /* libcocosbuilder iOS.a */,
B24EEA7E19775EE1004493CC /* libspine iOS.a */,
B24EEA8619775EF3004493CC /* libnetwork iOS.a */,
1516200B199E7363006099B8 /* libcocos3d Mac.a */,
15162201199E7810006099B8 /* libcocos3d iOS.a */,
);
name = Products;
sourceTree = "<group>";
@ -3411,6 +3478,8 @@
1A570095180BC5B00088DEC7 /* base-nodes */ = {
isa = PBXGroup;
children = (
46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */,
46633BC3199DDB2F00F6E838 /* CCModuleManager.h */,
15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */,
15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */,
1A57009C180BC5D20088DEC7 /* CCNode.cpp */,
@ -3424,6 +3493,8 @@
1A5700A2180BC5E60088DEC7 /* base */ = {
isa = PBXGroup;
children = (
299CF1F919A434BC00C378C1 /* ccRandom.cpp */,
299CF1FA19A434BC00C378C1 /* ccRandom.h */,
3EA3EDBA1991CDFA00645534 /* CCCamera.cpp */,
3EA3EDBB1991CDFA00645534 /* CCCamera.h */,
464AD6E3197EBB1400E502D8 /* pvr.cpp */,
@ -5229,6 +5300,13 @@
B29594B81926D61F003EEF37 /* 3d */ = {
isa = PBXGroup;
children = (
15162236199F9EEA006099B8 /* cocos3d.h */,
B6105175199CB1A600DC41CE /* CCAABB.cpp */,
B6105176199CB1A600DC41CE /* CCAABB.h */,
B6105177199CB1A600DC41CE /* CCOBB.cpp */,
B6105178199CB1A600DC41CE /* CCOBB.h */,
B6105179199CB1A600DC41CE /* CCRay.cpp */,
B610517A199CB1A600DC41CE /* CCRay.h */,
3EA2A83E1987A6810077B3D4 /* CCSkeleton3D.cpp */,
3EA2A83F1987A6810077B3D4 /* CCSkeleton3D.h */,
3E9E80E3198639EF00FA95D0 /* CCAttachNode.cpp */,
@ -5266,6 +5344,58 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
15161F1A199E7362006099B8 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
1516201C199E75FE006099B8 /* CCAABB.h in Headers */,
1516201D199E75FE006099B8 /* CCOBB.h in Headers */,
1516201E199E75FE006099B8 /* CCRay.h in Headers */,
1516201F199E75FE006099B8 /* CCSkeleton3D.h in Headers */,
15162020199E75FE006099B8 /* CCAttachNode.h in Headers */,
15162021199E75FE006099B8 /* CCSubMesh.h in Headers */,
15162022199E75FF006099B8 /* CCSubMeshState.h in Headers */,
15162023199E75FF006099B8 /* CCBundleReader.h in Headers */,
15162024199E75FF006099B8 /* CCBundle3D.h in Headers */,
15162025199E75FF006099B8 /* CCAnimate3D.h in Headers */,
15162237199F9EEA006099B8 /* cocos3d.h in Headers */,
15162026199E75FF006099B8 /* CCMeshSkin.h in Headers */,
15162027199E75FF006099B8 /* CCAnimation3D.h in Headers */,
15162028199E75FF006099B8 /* CCAnimationCurve.h in Headers */,
15162029199E75FF006099B8 /* CCMesh.h in Headers */,
1516202A199E75FF006099B8 /* CCObjLoader.h in Headers */,
1516202B199E75FF006099B8 /* CCSprite3D.h in Headers */,
1516202C199E75FF006099B8 /* CCSprite3DMaterial.h in Headers */,
1516202D199E75FF006099B8 /* CCBundle3DData.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
15162109199E7810006099B8 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
15162212199E7A32006099B8 /* CCAABB.h in Headers */,
15162213199E7A32006099B8 /* CCOBB.h in Headers */,
15162214199E7A32006099B8 /* CCRay.h in Headers */,
15162215199E7A32006099B8 /* CCSkeleton3D.h in Headers */,
15162216199E7A32006099B8 /* CCAttachNode.h in Headers */,
15162217199E7A32006099B8 /* CCSubMesh.h in Headers */,
15162218199E7A32006099B8 /* CCSubMeshState.h in Headers */,
15162219199E7A32006099B8 /* CCBundleReader.h in Headers */,
1516221A199E7A32006099B8 /* CCBundle3D.h in Headers */,
1516221B199E7A32006099B8 /* CCAnimate3D.h in Headers */,
15162238199F9EEA006099B8 /* cocos3d.h in Headers */,
1516221C199E7A32006099B8 /* CCMeshSkin.h in Headers */,
1516221D199E7A32006099B8 /* CCAnimation3D.h in Headers */,
1516221E199E7A32006099B8 /* CCAnimationCurve.h in Headers */,
1516221F199E7A32006099B8 /* CCMesh.h in Headers */,
15162220199E7A32006099B8 /* CCObjLoader.h in Headers */,
15162221199E7A32006099B8 /* CCSprite3D.h in Headers */,
15162222199E7A32006099B8 /* CCSprite3DMaterial.h in Headers */,
15162223199E7A32006099B8 /* CCBundle3DData.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1551A33D158F2AB200E66CFE /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@ -5276,10 +5406,10 @@
50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */,
50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */,
50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */,
B29594D01926D61F003EEF37 /* CCSprite3DMaterial.h in Headers */,
1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */,
5034CA3F191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */,
50ABBD461925AB0000A911A9 /* CCVertex.h in Headers */,
46633BC6199DDB2F00F6E838 /* CCModuleManager.h in Headers */,
46A170E71807CECA005B8026 /* CCPhysicsBody.h in Headers */,
46A170EB1807CECA005B8026 /* CCPhysicsJoint.h in Headers */,
50ABBD3E1925AB0000A911A9 /* CCGeometry.h in Headers */,
@ -5314,13 +5444,11 @@
50ABBD8D1925AB4100A911A9 /* CCGLProgram.h in Headers */,
50ABBEA11925AB6F00A911A9 /* CCScheduler.h in Headers */,
50ABBDB71925AB4100A911A9 /* CCTexture2D.h in Headers */,
B2D3D3B91948613300BA4831 /* CCBundle3DData.h in Headers */,
50ABBE811925AB6F00A911A9 /* CCEventType.h in Headers */,
1A57008F180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */,
1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */,
50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */,
1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */,
3E9E80F3198639EF00FA95D0 /* CCSubMeshState.h in Headers */,
1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */,
50ABC0671926664800A911A9 /* CCPlatformDefine.h in Headers */,
46C02E0918E91123004B7456 /* xxhash.h in Headers */,
@ -5342,7 +5470,6 @@
1A5701BB180BCB5A0088DEC7 /* CCLabel.h in Headers */,
1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */,
50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */,
3E9E80EB198639EF00FA95D0 /* CCAttachNode.h in Headers */,
1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */,
50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */,
1A5701C9180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */,
@ -5391,7 +5518,6 @@
1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */,
50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */,
1A570298180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */,
B29594C81926D61F003EEF37 /* CCObjLoader.h in Headers */,
50ABBE911925AB6F00A911A9 /* CCPlatformMacros.h in Headers */,
50ABC05D1926664800A911A9 /* CCApplication.h in Headers */,
50ABC0071926664800A911A9 /* CCApplicationProtocol.h in Headers */,
@ -5414,7 +5540,6 @@
1A570302180BCE890088DEC7 /* CCParallaxNode.h in Headers */,
50ABBE4B1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */,
1A57030E180BCF190088DEC7 /* CCComponent.h in Headers */,
3E9E80EF198639EF00FA95D0 /* CCSubMesh.h in Headers */,
1A570312180BCF190088DEC7 /* CCComponentContainer.h in Headers */,
50ABBD851925AB4100A911A9 /* CCBatchCommand.h in Headers */,
50ABC0651926664800A911A9 /* CCGL.h in Headers */,
@ -5423,7 +5548,6 @@
1A01C69418F57BE800EFE3A6 /* CCFloat.h in Headers */,
1A57034D180BD09B0088DEC7 /* tinyxml2.h in Headers */,
1A570356180BD0B00088DEC7 /* ioapi.h in Headers */,
B29594C41926D61F003EEF37 /* CCMesh.h in Headers */,
50ABBE331925AB6F00A911A9 /* CCConfiguration.h in Headers */,
50ABC01F1926664800A911A9 /* CCThread.h in Headers */,
1A57035A180BD0B00088DEC7 /* unzip.h in Headers */,
@ -5439,6 +5563,7 @@
3EA3EDBE1991CDFA00645534 /* CCCamera.h in Headers */,
50ABBE8F1925AB6F00A911A9 /* CCPlatformConfig.h in Headers */,
50ABBE291925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */,
299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */,
50ABBE471925AB6F00A911A9 /* CCEvent.h in Headers */,
B257B4501989D5E800D9A687 /* CCPrimitive.h in Headers */,
50ABBE6B1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */,
@ -5446,10 +5571,8 @@
50ABBD3A1925AB0000A911A9 /* CCAffineTransform.h in Headers */,
50ABBE571925AB6F00A911A9 /* CCEventFocus.h in Headers */,
1A01C69218F57BE800EFE3A6 /* CCDouble.h in Headers */,
3EA2A8421987A6810077B3D4 /* CCSkeleton3D.h in Headers */,
50ABBE251925AB6F00A911A9 /* base64.h in Headers */,
50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */,
B29594CC1926D61F003EEF37 /* CCSprite3D.h in Headers */,
503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */,
50ABBD5A1925AB0000A911A9 /* Vec2.h in Headers */,
B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */,
@ -5463,7 +5586,6 @@
50ABC00F1926664800A911A9 /* CCFileUtils.h in Headers */,
50ABBE3B1925AB6F00A911A9 /* CCData.h in Headers */,
50ABBE3F1925AB6F00A911A9 /* CCDataVisitor.h in Headers */,
3EA47872195478E00068D9D1 /* CCBundleReader.h in Headers */,
50ABBD9D1925AB4100A911A9 /* ccGLStateCache.h in Headers */,
50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */,
50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */,
@ -5497,12 +5619,7 @@
50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */,
50ABC0091926664800A911A9 /* CCCommon.h in Headers */,
50ABBE531925AB6F00A911A9 /* CCEventDispatcher.h in Headers */,
B6B2633F19381FBF0088FE25 /* CCAnimationCurve.h in Headers */,
B6B26345193884D60088FE25 /* CCAnimation3D.h in Headers */,
464AD6E7197EBB1400E502D8 /* pvr.h in Headers */,
B6ACD899193D6693005E0B8A /* CCMeshSkin.h in Headers */,
B6ACD8A0193DC0CC005E0B8A /* CCAnimate3D.h in Headers */,
B6AAF84319404E0D0069DE01 /* CCBundle3D.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -5651,10 +5768,8 @@
50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */,
5034CA38191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */,
50ABBE7C1925AB6F00A911A9 /* CCEventMouse.h in Headers */,
B29594D11926D61F003EEF37 /* CCSprite3DMaterial.h in Headers */,
46A171011807CECB005B8026 /* CCPhysicsJoint.h in Headers */,
46A170FD1807CECB005B8026 /* CCPhysicsBody.h in Headers */,
B29594C51926D61F003EEF37 /* CCMesh.h in Headers */,
50ABBE9C1925AB6F00A911A9 /* CCRef.h in Headers */,
50ABBD961925AB4100A911A9 /* CCGLProgramState.h in Headers */,
46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */,
@ -5664,6 +5779,7 @@
50ABC0041926664800A911A9 /* CCLock.h in Headers */,
5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */,
50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */,
46633BC7199DDB2F00F6E838 /* CCModuleManager.h in Headers */,
50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */,
B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */,
50ABBE401925AB6F00A911A9 /* CCDataVisitor.h in Headers */,
@ -5685,13 +5801,11 @@
1A57007C180BC5A10088DEC7 /* CCActionInstant.h in Headers */,
3E6176751960F89B00DE83F5 /* CCEventController.h in Headers */,
50ABBE781925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */,
B2D3D3BA1948613300BA4831 /* CCBundle3DData.h in Headers */,
B37510861823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */,
1A570080180BC5A10088DEC7 /* CCActionInterval.h in Headers */,
1A570084180BC5A10088DEC7 /* CCActionManager.h in Headers */,
50ABC0141926664800A911A9 /* CCGLView.h in Headers */,
1A570088180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */,
3EA2A8431987A6810077B3D4 /* CCSkeleton3D.h in Headers */,
50ABBD9E1925AB4100A911A9 /* ccGLStateCache.h in Headers */,
1A57008C180BC5A10088DEC7 /* CCActionProgressTimer.h in Headers */,
1A570090180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */,
@ -5783,7 +5897,6 @@
5034CA44191D591100CE6051 /* ccShader_Label.vert in Headers */,
1A5702F5180BCE750088DEC7 /* CCTMXObjectGroup.h in Headers */,
1A5702F9180BCE750088DEC7 /* CCTMXTiledMap.h in Headers */,
3E9E80F0198639EF00FA95D0 /* CCSubMesh.h in Headers */,
1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */,
1A5702FD180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */,
1A570303180BCE890088DEC7 /* CCParallaxNode.h in Headers */,
@ -5813,7 +5926,6 @@
5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */,
503DD8EB1926736A00CD74DD /* CCGL.h in Headers */,
50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */,
3E9E80EC198639EF00FA95D0 /* CCAttachNode.h in Headers */,
503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */,
50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */,
50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */,
@ -5822,12 +5934,10 @@
50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */,
50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */,
5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */,
B29594CD1926D61F003EEF37 /* CCSprite3D.h in Headers */,
3E6176691960F89B00DE83F5 /* CCController.h in Headers */,
3E6176781960F89B00DE83F5 /* CCGameController.h in Headers */,
50ABBE641925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */,
50ABBD921925AB4100A911A9 /* CCGLProgramCache.h in Headers */,
B29594C91926D61F003EEF37 /* CCObjLoader.h in Headers */,
50ABBE961925AB6F00A911A9 /* CCProfiling.h in Headers */,
503DD8E01926736A00CD74DD /* CCApplication.h in Headers */,
50ABBD8E1925AB4100A911A9 /* CCGLProgram.h in Headers */,
@ -5837,6 +5947,7 @@
1A01C69718F57BE800EFE3A6 /* CCInteger.h in Headers */,
50ABBEBE1925AB6F00A911A9 /* ccUtils.h in Headers */,
50ABBE801925AB6F00A911A9 /* CCEventTouch.h in Headers */,
299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */,
50ABBDBC1925AB4100A911A9 /* CCTextureAtlas.h in Headers */,
50ABBE541925AB6F00A911A9 /* CCEventDispatcher.h in Headers */,
1A12775A18DFCC4F0005F345 /* CCTweenFunction.h in Headers */,
@ -5863,7 +5974,6 @@
50ABC0201926664800A911A9 /* CCThread.h in Headers */,
1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */,
50ABBE221925AB6F00A911A9 /* atitc.h in Headers */,
3EA47873195478E00068D9D1 /* CCBundleReader.h in Headers */,
50ABBED21925AB6F00A911A9 /* TGAlib.h in Headers */,
1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */,
503DD8EA1926736A00CD74DD /* CCESRenderer.h in Headers */,
@ -5875,14 +5985,8 @@
503DD8F11926736A00CD74DD /* OpenGL_Internal.h in Headers */,
B37510801823ACA100B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */,
50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */,
3E9E80F4198639EF00FA95D0 /* CCSubMeshState.h in Headers */,
50ABBE601925AB6F00A911A9 /* CCEventListener.h in Headers */,
50ABBEB21925AB6F00A911A9 /* CCUserDefault.h in Headers */,
B6B2634019381FBF0088FE25 /* CCAnimationCurve.h in Headers */,
B6B26346193884D60088FE25 /* CCAnimation3D.h in Headers */,
B6ACD89A193D6693005E0B8A /* CCMeshSkin.h in Headers */,
B6ACD8A1193DC0CC005E0B8A /* CCAnimate3D.h in Headers */,
B6AAF84419404E0D0069DE01 /* CCBundle3D.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -6374,6 +6478,40 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
15161E42199E7362006099B8 /* libcocos3d Mac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 15162008199E7363006099B8 /* Build configuration list for PBXNativeTarget "libcocos3d Mac" */;
buildPhases = (
15161E45199E7362006099B8 /* Sources */,
15161F0B199E7362006099B8 /* Frameworks */,
15161F1A199E7362006099B8 /* Headers */,
);
buildRules = (
);
dependencies = (
);
name = "libcocos3d Mac";
productName = cocos2dx;
productReference = 1516200B199E7363006099B8 /* libcocos3d Mac.a */;
productType = "com.apple.product-type.library.static";
};
15162030199E7810006099B8 /* libcocos3d iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 151621FE199E7810006099B8 /* Build configuration list for PBXNativeTarget "libcocos3d iOS" */;
buildPhases = (
15162033199E7810006099B8 /* Sources */,
15162101199E7810006099B8 /* Frameworks */,
15162109199E7810006099B8 /* Headers */,
);
buildRules = (
);
dependencies = (
);
name = "libcocos3d iOS";
productName = cocos2dx;
productReference = 15162201199E7810006099B8 /* libcocos3d iOS.a */;
productType = "com.apple.product-type.library.static";
};
1551A33E158F2AB200E66CFE /* libcocos2d Mac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1551A34C158F2AB200E66CFE /* Build configuration list for PBXNativeTarget "libcocos2d Mac" */;
@ -6748,6 +6886,7 @@
A03F2B781780BD04006731B9 /* libchipmunk Mac */,
A03F2D5D1780BDF7006731B9 /* libbox2d Mac */,
A03F2E9817814268006731B9 /* libcocosdenshion Mac */,
15161E42199E7362006099B8 /* libcocos3d Mac */,
A07A4E0B178386390073F6A7 /* build all libs iOS */,
A07A4C241783777C0073F6A7 /* libcocos2d iOS */,
A07A4E111783867C0073F6A7 /* libextension iOS */,
@ -6759,11 +6898,58 @@
B24EEA6F19775ECE004493CC /* libcocosbuilder iOS */,
B24EEA7719775EE1004493CC /* libspine iOS */,
B24EEA7F19775EF3004493CC /* libnetwork iOS */,
15162030199E7810006099B8 /* libcocos3d iOS */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
15161E45199E7362006099B8 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1516200C199E75C2006099B8 /* CCAABB.cpp in Sources */,
1516200D199E75C2006099B8 /* CCOBB.cpp in Sources */,
1516200E199E75C2006099B8 /* CCRay.cpp in Sources */,
1516200F199E75C2006099B8 /* CCSkeleton3D.cpp in Sources */,
15162010199E75C2006099B8 /* CCAttachNode.cpp in Sources */,
15162011199E75C2006099B8 /* CCSubMesh.cpp in Sources */,
15162012199E75C2006099B8 /* CCSubMeshState.cpp in Sources */,
15162013199E75C2006099B8 /* CCBundleReader.cpp in Sources */,
15162014199E75C2006099B8 /* CCBundle3D.cpp in Sources */,
15162015199E75C2006099B8 /* CCAnimate3D.cpp in Sources */,
15162016199E75C2006099B8 /* CCMeshSkin.cpp in Sources */,
15162017199E75C2006099B8 /* CCAnimation3D.cpp in Sources */,
15162018199E75C2006099B8 /* CCMesh.cpp in Sources */,
15162019199E75C2006099B8 /* CCObjLoader.cpp in Sources */,
1516201A199E75C2006099B8 /* CCSprite3D.cpp in Sources */,
1516201B199E75C2006099B8 /* CCSprite3DMaterial.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
15162033199E7810006099B8 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15162202199E7874006099B8 /* CCAABB.cpp in Sources */,
15162203199E7874006099B8 /* CCOBB.cpp in Sources */,
15162204199E7874006099B8 /* CCRay.cpp in Sources */,
15162205199E7874006099B8 /* CCSkeleton3D.cpp in Sources */,
15162206199E7874006099B8 /* CCAttachNode.cpp in Sources */,
15162207199E7874006099B8 /* CCSubMesh.cpp in Sources */,
15162208199E7874006099B8 /* CCSubMeshState.cpp in Sources */,
15162209199E7874006099B8 /* CCBundleReader.cpp in Sources */,
1516220A199E7874006099B8 /* CCBundle3D.cpp in Sources */,
1516220B199E7874006099B8 /* CCAnimate3D.cpp in Sources */,
1516220C199E7874006099B8 /* CCMeshSkin.cpp in Sources */,
1516220D199E7874006099B8 /* CCAnimation3D.cpp in Sources */,
1516220E199E7874006099B8 /* CCMesh.cpp in Sources */,
1516220F199E7874006099B8 /* CCObjLoader.cpp in Sources */,
15162210199E7874006099B8 /* CCSprite3D.cpp in Sources */,
15162211199E7874006099B8 /* CCSprite3DMaterial.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1551A33B158F2AB200E66CFE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -6789,7 +6975,6 @@
50ABBEBB1925AB6F00A911A9 /* ccUtils.cpp in Sources */,
15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */,
50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */,
3E9E80F1198639EF00FA95D0 /* CCSubMeshState.cpp in Sources */,
50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */,
50ABBE8B1925AB6F00A911A9 /* CCNS.cpp in Sources */,
46A170E81807CECA005B8026 /* CCPhysicsContact.cpp in Sources */,
@ -6799,6 +6984,7 @@
50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */,
1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */,
B257B44E1989D5E800D9A687 /* CCPrimitive.cpp in Sources */,
299CF1FB19A434BC00C378C1 /* ccRandom.cpp in Sources */,
1A57006D180BC5A10088DEC7 /* CCActionEase.cpp in Sources */,
1A570071180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */,
B37510761823AC9F00B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */,
@ -6814,13 +7000,13 @@
1A57008D180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */,
1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */,
50ABBEBF1925AB6F00A911A9 /* CCValue.cpp in Sources */,
3E9E80E9198639EF00FA95D0 /* CCAttachNode.cpp in Sources */,
1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */,
1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */,
B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */,
50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */,
B37510781823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.cpp in Sources */,
50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */,
46633BC4199DDB2F00F6E838 /* CCModuleManager.cpp in Sources */,
1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */,
50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */,
1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */,
@ -6833,7 +7019,6 @@
1A5701B1180BCB590088DEC7 /* CCFontFNT.cpp in Sources */,
1A5701B5180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */,
1A5701B9180BCB5A0088DEC7 /* CCLabel.cpp in Sources */,
3EA2A8401987A6810077B3D4 /* CCSkeleton3D.cpp in Sources */,
1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */,
50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */,
50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */,
@ -6846,7 +7031,6 @@
1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */,
50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */,
1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */,
3E9E80ED198639EF00FA95D0 /* CCSubMesh.cpp in Sources */,
1A5701E2180BCB8C0088DEC7 /* CCScene.cpp in Sources */,
1A12775C18DFCC590005F345 /* CCTweenFunction.cpp in Sources */,
1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */,
@ -6880,7 +7064,6 @@
50ABBEAF1925AB6F00A911A9 /* CCUserDefault.cpp in Sources */,
50ABBE791925AB6F00A911A9 /* CCEventMouse.cpp in Sources */,
50ABC0111926664800A911A9 /* CCGLView.cpp in Sources */,
B29594C21926D61F003EEF37 /* CCMesh.cpp in Sources */,
50ABBE3D1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */,
1A5702C8180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */,
50ABBE7D1925AB6F00A911A9 /* CCEventTouch.cpp in Sources */,
@ -6903,7 +7086,6 @@
1A57034B180BD09B0088DEC7 /* tinyxml2.cpp in Sources */,
1A570354180BD0B00088DEC7 /* ioapi.cpp in Sources */,
1A570358180BD0B00088DEC7 /* unzip.cpp in Sources */,
3EA47870195478E00068D9D1 /* CCBundleReader.cpp in Sources */,
50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */,
50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */,
50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */,
@ -6911,7 +7093,6 @@
50ABBD8B1925AB4100A911A9 /* CCGLProgram.cpp in Sources */,
464AD6E5197EBB1400E502D8 /* pvr.cpp in Sources */,
50ABBDA31925AB4100A911A9 /* CCQuadCommand.cpp in Sources */,
B29594C61926D61F003EEF37 /* CCObjLoader.cpp in Sources */,
50ABC01D1926664800A911A9 /* CCThread.cpp in Sources */,
50ABBECB1925AB6F00A911A9 /* s3tc.cpp in Sources */,
50ABBD481925AB0000A911A9 /* Mat4.cpp in Sources */,
@ -6922,7 +7103,6 @@
50ABBE751925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */,
50ABBE511925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */,
50ABC0051926664800A911A9 /* CCThread.mm in Sources */,
B29594CA1926D61F003EEF37 /* CCSprite3D.cpp in Sources */,
50ABC0631926664800A911A9 /* CCDevice.mm in Sources */,
50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */,
1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */,
@ -6940,7 +7120,6 @@
50ABBD9F1925AB4100A911A9 /* CCGroupCommand.cpp in Sources */,
50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */,
50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */,
B29594CE1926D61F003EEF37 /* CCSprite3DMaterial.cpp in Sources */,
299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */,
50ABC0211926664800A911A9 /* CCGLViewImpl.cpp in Sources */,
50ABC00D1926664800A911A9 /* CCFileUtils.cpp in Sources */,
@ -6957,10 +7136,6 @@
46C02E0718E91123004B7456 /* xxhash.c in Sources */,
50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */,
1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */,
B6B26343193884D60088FE25 /* CCAnimation3D.cpp in Sources */,
B6ACD897193D6693005E0B8A /* CCMeshSkin.cpp in Sources */,
B6ACD89E193DC0CC005E0B8A /* CCAnimate3D.cpp in Sources */,
B6AAF84119404E0D0069DE01 /* CCBundle3D.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -7114,7 +7289,6 @@
B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */,
B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */,
503DD8EE1926736A00CD74DD /* CCImage.mm in Sources */,
3EA47871195478E00068D9D1 /* CCBundleReader.cpp in Sources */,
B37510811823ACA100B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */,
46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */,
50ABBD941925AB4100A911A9 /* CCGLProgramState.cpp in Sources */,
@ -7123,7 +7297,6 @@
46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */,
1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */,
1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */,
3E9E80F2198639EF00FA95D0 /* CCSubMeshState.cpp in Sources */,
B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */,
1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */,
1A57006E180BC5A10088DEC7 /* CCActionEase.cpp in Sources */,
@ -7136,7 +7309,6 @@
50ABBE6E1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */,
50ABBE461925AB6F00A911A9 /* CCEvent.cpp in Sources */,
50ABBEA01925AB6F00A911A9 /* CCScheduler.cpp in Sources */,
3E9E80EA198639EF00FA95D0 /* CCAttachNode.cpp in Sources */,
50ABBE4E1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */,
50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */,
50ABBE5A1925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */,
@ -7151,7 +7323,6 @@
1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */,
1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */,
1A57008A180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */,
B29594CB1926D61F003EEF37 /* CCSprite3D.cpp in Sources */,
50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */,
1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */,
1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */,
@ -7160,7 +7331,6 @@
50ABBE3E1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */,
1A57009F180BC5D20088DEC7 /* CCNode.cpp in Sources */,
B37510831823ACA100B3BA6A /* CCPhysicsShapeInfo_chipmunk.cpp in Sources */,
B29594CF1926D61F003EEF37 /* CCSprite3DMaterial.cpp in Sources */,
1A57010F180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */,
1A570113180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */,
1A57011C180BC90D0088DEC7 /* CCGrabber.cpp in Sources */,
@ -7170,6 +7340,7 @@
1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */,
3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */,
50ABC00E1926664800A911A9 /* CCFileUtils.cpp in Sources */,
299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */,
50ABBE241925AB6F00A911A9 /* base64.cpp in Sources */,
1A5701A6180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */,
1A5701B2180BCB590088DEC7 /* CCFontFNT.cpp in Sources */,
@ -7209,7 +7380,6 @@
1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */,
50ABBD901925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */,
1A57027F180BCC900088DEC7 /* CCSprite.cpp in Sources */,
3EA2A8411987A6810077B3D4 /* CCSkeleton3D.cpp in Sources */,
1A570283180BCC900088DEC7 /* CCSpriteBatchNode.cpp in Sources */,
1A570287180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */,
1A57028B180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */,
@ -7228,6 +7398,7 @@
50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */,
50ABBDAE1925AB4100A911A9 /* CCRenderer.cpp in Sources */,
50ABBDBA1925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */,
46633BC5199DDB2F00F6E838 /* CCModuleManager.cpp in Sources */,
1A5702FB180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */,
1A570301180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */,
1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */,
@ -7244,7 +7415,6 @@
50ABBD881925AB4100A911A9 /* CCCustomCommand.cpp in Sources */,
50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */,
50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */,
B29594C31926D61F003EEF37 /* CCMesh.cpp in Sources */,
50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */,
503DD8E91926736A00CD74DD /* CCES2Renderer.m in Sources */,
5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */,
@ -7253,7 +7423,6 @@
503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */,
50ABBDB21925AB4100A911A9 /* ccShaders.cpp in Sources */,
50ABBD451925AB0000A911A9 /* CCVertex.cpp in Sources */,
B29594C71926D61F003EEF37 /* CCObjLoader.cpp in Sources */,
50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */,
50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */,
1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */,
@ -7271,7 +7440,6 @@
50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */,
3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */,
50ABBE361925AB6F00A911A9 /* CCConsole.cpp in Sources */,
3E9E80EE198639EF00FA95D0 /* CCSubMesh.cpp in Sources */,
503DD8E51926736A00CD74DD /* CCDirectorCaller.mm in Sources */,
50ABBD5D1925AB0000A911A9 /* Vec3.cpp in Sources */,
50ABC0121926664800A911A9 /* CCGLView.cpp in Sources */,
@ -7294,10 +7462,6 @@
50ABBE7A1925AB6F00A911A9 /* CCEventMouse.cpp in Sources */,
15EFA212198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */,
50ABBD981925AB4100A911A9 /* CCGLProgramStateCache.cpp in Sources */,
B6B26344193884D60088FE25 /* CCAnimation3D.cpp in Sources */,
B6ACD898193D6693005E0B8A /* CCMeshSkin.cpp in Sources */,
B6ACD89F193DC0CC005E0B8A /* CCAnimate3D.cpp in Sources */,
B6AAF84219404E0D0069DE01 /* CCBundle3D.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -7762,6 +7926,16 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
1516202F199E76D9006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 15161E42199E7362006099B8 /* libcocos3d Mac */;
targetProxy = 1516202E199E76D9006099B8 /* PBXContainerItemProxy */;
};
15162225199E7B9E006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 15162030199E7810006099B8 /* libcocos3d iOS */;
targetProxy = 15162224199E7B9E006099B8 /* PBXContainerItemProxy */;
};
460E44F41807E241000CDD6D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A03F2B781780BD04006731B9 /* libchipmunk Mac */;
@ -7875,6 +8049,106 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
15162009199E7363006099B8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD)";
EXECUTABLE_EXTENSION = a;
EXECUTABLE_PREFIX = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CC_TARGET_OS_MAC,
CC_KEYBOARD_SUPPORT,
_USRDLL,
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = "";
LD_DYLIB_INSTALL_NAME = "";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACH_O_TYPE = staticlib;
PRODUCT_NAME = "libcocos3d Mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../cocos/platform/desktop $(SRCROOT)/../external/glfw3/include/mac";
};
name = Debug;
};
1516200A199E7363006099B8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD)";
EXECUTABLE_EXTENSION = a;
EXECUTABLE_PREFIX = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CC_KEYBOARD_SUPPORT,
CC_TARGET_OS_MAC,
_USRDLL,
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = "";
LD_DYLIB_INSTALL_NAME = "";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACH_O_TYPE = staticlib;
PRODUCT_NAME = "libcocos3d Mac";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../cocos/platform/desktop $(SRCROOT)/../external/glfw3/include/mac";
};
name = Release;
};
151621FF199E7810006099B8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD)";
EXECUTABLE_PREFIX = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CC_TARGET_OS_IPHONE,
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
LIBRARY_SEARCH_PATHS = "";
PRODUCT_NAME = "libcocos3d iOS";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios";
};
name = Debug;
};
15162200199E7810006099B8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD)";
EXECUTABLE_PREFIX = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CC_TARGET_OS_IPHONE,
);
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
LIBRARY_SEARCH_PATHS = "";
PRODUCT_NAME = "libcocos3d iOS";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios";
};
name = Release;
};
1551A34A158F2AB200E66CFE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -8825,6 +9099,24 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
15162008199E7363006099B8 /* Build configuration list for PBXNativeTarget "libcocos3d Mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
15162009199E7363006099B8 /* Debug */,
1516200A199E7363006099B8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
151621FE199E7810006099B8 /* Build configuration list for PBXNativeTarget "libcocos3d iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
151621FF199E7810006099B8 /* Debug */,
15162200199E7810006099B8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1551A339158F2AB200E66CFE /* Build configuration list for PBXProject "cocos2d_libs" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View File

@ -58,11 +58,17 @@
1503FAC418DA8B6C00F6518C /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB118DA8B6C00F6518C /* tp.lua */; };
1503FAC518DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
1503FAC618DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
15162232199F95C6006099B8 /* libcocos3d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1516222D199F95B2006099B8 /* libcocos3d Mac.a */; };
15162235199F97E1006099B8 /* libcocos3d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1516222F199F95B2006099B8 /* libcocos3d iOS.a */; };
151622C819A0F689006099B8 /* libluacocos3d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 151622C319A0F66B006099B8 /* libluacocos3d Mac.a */; };
151622C919A0F692006099B8 /* libcocos3d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1516222D199F95B2006099B8 /* libcocos3d Mac.a */; };
15427B79198B879900DC375D /* libluacocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15EFA665198B33EE000C57D3 /* libluacocos2d iOS.a */; };
15427B7A198B87AA00DC375D /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46A15FBE1807A4F9005B8026 /* libcocos2d iOS.a */; };
15427B7D198B880100DC375D /* lua_cocos2dx_controller_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15427B7B198B880100DC375D /* lua_cocos2dx_controller_manual.cpp */; };
15427B7E198B896D00DC375D /* libcocosdenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 46A15FC61807A4F9005B8026 /* libcocosdenshion iOS.a */; };
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
158C129419A0FC6400781A76 /* libcocos3d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1516222F199F95B2006099B8 /* libcocos3d iOS.a */; };
158C129519A0FC6400781A76 /* libluacocos3d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 151622C519A0F66B006099B8 /* libluacocos3d iOS.a */; };
15AECE0B195C0F8A00907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; };
15AECE25195D467D00907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
@ -962,6 +968,8 @@
3EA0FB72191C844400B170C8 /* UIVideoPlayerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB70191C844400B170C8 /* UIVideoPlayerTest.cpp */; };
59620E8F1921E5CF002021B6 /* Bug-Child.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59620E8D1921E5CF002021B6 /* Bug-Child.cpp */; };
59620E901921E5CF002021B6 /* Bug-Child.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59620E8D1921E5CF002021B6 /* Bug-Child.cpp */; };
5EBEECB01995247000429821 /* DrawNode3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EBEECAE1995247000429821 /* DrawNode3D.cpp */; };
5EBEECB11995247000429821 /* DrawNode3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EBEECAE1995247000429821 /* DrawNode3D.cpp */; };
A05FCACA177C124500BE600E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64822165F391E007D4F18 /* Cocoa.framework */; };
A07A521E1783A1D20073F6A7 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C6482E165F399D007D4F18 /* libz.dylib */; };
A07A521F1783A1D20073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64832165F3AFD007D4F18 /* Foundation.framework */; };
@ -1000,6 +1008,62 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
15162226199F95B2006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 15161E42199E7362006099B8;
remoteInfo = "libcocos3d Mac";
};
1516222C199F95B2006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1516200B199E7363006099B8;
remoteInfo = "libcocos3d Mac";
};
1516222E199F95B2006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 15162201199E7810006099B8;
remoteInfo = "libcocos3d iOS";
};
15162233199F97D1006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 15162030199E7810006099B8;
remoteInfo = "libcocos3d iOS";
};
151622BE19A0F66B006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 1516224519A0F32D006099B8;
remoteInfo = "libluacocos3d Mac";
};
151622C219A0F66B006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1516227C19A0F32D006099B8;
remoteInfo = "libluacocos3d Mac";
};
151622C419A0F66B006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 151622BB19A0F45E006099B8;
remoteInfo = "libluacocos3d iOS";
};
151622C619A0F679006099B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 15161E42199E7362006099B8;
remoteInfo = "libcocos3d Mac";
};
15427B80198B8ACB00DC375D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */;
@ -1189,6 +1253,20 @@
remoteGlobalIDString = 15C1C255198748D200A46ACC;
remoteInfo = "libluacocos2d Mac";
};
158C128B19A0FC4700781A76 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 15162030199E7810006099B8;
remoteInfo = "libcocos3d iOS";
};
158C129219A0FC5300781A76 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1ABCA27618CD90A40087CE3A /* cocos2d_lua_bindings.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 1516228319A0F45E006099B8;
remoteInfo = "libluacocos3d iOS";
};
15CBA017196EE56C005877BB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */;
@ -3651,6 +3729,8 @@
46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
59620E8D1921E5CF002021B6 /* Bug-Child.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "Bug-Child.cpp"; sourceTree = "<group>"; };
59620E8E1921E5CF002021B6 /* Bug-Child.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bug-Child.h"; sourceTree = "<group>"; };
5EBEECAE1995247000429821 /* DrawNode3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DrawNode3D.cpp; path = Sprite3DTest/DrawNode3D.cpp; sourceTree = "<group>"; };
5EBEECAF1995247000429821 /* DrawNode3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DrawNode3D.h; path = Sprite3DTest/DrawNode3D.h; sourceTree = "<group>"; };
70A7F72D191D3E4900F0F206 /* shaderTest.psh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = shaderTest.psh.h; sourceTree = "<group>"; };
70A7F730191D421B00F0F206 /* ShaderTest.vsh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShaderTest.vsh.h; sourceTree = "<group>"; };
A035A71117822E9E00987F6C /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
@ -3782,6 +3862,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
151622C919A0F692006099B8 /* libcocos3d Mac.a in Frameworks */,
151622C819A0F689006099B8 /* libluacocos3d Mac.a in Frameworks */,
15EFA27A198B269E000C57D3 /* libluaextension Mac.a in Frameworks */,
15EFA279198B268A000C57D3 /* libluanetwork Mac.a in Frameworks */,
15EFA278198B2673000C57D3 /* libluaspine Mac.a in Frameworks */,
@ -3816,6 +3898,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
158C129419A0FC6400781A76 /* libcocos3d iOS.a in Frameworks */,
158C129519A0FC6400781A76 /* libluacocos3d iOS.a in Frameworks */,
15EFA66F198B356E000C57D3 /* libluacocos2d iOS.a in Frameworks */,
15EFA670198B356E000C57D3 /* libluacocosbuilder iOS.a in Frameworks */,
15EFA671198B356E000C57D3 /* libluacocosdenshion iOS.a in Frameworks */,
@ -3851,6 +3935,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
15162232199F95C6006099B8 /* libcocos3d Mac.a in Frameworks */,
B244F3171976878E00ED1926 /* libnetwork Mac.a in Frameworks */,
B2DB493A197681E500411E16 /* libspine Mac.a in Frameworks */,
B2DB48C619767DAC00411E16 /* libcocostudio Mac.a in Frameworks */,
@ -3898,6 +3983,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
15162235199F97E1006099B8 /* libcocos3d iOS.a in Frameworks */,
B2C59AC8197782B900B452DF /* libcocosbuilder iOS.a in Frameworks */,
B2C59AC9197782B900B452DF /* libui iOS.a in Frameworks */,
B2C59ACA197782B900B452DF /* libcocostudio iOS.a in Frameworks */,
@ -6042,6 +6128,7 @@
15EFA252198A4A24000C57D3 /* libluaspine Mac.a */,
15EFA254198A4A24000C57D3 /* libluanetwork Mac.a */,
15EFA256198A4A24000C57D3 /* libluacocosdenshion Mac.a */,
151622C319A0F66B006099B8 /* libluacocos3d Mac.a */,
15EFA258198A4A24000C57D3 /* libluacocos2d Mac.a */,
15EFA25A198A4A24000C57D3 /* libluaextension iOS.a */,
15EFA659198B33EE000C57D3 /* libluaui iOS.a */,
@ -6050,6 +6137,7 @@
15EFA65F198B33EE000C57D3 /* libluaspine iOS.a */,
15EFA661198B33EE000C57D3 /* libluanetwork iOS.a */,
15EFA663198B33EE000C57D3 /* libluacocosdenshion iOS.a */,
151622C519A0F66B006099B8 /* libluacocos3d iOS.a */,
15EFA665198B33EE000C57D3 /* libluacocos2d iOS.a */,
);
name = Products;
@ -7882,6 +7970,8 @@
3E92EA7D1921A0C60094CD21 /* Sprite3DTest */ = {
isa = PBXGroup;
children = (
5EBEECAE1995247000429821 /* DrawNode3D.cpp */,
5EBEECAF1995247000429821 /* DrawNode3D.h */,
3E92EA801921A1400094CD21 /* Sprite3DTest.cpp */,
3E92EA811921A1400094CD21 /* Sprite3DTest.h */,
);
@ -7919,6 +8009,7 @@
46A15FB41807A4F9005B8026 /* libchipmunk Mac.a */,
46A15FB61807A4F9005B8026 /* libbox2d Mac.a */,
46A15FB81807A4F9005B8026 /* libcocosdenshion Mac.a */,
1516222D199F95B2006099B8 /* libcocos3d Mac.a */,
46A15FBE1807A4F9005B8026 /* libcocos2d iOS.a */,
46A15FC01807A4F9005B8026 /* libextension iOS.a */,
46A15FC21807A4F9005B8026 /* libchipmunk iOS.a */,
@ -7929,6 +8020,7 @@
B2CC503D197763A20041958E /* libcocosbuilder iOS.a */,
B2CC503F197763A20041958E /* libspine iOS.a */,
B2CC5041197763A20041958E /* libnetwork iOS.a */,
1516222F199F95B2006099B8 /* libcocos3d iOS.a */,
);
name = Products;
sourceTree = "<group>";
@ -8053,6 +8145,8 @@
buildRules = (
);
dependencies = (
151622C719A0F679006099B8 /* PBXTargetDependency */,
151622BF19A0F66B006099B8 /* PBXTargetDependency */,
15427BA7198B8C5000DC375D /* PBXTargetDependency */,
15427BA9198B8C5000DC375D /* PBXTargetDependency */,
15427BAB198B8C5000DC375D /* PBXTargetDependency */,
@ -8087,6 +8181,8 @@
buildRules = (
);
dependencies = (
158C129319A0FC5300781A76 /* PBXTargetDependency */,
158C128C19A0FC4700781A76 /* PBXTargetDependency */,
15427B87198B8BB400DC375D /* PBXTargetDependency */,
15427B89198B8BB400DC375D /* PBXTargetDependency */,
15427B8B198B8BB400DC375D /* PBXTargetDependency */,
@ -8121,6 +8217,7 @@
buildRules = (
);
dependencies = (
15162227199F95B2006099B8 /* PBXTargetDependency */,
B244F3111976878700ED1926 /* PBXTargetDependency */,
B2DB49361976819900411E16 /* PBXTargetDependency */,
B2DB48C519767DA500411E16 /* PBXTargetDependency */,
@ -8167,6 +8264,7 @@
buildRules = (
);
dependencies = (
15162234199F97D1006099B8 /* PBXTargetDependency */,
B2C59ABE197782AC00B452DF /* PBXTargetDependency */,
B2C59AC0197782AC00B452DF /* PBXTargetDependency */,
B2C59AC2197782AC00B452DF /* PBXTargetDependency */,
@ -8234,6 +8332,34 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
1516222D199F95B2006099B8 /* libcocos3d Mac.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libcocos3d Mac.a";
remoteRef = 1516222C199F95B2006099B8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1516222F199F95B2006099B8 /* libcocos3d iOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libcocos3d iOS.a";
remoteRef = 1516222E199F95B2006099B8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
151622C319A0F66B006099B8 /* libluacocos3d Mac.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libluacocos3d Mac.a";
remoteRef = 151622C219A0F66B006099B8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
151622C519A0F66B006099B8 /* libluacocos3d iOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libluacocos3d iOS.a";
remoteRef = 151622C419A0F66B006099B8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
15EFA24A198A4A24000C57D3 /* libluaextension Mac.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -9138,6 +9264,7 @@
29080DC3191B595E0066F8DF /* UIScene.cpp in Sources */,
29080D9B191B595E0066F8DF /* CustomParticleWidget.cpp in Sources */,
29080D8D191B595E0066F8DF /* CocosGUIScene.cpp in Sources */,
5EBEECB01995247000429821 /* DrawNode3D.cpp in Sources */,
1AC35BED18CECF0C00F37B72 /* CCControlStepperTest.cpp in Sources */,
1AC35C3318CECF0C00F37B72 /* PerformanceScenarioTest.cpp in Sources */,
1AC35C5918CECF0C00F37B72 /* TextureAtlasEncryptionTest.cpp in Sources */,
@ -9232,6 +9359,7 @@
29080DB4191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */,
1AC35C4E18CECF0C00F37B72 /* SpineTest.cpp in Sources */,
1AC35C1E18CECF0C00F37B72 /* NewRendererTest.cpp in Sources */,
5EBEECB11995247000429821 /* DrawNode3D.cpp in Sources */,
1AC35B6818CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */,
29080D8E191B595E0066F8DF /* CocosGUIScene.cpp in Sources */,
1AC35BFA18CECF0C00F37B72 /* WebSocketTest.cpp in Sources */,
@ -9410,6 +9538,26 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
15162227199F95B2006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libcocos3d Mac";
targetProxy = 15162226199F95B2006099B8 /* PBXContainerItemProxy */;
};
15162234199F97D1006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libcocos3d iOS";
targetProxy = 15162233199F97D1006099B8 /* PBXContainerItemProxy */;
};
151622BF19A0F66B006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libluacocos3d Mac";
targetProxy = 151622BE19A0F66B006099B8 /* PBXContainerItemProxy */;
};
151622C719A0F679006099B8 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libcocos3d Mac";
targetProxy = 151622C619A0F679006099B8 /* PBXContainerItemProxy */;
};
15427B81198B8ACB00DC375D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libluanetwork iOS";
@ -9545,6 +9693,16 @@
name = "libluacocos2d Mac";
targetProxy = 15427BB4198B8C5000DC375D /* PBXContainerItemProxy */;
};
158C128C19A0FC4700781A76 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libcocos3d iOS";
targetProxy = 158C128B19A0FC4700781A76 /* PBXContainerItemProxy */;
};
158C129319A0FC5300781A76 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "libluacocos3d iOS";
targetProxy = 158C129219A0FC5300781A76 /* PBXContainerItemProxy */;
};
15CBA016196EE56C005877BB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "cocos2dx iOS";

View File

@ -261,6 +261,7 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
renderer->addCommand(&_afterDrawStencilCmd);
int i = 0;
bool visibleByCamera = isVisitableByVisitingCamera();
if(!_children.empty())
{
@ -276,12 +277,13 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
break;
}
// self draw
this->draw(renderer, _modelViewTransform, flags);
if (visibleByCamera)
this->draw(renderer, _modelViewTransform, flags);
for(auto it=_children.cbegin()+i; it != _children.cend(); ++it)
(*it)->visit(renderer, _modelViewTransform, flags);
}
else
else if (visibleByCamera)
{
this->draw(renderer, _modelViewTransform, flags);
}

View File

@ -267,7 +267,7 @@ unsigned char* FontFreeType::getGlyphBitmap(unsigned short theChar, long &outWid
}
else
{
if (FT_Load_Glyph(_fontRef,glyphIndex,FT_LOAD_RENDER))
if (FT_Load_Glyph(_fontRef,glyphIndex,FT_LOAD_RENDER | FT_LOAD_NO_AUTOHINT))
break;
}

View File

@ -1023,7 +1023,8 @@ void Label::updateFont()
void Label::drawTextSprite(Renderer *renderer, uint32_t parentFlags)
{
if (_fontDefinition._fontFillColor != _textColor)
if (_fontDefinition._fontFillColor.r != _textColor.r || _fontDefinition._fontFillColor.g != _textColor.g
|| _fontDefinition._fontFillColor.b != _textColor.b)
{
updateContent();
}
@ -1053,7 +1054,7 @@ void Label::drawTextSprite(Renderer *renderer, uint32_t parentFlags)
void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
if (! _visible || _originalUTF8String.empty())
if (! _visible || _originalUTF8String.empty() || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -1225,6 +1225,13 @@ uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFl
return flags;
}
bool Node::isVisitableByVisitingCamera() const
{
auto camera = Camera::getVisitingCamera();
bool visibleByCamera = camera ? (unsigned short)camera->getCameraFlag() & _cameraMask : true;
return visibleByCamera;
}
void Node::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
@ -1242,8 +1249,7 @@ void Node::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t paren
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
auto camera = Camera::getVisitingCamera();
bool visibleByCamera = camera ? (unsigned short)camera->getCameraFlag() & _cameraMask : true;
bool visibleByCamera = isVisitableByVisitingCamera();
int i = 0;
@ -1267,10 +1273,9 @@ void Node::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t paren
for(auto it=_children.cbegin()+i; it != _children.cend(); ++it)
(*it)->visit(renderer, _modelViewTransform, flags);
}
else
else if (visibleByCamera)
{
if (visibleByCamera)
this->draw(renderer, _modelViewTransform, flags);
this->draw(renderer, _modelViewTransform, flags);
}
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);

View File

@ -1284,12 +1284,12 @@ public:
* Resumes all scheduled selectors, actions and event listeners.
* This method is called internally by onEnter
*/
void resume(void);
virtual void resume(void);
/**
* Pauses all scheduled selectors, actions and event listeners..
* This method is called internally by onExit
*/
void pause(void);
virtual void pause(void);
/**
* Resumes all scheduled selectors, actions and event listeners.
@ -1521,6 +1521,9 @@ protected:
bool doEnumerate(std::string name, std::function<bool (Node *)> callback) const;
bool doEnumerateRecursive(const Node* node, const std::string &name, std::function<bool (Node *)> callback) const;
//check whether this camera mask is visible by the current visiting camera
bool isVisitableByVisitingCamera() const;
#if CC_USE_PHYSICS
void updatePhysicsBodyTransform(Scene* layer);
virtual void updatePhysicsBodyPosition(Scene* layer);

View File

@ -126,6 +126,7 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p
}
int i = 0;
bool visibleByCamera = isVisitableByVisitingCamera();
if(!_children.empty())
{
@ -141,13 +142,14 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p
break;
}
// self draw,currently we have nothing to draw on NodeGrid, so there is no need to add render command
this->draw(renderer, _modelViewTransform, dirty);
if (visibleByCamera)
this->draw(renderer, _modelViewTransform, dirty);
for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) {
(*it)->visit(renderer, _modelViewTransform, dirty);
}
}
else
else if (visibleByCamera)
{
this->draw(renderer, _modelViewTransform, dirty);
}

View File

@ -130,7 +130,7 @@ void ParticleBatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, u
// The alternative is to have a void Sprite#visit, but
// although this is less maintainable, is faster
//
if (!_visible)
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -318,7 +318,8 @@ void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint3
//
// draw self
//
this->draw(renderer, _modelViewTransform, flags);
if (isVisitableByVisitingCamera())
this->draw(renderer, _modelViewTransform, flags);
//
// draw children and protectedChildren zOrder >= 0

View File

@ -67,6 +67,7 @@ RenderTexture::RenderTexture()
, _rtTextureRect(Rect::ZERO)
, _fullRect(Rect::ZERO)
, _fullviewPort(Rect::ZERO)
, _saveFileCallback(nullptr)
{
#if CC_ENABLE_CACHE_TEXTURE_DATA
// Listen this event to save render texture before come to background.
@ -393,7 +394,7 @@ void RenderTexture::visit(Renderer *renderer, const Mat4 &parentTransform, uint3
{
// override visit.
// Don't call visit on its children
if (!_visible)
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}
@ -415,33 +416,36 @@ void RenderTexture::visit(Renderer *renderer, const Mat4 &parentTransform, uint3
_orderOfArrival = 0;
}
bool RenderTexture::saveToFile(const std::string& filename, bool isRGBA)
bool RenderTexture::saveToFile(const std::string& filename, bool isRGBA, std::function<void (RenderTexture*, const std::string&)> callback)
{
std::string basename(filename);
std::transform(basename.begin(), basename.end(), basename.begin(), ::tolower);
if (basename.find(".png") != std::string::npos)
{
return saveToFile(filename, Image::Format::PNG, isRGBA);
return saveToFile(filename, Image::Format::PNG, isRGBA, callback);
}
else if (basename.find(".jpg") != std::string::npos)
{
if (isRGBA) CCLOG("RGBA is not supported for JPG format.");
return saveToFile(filename, Image::Format::JPG, false);
return saveToFile(filename, Image::Format::JPG, false, callback);
}
else
{
CCLOG("Only PNG and JPG format are supported now!");
}
return saveToFile(filename, Image::Format::JPG, false);
return saveToFile(filename, Image::Format::JPG, false, callback);
}
bool RenderTexture::saveToFile(const std::string& fileName, Image::Format format, bool isRGBA)
bool RenderTexture::saveToFile(const std::string& fileName, Image::Format format, bool isRGBA, std::function<void (RenderTexture*, const std::string&)> callback)
{
CCASSERT(format == Image::Format::JPG || format == Image::Format::PNG,
"the image can only be saved as JPG or PNG format");
if (isRGBA && format == Image::Format::JPG) CCLOG("RGBA is not supported for JPG format");
_saveFileCallback = callback;
std::string fullpath = FileUtils::getInstance()->getWritablePath() + fileName;
_saveToFileCommand.init(_globalZOrder);
_saveToFileCommand.func = CC_CALLBACK_0(RenderTexture::onSaveToFile, this, fullpath, isRGBA);
@ -457,7 +461,10 @@ void RenderTexture::onSaveToFile(const std::string& filename, bool isRGBA)
{
image->saveToFile(filename.c_str(), !isRGBA);
}
if(_saveFileCallback)
{
_saveFileCallback(this, filename);
}
CC_SAFE_DELETE(image);
}

View File

@ -103,12 +103,12 @@ public:
/** saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
Returns true if the operation is successful.
*/
bool saveToFile(const std::string& filename, bool isRGBA = true);
bool saveToFile(const std::string& filename, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
/** saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder.
Returns true if the operation is successful.
*/
bool saveToFile(const std::string& filename, Image::Format format, bool isRGBA = true);
bool saveToFile(const std::string& filename, Image::Format format, bool isRGBA = true, std::function<void (RenderTexture*, const std::string&)> callback = nullptr);
/** Listen "come to background" message, and save render texture.
It only has effect on Android.
@ -213,7 +213,12 @@ protected:
CustomCommand _clearCommand;
CustomCommand _beginCommand;
CustomCommand _endCommand;
/*this command is used to encapsulate saveToFile,
call saveToFile twice will overwrite this command and callback
and the command and callback will be executed twice.
*/
CustomCommand _saveToFileCommand;
std::function<void (RenderTexture*, const std::string&)> _saveFileCallback;
protected:
//renderer caches and callbacks
void onBegin();

View File

@ -28,6 +28,8 @@ THE SOFTWARE.
#include "2d/CCScene.h"
#include "base/CCDirector.h"
#include "base/CCCamera.h"
#include "base/CCEventDispatcher.h"
#include "base/CCEventListenerCustom.h"
#include "2d/CCLayer.h"
#include "2d/CCSprite.h"
#include "2d/CCSpriteBatchNode.h"
@ -43,6 +45,13 @@ Scene::Scene()
{
_ignoreAnchorPointForPosition = true;
setAnchorPoint(Vec2(0.5f, 0.5f));
//create default camera
_defaultCamera = Camera::create();
addChild(_defaultCamera);
_event = Director::getInstance()->getEventDispatcher()->addCustomEventListener(Director::EVENT_PROJECTION_CHANGED, std::bind(&Scene::onProjectionChanged, this, std::placeholders::_1));
_event->retain();
}
Scene::~Scene()
@ -50,6 +59,8 @@ Scene::~Scene()
#if CC_USE_PHYSICS
CC_SAFE_DELETE(_physicsWorld);
#endif
Director::getInstance()->getEventDispatcher()->removeEventListener(_event);
CC_SAFE_RELEASE(_event);
}
bool Scene::init()
@ -60,10 +71,6 @@ bool Scene::init()
bool Scene::initWithSize(const Size& size)
{
//create default camera
auto camera = Camera::create();
addChild(camera);
setContentSize(size);
return true;
}
@ -153,9 +160,6 @@ bool Scene::initWithPhysics()
{
Director * director;
CC_BREAK_IF( ! (director = Director::getInstance()) );
// add camera
auto camera = Camera::create();
addChild(camera);
this->setContentSize(director->getWinSize());
CC_BREAK_IF(! (_physicsWorld = PhysicsWorld::construct(*this)));
@ -189,6 +193,14 @@ void Scene::addChildToPhysicsWorld(Node* child)
}
}
void Scene::onProjectionChanged(EventCustom* event)
{
if (_defaultCamera)
{
_defaultCamera->initDefault();
}
}
#endif
NS_CC_END

View File

@ -74,6 +74,8 @@ CC_CONSTRUCTOR_ACCESS:
bool init();
bool initWithSize(const Size& size);
void onProjectionChanged(EventCustom* event);
protected:
friend class Node;
@ -83,6 +85,8 @@ protected:
friend class Director;
std::vector<Camera*> _cameras; //weak ref to Camera
Camera* _defaultCamera; //weak ref, default camera created by scene, _cameras[0], Caution that the default camera can not be added to _cameras before onEnter is called
EventListenerCustom* _event;
private:
CC_DISALLOW_COPY_AND_ASSIGN(Scene);

View File

@ -147,7 +147,7 @@ void SpriteBatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, uin
// The alternative is to have a void Sprite#visit, but
// although this is less maintainable, is faster
//
if (! _visible)
if (! _visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -259,7 +259,9 @@ const std::string& TextFieldTTF::getContentText()
void TextFieldTTF::setTextColor(const Color4B &color)
{
_colorText = color;
Label::setTextColor(_colorText);
if (_inputText.length() > 0) {
Label::setTextColor(_colorText);
}
}
void TextFieldTTF::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
@ -282,11 +284,18 @@ void TextFieldTTF::setColorSpaceHolder(const Color3B& color)
_colorSpaceHolder.g = color.g;
_colorSpaceHolder.b = color.b;
_colorSpaceHolder.a = 255;
if (0 == _inputText.length())
{
Label::setTextColor(_colorSpaceHolder);
}
}
void TextFieldTTF::setColorSpaceHolder(const Color4B& color)
{
_colorSpaceHolder = color;
if (0 == _inputText.length()) {
Label::setTextColor(_colorSpaceHolder);
}
}
//////////////////////////////////////////////////////////////////////////
@ -321,7 +330,7 @@ void TextFieldTTF::setString(const std::string &text)
}
// if there is no input text, display placeholder instead
if (! _inputText.length())
if (0 == _inputText.length())
{
Label::setTextColor(_colorSpaceHolder);
Label::setString(_placeHolder);
@ -343,7 +352,7 @@ const std::string& TextFieldTTF::getString() const
void TextFieldTTF::setPlaceHolder(const std::string& text)
{
_placeHolder = text;
if (! _inputText.length())
if (0 == _inputText.length())
{
Label::setTextColor(_colorSpaceHolder);
Label::setString(_placeHolder);

View File

@ -1,2 +1,3 @@
LIBRARY
EXPORTS
XXH32

View File

@ -222,6 +222,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\3d\CCAABB.cpp" />
<ClCompile Include="..\3d\CCAnimate3D.cpp" />
<ClCompile Include="..\3d\CCAnimation3D.cpp" />
<ClCompile Include="..\3d\CCAttachNode.cpp" />
@ -229,7 +230,9 @@
<ClCompile Include="..\3d\CCBundleReader.cpp" />
<ClCompile Include="..\3d\CCMesh.cpp" />
<ClCompile Include="..\3d\CCMeshSkin.cpp" />
<ClCompile Include="..\3d\CCOBB.cpp" />
<ClCompile Include="..\3d\CCObjLoader.cpp" />
<ClCompile Include="..\3d\CCRay.cpp" />
<ClCompile Include="..\3d\CCSkeleton3D.cpp" />
<ClCompile Include="..\3d\CCSprite3D.cpp" />
<ClCompile Include="..\3d\CCSprite3DMaterial.cpp" />
@ -238,6 +241,7 @@
<ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\base64.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
<ClCompile Include="..\base\CCCamera.cpp" />
<ClCompile Include="..\base\ccCArray.cpp" />
<ClCompile Include="..\base\CCConfiguration.cpp" />
<ClCompile Include="..\base\CCConsole.cpp" />
@ -276,8 +280,10 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\base\CCIMEDispatcher.cpp" />
<ClCompile Include="..\base\CCModuleManager.cpp" />
<ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCProfiling.cpp" />
<ClCompile Include="..\base\ccRandom.cpp" />
<ClCompile Include="..\base\CCRef.cpp" />
<ClCompile Include="..\base\CCScheduler.cpp" />
<ClCompile Include="..\base\CCScriptSupport.cpp" />
@ -355,6 +361,8 @@
<ClCompile Include="..\renderer\ccGLStateCache.cpp" />
<ClCompile Include="..\renderer\CCGroupCommand.cpp" />
<ClCompile Include="..\renderer\CCMeshCommand.cpp" />
<ClCompile Include="..\renderer\CCPrimitive.cpp" />
<ClCompile Include="..\renderer\CCPrimitiveCommand.cpp" />
<ClCompile Include="..\renderer\CCQuadCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderer.cpp" />
@ -362,6 +370,8 @@
<ClCompile Include="..\renderer\CCTexture2D.cpp" />
<ClCompile Include="..\renderer\CCTextureAtlas.cpp" />
<ClCompile Include="..\renderer\CCTextureCache.cpp" />
<ClCompile Include="..\renderer\CCVertexIndexBuffer.cpp" />
<ClCompile Include="..\renderer\CCVertexIndexData.cpp" />
<ClCompile Include="CCAction.cpp" />
<ClCompile Include="CCActionCamera.cpp" />
<ClCompile Include="CCActionCatmullRom.cpp" />
@ -436,6 +446,7 @@
<ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\..\external\unzip\unzip.h" />
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
<ClInclude Include="..\3d\CCAABB.h" />
<ClInclude Include="..\3d\CCAnimate3D.h" />
<ClInclude Include="..\3d\CCAnimation3D.h" />
<ClInclude Include="..\3d\CCAnimationCurve.h" />
@ -445,7 +456,9 @@
<ClInclude Include="..\3d\CCBundleReader.h" />
<ClInclude Include="..\3d\CCMesh.h" />
<ClInclude Include="..\3d\CCMeshSkin.h" />
<ClInclude Include="..\3d\CCOBB.h" />
<ClInclude Include="..\3d\CCObjLoader.h" />
<ClInclude Include="..\3d\CCRay.h" />
<ClInclude Include="..\3d\CCSkeleton3D.h" />
<ClInclude Include="..\3d\CCSprite3D.h" />
<ClInclude Include="..\3d\CCSprite3DMaterial.h" />
@ -454,6 +467,7 @@
<ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\base64.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" />
<ClInclude Include="..\base\CCCamera.h" />
<ClInclude Include="..\base\ccCArray.h" />
<ClInclude Include="..\base\ccConfig.h" />
<ClInclude Include="..\base\CCConfiguration.h" />
@ -482,11 +496,13 @@
<ClInclude Include="..\base\CCIMEDispatcher.h" />
<ClInclude Include="..\base\ccMacros.h" />
<ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCModuleManager.h" />
<ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\base\CCProfiling.h" />
<ClInclude Include="..\base\CCProtocols.h" />
<ClInclude Include="..\base\ccRandom.h" />
<ClInclude Include="..\base\CCRef.h" />
<ClInclude Include="..\base\CCRefPtr.h" />
<ClInclude Include="..\base\CCScheduler.h" />
@ -576,6 +592,8 @@
<ClInclude Include="..\renderer\ccGLStateCache.h" />
<ClInclude Include="..\renderer\CCGroupCommand.h" />
<ClInclude Include="..\renderer\CCMeshCommand.h" />
<ClInclude Include="..\renderer\CCPrimitive.h" />
<ClInclude Include="..\renderer\CCPrimitiveCommand.h" />
<ClInclude Include="..\renderer\CCQuadCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommandPool.h" />
@ -584,6 +602,8 @@
<ClInclude Include="..\renderer\CCTexture2D.h" />
<ClInclude Include="..\renderer\CCTextureAtlas.h" />
<ClInclude Include="..\renderer\CCTextureCache.h" />
<ClInclude Include="..\renderer\CCVertexIndexBuffer.h" />
<ClInclude Include="..\renderer\CCVertexIndexData.h" />
<ClInclude Include="CCAction.h" />
<ClInclude Include="CCActionCamera.h" />
<ClInclude Include="CCActionCatmullRom.h" />

View File

@ -632,6 +632,36 @@
<ClCompile Include="..\3d\CCAttachNode.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\base\CCCamera.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCPrimitiveCommand.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCPrimitive.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCVertexIndexBuffer.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCVertexIndexData.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\base\CCModuleManager.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\ccRandom.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCAABB.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCOBB.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCRay.cpp">
<Filter>3d</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCPhysicsBody.h">
@ -1292,6 +1322,36 @@
<ClInclude Include="..\3d\CCAttachNode.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\base\CCCamera.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCPrimitiveCommand.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCPrimitive.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCVertexIndexBuffer.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCVertexIndexData.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\base\CCModuleManager.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\ccRandom.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAABB.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCOBB.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCRay.h">
<Filter>3d</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">

View File

@ -7,7 +7,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\curl\include\wp8;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\wp8-specific\zlib\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\curl\include\wp8;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\wp8-specific\zlib\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
<MultiProcessorCompilation>true</MultiProcessorCompilation>

View File

@ -183,19 +183,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\..\external\unzip\ioapi.cpp" />
<ClCompile Include="..\..\external\unzip\unzip.cpp" />
<ClCompile Include="..\..\external\xxhash\xxhash.c" />
<ClCompile Include="..\3d\CCAnimate3D.cpp" />
<ClCompile Include="..\3d\CCAnimation3D.cpp" />
<ClCompile Include="..\3d\CCAttachNode.cpp" />
<ClCompile Include="..\3d\CCBundle3D.cpp" />
<ClCompile Include="..\3d\CCBundleReader.cpp" />
<ClCompile Include="..\3d\CCMesh.cpp" />
<ClCompile Include="..\3d\CCMeshSkin.cpp" />
<ClCompile Include="..\3d\CCObjLoader.cpp" />
<ClCompile Include="..\3d\CCSkeleton3D.cpp" />
<ClCompile Include="..\3d\CCSprite3D.cpp" />
<ClCompile Include="..\3d\CCSprite3DMaterial.cpp" />
<ClCompile Include="..\3d\CCSubMesh.cpp" />
<ClCompile Include="..\3d\CCSubMeshState.cpp" />
<ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\base64.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
@ -223,8 +210,10 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\base\CCEventTouch.cpp" />
<ClCompile Include="..\base\ccFPSImages.c" />
<ClCompile Include="..\base\CCIMEDispatcher.cpp" />
<ClCompile Include="..\base\CCModuleManager.cpp" />
<ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCProfiling.cpp" />
<ClCompile Include="..\base\ccRandom.cpp" />
<ClCompile Include="..\base\CCRef.cpp" />
<ClCompile Include="..\base\CCScheduler.cpp" />
<ClCompile Include="..\base\CCScriptSupport.cpp" />
@ -373,21 +362,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\..\external\unzip\unzip.h" />
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
<ClInclude Include="..\3d\CCAnimate3D.h" />
<ClInclude Include="..\3d\CCAnimation3D.h" />
<ClInclude Include="..\3d\CCAnimationCurve.h" />
<ClInclude Include="..\3d\CCAttachNode.h" />
<ClInclude Include="..\3d\CCBundle3D.h" />
<ClInclude Include="..\3d\CCBundle3DData.h" />
<ClInclude Include="..\3d\CCBundleReader.h" />
<ClInclude Include="..\3d\CCMesh.h" />
<ClInclude Include="..\3d\CCMeshSkin.h" />
<ClInclude Include="..\3d\CCObjLoader.h" />
<ClInclude Include="..\3d\CCSkeleton3D.h" />
<ClInclude Include="..\3d\CCSprite3D.h" />
<ClInclude Include="..\3d\CCSprite3DMaterial.h" />
<ClInclude Include="..\3d\CCSubMesh.h" />
<ClInclude Include="..\3d\CCSubMeshState.h" />
<ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\base64.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" />
@ -420,11 +394,13 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\base\CCIMEDispatcher.h" />
<ClInclude Include="..\base\ccMacros.h" />
<ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCModuleManager.h" />
<ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\base\CCProfiling.h" />
<ClInclude Include="..\base\CCProtocols.h" />
<ClInclude Include="..\base\ccRandom.h" />
<ClInclude Include="..\base\CCRef.h" />
<ClInclude Include="..\base\CCRefPtr.h" />
<ClInclude Include="..\base\CCScheduler.h" />
@ -584,7 +560,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="CCTweenFunction.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\3d\CCAnimationCurve.inl" />
<None Include="..\math\Mat4.inl" />
<None Include="..\math\MathUtil.inl" />
<None Include="..\math\MathUtilNeon.inl" />

View File

@ -52,9 +52,6 @@
<Filter Include="external\xxhash">
<UniqueIdentifier>{b4e2b1e5-2d79-44a3-af45-728d47b7bdb2}</UniqueIdentifier>
</Filter>
<Filter Include="3d">
<UniqueIdentifier>{a20c4bdc-bd4c-40c1-a78a-fe31cd3ec76a}</UniqueIdentifier>
</Filter>
<Filter Include="storage">
<UniqueIdentifier>{44bdf58f-4af2-433c-b4af-58dc05ef96b5}</UniqueIdentifier>
</Filter>
@ -550,36 +547,9 @@
<ClCompile Include="..\renderer\CCMeshCommand.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCMesh.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCObjLoader.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSprite3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\base\ObjectFactory.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCBundle3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCAnimate3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCMeshSkin.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCAnimation3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSprite3DMaterial.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCBundleReader.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="CCFastTMXLayer.cpp">
<Filter>2d</Filter>
</ClCompile>
@ -589,18 +559,6 @@
<ClCompile Include="..\storage\local-storage\LocalStorage.cpp">
<Filter>storage</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCAttachNode.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSkeleton3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSubMesh.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSubMeshState.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\platform\desktop\CCGLViewImpl.cpp">
<Filter>platform\desktop</Filter>
</ClCompile>
@ -625,6 +583,12 @@
<ClCompile Include="..\renderer\CCVertexIndexData.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\base\CCModuleManager.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\ccRandom.cpp">
<Filter>base</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCPhysicsBody.h">
@ -1189,42 +1153,9 @@
<ClInclude Include="..\renderer\CCMeshCommand.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCMesh.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCObjLoader.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSprite3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\base\ObjectFactory.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCBundle3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAnimate3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAnimationCurve.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCMeshSkin.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAnimation3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCBundle3DData.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSprite3DMaterial.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCBundleReader.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="CCFastTMXTiledMap.h">
<Filter>2d</Filter>
</ClInclude>
@ -1234,18 +1165,6 @@
<ClInclude Include="..\storage\local-storage\LocalStorage.h">
<Filter>storage</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAttachNode.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSkeleton3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSubMesh.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSubMeshState.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\platform\desktop\CCGLViewImpl.h">
<Filter>platform\desktop</Filter>
</ClInclude>
@ -1270,6 +1189,12 @@
<ClInclude Include="..\renderer\CCVertexIndexData.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\base\CCModuleManager.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\ccRandom.h">
<Filter>base</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">
@ -1293,9 +1218,6 @@
<None Include="..\math\Vec4.inl">
<Filter>math</Filter>
</None>
<None Include="..\3d\CCAnimationCurve.inl">
<Filter>3d</Filter>
</None>
<None Include="cocos2d.def" />
</ItemGroup>
</Project>

28
cocos/3d/3dExport.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef __COCOS_3D_3DEXPORT_H__
#define __COCOS_3D_3DEXPORT_H__
#if defined(WIN32) && defined(_WINDOWS)
#ifdef __MINGW32__
#include <string.h>
#endif
#if defined(_USE3DDLL)
#define CC_3D_DLL __declspec(dllexport)
#else /* use a DLL library */
#define CC_3D_DLL __declspec(dllimport)
#endif
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#else
#define CC_3D_DLL
#endif
#endif // __COCOS_3D_3DEXPORT_H__

33
cocos/3d/Android.mk Normal file
View File

@ -0,0 +1,33 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cocos3d_static
LOCAL_MODULE_FILENAME := libcocos3d
LOCAL_SRC_FILES := \
CCRay.cpp \
CCAABB.cpp \
CCOBB.cpp \
CCAnimate3D.cpp \
CCAnimation3D.cpp \
CCAttachNode.cpp \
CCBundle3D.cpp \
CCBundleReader.cpp \
CCMesh.cpp \
CCMeshSkin.cpp \
CCSprite3DMaterial.cpp \
CCObjLoader.cpp \
CCSkeleton3D.cpp \
CCSprite3D.cpp \
CCSubMesh.cpp \
CCSubMeshState.cpp \
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../../external \
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
include $(BUILD_STATIC_LIBRARY)

184
cocos/3d/CCAABB.cpp Executable file
View File

@ -0,0 +1,184 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "3d/CCAABB.h"
NS_CC_BEGIN
AABB::AABB()
{
reset();
}
AABB::AABB(const Vec3& min, const Vec3& max)
{
set(min, max);
}
AABB::AABB(const AABB& box)
{
set(box._min,box._max);
}
Vec3 AABB::getCenter()
{
Vec3 center;
center.x = 0.5f*(_min.x+_max.x);
center.y = 0.5f*(_min.y+_max.y);
center.z = 0.5f*(_min.z+_max.z);
return center;
}
void AABB::getCorners(Vec3 *dst) const
{
assert(dst);
// Near face, specified counter-clockwise looking towards the origin from the positive z-axis.
// Left-top-front.
dst[0].set(_min.x, _max.y, _max.z);
// Left-bottom-front.
dst[1].set(_min.x, _min.y, _max.z);
// Right-bottom-front.
dst[2].set(_max.x, _min.y, _max.z);
// Right-top-front.
dst[3].set(_max.x, _max.y, _max.z);
// Far face, specified counter-clockwise looking towards the origin from the negative z-axis.
// Right-top-back.
dst[4].set(_max.x, _max.y, _min.z);
// Right-bottom-back.
dst[5].set(_max.x, _min.y, _min.z);
// Left-bottom-back.
dst[6].set(_min.x, _min.y, _min.z);
// Left-top-back.
dst[7].set(_min.x, _max.y, _min.z);
}
bool AABB::intersects(const AABB& aabb) const
{
return ((_min.x >= aabb._min.x && _min.x <= aabb._max.x) || (aabb._min.x >= _min.x && aabb._min.x <= _max.x)) &&
((_min.y >= aabb._min.y && _min.y <= aabb._max.y) || (aabb._min.y >= _min.y && aabb._min.y <= _max.y)) &&
((_min.z >= aabb._min.z && _min.z <= aabb._max.z) || (aabb._min.z >= _min.z && aabb._min.z <= _max.z));
}
bool AABB::containPoint(const Vec3& point) const
{
if (point.x < _min.x) return false;
if (point.y < _min.y) return false;
if (point.z < _min.z) return false;
if (point.x > _max.x) return false;
if (point.y > _max.y) return false;
if (point.z > _max.z) return false;
return true;
}
void AABB::merge(const AABB& box)
{
// Calculate the new minimum point.
_min.x = std::min(_min.x, box._min.x);
_min.y = std::min(_min.y, box._min.y);
_min.z = std::min(_min.z, box._min.z);
// Calculate the new maximum point.
_max.x = std::max(_max.x, box._max.x);
_max.y = std::max(_max.y, box._max.y);
_max.z = std::max(_max.z, box._max.z);
}
void AABB::set(const Vec3& min, const Vec3& max)
{
this->_min = min;
this->_max = max;
}
void AABB::reset()
{
_min.set(99999.0f, 99999.0f, 99999.0f);
_max.set(-99999.0f, -99999.0f, -99999.0f);
}
void AABB::updateMinMax(const Vec3* point, ssize_t num)
{
for (ssize_t i = 0; i < num; i++)
{
// Leftmost point.
if (point[i].x < _min.x)
_min.x = point[i].x;
// Lowest point.
if (point[i].y < _min.y)
_min.y = point[i].y;
// Farthest point.
if (point[i].z < _min.z)
_min.z = point[i].z;
// Rightmost point.
if (point[i].x > _max.x)
_max.x = point[i].x;
// Highest point.
if (point[i].y > _max.y)
_max.y = point[i].y;
// Nearest point.
if (point[i].z > _max.z)
_max.z = point[i].z;
}
}
void AABB::transform(const Mat4& mat)
{
Vec3 corners[8];
// Near face, specified counter-clockwise
// Left-top-front.
corners[0].set(_min.x, _max.y, _max.z);
// Left-bottom-front.
corners[1].set(_min.x, _min.y, _max.z);
// Right-bottom-front.
corners[2].set(_max.x, _min.y, _max.z);
// Right-top-front.
corners[3].set(_max.x, _max.y, _max.z);
// Far face, specified clockwise
// Right-top-back.
corners[4].set(_max.x, _max.y, _min.z);
// Right-bottom-back.
corners[5].set(_max.x, _min.y, _min.z);
// Left-bottom-back.
corners[6].set(_min.x, _min.y, _min.z);
// Left-top-back.
corners[7].set(_min.x, _max.y, _min.z);
// Transform the corners, recalculate the min and max points along the way.
for (int i = 0; i < 8; i++)
mat.transformPoint(&corners[i]);
reset();
updateMinMax(corners, 8);
}
NS_CC_END

115
cocos/3d/CCAABB.h Normal file
View File

@ -0,0 +1,115 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_AABB_H__
#define __CC_AABB_H__
#include "base/ccMacros.h"
#include "math/CCMath.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
class CC_3D_DLL AABB
{
public:
/**
* Constructor.
*/
AABB();
/**
* Constructor.
*/
AABB(const Vec3& min, const Vec3& max);
/**
* Constructor.
*/
AABB(const AABB& box);
/**
* Gets the center point of the bounding box.
*/
Vec3 getCenter();
/* Near face, specified counter-clockwise looking towards the origin from the positive z-axis.
* verts[0] : left top front
* verts[1] : left bottom front
* verts[2] : right bottom front
* verts[3] : right top front
*
* Far face, specified counter-clockwise looking towards the origin from the negative z-axis.
* verts[4] : right top back
* verts[5] : right bottom back
* verts[6] : left bottom back
* verts[7] : left top back
*/
void getCorners(Vec3 *dst) const;
/**
* Tests whether this bounding box intersects the specified bounding object.
*/
bool intersects(const AABB& aabb) const;
/**
* check whether the point is in.
*/
bool containPoint(const Vec3& point) const;
/**
* Sets this bounding box to the smallest bounding box
* that contains both this bounding object and the specified bounding box.
*/
void merge(const AABB& box);
/**
* Sets this bounding box to the specified values.
*/
void set(const Vec3& min, const Vec3& max);
/**
* reset min and max value.
*/
void reset();
/**
* update the _min and _max from the given point.
*/
void updateMinMax(const Vec3* point, ssize_t num);
/**
* Transforms the bounding box by the given transformation matrix.
*/
void transform(const Mat4& mat);
public:
Vec3 _min;
Vec3 _max;
};
NS_CC_END
#endif

View File

@ -34,6 +34,7 @@
#include "base/ccTypes.h"
#include "base/CCPlatformMacros.h"
#include "2d/CCActionInterval.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -42,7 +43,7 @@ class Bone3D;
/**
* Animate3D, Animates a Sprite3D given with an Animation3D
*/
class CC_DLL Animate3D: public ActionInterval
class CC_3D_DLL Animate3D: public ActionInterval
{
public:

View File

@ -33,13 +33,14 @@
#include "base/CCRef.h"
#include "base/ccTypes.h"
#include "CCBundle3DData.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
/**
* static animation data, shared
*/
class CC_DLL Animation3D: public Ref
class CC_3D_DLL Animation3D: public Ref
{
friend class Bundle3D;
public:

View File

@ -33,6 +33,7 @@
#include "math/CCMath.h"
#include "2d/CCNode.h"
#include "renderer/CCMeshCommand.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -45,7 +46,7 @@ class Bone3D;
* auto attachNode = sprite->getAttachNode("left hand");
* attachNode->addChild(weapon);
*/
class CC_DLL AttachNode : public Node
class CC_3D_DLL AttachNode : public Node
{
public:
/**

View File

@ -35,6 +35,7 @@
#include "json/document.h"
#include "CCBundleReader.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
class Animation3D;
@ -46,7 +47,7 @@ class Data;
* c3t text file
* c3b binary file
*/
class CC_DLL Bundle3D
class CC_3D_DLL Bundle3D
{
public:
/**you can define yourself bundle and set it, use default bundle otherwise*/

View File

@ -207,6 +207,9 @@ bool Mesh::init(const std::vector<float>& positions, const std::vector<float>& n
buildSubMeshes();
buildBuffer();
calOriginAABB(positions, 3);
return true;
}
@ -220,6 +223,10 @@ bool Mesh::init(const std::vector<float>& vertices, int vertexSizeInFloat, const
buildSubMeshes();
buildBuffer();
unsigned int perVertexSize = _renderdata.calVertexSizeBytes() / sizeof(float);
calOriginAABB(vertices, perVertexSize);
return true;
}
@ -245,6 +252,16 @@ void Mesh::cleanAndFreeBuffers()
}
}
void Mesh::calOriginAABB(const std::vector<float>& vertices, unsigned int stride)
{
ssize_t vertexNum = vertices.size() / stride;
for(unsigned int i = 0; i < vertexNum; i++)
{
Vec3 point = Vec3(vertices[i * stride], vertices[i * stride + 1], vertices[i * stride + 2]);
_originAABB.updateMinMax(&point, 1);
}
}
void Mesh::buildBuffer()
{
cleanAndFreeBuffers();
@ -273,6 +290,11 @@ void Mesh::restore()
buildBuffer();
}
const AABB& Mesh::getOriginAABB() const
{
return _originAABB;
}
/**
* MeshCache
*/

View File

@ -37,12 +37,16 @@
#include "math/CCMath.h"
#include "renderer/CCGLProgram.h"
#include "CCAABB.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
class EventListenerCustom;
class EventCustom;
class CC_DLL RenderMeshData
class CC_3D_DLL RenderMeshData
{
typedef std::vector<unsigned short> IndexArray;
friend class Mesh;
@ -69,7 +73,7 @@ protected:
* Mesh: Geometry with a collection of vertex.
* Supporting various vertex formats.
*/
class CC_DLL Mesh : public Ref
class CC_3D_DLL Mesh : public Ref
{
typedef std::vector<unsigned short> IndexArray;
public:
@ -121,6 +125,9 @@ public:
/**build vertex buffer from renderdata*/
void restore();
/** get origin aabb that calculate from vertices*/
const AABB& getOriginAABB() const;
/**to be deprecated, those functions have been moved to SubMesh*/
/** get primitive type*/
CC_DEPRECATED_ATTRIBUTE PrimitiveType getPrimitiveType() const { return _subMeshes.at(0)->getPrimitiveType(); }
@ -147,12 +154,21 @@ CC_CONSTRUCTOR_ACCESS:
void buildBuffer();
/**free buffer*/
void cleanAndFreeBuffers();
/*
* calculate AABB by origin vertices
* @param the vertices list
* @param stride the stride between two vertex's position data.
*/
void calOriginAABB(const std::vector<float>& vertices, unsigned int stride);
protected:
GLuint _vertexBuffer;
Vector<SubMesh*> _subMeshes;
RenderMeshData _renderdata;
AABB _originAABB;
};
/**

View File

@ -35,6 +35,7 @@
#include "base/CCVector.h"
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -45,7 +46,7 @@ class Skeleton3D;
* MeshSkin, A class maintain a collection of bones that affect Mesh vertex.
* And it is responsible for computing matrix palletes that used by skin mesh rendering.
*/
class CC_DLL MeshSkin: public Ref
class CC_3D_DLL MeshSkin: public Ref
{
public:

452
cocos/3d/CCOBB.cpp Executable file
View File

@ -0,0 +1,452 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "3d/CCOBB.h"
NS_CC_BEGIN
#define ROTATE(a,i,j,k,l) g=a.m[i + 4 * j]; h=a.m[k + 4 * l]; a.m[i + 4 * j]=(float)(g-s*(h+g*tau)); a.m[k + 4 * l]=(float)(h+s*(g-h*tau));
static Mat4 _getConvarianceMatrix(const Vec3* vertPos, int vertCount)
{
int i;
Mat4 Cov;
double S1[3];
double S2[3][3];
S1[0] = S1[1] = S1[2] = 0.0;
S2[0][0] = S2[1][0] = S2[2][0] = 0.0;
S2[0][1] = S2[1][1] = S2[2][1] = 0.0;
S2[0][2] = S2[1][2] = S2[2][2] = 0.0;
// get center of mass
for(i=0; i<vertCount; i++)
{
S1[0] += vertPos[i].x;
S1[1] += vertPos[i].y;
S1[2] += vertPos[i].z;
S2[0][0] += vertPos[i].x * vertPos[i].x;
S2[1][1] += vertPos[i].y * vertPos[i].y;
S2[2][2] += vertPos[i].z * vertPos[i].z;
S2[0][1] += vertPos[i].x * vertPos[i].y;
S2[0][2] += vertPos[i].x * vertPos[i].z;
S2[1][2] += vertPos[i].y * vertPos[i].z;
}
float n = (float)vertCount;
// now get covariances
Cov.m[0] = (float)(S2[0][0] - S1[0]*S1[0] / n) / n;
Cov.m[5] = (float)(S2[1][1] - S1[1]*S1[1] / n) / n;
Cov.m[10] = (float)(S2[2][2] - S1[2]*S1[2] / n) / n;
Cov.m[4] = (float)(S2[0][1] - S1[0]*S1[1] / n) / n;
Cov.m[9] = (float)(S2[1][2] - S1[1]*S1[2] / n) / n;
Cov.m[8] = (float)(S2[0][2] - S1[0]*S1[2] / n) / n;
Cov.m[1] = Cov.m[4];
Cov.m[2] = Cov.m[8];
Cov.m[6] = Cov.m[9];
return Cov;
}
static float& _getElement( Vec3& point, int index)
{
if (index == 0)
return point.x;
if (index == 1)
return point.y;
if (index == 2)
return point.z;
CC_ASSERT(0);
return point.x;
}
static void _getEigenVectors(Mat4* vout, Vec3* dout, Mat4 a)
{
int n = 3;
int j,iq,ip,i;
double tresh, theta, tau, t, sm, s, h, g, c;
int nrot;
Vec3 b;
Vec3 z;
Mat4 v;
Vec3 d;
v = Mat4::IDENTITY;
for(ip = 0; ip < n; ip++)
{
_getElement(b, ip) = a.m[ip + 4 * ip];
_getElement(d, ip) = a.m[ip + 4 * ip];
_getElement(z, ip) = 0.0;
}
nrot = 0;
for(i = 0; i < 50; i++)
{
sm = 0.0;
for(ip = 0; ip < n; ip++) for(iq = ip+1; iq < n; iq++) sm += fabs(a.m[ip + 4 * iq]);
if( fabs(sm) < FLT_EPSILON )
{
v.transpose();
*vout = v;
*dout = d;
return;
}
if (i < 3)
tresh = 0.2 * sm / (n*n);
else
tresh = 0.0;
for(ip = 0; ip < n; ip++)
{
for(iq = ip + 1; iq < n; iq++)
{
g = 100.0 * fabs(a.m[ip + iq * 4]);
float dmip = _getElement(d, ip);
float dmiq = _getElement(d, iq);
if( i>3 && fabs(dmip) + g == fabs(dmip) && fabs(dmiq) + g == fabs(dmiq) )
{
a.m[ip + 4 * iq] = 0.0;
}
else if (fabs(a.m[ip + 4 * iq]) > tresh)
{
h = dmiq - dmip;
if (fabs(h) + g == fabs(h))
{
t=(a.m[ip + 4 * iq])/h;
}
else
{
theta = 0.5 * h / (a.m[ip + 4 * iq]);
t=1.0 / (fabs(theta) + sqrt(1.0 + theta * theta));
if (theta < 0.0) t = -t;
}
c = 1.0 / sqrt(1+t*t);
s = t*c;
tau = s / (1.0+c);
h = t * a.m[ip + 4 * iq];
_getElement(z, ip) -= (float)h;
_getElement(z, iq) += (float)h;
_getElement(d, ip) -= (float)h;
_getElement(d, iq) += (float)h;
a.m[ip + 4 * iq]=0.0;
for(j = 0; j < ip; j++) { ROTATE(a,j,ip,j,iq); }
for(j = ip + 1; j < iq; j++) { ROTATE(a,ip,j,j,iq); }
for(j = iq + 1; j < n; j++) { ROTATE(a,ip,j,iq,j); }
for(j = 0; j < n; j++) { ROTATE(v,j,ip,j,iq); }
nrot++;
}
}
}
for(ip = 0; ip < n; ip++)
{
_getElement(b, ip) += _getElement(z, ip);
_getElement(d, ip) = _getElement(b, ip);
_getElement(z, ip) = 0.0f;
}
}
v.transpose();
*vout = v;
*dout = d;
return;
}
static Mat4 _getOBBOrientation(const Vec3* vertPos, int num)
{
Mat4 Cov;
if (num <= 0)
return Mat4::IDENTITY;
Cov = _getConvarianceMatrix(vertPos, num);
// now get eigenvectors
Mat4 Evecs;
Vec3 Evals;
_getEigenVectors(&Evecs, &Evals, Cov);
Evecs.transpose();
return Evecs;
}
OBB::OBB()
{
reset();
}
OBB::OBB(const AABB& aabb)
{
reset();
_center = (aabb._min + aabb._max);
_center.scale(0.5f);
_xAxis = Vec3(1.0f, 0.0f, 0.0f);
_yAxis = Vec3(0.0f, 1.0f, 0.0f);
_zAxis = Vec3(0.0f, 0.0f, 1.0f);
_extents = aabb._max - aabb._min;
_extents.scale(0.5f);
}
OBB::OBB(const Vec3* verts, int num)
{
if (!verts) return;
reset();
Mat4 matTransform = _getOBBOrientation(verts, num);
// For matTransform is orthogonal, so the inverse matrix is just rotate it;
matTransform.transpose();
Vec3 vecMax = matTransform * Vec3(verts[0].x, verts[0].y, verts[0].z);
Vec3 vecMin = vecMax;
for (int i = 1; i < num; i++)
{
Vec3 vect = matTransform * Vec3(verts[i].x, verts[i].y, verts[i].z);
vecMax.x = vecMax.x > vect.x ? vecMax.x : vect.x;
vecMax.y = vecMax.y > vect.y ? vecMax.y : vect.y;
vecMax.z = vecMax.z > vect.z ? vecMax.z : vect.z;
vecMin.x = vecMin.x < vect.x ? vecMin.x : vect.x;
vecMin.y = vecMin.y < vect.y ? vecMin.y : vect.y;
vecMin.z = vecMin.z < vect.z ? vecMin.z : vect.z;
}
matTransform.transpose();
_xAxis = Vec3(matTransform.m[0], matTransform.m[1], matTransform.m[2]);
_yAxis = Vec3(matTransform.m[4], matTransform.m[5], matTransform.m[6]);
_zAxis = Vec3(matTransform.m[8], matTransform.m[9], matTransform.m[10]);
_center = 0.5f * (vecMax + vecMin);
_center *= matTransform;
_xAxis.normalize();
_yAxis.normalize();
_zAxis.normalize();
_extents = 0.5f * (vecMax - vecMin);
}
bool OBB::containPoint(const Vec3& point) const
{
Vec3 vd = point - _center;
float d = vd.dot(_xAxis);
if (d > _extents.x || d < -_extents.x)
return false;
d = vd.dot(_yAxis);
if (d > _extents.y || d < -_extents.y)
return false;
d = vd.dot(_zAxis);
if (d > _extents.z || d < -_extents.z)
return false;
return true;
}
void OBB::set(const Vec3& center, const Vec3& xAxis, const Vec3& yAxis, const Vec3& zAxis, const Vec3& extents)
{
_center = center;
_xAxis = xAxis;
_yAxis = yAxis;
_zAxis = zAxis;
_extents = extents;
}
void OBB::reset()
{
memset(this, 0, sizeof(OBB));
}
void OBB::getCorners(Vec3* verts) const
{
Vec3 extX = _xAxis * _extents.x;
Vec3 extY = _yAxis * _extents.y;
Vec3 extZ = _zAxis * _extents.z;
verts[0] = _center - extX + extY + extZ; // left top front
verts[1] = _center - extX - extY + extZ; // left bottom front
verts[2] = _center + extX - extY + extZ; // right bottom front
verts[3] = _center + extX + extY + extZ; // right top front
verts[4] = _center + extX + extY - extZ; // right top back
verts[5] = _center + extX - extY - extZ; // right bottom back
verts[6] = _center - extX - extY - extZ; // left bottom back
verts[7] = _center - extX + extY - extZ; // left top back
}
float OBB::projectPoint(const Vec3& point, const Vec3& axis)const
{
float dot = axis.dot(point);
float ret = dot * point.length();
return ret;
}
void OBB::getInterval(const OBB& box, const Vec3& axis, float &min, float &max)const
{
Vec3 corners[8];
box.getCorners(corners);
float value;
min = max = projectPoint(axis, corners[0]);
for(int i = 1; i < 8; i++)
{
value = projectPoint(axis, corners[i]);
min = MIN(min, value);
max = MAX(max, value);
}
}
Vec3 OBB::getEdgeDirection(int index)const
{
Vec3 corners[8];
getCorners(corners);
Vec3 tmpLine;
switch(index)
{
case 0:// edge with x axis
tmpLine = corners[5] - corners[6];
tmpLine.normalize();
break;
case 1:// edge with y axis
tmpLine = corners[7] - corners[6];
tmpLine.normalize();
break;
case 2:// edge with z axis
tmpLine = corners[1] - corners[6];
tmpLine.normalize();
break;
default:
CCASSERT(0, "Invalid index!");
break;
}
return tmpLine;
}
Vec3 OBB::getFaceDirection(int index) const
{
Vec3 corners[8];
getCorners(corners);
Vec3 faceDirection, v0, v1;
switch(index)
{
case 0:// front and back
v0 = corners[2] - corners[1];
v1 = corners[0] - corners[1];
Vec3::cross(v0, v1, &faceDirection);
faceDirection.normalize();
break;
case 1:// left and right
v0 = corners[5] - corners[2];
v1 = corners[3] - corners[2];
Vec3::cross(v0, v1, &faceDirection);
faceDirection.normalize();
break;
case 2:// top and bottom
v0 = corners[1] - corners[2];
v1 = corners[5] - corners[2];
Vec3::cross(v0, v1, &faceDirection);
faceDirection.normalize();
break;
default:
CCASSERT(0, "Invalid index!");
break;
}
return faceDirection;
}
bool OBB::intersects(const OBB& box) const
{
float min1, max1, min2, max2;
for (int i = 0; i < 3; i++)
{
getInterval(*this, getFaceDirection(i), min1, max1);
getInterval(box, getFaceDirection(i), min2, max2);
if (max1 < min2 || max2 < min1) return false;
}
for (int i = 0; i < 3; i++)
{
getInterval(*this, box.getFaceDirection(i), min1, max1);
getInterval(box, box.getFaceDirection(i), min2, max2);
if (max1 < min2 || max2 < min1) return false;
}
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
Vec3 axis;
Vec3::cross(getFaceDirection(i), box.getFaceDirection(j), &axis);
getInterval(*this, axis, min1, max1);
getInterval(box, axis, min2, max2);
if (max1 < min2 || max2 < min1) return false;
}
}
return true;
}
void OBB::transform(const Mat4& mat)
{
Vec4 newcenter = mat * Vec4(_center.x, _center.y, _center.z, 1.0f);// center;
_center.x = newcenter.x;
_center.y = newcenter.y;
_center.z = newcenter.z;
_xAxis = mat * _xAxis;
_yAxis = mat * _yAxis;
_zAxis = mat * _zAxis;
_xAxis.normalize();
_yAxis.normalize();
_zAxis.normalize();
Vec3 scale, trans;
Quaternion quat;
mat.decompose(&scale, &quat, &trans);
_extents.x *= scale.x;
_extents.y *= scale.y;
_extents.z *= scale.z;
}
NS_CC_END

118
cocos/3d/CCOBB.h Normal file
View File

@ -0,0 +1,118 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_OBB_H__
#define __CC_OBB_H__
#include "CCAABB.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
class CC_3D_DLL OBB
{
public:
OBB();
/*
* Construct obb from oriented bounding box
*/
OBB(const AABB& aabb);
/*
* Construct obb from points
*/
OBB(const Vec3* verts, int num);
/*
* Check point in
*/
bool containPoint(const Vec3& point) const;
/*
* Specify obb values
*/
void set(const Vec3& center, const Vec3& _xAxis, const Vec3& _yAxis, const Vec3& _zAxis, const Vec3& _extents);
/*
* Clear obb
*/
void reset();
/* face to the obb's -z direction
* verts[0] : left top front
* verts[1] : left bottom front
* verts[2] : right bottom front
* verts[3] : right top front
*
* face to the obb's z direction
* verts[4] : right top back
* verts[5] : right bottom back
* verts[6] : left bottom back
* verts[7] : left top back
*/
void getCorners(Vec3* verts) const;
/*
* Check intersect with other
*/
bool intersects(const OBB& box) const;
/**
* Transforms the obb by the given transformation matrix.
*/
void transform(const Mat4& mat);
protected:
/*
* Project point to the target axis
*/
float projectPoint(const Vec3& point, const Vec3& axis) const;
/*
* Calculate the min and max project value of through the box's corners
*/
void getInterval(const OBB& box, const Vec3& axis, float &min, float &max) const;
/*
* Get the edege of x y z axis direction
*/
Vec3 getEdgeDirection(int index) const;
/*
* Get the face of x y z axis direction
*/
Vec3 getFaceDirection(int index) const;
public:
Vec3 _center; // obb center
Vec3 _xAxis; // x axis of obb, unit vector
Vec3 _yAxis; // y axis of obb, unit vecotr
Vec3 _zAxis; // z axis of obb, unit vector
Vec3 _extents; // obb length along each axis
};
NS_CC_END
#endif

158
cocos/3d/CCRay.cpp Executable file
View File

@ -0,0 +1,158 @@
/****************************************************************************
Copyright (c) Chukong Technologies Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCRay.h"
#include "CCAABB.h"
#include "CCOBB.h"
NS_CC_BEGIN
Ray::Ray()
: _direction(0, 0, 1)
{
}
Ray::Ray(const Vec3& origin, const Vec3& direction)
{
set(origin, direction);
}
Ray::~Ray()
{
}
bool Ray::intersects(const AABB& aabb) const
{
Vec3 ptOnPlane;
Vec3 min = aabb._min;
Vec3 max = aabb._max;
const Vec3& origin = _origin;
const Vec3& dir = _direction;
float t;
if (dir.x != 0.f)
{
if (dir.x > 0)
t = (min.x - origin.x) / dir.x;
else
t = (max.x - origin.x) / dir.x;
if (t > 0.f)
{
ptOnPlane = origin + t * dir;
if (min.y < ptOnPlane.y && ptOnPlane.y < max.y && min.z < ptOnPlane.z && ptOnPlane.z < max.z)
{
return true;
}
}
}
if (dir.y != 0.f)
{
if (dir.y > 0)
t = (min.y - origin.y) / dir.y;
else
t = (max.y - origin.y) / dir.y;
if (t > 0.f)
{
ptOnPlane = origin + t * dir;
if (min.z < ptOnPlane.z && ptOnPlane.z < max.z && min.x < ptOnPlane.x && ptOnPlane.x < max.x)
{
return true;
}
}
}
if (dir.z != 0.f)
{
if (dir.z > 0)
t = (min.z - origin.z) / dir.z;
else
t = (max.z - origin.z) / dir.z;
if (t > 0.f)
{
ptOnPlane = origin + t * dir;
if (min.x < ptOnPlane.x && ptOnPlane.x < max.x && min.y < ptOnPlane.y && ptOnPlane.y < max.y)
{
return true;
}
}
}
return false;
}
bool Ray::intersects(const OBB& obb) const
{
AABB aabb;
aabb._min = - obb._extents;
aabb._max = obb._extents;
Ray ray;
ray._direction = _direction;
ray._origin = _origin;
Mat4 mat = Mat4::IDENTITY;
mat.m[0] = obb._xAxis.x;
mat.m[1] = obb._xAxis.y;
mat.m[2] = obb._xAxis.z;
mat.m[4] = obb._yAxis.x;
mat.m[5] = obb._yAxis.y;
mat.m[6] = obb._yAxis.z;
mat.m[8] = obb._zAxis.x;
mat.m[9] = obb._zAxis.y;
mat.m[10] = obb._zAxis.z;
mat.m[12] = obb._center.x;
mat.m[13] = obb._center.y;
mat.m[14] = obb._center.z;
mat = mat.getInversed();
ray.transform(mat);
return ray.intersects(aabb);
}
void Ray::set(const Vec3& origin, const Vec3& direction)
{
_origin = origin;
_direction = direction;
}
void Ray::transform(const Mat4& matrix)
{
matrix.transformPoint(&_origin);
matrix.transformVector(&_direction);
_direction.normalize();
}
NS_CC_END

93
cocos/3d/CCRay.h Normal file
View File

@ -0,0 +1,93 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_RAY_H_
#define __CC_RAY_H_
#include "base/ccMacros.h"
#include "math/CCMath.h"
#include "CCAABB.h"
#include "CCOBB.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
class CC_3D_DLL Ray
{
public:
/**
* Constructor.
*/
Ray();
/**
* Constructor.
*/
Ray(const Ray& ray);
/**
* Constructs a new ray initialized to the specified values.
*
* @param origin The ray's origin.
* @param direction The ray's direction.
*/
Ray(const Vec3& origin, const Vec3& direction);
/**
* Destructor.
*/
~Ray();
/**
* Check whether this ray intersects the specified bounding box.
*/
bool intersects(const AABB& aabb) const;
/**
* Check whether this ray intersects the specified obb.
*/
bool intersects(const OBB& obb) const;
/**
* Sets this ray to the specified values.
*
* @param origin The ray's origin.
* @param direction The ray's direction.
*/
void set(const Vec3& origin, const Vec3& direction);
/**
* Transforms this ray by the given transformation matrix.
*
* @param matrix The transformation matrix to transform by.
*/
void transform(const Mat4& matrix);
Vec3 _origin; // The ray origin position.
Vec3 _direction; // The ray direction vector.
};
NS_CC_END
#endif

View File

@ -34,13 +34,14 @@
#include "base/CCVector.h"
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
/**
* Defines a basic hierachial structure of transformation spaces.
*/
class CC_DLL Bone3D : public Ref
class CC_3D_DLL Bone3D : public Ref
{
friend class Skeleton3D;
friend class MeshSkin;
@ -183,7 +184,7 @@ protected:
* Skeleton
*
*/
class CC_DLL Skeleton3D: public Ref
class CC_3D_DLL Skeleton3D: public Ref
{
public:

View File

@ -382,7 +382,7 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
}
//support tint and fade
meshCommand.setDisplayColor(Vec4(color.r, color.g, color.b, color.a));
Director::getInstance()->getRenderer()->addCommand(&meshCommand);
renderer->addCommand(&meshCommand);
}
}
@ -399,4 +399,51 @@ const BlendFunc& Sprite3D::getBlendFunc() const
return _blend;
}
AABB Sprite3D::getAABB() const
{
Mat4 nodeToWorldTransform(getNodeToWorldTransform());
// If nodeToWorldTransform matrix isn't changed, we don't need to transform aabb.
if (memcmp(_nodeToWorldTransform.m, nodeToWorldTransform.m, sizeof(Mat4)) == 0)
{
return _aabb;
}
else
{
Mat4 transform(nodeToWorldTransform);
_aabb = _mesh->getOriginAABB();
if (getSkin() && getSkin()->getRootBone())
{
transform = nodeToWorldTransform * getSkin()->getRootBone()->getWorldMat();
}
_aabb.transform(transform);
_nodeToWorldTransform = nodeToWorldTransform;
}
return _aabb;
}
Rect Sprite3D::getBoundingBox() const
{
AABB aabb = getAABB();
Rect ret(aabb._min.x, aabb._min.y, (aabb._max.x - aabb._min.x), (aabb._max.y - aabb._min.y));
return ret;
}
void Sprite3D::setCullFace(GLenum cullFace)
{
for (auto& it : _meshCommands) {
it.setCullFace(cullFace);
}
}
void Sprite3D::setCullFaceEnabled(bool enable)
{
for (auto& it : _meshCommands) {
it.setCullFaceEnabled(enable);
}
}
NS_CC_END

View File

@ -33,6 +33,8 @@
#include "base/CCProtocols.h"
#include "2d/CCNode.h"
#include "renderer/CCMeshCommand.h"
#include "CCAABB.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -45,7 +47,7 @@ class SubMeshState;
class Skeleton3D;
/** Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */
class CC_DLL Sprite3D : public Node, public BlendProtocol
class CC_3D_DLL Sprite3D : public Node, public BlendProtocol
{
public:
/** creates a Sprite3D*/
@ -79,6 +81,25 @@ public:
// overrides
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
virtual const BlendFunc &getBlendFunc() const override;
/*
* Get AABB
* If the sprite has animation, it can't be calculated accuratly,
* because bone can drive the vertices, we just use the origin vertices
* to calculate the AABB.
*/
AABB getAABB() const;
/**
* Returns 2d bounding-box
* Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate.
*/
virtual Rect getBoundingBox() const override;
// set which face is going to cull, GL_BACK, GL_FRONT, GL_FRONT_AND_BACK, default GL_BACK
void setCullFace(GLenum cullFace);
// set cull face enable or not
void setCullFaceEnabled(bool enable);
CC_CONSTRUCTOR_ACCESS:
@ -119,9 +140,12 @@ protected:
std::unordered_map<std::string, AttachNode*> _attachments;
BlendFunc _blend;
mutable AABB _aabb; // cache current aabb
mutable Mat4 _nodeToWorldTransform; // cache the matrix
};
extern std::string CC_DLL s_attributeNames[];//attribute names array
extern std::string CC_3D_DLL s_attributeNames[];//attribute names array
NS_CC_END
#endif // __SPRITE3D_H_

View File

@ -34,6 +34,7 @@
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "renderer/CCGLProgram.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -57,7 +58,7 @@ enum class PrimitiveType
/**
* SubMesh: Defines the way the mesh's vertices how to be connected together.
*/
class CC_DLL SubMesh : public Ref
class CC_3D_DLL SubMesh : public Ref
{
friend class Mesh;
public:

View File

@ -34,6 +34,7 @@
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "renderer/CCGLProgram.h"
#include "3d/3dExport.h"
NS_CC_BEGIN
@ -42,7 +43,7 @@ class MeshSkin;
/**
* SubMeshState: visibility and apperence of submesh
*/
class CC_DLL SubMeshState : public Ref
class CC_3D_DLL SubMeshState : public Ref
{
public:

View File

@ -1,15 +1,37 @@
set(COCOS_3D_SRC
3d/CCSkeleton3D.cpp
3d/CCAttachNode.cpp
3d/CCSubMesh.cpp
3d/CCSubMeshState.cpp
3d/CCMesh.cpp
3d/CCObjLoader.cpp
3d/CCSprite3D.cpp
3d/CCSprite3DMaterial.cpp
3d/CCAnimate3D.cpp
3d/CCAnimation3D.cpp
3d/CCBundle3D.cpp
3d/CCMeshSkin.cpp
3d/CCBundleReader.cpp
CCRay.cpp
CCAABB.cpp
CCOBB.cpp
CCAnimate3D.cpp
CCAnimation3D.cpp
CCAttachNode.cpp
CCBundle3D.cpp
CCBundleReader.cpp
CCMesh.cpp
CCMeshSkin.cpp
CCSprite3DMaterial.cpp
CCObjLoader.cpp
CCSkeleton3D.cpp
CCSprite3D.cpp
CCSubMesh.cpp
CCSubMeshState.cpp
)
include_directories(
3d
)
add_library(cocos3d STATIC
${COCOS_3D_SRC}
)
target_link_libraries(cocos3d
cocos2d
)
set_target_properties(cocos3d
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)

41
cocos/3d/cocos3d.h Executable file
View File

@ -0,0 +1,41 @@
/****************************************************************************
Copyright (c) 2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __COCOS_3D_COCOS3D_H__
#define __COCOS_3D_COCOS3D_H__
//3d
#include "3d/CCAABB.h"
#include "3d/CCOBB.h"
#include "3d/CCRay.h"
#include "3d/CCSprite3D.h"
#include "3d/CCMesh.h"
#include "3d/CCMeshSkin.h"
#include "3d/CCAnimate3D.h"
#include "3d/CCAnimation3D.h"
#include "3d/CCSprite3DMaterial.h"
#include "3d/CCSubMeshState.h"
#include "3d/CCAttachNode.h"
#endif

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\2d\libcocos2d.vcxproj">
<Project>{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\CCAABB.cpp" />
<ClCompile Include="..\CCAnimate3D.cpp" />
<ClCompile Include="..\CCAnimation3D.cpp" />
<ClCompile Include="..\CCAttachNode.cpp" />
<ClCompile Include="..\CCBundle3D.cpp" />
<ClCompile Include="..\CCBundleReader.cpp" />
<ClCompile Include="..\CCMesh.cpp" />
<ClCompile Include="..\CCMeshSkin.cpp" />
<ClCompile Include="..\CCOBB.cpp" />
<ClCompile Include="..\CCObjLoader.cpp" />
<ClCompile Include="..\CCRay.cpp" />
<ClCompile Include="..\CCSkeleton3D.cpp" />
<ClCompile Include="..\CCSprite3D.cpp" />
<ClCompile Include="..\CCSprite3DMaterial.cpp" />
<ClCompile Include="..\CCSubMesh.cpp" />
<ClCompile Include="..\CCSubMeshState.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\3dExport.h" />
<ClInclude Include="..\CCAABB.h" />
<ClInclude Include="..\CCAnimate3D.h" />
<ClInclude Include="..\CCAnimation3D.h" />
<ClInclude Include="..\CCAnimationCurve.h" />
<ClInclude Include="..\CCAttachNode.h" />
<ClInclude Include="..\CCBundle3D.h" />
<ClInclude Include="..\CCBundle3DData.h" />
<ClInclude Include="..\CCBundleReader.h" />
<ClInclude Include="..\CCMesh.h" />
<ClInclude Include="..\CCMeshSkin.h" />
<ClInclude Include="..\CCOBB.h" />
<ClInclude Include="..\CCObjLoader.h" />
<ClInclude Include="..\CCRay.h" />
<ClInclude Include="..\CCSkeleton3D.h" />
<ClInclude Include="..\CCSprite3D.h" />
<ClInclude Include="..\CCSprite3DMaterial.h" />
<ClInclude Include="..\CCSubMesh.h" />
<ClInclude Include="..\CCSubMeshState.h" />
<ClInclude Include="..\cocos3d.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E24950FA-5BC1-4AEE-A900-4F0259354BF0}</ProjectGuid>
<RootNamespace>libcocos3d</RootNamespace>
<ProjectName>libcocos3d</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>opengl32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>opengl32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="3d">
<UniqueIdentifier>{6107c94d-579b-488f-86b7-c191d4c3b9aa}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\CCAABB.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCAnimate3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCAnimation3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCAttachNode.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCBundle3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCBundleReader.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCMesh.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCMeshSkin.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCOBB.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCObjLoader.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCRay.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCSkeleton3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCSprite3D.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCSprite3DMaterial.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCSubMesh.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\CCSubMeshState.cpp">
<Filter>3d</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CCAABB.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCAnimate3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCAnimation3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCAnimationCurve.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCAttachNode.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCBundle3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCBundle3DData.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCBundleReader.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCMesh.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCMeshSkin.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCOBB.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCObjLoader.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCRay.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCSkeleton3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCSprite3D.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCSprite3DMaterial.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCSubMesh.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\CCSubMeshState.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\cocos3d.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3dExport.h">
<Filter>3d</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -74,19 +74,6 @@ cocos2d.cpp \
2d/CCTransitionPageTurn.cpp \
2d/CCTransitionProgress.cpp \
2d/CCTweenFunction.cpp \
3d/CCAnimate3D.cpp \
3d/CCAnimation3D.cpp \
3d/CCAttachNode.cpp \
3d/CCBundle3D.cpp \
3d/CCBundleReader.cpp \
3d/CCMesh.cpp \
3d/CCMeshSkin.cpp \
3d/CCSprite3DMaterial.cpp \
3d/CCObjLoader.cpp \
3d/CCSkeleton3D.cpp \
3d/CCSprite3D.cpp \
3d/CCSubMesh.cpp \
3d/CCSubMeshState.cpp \
platform/CCGLView.cpp \
platform/CCFileUtils.cpp \
platform/CCSAXParser.cpp \
@ -127,8 +114,10 @@ base/CCEventListenerTouch.cpp \
base/CCEventMouse.cpp \
base/CCEventTouch.cpp \
base/CCIMEDispatcher.cpp \
base/CCModuleManager.cpp \
base/CCNS.cpp \
base/CCProfiling.cpp \
base/ccRandom.cpp \
base/CCRef.cpp \
base/CCScheduler.cpp \
base/CCScriptSupport.cpp \
@ -222,13 +211,10 @@ LOCAL_EXPORT_LDLIBS := -lGLESv2 \
-lz \
-landroid
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_freetype2_static
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_png_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_jpeg_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_tiff_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_webp_static
LOCAL_STATIC_LIBRARIES := cocos_freetype2_static
LOCAL_STATIC_LIBRARIES += chipmunk_static
LOCAL_STATIC_LIBRARIES += cocos_png_static
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static
# define the macro to compile through support/zip_support/ioapi.c
LOCAL_CFLAGS := -DUSE_FILE32API
@ -241,7 +227,4 @@ include $(BUILD_STATIC_LIBRARY)
$(call import-module,freetype2/prebuilt/android)
$(call import-module,chipmunk)
$(call import-module,platform/android)
$(call import-module,jpeg/prebuilt/android)
$(call import-module,png/prebuilt/android)
$(call import-module,tiff/prebuilt/android)
$(call import-module,webp/prebuilt/android)

View File

@ -5,7 +5,6 @@ endif()
set(COCOS_SRC cocos2d.cpp)
include(2d/CMakeLists.txt)
include(3d/CMakeLists.txt)
include(platform/CMakeLists.txt)
include(physics/CMakeLists.txt)
include(math/CMakeLists.txt)
@ -16,7 +15,6 @@ include(deprecated/CMakeLists.txt)
add_library(cocos2d STATIC
${COCOS_SRC}
${COCOS_2D_SRC}
${COCOS_3D_SRC}
${COCOS_PLATFORM_SRC}
${COCOS_BASE_SRC}
${COCOS_RENDERER_SRC}

View File

@ -33,30 +33,10 @@ Camera* Camera::_visitingCamera = nullptr;
Camera* Camera::create()
{
Camera* camera = nullptr;
auto size = Director::getInstance()->getWinSize();
//create default camera
auto projection = Director::getInstance()->getProjection();
switch (projection)
{
case Director::Projection::_2D:
{
camera = Camera::createOrthographic(size.width, size.height, -1024, 1024);
break;
}
case Director::Projection::_3D:
{
float zeye = Director::getInstance()->getZEye();
camera = Camera::createPerspective(60, (GLfloat)size.width / size.height, 10, zeye + size.height / 2.0f);
Vec3 eye(size.width/2, size.height/2.0f, zeye), center(size.width/2, size.height/2, 0.0f), up(0.0f, 1.0f, 0.0f);
camera->setPosition3D(eye);
camera->lookAt(center, up);
break;
}
default:
CCLOG("unrecognized projection");
break;
}
Camera* camera = new Camera();
camera->initDefault();
camera->autorelease();
return camera;
}
@ -65,20 +45,7 @@ Camera* Camera::createPerspective(float fieldOfView, float aspectRatio, float ne
auto ret = new Camera();
if (ret)
{
ret->_fieldOfView = fieldOfView;
ret->_aspectRatio = aspectRatio;
ret->_nearPlane = nearPlane;
ret->_farPlane = farPlane;
Mat4::createPerspective(ret->_fieldOfView, ret->_aspectRatio, ret->_nearPlane, ret->_farPlane, &ret->_projection);
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
//if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode
GLView* view = Director::getInstance()->getOpenGLView();
if(view != nullptr)
{
setAdditionalProjection(view->getOrientationMatrix());
}
#endif
ret->_viewProjectionDirty = true;
ret->initPerspective(fieldOfView, aspectRatio, nearPlane, farPlane);
ret->autorelease();
return ret;
}
@ -91,20 +58,7 @@ Camera* Camera::createOrthographic(float zoomX, float zoomY, float nearPlane, fl
auto ret = new Camera();
if (ret)
{
ret->_zoom[0] = zoomX;
ret->_zoom[1] = zoomY;
ret->_nearPlane = nearPlane;
ret->_farPlane = farPlane;
Mat4::createOrthographic(ret->_zoom[0], ret->_zoom[1], ret->_nearPlane, ret->_farPlane, &ret->_projection);
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
//if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode
GLView* view = Director::getInstance()->getOpenGLView();
if(view != nullptr)
{
setAdditionalProjection(view->getOrientationMatrix());
}
#endif
ret->_viewProjectionDirty = true;
ret->initOrthographic(zoomX, zoomY, nearPlane, farPlane);
ret->autorelease();
return ret;
}
@ -203,6 +157,76 @@ void Camera::setAdditionalProjection(const Mat4& mat)
getViewProjectionMatrix();
}
bool Camera::initDefault()
{
auto size = Director::getInstance()->getWinSize();
//create default camera
auto projection = Director::getInstance()->getProjection();
switch (projection)
{
case Director::Projection::_2D:
{
initOrthographic(size.width, size.height, -1024, 1024);
setPosition3D(Vec3(0.0f, 0.0f, 0.0f));
setRotation3D(Vec3(0.f, 0.f, 0.f));
break;
}
case Director::Projection::_3D:
{
float zeye = Director::getInstance()->getZEye();
initPerspective(60, (GLfloat)size.width / size.height, 10, zeye + size.height / 2.0f);
Vec3 eye(size.width/2, size.height/2.0f, zeye), center(size.width/2, size.height/2, 0.0f), up(0.0f, 1.0f, 0.0f);
setPosition3D(eye);
lookAt(center, up);
break;
}
default:
CCLOG("unrecognized projection");
break;
}
return true;
}
bool Camera::initPerspective(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
{
_fieldOfView = fieldOfView;
_aspectRatio = aspectRatio;
_nearPlane = nearPlane;
_farPlane = farPlane;
Mat4::createPerspective(_fieldOfView, _aspectRatio, _nearPlane, _farPlane, &_projection);
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
//if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode
GLView* view = Director::getInstance()->getOpenGLView();
if(view != nullptr)
{
setAdditionalProjection(view->getOrientationMatrix());
}
#endif
_viewProjectionDirty = true;
return true;
}
bool Camera::initOrthographic(float zoomX, float zoomY, float nearPlane, float farPlane)
{
_zoom[0] = zoomX;
_zoom[1] = zoomY;
_nearPlane = nearPlane;
_farPlane = farPlane;
Mat4::createOrthographicOffCenter(0, _zoom[0], 0, _zoom[1], _nearPlane, _farPlane, &_projection);
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
//if needed, we need to add a rotation for Landscape orientations on Windows Phone 8 since it is always in Portrait Mode
GLView* view = Director::getInstance()->getOpenGLView();
if(view != nullptr)
{
setAdditionalProjection(view->getOrientationMatrix());
}
#endif
_viewProjectionDirty = true;
return true;
}
void Camera::unproject(const Size& viewport, Vec3* src, Vec3* dst) const
{
assert(dst);

View File

@ -50,6 +50,7 @@ enum class CameraFlag
*/
class CC_DLL Camera :public Node
{
friend class Scene;
public:
/**
* The type of camera.
@ -142,6 +143,11 @@ CC_CONSTRUCTOR_ACCESS:
/**set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8*/
void setAdditionalProjection(const Mat4& mat);
/** init camera */
bool initDefault();
bool initPerspective(float fieldOfView, float aspectRatio, float nearPlane, float farPlane);
bool initOrthographic(float zoomX, float zoomY, float nearPlane, float farPlane);
protected:

View File

@ -131,7 +131,7 @@ static ssize_t mydprintf(int sock, const char *format, ...)
static void sendPrompt(int fd)
{
const char prompt[] = "> ";
send(fd, prompt, sizeof(prompt),0);
send(fd, prompt, strlen(prompt),0);
}
static int printSceneGraph(int fd, Node* node, int level)

View File

@ -232,7 +232,7 @@ void Director::setDefaultValues(void)
// PVR v2 has alpha premultiplied ?
bool pvr_alpha_premultipled = conf->getValue("cocos2d.x.texture.pvrv2_has_alpha_premultiplied", Value(false)).asBool();
Texture2D::PVRImagesHavePremultipliedAlpha(pvr_alpha_premultipled);
Image::setPVRImagesHavePremultipliedAlpha(pvr_alpha_premultipled);
}
void Director::setGLDefaultValues()

View File

@ -36,7 +36,7 @@ NS_CC_BEGIN
class CC_DLL EventTouch : public Event
{
public:
static const int MAX_TOUCHES = 5;
static const int MAX_TOUCHES = 15;
enum class EventCode
{

View File

@ -0,0 +1,71 @@
/****************************************************************************
Copyright (c) 2014 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "base/CCModuleManager.h"
#include <unordered_map>
#include "base/CCConsole.h"
using namespace std;
//RegisterJPEG *temp = new RegisterJPEG();
NS_CC_BEGIN
void ModuleManager::registerModule(const string &moduleName, void* module)
{
auto &moduleMap = createMap();
if (moduleMap.find(moduleName) != moduleMap.end())
{
CCLOG("module: %s exists", moduleName.c_str());
return;
}
moduleMap[moduleName] = module;
}
void ModuleManager::unRegisterModule(const string &moduleName)
{
auto &moduleMap = createMap();
moduleMap.erase(moduleName);
}
void* ModuleManager::getModule(const string &moduleName)
{
auto &moduleMap = createMap();
auto result = moduleMap.find(moduleName);
if (result != moduleMap.end())
{
return result->second;
}
else
return nullptr;
}
unordered_map<std::string, void*>& ModuleManager::createMap()
{
static unordered_map<string, void*> map;
return map;
}
NS_CC_END

View File

@ -0,0 +1,50 @@
/****************************************************************************
Copyright (c) 2014 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __BASE_CC_MODULE_MANAGER__
#define __BASE_CC_MODULE_MANAGER__
#include <string>
#include <unordered_map>
#include "base/CCPlatformMacros.h"
NS_CC_BEGIN
class CC_DLL ModuleManager
{
public:
static void registerModule(const std::string &moduleName, void* module);
static void unRegisterModule(const std::string &moduleName);
static void* getModule(const std::string &moduleName);
private:
static std::unordered_map<std::string, void*>& createMap();
};
NS_CC_END
#endif

View File

@ -104,10 +104,12 @@ It's new in cocos2d-x since v0.99.5
#define NS_CC_BEGIN namespace cocos2d {
#define NS_CC_END }
#define USING_NS_CC using namespace cocos2d
#define NS_CC ::cocos2d
#else
#define NS_CC_BEGIN
#define NS_CC_END
#define USING_NS_CC
#define NS_CC
#endif
/** CC_PROPERTY_READONLY is used to declare a protected variable.

View File

@ -77,6 +77,7 @@ public:
{
_startPoint = _point;
_startPointCaptured = true;
_prevPoint = _point;
}
}
/**

View File

@ -22,8 +22,10 @@ set(COCOS_BASE_SRC
base/CCEventMouse.cpp
base/CCEventTouch.cpp
base/CCIMEDispatcher.cpp
base/CCModuleManager.cpp
base/CCNS.cpp
base/CCProfiling.cpp
base/ccRandom.cpp
base/CCRef.cpp
base/CCScheduler.cpp
base/CCScriptSupport.cpp

View File

@ -223,7 +223,7 @@ namespace cocos2d
*
* @since v2.0.5
*/
class ZipFile
class CC_DLL ZipFile
{
public:
/**

View File

@ -69,16 +69,17 @@ simple macro that swaps 2 variables
x = y; y = temp; \
}
#include "base/ccRandom.h"
/** @def CCRANDOM_MINUS1_1
returns a random float between -1 and 1
*/
#define CCRANDOM_MINUS1_1() ((2.0f*((float)rand()/RAND_MAX))-1.0f)
#define CCRANDOM_MINUS1_1() cocos2d::rand_minus1_1()
/** @def CCRANDOM_0_1
returns a random float between 0 and 1
*/
#define CCRANDOM_0_1() ((float)rand()/RAND_MAX)
#define CCRANDOM_0_1() cocos2d::rand_0_1()
/** @def CC_DEGREES_TO_RADIANS
converts degrees to radians
@ -203,20 +204,20 @@ It should work same as apples CFSwapInt32LittleToHost(..)
/**********************/
#if CC_ENABLE_PROFILERS
#define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers()
#define CC_PROFILER_PURGE_ALL() Profiler::getInstance()->releaseAllTimers()
#define CC_PROFILER_DISPLAY_TIMERS() NS_CC::Profiler::getInstance()->displayTimers()
#define CC_PROFILER_PURGE_ALL() NS_CC::Profiler::getInstance()->releaseAllTimers()
#define CC_PROFILER_START(__name__) ProfilingBeginTimingBlock(__name__)
#define CC_PROFILER_STOP(__name__) ProfilingEndTimingBlock(__name__)
#define CC_PROFILER_RESET(__name__) ProfilingResetTimingBlock(__name__)
#define CC_PROFILER_START(__name__) NS_CC::ProfilingBeginTimingBlock(__name__)
#define CC_PROFILER_STOP(__name__) NS_CC::ProfilingEndTimingBlock(__name__)
#define CC_PROFILER_RESET(__name__) NS_CC::ProfilingResetTimingBlock(__name__)
#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingBeginTimingBlock(__name__); } while(0)
#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingEndTimingBlock(__name__); } while(0)
#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingResetTimingBlock(__name__); } while(0)
#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do{ if(__cat__) NS_CC::ProfilingBeginTimingBlock(__name__); } while(0)
#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do{ if(__cat__) NS_CC::ProfilingEndTimingBlock(__name__); } while(0)
#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do{ if(__cat__) NS_CC::ProfilingResetTimingBlock(__name__); } while(0)
#define CC_PROFILER_START_INSTANCE(__id__, __name__) do{ ProfilingBeginTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do{ ProfilingEndTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#define CC_PROFILER_START_INSTANCE(__id__, __name__) do{ NS_CC::ProfilingBeginTimingBlock( NS_CC::String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do{ NS_CC::ProfilingEndTimingBlock( NS_CC::String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ NS_CC::ProfilingResetTimingBlock( NS_CC::String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
#else

32
cocos/base/ccRandom.cpp Normal file
View File

@ -0,0 +1,32 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "ccRandom.h"
std::mt19937 &cocos2d::RandomHelper::getEngine() {
static std::random_device seed_gen;
static std::mt19937 engine(seed_gen());
return engine;
}

99
cocos/base/ccRandom.h Normal file
View File

@ -0,0 +1,99 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __ccRandom_H_
#define __ccRandom_H_
#include "base/CCPlatformMacros.h"
#include <random>
NS_CC_BEGIN
class CC_DLL RandomHelper {
public:
template<typename T>
static inline T random_real(T min, T max) {
std::uniform_real_distribution<T> dist(min, max);
auto &mt = RandomHelper::getEngine();
return dist(mt);
}
template<typename T>
static inline T random_int(T min, T max) {
std::uniform_int_distribution<> dist(min, max);
auto &mt = RandomHelper::getEngine();
return dist(mt);
}
private:
static std::mt19937 &getEngine();
};
/**
* returns a random value between `min` and `max`
*/
template<typename T>
inline T random(T min, T max) {
return RandomHelper::random_int(min, max);
}
template<>
inline float random(float min, float max) {
return RandomHelper::random_real(min, max);
}
template<>
inline long double random(long double min, long double max) {
return RandomHelper::random_real(min, max);
}
template<>
inline double random(double min, double max) {
return RandomHelper::random_real(min, max);
}
/**
* returns a random int between 0 and RAND_MAX
*/
inline int random() {
return cocos2d::random(0, RAND_MAX);
};
/**
* returns a random float between -1 and 1
*/
inline float rand_minus1_1() {
return cocos2d::random(-1.f, 1.f);
};
/**
* returns a random float between 0 and 1
*/
inline float rand_0_1() {
return cocos2d::random(0.f, 1.f);
};
NS_CC_END
#endif //__ccRandom_H_

View File

@ -348,6 +348,11 @@ struct CC_DLL BlendFunc
return src == a.src && dst == a.dst;
}
bool operator!=(const BlendFunc &a) const
{
return src != a.src || dst != a.dst;
}
bool operator<(const BlendFunc &a) const
{
return src < a.src || (src == a.src && dst < a.dst);

View File

@ -31,7 +31,7 @@ NS_CC_BEGIN
CC_DLL const char* cocos2dVersion()
{
return "cocos2d-x 3.2";
return "cocos2d-x 3.3";
}
NS_CC_END

View File

@ -29,8 +29,8 @@ THE SOFTWARE.
#define __COCOS2D_H__
// 0x00 HI ME LO
// 00 03 02 00
#define COCOS2D_VERSION 0x00030200
// 00 03 03 00
#define COCOS2D_VERSION 0x00030300
//
// all cocos2d include files
@ -154,6 +154,10 @@ THE SOFTWARE.
#include "renderer/ccShaders.h"
#include "renderer/CCTexture2D.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCVertexIndexBuffer.h"
#include "renderer/CCVertexIndexData.h"
#include "renderer/CCPrimitive.h"
#include "renderer/CCPrimitiveCommand.h"
// physics
#include "physics/CCPhysicsBody.h"
@ -261,16 +265,6 @@ THE SOFTWARE.
#include "2d/CCComponent.h"
#include "2d/CCComponentContainer.h"
//3d
#include "3d/CCSprite3D.h"
#include "3d/CCMesh.h"
#include "3d/CCMeshSkin.h"
#include "3d/CCAnimate3D.h"
#include "3d/CCAnimation3D.h"
#include "3d/CCSprite3DMaterial.h"
#include "3d/CCSubMeshState.h"
#include "3d/CCAttachNode.h"
// Deprecated include
#include "deprecated/CCDictionary.h"
#include "deprecated/CCArray.h"

View File

@ -36,7 +36,7 @@ $(LOCAL_PATH) \
$(LOCAL_PATH)/../../..
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_extension_static
LOCAL_STATIC_LIBRARIES := cocos_extension_static
include $(BUILD_STATIC_LIBRARY)

View File

@ -516,9 +516,6 @@ void ColorFrame::onEnter(Frame *nextFrame)
_betweenGreen = color.g - _color.g;
_betweenBlue = color.b - _color.b;
}
_node->setCascadeColorEnabled(true);
_node->setCascadeOpacityEnabled(true);
}
void ColorFrame::apply(float percent)

View File

@ -71,8 +71,8 @@ $(LOCAL_PATH)/../..
LOCAL_CFLAGS += -fexceptions
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_ui_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
LOCAL_STATIC_LIBRARIES := cocos_ui_static
LOCAL_STATIC_LIBRARIES += cocosdenshion_static
include $(BUILD_STATIC_LIBRARY)

View File

@ -467,7 +467,7 @@ void Armature::onExit()
void Armature::visit(cocos2d::Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible)
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -153,7 +153,7 @@ void ArmatureAnimation::setSpeedScale(float speedScale)
bone->getTween()->setProcessScale(_processScale);
if (bone->getChildArmature())
{
bone->getChildArmature()->getAnimation()->setProcessScale(_processScale);
bone->getChildArmature()->getAnimation()->setSpeedScale(_processScale);
}
}
}
@ -228,7 +228,7 @@ void ArmatureAnimation::play(const std::string& animationName, int durationTo,
if (bone->getChildArmature())
{
bone->getChildArmature()->getAnimation()->setProcessScale(_processScale);
bone->getChildArmature()->getAnimation()->setSpeedScale(_processScale);
}
}
else

View File

@ -108,7 +108,7 @@ void BatchNode::removeChild(Node* child, bool cleanup)
void BatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible)
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -36,7 +36,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/..
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_STATIC_LIBRARIES := cocos2dx_static
include $(BUILD_STATIC_LIBRARY)

View File

@ -30,13 +30,14 @@ THE SOFTWARE.
// todo:
// when in MAC or windows, it includes <OpenGL/gl.h>
#include "CCGL.h"
#include "base/ccMacros.h"
namespace cocos2d {
struct AffineTransform;
void CGAffineToGL(const AffineTransform &t, GLfloat *m);
void GLToCGAffine(const GLfloat *m, AffineTransform *t);
CC_DLL void CGAffineToGL(const AffineTransform &t, GLfloat *m);
CC_DLL void GLToCGAffine(const GLfloat *m, AffineTransform *t);
}//namespace cocos2d
#endif // __SUPPORT_TRANSFORM_UTILS_H__

View File

@ -16,9 +16,9 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/..
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_curl_static
LOCAL_WHOLE_STATIC_LIBRARIES += libwebsockets_static
LOCAL_STATIC_LIBRARIES := cocos2dx_static
LOCAL_STATIC_LIBRARIES += cocos_curl_static
LOCAL_STATIC_LIBRARIES += libwebsockets_static
include $(BUILD_STATIC_LIBRARY)

View File

@ -65,6 +65,8 @@ public:
static void setAccelerometerInterval(float interval);
static Data getTextureDataForText(const char * text, const FontDefinition& textDefinition, TextAlign align, int &width, int &height, bool& hasPremultipliedAlpha);
static void setKeepScreenOn(bool value);
private:
CC_DISALLOW_IMPLICIT_CONSTRUCTORS(Device);

View File

@ -31,12 +31,6 @@ THE SOFTWARE.
#include "base/CCData.h"
#ifdef EMSCRIPTEN
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#endif // EMSCRIPTEN
extern "C"
{
// To resolve link error when building 32bits with Xcode 6.
@ -57,22 +51,21 @@ extern "C"
{
return strerror(errnum);
}
// int fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs);
int fputs$UNIX2003(const char *str, FILE *stream)
{
return fputs(str, stream);
}
#endif
#endif
#include "png.h"
#include "tiffio.h"
#include "base/etc1.h"
#include "jpeglib.h"
}
#include "base/s3tc.h"
#include "base/atitc.h"
#include "base/pvr.h"
#include "base/TGAlib.h"
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
#include "decode.h"
#endif
#include "base/ccMacros.h"
#include "CCCommon.h"
#include "CCStdC.h"
@ -80,6 +73,7 @@ extern "C"
#include "base/CCConfiguration.h"
#include "base/ccUtils.h"
#include "base/ZipUtils.h"
#include "base/CCModuleManager.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "android/CCFileUtilsAndroid.h"
#endif
@ -96,7 +90,6 @@ NS_CC_BEGIN
namespace
{
static const int PVR_TEXTURE_FLAG_TYPE_MASK = 0xff;
static bool _PVRHaveAlphaPremultiplied = false;
// Values taken from PVRTexture.h from http://www.imgtec.com
@ -759,158 +752,28 @@ bool Image::isCompressed()
return Texture2D::getPixelFormatInfoMap().at(_renderFormat).compressed;
}
namespace
{
/*
* ERROR HANDLING:
*
* The JPEG library's standard error handler (jerror.c) is divided into
* several "methods" which you can override individually. This lets you
* adjust the behavior without duplicating a lot of code, which you might
* have to update with each future release.
*
* We override the "error_exit" method so that control is returned to the
* library's caller when a fatal error occurs, rather than calling exit()
* as the standard error_exit method does.
*
* We use C's setjmp/longjmp facility to return control. This means that the
* routine which calls the JPEG library must first execute a setjmp() call to
* establish the return point. We want the replacement error_exit to do a
* longjmp(). But we need to make the setjmp buffer accessible to the
* error_exit routine. To do this, we make a private extension of the
* standard JPEG error handler object. (If we were using C++, we'd say we
* were making a subclass of the regular error handler.)
*
* Here's the extended error handler struct:
*/
struct MyErrorMgr
{
struct jpeg_error_mgr pub; /* "public" fields */
jmp_buf setjmp_buffer; /* for return to caller */
};
typedef struct MyErrorMgr * MyErrorPtr;
/*
* Here's the routine that will replace the standard error_exit method:
*/
METHODDEF(void)
myErrorExit(j_common_ptr cinfo)
{
/* cinfo->err really points to a MyErrorMgr struct, so coerce pointer */
MyErrorPtr myerr = (MyErrorPtr) cinfo->err;
/* Always display the message. */
/* We could postpone this until after returning, if we chose. */
/* internal message function cann't show error message in some platforms, so we rewrite it here.
* edit it if has version confilict.
*/
//(*cinfo->err->output_message) (cinfo);
char buffer[JMSG_LENGTH_MAX];
(*cinfo->err->format_message) (cinfo, buffer);
CCLOG("jpeg error: %s", buffer);
/* Return control to the setjmp point */
longjmp(myerr->setjmp_buffer, 1);
}
}
bool Image::initWithJpgData(const unsigned char * data, ssize_t dataLen)
{
/* these are standard libjpeg structures for reading(decompression) */
struct jpeg_decompress_struct cinfo;
/* We use our private extension JPEG error handler.
* Note that this struct must live as long as the main JPEG parameter
* struct, to avoid dangling-pointer problems.
*/
struct MyErrorMgr jerr;
/* libjpeg data structure for storing one row, that is, scanline of an image */
JSAMPROW row_pointer[1] = {0};
unsigned long location = 0;
unsigned int i = 0;
bool bRet = false;
do
_hasPremultipliedAlpha = false;
JPEGModule *jpegModule = static_cast<JPEGModule*>(ModuleManager::getModule("jpeg"));
if (jpegModule)
{
/* We set up the normal JPEG error routines, then override error_exit. */
cinfo.err = jpeg_std_error(&jerr.pub);
jerr.pub.error_exit = myErrorExit;
/* Establish the setjmp return context for MyErrorExit to use. */
if (setjmp(jerr.setjmp_buffer)) {
/* If we get here, the JPEG code has signaled an error.
* We need to clean up the JPEG object, close the input file, and return.
*/
jpeg_destroy_decompress(&cinfo);
break;
}
/* setup decompression process and source, then read JPEG header */
jpeg_create_decompress( &cinfo );
#ifndef CC_TARGET_QT5
jpeg_mem_src( &cinfo, const_cast<unsigned char*>(data), dataLen );
#endif /* CC_TARGET_QT5 */
/* reading the image header which contains image information */
#if (JPEG_LIB_VERSION >= 90)
// libjpeg 0.9 adds stricter types.
jpeg_read_header( &cinfo, TRUE );
#else
jpeg_read_header( &cinfo, true );
#endif
// we only support RGB or grayscale
if (cinfo.jpeg_color_space == JCS_GRAYSCALE)
{
_renderFormat = Texture2D::PixelFormat::I8;
}else
{
cinfo.out_color_space = JCS_RGB;
_renderFormat = Texture2D::PixelFormat::RGB888;
}
/* Start decompression jpeg here */
jpeg_start_decompress( &cinfo );
/* init image info */
_width = cinfo.output_width;
_height = cinfo.output_height;
_hasPremultipliedAlpha = false;
row_pointer[0] = static_cast<unsigned char*>(malloc(cinfo.output_width*cinfo.output_components * sizeof(unsigned char)));
CC_BREAK_IF(! row_pointer[0]);
_dataLen = cinfo.output_width*cinfo.output_height*cinfo.output_components;
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
CC_BREAK_IF(! _data);
/* now actually read the jpeg into the raw buffer */
/* read one scan line at a time */
while( cinfo.output_scanline < cinfo.output_height )
{
jpeg_read_scanlines( &cinfo, row_pointer, 1 );
for( i=0; i<cinfo.output_width*cinfo.output_components;i++)
{
_data[location++] = row_pointer[0][i];
}
}
/* When read image file with broken data, jpeg_finish_decompress() may cause error.
* Besides, jpeg_destroy_decompress() shall deallocate and release all memory associated
* with the decompression object.
* So it doesn't need to call jpeg_finish_decompress().
*/
//jpeg_finish_decompress( &cinfo );
jpeg_destroy_decompress( &cinfo );
/* wrap up decompression, destroy objects, free pointers and close open files */
bRet = true;
} while (0);
if (row_pointer[0] != nullptr)
DataFromModule dataFromJPEGInit;
bool result = jpegModule->initWithJPEGData(data, dataLen, dataFromJPEGInit);
_width = dataFromJPEGInit.width;
_height = dataFromJPEGInit.height;
_renderFormat = dataFromJPEGInit.renderFormat;
_dataLen = dataFromJPEGInit.dataLength;
_data = dataFromJPEGInit.data;
return result;
}
else
{
free(row_pointer[0]);
};
return bRet;
CCLOG("jpeg module is not enabled");
return false;
}
}
bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen)
@ -1062,175 +925,28 @@ bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen)
return bRet;
}
namespace
{
static tmsize_t tiffReadProc(thandle_t fd, void* buf, tmsize_t size)
{
tImageSource* isource = (tImageSource*)fd;
uint8* ma;
uint64 mb;
unsigned long n;
unsigned long o;
tmsize_t p;
ma=(uint8*)buf;
mb=size;
p=0;
while (mb>0)
{
n=0x80000000UL;
if ((uint64)n>mb)
n=(unsigned long)mb;
if((int)(isource->offset + n) <= isource->size)
{
memcpy(ma, isource->data+isource->offset, n);
isource->offset += n;
o = n;
}
else
{
return 0;
}
ma+=o;
mb-=o;
p+=o;
if (o!=n)
{
break;
}
}
return p;
}
static tmsize_t tiffWriteProc(thandle_t fd, void* buf, tmsize_t size)
{
CC_UNUSED_PARAM(fd);
CC_UNUSED_PARAM(buf);
CC_UNUSED_PARAM(size);
return 0;
}
static uint64 tiffSeekProc(thandle_t fd, uint64 off, int whence)
{
tImageSource* isource = (tImageSource*)fd;
uint64 ret = -1;
do
{
if (whence == SEEK_SET)
{
CC_BREAK_IF(off >= (uint64)isource->size);
ret = isource->offset = (uint32)off;
}
else if (whence == SEEK_CUR)
{
CC_BREAK_IF(isource->offset + off >= (uint64)isource->size);
ret = isource->offset += (uint32)off;
}
else if (whence == SEEK_END)
{
CC_BREAK_IF(off >= (uint64)isource->size);
ret = isource->offset = (uint32)(isource->size-1 - off);
}
else
{
CC_BREAK_IF(off >= (uint64)isource->size);
ret = isource->offset = (uint32)off;
}
} while (0);
return ret;
}
static uint64 tiffSizeProc(thandle_t fd)
{
tImageSource* pImageSrc = (tImageSource*)fd;
return pImageSrc->size;
}
static int tiffCloseProc(thandle_t fd)
{
CC_UNUSED_PARAM(fd);
return 0;
}
static int tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
{
CC_UNUSED_PARAM(fd);
CC_UNUSED_PARAM(pbase);
CC_UNUSED_PARAM(psize);
return 0;
}
static void tiffUnmapProc(thandle_t fd, void* base, toff_t size)
{
CC_UNUSED_PARAM(fd);
CC_UNUSED_PARAM(base);
CC_UNUSED_PARAM(size);
}
}
bool Image::initWithTiffData(const unsigned char * data, ssize_t dataLen)
{
bool bRet = false;
do
_hasPremultipliedAlpha = true;
TIFFModule *tiffModule = static_cast<TIFFModule*>(ModuleManager::getModule("tiff"));
if (tiffModule)
{
// set the read call back function
tImageSource imageSource;
imageSource.data = data;
imageSource.size = dataLen;
imageSource.offset = 0;
TIFF* tif = TIFFClientOpen("file.tif", "r", (thandle_t)&imageSource,
tiffReadProc, tiffWriteProc,
tiffSeekProc, tiffCloseProc, tiffSizeProc,
tiffMapProc,
tiffUnmapProc);
CC_BREAK_IF(nullptr == tif);
uint32 w = 0, h = 0;
uint16 bitsPerSample = 0, samplePerPixel = 0, planarConfig = 0;
size_t npixels = 0;
DataFromModule dataFromTIFFInit;
bool result = tiffModule->initWithTIFFData(data, dataLen, dataFromTIFFInit);
_width = dataFromTIFFInit.width;
_height = dataFromTIFFInit.height;
_renderFormat = dataFromTIFFInit.renderFormat;
_dataLen = dataFromTIFFInit.dataLength;
_data = dataFromTIFFInit.data;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitsPerSample);
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplePerPixel);
TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planarConfig);
npixels = w * h;
_renderFormat = Texture2D::PixelFormat::RGBA8888;
_width = w;
_height = h;
_dataLen = npixels * sizeof (uint32);
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
uint32* raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32));
if (raster != nullptr)
{
if (TIFFReadRGBAImageOriented(tif, w, h, raster, ORIENTATION_TOPLEFT, 0))
{
/* the raster data is pre-multiplied by the alpha component
after invoking TIFFReadRGBAImageOriented*/
_hasPremultipliedAlpha = true;
memcpy(_data, raster, npixels*sizeof (uint32));
}
_TIFFfree(raster);
}
TIFFClose(tif);
bRet = true;
} while (0);
return bRet;
return result;
}
else
{
CCLOG("tiff module is not enabled");
return false;
}
}
namespace
@ -2011,42 +1727,29 @@ bool Image::initWithPVRData(const unsigned char * data, ssize_t dataLen)
bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen)
{
bool bRet = false;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
CCLOG("WEBP image format not supported on WinRT or WP8");
return false;
#else
do
{
WebPDecoderConfig config;
if (WebPInitDecoderConfig(&config) == 0) break;
if (WebPGetFeatures(static_cast<const uint8_t*>(data), dataLen, &config.input) != VP8_STATUS_OK) break;
if (config.input.width == 0 || config.input.height == 0) break;
WEBPModule *webpModule = static_cast<WEBPModule*>(ModuleManager::getModule("webp"));
if (webpModule)
{
DataFromModule dataFromWEBPInit;
bool result = webpModule->initWithWEBPData(data, dataLen, dataFromWEBPInit);
_width = dataFromWEBPInit.width;
_height = dataFromWEBPInit.height;
_renderFormat = dataFromWEBPInit.renderFormat;
_dataLen = dataFromWEBPInit.dataLength;
_data = dataFromWEBPInit.data;
config.output.colorspace = MODE_RGBA;
_renderFormat = Texture2D::PixelFormat::RGBA8888;
_width = config.input.width;
_height = config.input.height;
_dataLen = _width * _height * 4;
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
config.output.u.RGBA.rgba = static_cast<uint8_t*>(_data);
config.output.u.RGBA.stride = _width * 4;
config.output.u.RGBA.size = _dataLen;
config.output.is_external_memory = 1;
if (WebPDecode(static_cast<const uint8_t*>(data), dataLen, &config) != VP8_STATUS_OK)
{
free(_data);
_data = nullptr;
break;
}
bRet = true;
} while (0);
return result;
}
else
{
CCLOG("webp module is not enabled");
return false;
}
#endif
return bRet;
}
@ -2265,82 +1968,16 @@ bool Image::saveImageToPNG(const std::string& filePath, bool isToRGB)
}
bool Image::saveImageToJPG(const std::string& filePath)
{
bool bRet = false;
do
JPEGModule *jpegModule = static_cast<JPEGModule*>(ModuleManager::getModule("jpeg"));
if (jpegModule)
{
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE * outfile; /* target file */
JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
int row_stride; /* physical row width in image buffer */
cinfo.err = jpeg_std_error(&jerr);
/* Now we can initialize the JPEG compression object. */
jpeg_create_compress(&cinfo);
CC_BREAK_IF((outfile = fopen(filePath.c_str(), "wb")) == nullptr);
jpeg_stdio_dest(&cinfo, outfile);
cinfo.image_width = _width; /* image width and height, in pixels */
cinfo.image_height = _height;
cinfo.input_components = 3; /* # of color components per pixel */
cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, 90, TRUE);
jpeg_start_compress(&cinfo, TRUE);
row_stride = _width * 3; /* JSAMPLEs per row in image_buffer */
if (hasAlpha())
{
unsigned char *pTempData = static_cast<unsigned char*>(malloc(_width * _height * 3 * sizeof(unsigned char)));
if (nullptr == pTempData)
{
jpeg_finish_compress(&cinfo);
jpeg_destroy_compress(&cinfo);
fclose(outfile);
break;
}
for (int i = 0; i < _height; ++i)
{
for (int j = 0; j < _width; ++j)
{
pTempData[(i * _width + j) * 3] = _data[(i * _width + j) * 4];
pTempData[(i * _width + j) * 3 + 1] = _data[(i * _width + j) * 4 + 1];
pTempData[(i * _width + j) * 3 + 2] = _data[(i * _width + j) * 4 + 2];
}
}
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer[0] = & pTempData[cinfo.next_scanline * row_stride];
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
if (pTempData != nullptr)
{
free(pTempData);
}
}
else
{
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer[0] = & _data[cinfo.next_scanline * row_stride];
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
}
jpeg_finish_compress(&cinfo);
fclose(outfile);
jpeg_destroy_compress(&cinfo);
bRet = true;
} while (0);
return bRet;
return jpegModule->saveImage(filePath, this);
}
else
{
CCLOG("jpeg module is not enabled");
return false;
}
}
void Image::premultipliedAlpha()
@ -2357,7 +1994,6 @@ void Image::premultipliedAlpha()
_hasPremultipliedAlpha = true;
}
void Image::setPVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied)
{
_PVRHaveAlphaPremultiplied = haveAlphaPremultiplied;

View File

@ -26,6 +26,8 @@ THE SOFTWARE.
#ifndef __CC_IMAGE_H__
#define __CC_IMAGE_H__
#include <functional>
#include <string>
#include "base/CCRef.h"
#include "renderer/CCTexture2D.h"
@ -167,6 +169,7 @@ protected:
void premultipliedAlpha();
protected:
/**
@brief Determine how many mipmaps can we have.
@ -212,6 +215,35 @@ protected:
bool isATITC(const unsigned char *data, ssize_t dataLen);
};
/* Data returned from jpeg/tiff/webp module initialization
*/
typedef struct DataFromModule
{
Texture2D::PixelFormat renderFormat;
int width;
int height;
ssize_t dataLength;
unsigned char* data;
bool hasPremultiAlpha;
} DataFromModule;
struct JPEGModule
{
std::function<bool(const std::string &filePath, Image *image)> saveImage;
std::function<bool(const unsigned char*, ssize_t, DataFromModule &dataFromJPEGInit)> initWithJPEGData;
};
struct TIFFModule
{
std::function<bool(const unsigned char*, ssize_t, DataFromModule &dataFromJPEGInit)> initWithTIFFData;
};
struct WEBPModule
{
std::function<bool(const unsigned char*, ssize_t, DataFromModule &dataFromJPEGInit)> initWithWEBPData;
};
// end of platform group
/// @}

View File

@ -202,6 +202,12 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
setKeepScreenOnJni(value);
}
NS_CC_END
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID

View File

@ -34,6 +34,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.util.Log;
import android.widget.FrameLayout;
import android.preference.PreferenceManager.OnActivityResultListener;
@ -58,6 +59,16 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
return sContext;
}
public void setKeepScreenOn(boolean value) {
final boolean newValue = value;
runOnUiThread(new Runnable() {
@Override
public void run() {
mGLSurfaceView.setKeepScreenOn(newValue);
}
});
}
protected void onLoadNativeLibraries() {
try {
ApplicationInfo ai = getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);

View File

@ -171,6 +171,10 @@ public class Cocos2dxHelper {
Cocos2dxHelper.sAccelerometerEnabled = false;
Cocos2dxHelper.sCocos2dxAccelerometer.disable();
}
public static void setKeepScreenOn(boolean value) {
((Cocos2dxActivity)sActivity).setKeepScreenOn(value);
}
public static void preloadBackgroundMusic(final String pPath) {
Cocos2dxHelper.sCocos2dMusic.preloadBackgroundMusic(pPath);

View File

@ -100,11 +100,8 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer {
/*
* Render time MUST be counted in, or the FPS will slower than appointed.
*/
final long renderStart = System.nanoTime();
this.mLastTickInNanoSeconds = System.nanoTime();
Cocos2dxRenderer.nativeRender();
final long renderEnd = System.nanoTime();
final long renderInterval = renderEnd - renderStart;
this.mLastTickInNanoSeconds = renderEnd - renderInterval;
}
}

View File

@ -222,6 +222,16 @@ void activityInitWithOGLCntattrsJni(int* OGLCntattrs) {
}
}
void setKeepScreenOnJni(bool value) {
JniMethodInfo t;
if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setKeepScreenOn", "(Z)V")) {
t.env->CallStaticVoidMethod(t.classID, t.methodID, value);
t.env->DeleteLocalRef(t.classID);
}
}
// functions for UserDefault
bool getBoolForKeyJNI(const char* key, bool defaultValue)
{

View File

@ -40,6 +40,7 @@ extern void enableAccelerometerJni();
extern void disableAccelerometerJni();
extern void setAccelerometerIntervalJni(float interval);
extern void activityInitWithOGLCntattrsJni(int* OGLCntattrs);
extern void setKeepScreenOnJni(bool value);
// functions for UserDefault
extern bool getBoolForKeyJNI(const char* key, bool defaultValue);
extern int getIntegerForKeyJNI(const char* key, int defaultValue);

View File

@ -24,6 +24,7 @@ THE SOFTWARE.
****************************************************************************/
#include "CCGLViewImpl.h"
#include "CCApplication.h"
#include "base/CCDirector.h"
#include "base/CCTouch.h"
#include "base/CCEventDispatcher.h"
@ -101,6 +102,14 @@ public:
_view = view;
}
static void onGLFWWindowIconifyCallback(GLFWwindow* window, int iconified)
{
if (_view)
{
_view->onGLFWWindowIconifyCallback(window, iconified);
}
}
private:
static GLViewImpl* _view;
};
@ -362,6 +371,7 @@ bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float fram
glfwSetWindowPosCallback(_mainWindow, GLFWEventHandler::onGLFWWindowPosCallback);
glfwSetFramebufferSizeCallback(_mainWindow, GLFWEventHandler::onGLFWframebuffersize);
glfwSetWindowSizeCallback(_mainWindow, GLFWEventHandler::onGLFWWindowSizeFunCallback);
glfwSetWindowIconifyCallback(_mainWindow, GLFWEventHandler::onGLFWWindowIconifyCallback);
setFrameSize(rect.size.width, rect.size.height);
@ -657,9 +667,6 @@ void GLViewImpl::onGLFWKeyCallback(GLFWwindow *window, int key, int scancode, in
EventKeyboard event(g_keyCodeMap[key], GLFW_PRESS == action);
auto dispatcher = Director::getInstance()->getEventDispatcher();
dispatcher->dispatchEvent(&event);
if (key == GLFW_KEY_BACKSPACE && action == GLFW_PRESS) {
IMEDispatcher::sharedDispatcher()->dispatchDeleteBackward();
}
}
if (GLFW_RELEASE != action && g_keyCodeMap[key] == EventKeyboard::KeyCode::KEY_BACKSPACE)
{
@ -719,6 +726,18 @@ void GLViewImpl::onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int
}
}
void GLViewImpl::onGLFWWindowIconifyCallback(GLFWwindow* window, int iconified)
{
if (iconified == GL_TRUE)
{
Application::getInstance()->applicationDidEnterBackground();
}
else
{
Application::getInstance()->applicationWillEnterForeground();
}
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
static bool glew_dynamic_binding()
{

View File

@ -130,6 +130,7 @@ protected:
void onGLFWWindowPosCallback(GLFWwindow* windows, int x, int y);
void onGLFWframebuffersize(GLFWwindow* window, int w, int h);
void onGLFWWindowSizeFunCallback(GLFWwindow *window, int width, int height);
void onGLFWWindowIconifyCallback(GLFWwindow* window, int iconified);
bool _captured;
bool _supportTouch;

View File

@ -477,6 +477,11 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
}
NS_CC_END
#endif // CC_PLATFORM_IOS

View File

@ -499,6 +499,10 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
}
NS_CC_END
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX

View File

@ -247,6 +247,11 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
}
NS_CC_END
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC

View File

@ -451,6 +451,10 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
}
NS_CC_END
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32

View File

@ -163,6 +163,10 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
return ret;
}
void Device::setKeepScreenOn(bool value)
{
}
NS_CC_END
#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)

View File

@ -53,7 +53,7 @@ static void _checkPath()
if (s_pszResourcePath.empty())
{
// TODO: needs to be tested
s_pszResourcePath = convertPathFormatToUnixStyle(CCFileUtilsWinRT::getAppPath() + '\\' + "Assets\\Resources" + '\\');
s_pszResourcePath = convertPathFormatToUnixStyle(CCFileUtilsWinRT::getAppPath() + '\\' + "Assets\\res" + '\\');
}
}

View File

@ -135,6 +135,25 @@ void CCPrecompiledShaders::loadPrecompiledPrograms()
#endif
}
void CCPrecompiledShaders::addPrecompiledProgram(const char* key, const unsigned char* program, int programLength)
{
std::string id = key;
PrecompiledProgram* p = nullptr;
auto it = m_precompiledPrograms.find(id);
if (it != m_precompiledPrograms.end())
{
p = it->second;
}
else
{
p = new PrecompiledProgram();
m_precompiledPrograms[id] = p;
}
p->key = key;
p->program = program;
p->length = programLength;
}
bool CCPrecompiledShaders::loadProgram(GLuint program, const GLchar* vShaderByteArray, const GLchar* fShaderByteArray)
{
std::string id = computeHash(vShaderByteArray, fShaderByteArray);

View File

@ -70,6 +70,7 @@ public:
*/
static CCPrecompiledShaders* getInstance();
void addPrecompiledProgram(const char* key, const unsigned char* program, int programLength);
std::string addShaders(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray);
bool addProgram(GLuint program, const std::string& id);

View File

@ -41,6 +41,12 @@
NS_CC_BEGIN
//render state
static bool s_cullFaceEnabled = false;
static GLenum s_cullFace = 0;
static bool s_depthTestEnabled = false;
static bool s_depthWriteEnabled = false;
MeshCommand::MeshCommand()
: _textureID(0)
, _blendType(BlendFunc::DISABLE)
@ -86,7 +92,7 @@ void MeshCommand::init(float globalOrder,
_primitive = primitive;
_indexFormat = indexFormat;
_indexCount = indexCount;
_mv = mv;
_mv.set(mv);
}
void MeshCommand::setCullFaceEnabled(bool enable)
@ -124,35 +130,46 @@ MeshCommand::~MeshCommand()
void MeshCommand::applyRenderState()
{
if (_cullFaceEnabled)
if (_cullFaceEnabled && !s_cullFaceEnabled)
{
glEnable(GL_CULL_FACE);
glCullFace(_cullFace);
if (s_cullFace != _cullFace)
{
glCullFace(_cullFace);
s_cullFace = _cullFace;
}
s_cullFaceEnabled = true;
}
if (_depthTestEnabled)
if (_depthTestEnabled && !s_depthTestEnabled)
{
glEnable(GL_DEPTH_TEST);
s_depthTestEnabled = true;
}
if (_depthWriteEnabled)
if (_depthWriteEnabled && !s_depthWriteEnabled)
{
glDepthMask(GL_TRUE);
s_depthWriteEnabled = true;
}
}
void MeshCommand::restoreRenderState()
{
if (_cullFaceEnabled)
if (s_cullFaceEnabled)
{
glDisable(GL_CULL_FACE);
s_cullFaceEnabled = false;
}
if (_depthTestEnabled)
if (s_depthTestEnabled)
{
glDisable(GL_DEPTH_TEST);
s_depthTestEnabled = false;
}
if (_depthWriteEnabled)
if (s_depthWriteEnabled)
{
glDepthMask(GL_FALSE);
s_depthWriteEnabled = false;
}
s_cullFace = 0;
}
void MeshCommand::genMaterialID(GLuint texID, void* glProgramState, void* mesh, const BlendFunc& blend)
@ -177,8 +194,6 @@ void MeshCommand::MatrixPalleteCallBack( GLProgram* glProgram, Uniform* uniform)
void MeshCommand::preBatchDraw()
{
// set render state
applyRenderState();
// Set material
GL::bindTexture2D(_textureID);
GL::blendFunc(_blendType.src, _blendType.dst);
@ -198,6 +213,9 @@ void MeshCommand::preBatchDraw()
}
void MeshCommand::batchDraw()
{
// set render state
applyRenderState();
_glProgramState->setUniformVec4("u_color", _displayColor);
if (_matrixPaletteSize && _matrixPalette)

View File

@ -57,11 +57,17 @@ VertexBuffer::VertexBuffer()
: _vbo(0)
, _vertexNumber(0)
, _sizePerVertex(0)
, _recreateVBOEventListener(nullptr)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_COME_TO_BACKGROUND, CC_CALLBACK_1(VertexBuffer::listenToBackground, this));
auto callBack = [this](EventCustom* event)
{
this->recreateVBO();
};
_recreateVBOEventListener = Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_RENDERER_RECREATED, callBack);
#endif
}
@ -72,6 +78,9 @@ VertexBuffer::~VertexBuffer()
glDeleteBuffers(1, &_vbo);
_vbo = 0;
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->removeEventListener(_recreateVBOEventListener);
#endif
}
bool VertexBuffer::init(int sizePerVertex, int vertexNumber)
@ -131,21 +140,8 @@ bool VertexBuffer::updateVertices(const void* verts, int count, int begin)
return true;
}
void VertexBuffer::listenToBackground(EventCustom *event)
{
if(glIsBuffer(_vbo))
{
glDeleteBuffers(1, &_vbo);
_vbo = 0;
}
}
GLuint VertexBuffer::getVBO() const
{
if(0 == _vbo)
{
recreateVBO();
}
return _vbo;
}
@ -159,7 +155,7 @@ void VertexBuffer::recreateVBO() const
{
buffer = &_shadowCopy[0];
}
CCLOG("recreate IndexBuffer with size %d %d", getSizePerVertex(), _vertexNumber);
glBufferData(GL_ARRAY_BUFFER, _sizePerVertex * _vertexNumber, buffer, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
if(!glIsBuffer(_vbo))
@ -189,10 +185,15 @@ IndexBuffer::IndexBuffer()
: _vbo(0)
, _type(IndexType::INDEX_TYPE_SHORT_16)
, _indexNumber(0)
, _recreateVBOEventListener(nullptr)
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_COME_TO_BACKGROUND, CC_CALLBACK_1(IndexBuffer::listenToBackground, this));
auto callBack = [this](EventCustom* event)
{
this->recreateVBO();
};
_recreateVBOEventListener = Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_RENDERER_RECREATED, callBack);
#endif
}
@ -203,6 +204,9 @@ IndexBuffer::~IndexBuffer()
glDeleteBuffers(1, &_vbo);
_vbo = 0;
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
Director::getInstance()->getEventDispatcher()->removeEventListener(_recreateVBOEventListener);
#endif
}
bool IndexBuffer::init(IndexBuffer::IndexType type, int number)
@ -273,22 +277,8 @@ int IndexBuffer::getSize() const
return getSizePerIndex() * _indexNumber;
}
void IndexBuffer::listenToBackground(EventCustom *event)
{
if(glIsBuffer(_vbo))
{
glDeleteBuffers(1, &_vbo);
_vbo = 0;
}
}
GLuint IndexBuffer::getVBO() const
{
if(0 == _vbo)
{
recreateVBO();
}
return _vbo;
}
@ -302,7 +292,7 @@ void IndexBuffer::recreateVBO() const
{
buffer = &_shadowCopy[0];
}
CCLOG("recreate IndexBuffer with size %d %d ", getSizePerIndex(), _indexNumber);
glBufferData(GL_ARRAY_BUFFER, getSize(), buffer, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
if(!glIsBuffer(_vbo))

Some files were not shown because too many files have changed in this diff Show More