├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── samples ├── BasicApp │ ├── include │ │ └── Resources.h │ ├── resources │ │ ├── CinderApp.icns │ │ └── cinder_app_icon.ico │ ├── src │ │ └── BasicApp.cpp │ ├── vc2013 │ │ ├── BasicApp.sln │ │ ├── BasicApp.vcxproj │ │ ├── BasicApp.vcxproj.filters │ │ └── Resources.rc │ ├── xcode │ │ ├── BasicApp.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ ├── BasicApp_Prefix.pch │ │ └── Info.plist │ └── xcode_ios │ │ ├── BasicApp.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── BasicApp_Prefix.pch │ │ └── Info.plist └── InstancedApp │ ├── assets │ ├── frag.glsl │ └── vert.glsl │ ├── include │ ├── Model.h │ └── Resources.h │ ├── resources │ ├── CinderApp.icns │ └── cinder_app_icon.ico │ ├── src │ ├── InstancedApp.cpp │ └── Model.cpp │ ├── vc2013 │ ├── InstancedApp.sln │ ├── InstancedApp.vcxproj │ ├── InstancedApp.vcxproj.filters │ └── Resources.rc │ ├── xcode │ ├── Info.plist │ ├── InstancedApp.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── InstancedApp_Prefix.pch │ └── xcode_ios │ ├── Info.plist │ ├── InstancedApp.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── InstancedApp_Prefix.pch └── src ├── CinderPhysx.cpp └── CinderPhysx.h /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.xcuserdatad 3 | *.xccheckout 4 | xcshareddata 5 | xcuserdata 6 | bin 7 | build 8 | DerivedData 9 | ipch 10 | Debug 11 | Release 12 | *.opensdf 13 | *.sdf 14 | *.suo 15 | *.user 16 | *.exe 17 | *.map 18 | *.pdb 19 | *.ilk 20 | Thumbs.db -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "PhysX-3.3"] 2 | path = PhysX-3.3 3 | url = https://github.com/NVIDIAGameWorks/PhysX-3.3.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Stephen Schieberl 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cinder-Physx 2 | Nvidia Physx SDK implementation for Cinder. Learn more about Physx here: https://developer.nvidia.com/physx-sdk 3 | 4 | ![alt tag](http://bantherewind.com/uploads/physx.png) 5 | 6 | ### SETUP 7 | 8 | ##### 1. Register as a Nvidia developer to get access to the Physx source by following the instructions here: 9 | https://developer.nvidia.com/physx-source-github 10 | 11 | ##### 2. Clone this repository. 12 | ``` 13 | git clone https://github.com/BanTheRewind/Cinder-Physx.git 14 | ``` 15 | ##### 3. Add the Physx submodule. 16 | ``` 17 | cd Cinder-Physx 18 | git submodule update --init 19 | ``` 20 | 21 | ### BUILD (VISUAL STUDIO 2013) 22 | 23 | ##### 4. Build Physx with Visual Studio 2013 Community Edition or better. 24 | - Open "Cinder-Physx/PhysX-3.3/PhysXSDK/Source/compiler/vc12win64/PhysX.sln" 25 | - Go to "BUILD" > "Batch Build..." 26 | - "Select All" 27 | - "Build" 28 | 29 | ##### 5. Open and run a sample project. 30 | 31 | ##### 6. (Optional) Download and install Physx Visual Debugger (PVD) from here: 32 | https://developer.nvidia.com/gameworksdownload#?search=pvd 33 | 34 | NOTE: Open and run PVD _before_ running a sample app. 35 | 36 | ### BUILD (XCODE) 37 | 38 | ##### 4. Change `abs` to `fabs` at "Cinder-Physx/PhysX-3.3/PhysXSDK/Source/LowLevel/Software Source/PxsSolverConstraintExtPF:209". 39 | 40 | ##### 5. Make the following changes to "Cinder-Physx/PhysX-3.3/PhysXSDK/Source/LowLevelCloth/src/neon/SwCollisionHelpers.h" 41 | ``` 42 | SwCollisionHelpers.h:56 43 | “uint8x16_t” to “uint8x8_t” (two instances) 44 | 45 | SwCollisionHelpers.h:57 46 | “vtbl1q_u8” to “vtbl1_u8” 47 | 48 | SwCollisionHelpers.h:58 49 | “vtbl1q_u8” to “vtbl1_u8” 50 | 51 | SwCollisionHelpers.h:76 52 | “uint8x16x2_t” to “uint8x8x2_t” (two instances) 53 | 54 | SwCollisionHelpers.h:77 55 | “vtbl2q_u8” to “vtbl2_u8” 56 | 57 | SwCollisionHelpers.h:78 58 | “vtbl2q_u8” to “vtbl2_u8” 59 | ``` 60 | 61 | ##### 6. The following must be added to "Other C Flags" for each configuration on each target: 62 | ``` 63 | -Wno-reserved-id-macro 64 | -Wno-unused-local-typedefs 65 | ``` 66 | 67 | ##### 7. Use the command line tool to build each configuration from "Cinder-Physx/PhysX-3.3/PhysXSDK/Source/compiler/xcode_osx64/" 68 | ``` 69 | xcodebuild -project PhysX.xcodeproj -alltargets -configuration checked 70 | xcodebuild -project PhysX.xcodeproj -alltargets -configuration debug 71 | xcodebuild -project PhysX.xcodeproj -alltargets -configuration profile 72 | xcodebuild -project PhysX.xcodeproj -alltargets -configuration release 73 | ``` 74 | 75 | ##### 8. Repeat steps 6 and 7 for iOS from the "xcode_ios64" folder (first change "Targeted Device Family" to match your device(s)). 76 | -------------------------------------------------------------------------------- /samples/BasicApp/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/BasicApp/resources/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-Physx/7c4cdb33cb00a37e046fb2ca7d257791d23fa7a0/samples/BasicApp/resources/CinderApp.icns -------------------------------------------------------------------------------- /samples/BasicApp/resources/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-Physx/7c4cdb33cb00a37e046fb2ca7d257791d23fa7a0/samples/BasicApp/resources/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/BasicApp/src/BasicApp.cpp: -------------------------------------------------------------------------------- 1 | #include "cinder/app/App.h" 2 | #include "cinder/Camera.h" 3 | #include "cinder/CameraUi.h" 4 | #include "cinder/gl/gl.h" 5 | 6 | #include "CinderPhysx.h" 7 | 8 | class BasicApp : public ci::app::App, public physx::PxBroadPhaseCallback 9 | { 10 | public: 11 | BasicApp(); 12 | 13 | void draw() override; 14 | #if defined( CINDER_COCOA_TOUCH ) 15 | void touchesBegan( ci::app::TouchEvent event ) override; 16 | void touchesEnded( ci::app::TouchEvent event ) override; 17 | #else 18 | void keyDown( ci::app::KeyEvent event ) override; 19 | #endif 20 | void resize() override; 21 | void update() override; 22 | private: 23 | ci::CameraPersp mCamera; 24 | ci::CameraUi mCamUi; 25 | 26 | ci::gl::BatchRef mBatchStockColorCapsule; 27 | ci::gl::BatchRef mBatchStockColorCube; 28 | ci::gl::BatchRef mBatchStockColorPlane; 29 | ci::gl::BatchRef mBatchStockColorSphere; 30 | 31 | void addActor(); 32 | physx::PxMaterial* mMaterial; 33 | PhysxRef mPhysx; 34 | virtual void onObjectOutOfBounds( physx::PxShape& shape, physx::PxActor& actor ) override; 35 | virtual void onObjectOutOfBounds( physx::PxAggregate& aggregate ) override; 36 | 37 | #if defined( CINDER_COCOA_TOUCH ) 38 | bool mTouching; 39 | #endif 40 | }; 41 | 42 | using namespace ci; 43 | using namespace ci::app; 44 | using namespace physx; 45 | using namespace std; 46 | 47 | #include "cinder/app/RendererGl.h" 48 | #include "cinder/Log.h" 49 | #include "cinder/Rand.h" 50 | 51 | BasicApp::BasicApp() 52 | { 53 | #if defined( CINDER_COCOA_TOUCH ) 54 | mTouching = false; 55 | #endif 56 | 57 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 0.01f, 1000.0f ); 58 | mCamera.lookAt( vec3( 0.0f, 0.0f, 30.0f ), vec3( 0.0f, 0.0f, 0.0f ) ); 59 | mCamUi = CameraUi( &mCamera, getWindow() ); 60 | 61 | // Initialize Physx 62 | mPhysx = Physx::create(); 63 | 64 | // Create a material for all actors 65 | mMaterial = mPhysx->getPhysics()->createMaterial( 0.5f, 0.5f, 0.5f ); 66 | 67 | // Create a scene. Multiples scenes are allowed. 68 | mPhysx->createScene(); 69 | 70 | // Connects onObjectOutOfBounds to scene. This lets us manage 71 | // objects that have gone out of bounds. 72 | mPhysx->getScene()->setBroadPhaseCallback( this ); 73 | 74 | // Add the plane to the scene 75 | mPhysx->addActor( PxCreatePlane( 76 | *mPhysx->getPhysics(), 77 | PxPlane( Physx::to( vec3( 0.0f, 1.0f, 0.0f ) ), 5.0f ), 78 | *mMaterial 79 | ), mPhysx->getScene() ); 80 | 81 | // Rotate plane so everything slides away 82 | PxRigidStatic* floor = static_cast( mPhysx->getActor() ); 83 | mat4 m = Physx::from( floor->getGlobalPose() ); 84 | m = glm::rotate( m, 0.5f, vec3( 0.0f, -1.0f, 1.0f ) ); 85 | floor->setGlobalPose( PxTransform( Physx::to( m ) ) ); 86 | 87 | // Create shader and geometry batches 88 | gl::GlslProgRef stockColor = gl::getStockShader( gl::ShaderDef().color() ); 89 | gl::VboMeshRef capsule = gl::VboMesh::create( geom::Capsule() 90 | .subdivisionsAxis( 16 ) 91 | .subdivisionsHeight( 16 ) ); 92 | gl::VboMeshRef cube = gl::VboMesh::create( geom::Cube().colors() ); 93 | gl::VboMeshRef plane = gl::VboMesh::create( geom::Plane() 94 | .axes( vec3( 0.0f, 1.0f, 0.0f ), vec3( 0.0f, 0.0f, 1.0f ) ) 95 | .size( vec2( 200.0f ) ) 96 | .subdivisions( ivec2( 32 ) ) ); 97 | gl::VboMeshRef sphere = gl::VboMesh::create( geom::Sphere() 98 | .colors() 99 | .subdivisions( 32 ) ); 100 | mBatchStockColorCapsule = gl::Batch::create( capsule, stockColor ); 101 | mBatchStockColorCube = gl::Batch::create( cube, stockColor ); 102 | mBatchStockColorPlane = gl::Batch::create( plane, stockColor ); 103 | mBatchStockColorSphere = gl::Batch::create( sphere, stockColor ); 104 | 105 | #if !defined( CINDER_COCOA_TOUCH ) 106 | // Connect to Physx Visual Debugger 107 | mPhysx->pvdConnect(); 108 | #endif 109 | 110 | resize(); 111 | 112 | gl::enableDepthRead(); 113 | gl::enableDepthWrite(); 114 | gl::enableVerticalSync(); 115 | #if !defined( CINDER_COCOA_TOUCH ) 116 | gl::polygonMode( GL_FRONT_AND_BACK, GL_LINE ); 117 | #endif 118 | } 119 | 120 | void BasicApp::addActor() 121 | { 122 | // Choose random position and size 123 | vec3 p( randVec3() * 5.0f ); 124 | p.y = glm::abs( p.y ); 125 | float r = randFloat( 0.01f, 1.0f ); 126 | 127 | // Create a randomly shaped actor 128 | PxRigidDynamic* actor = nullptr; 129 | switch ( randInt( 0, 3 ) ) { 130 | case 0: 131 | actor = PxCreateDynamic( 132 | *mPhysx->getPhysics(), 133 | PxTransform( Physx::to( p ) ), 134 | PxBoxGeometry( Physx::to( vec3( r ) ) ), 135 | *mMaterial, 136 | r * 100.0f ); 137 | break; 138 | case 1: 139 | actor = PxCreateDynamic( 140 | *mPhysx->getPhysics(), 141 | PxTransform( Physx::to( p ) ), 142 | PxSphereGeometry( r ), 143 | *mMaterial, 144 | r * 100.0f ); 145 | break; 146 | case 2: 147 | actor = PxCreateDynamic( 148 | *mPhysx->getPhysics(), 149 | PxTransform( Physx::to( p ) ), 150 | PxCapsuleGeometry( r, r * 0.5f ), 151 | *mMaterial, 152 | r * 100.0f ); 153 | break; 154 | } 155 | 156 | // Apply some motion and add it to the scene 157 | actor->setLinearVelocity( Physx::to( randVec3() ) ); 158 | mPhysx->addActor( actor, mPhysx->getScene() ); 159 | } 160 | 161 | void BasicApp::draw() 162 | { 163 | gl::clear(); 164 | const gl::ScopedMatrices scopedMatrices; 165 | gl::setMatrices( mCamera ); 166 | 167 | for ( const auto& iter : mPhysx->getActors() ) { 168 | 169 | // Cast to rigid actor 170 | if ( iter.second->getType() == PxActorType::eRIGID_DYNAMIC || 171 | iter.second->getType() == PxActorType::eRIGID_STATIC ) { 172 | PxRigidActor* actor = static_cast( iter.second ); 173 | 174 | // Apply actor's transform 175 | const gl::ScopedModelMatrix scopedModelMatrix; 176 | gl::multModelMatrix( Physx::from( actor->getGlobalPose() ) ); 177 | 178 | // Get the actor's shapes 179 | PxShape* shape = nullptr; 180 | actor->getShapes( &shape, sizeof( PxShape ) * actor->getNbShapes() ); 181 | for ( uint32_t i = 0; i < actor->getNbShapes(); ++i, ++shape ) { 182 | 183 | // Scale non-plane shapes to their bounds (plane is infinite) 184 | if ( shape->getGeometryType() != PxGeometryType::ePLANE ) { 185 | gl::scale( Physx::from( actor->getWorldBounds() ).getSize() ); 186 | } 187 | 188 | // Use the appropriate batch to draw the geometry type 189 | switch ( shape->getGeometryType() ) { 190 | case PxGeometryType::eBOX: 191 | mBatchStockColorCube->draw(); 192 | break; 193 | case PxGeometryType::eCAPSULE: 194 | mBatchStockColorCapsule->draw(); 195 | break; 196 | case PxGeometryType::ePLANE: 197 | mBatchStockColorPlane->draw(); 198 | break; 199 | case PxGeometryType::eSPHERE: 200 | mBatchStockColorSphere->draw(); 201 | break; 202 | default: 203 | break; 204 | } 205 | } 206 | } 207 | } 208 | } 209 | 210 | #if defined( CINDER_COCOA_TOUCH ) 211 | 212 | void BasicApp::touchesBegan( TouchEvent event ) 213 | { 214 | mTouching = true; 215 | } 216 | 217 | void BasicApp::touchesEnded( TouchEvent event ) 218 | { 219 | mTouching = false; 220 | } 221 | 222 | #else 223 | 224 | void BasicApp::keyDown( ci::app::KeyEvent event ) 225 | { 226 | switch ( event.getCode() ) { 227 | case KeyEvent::KEY_SPACE: 228 | addActor(); 229 | break; 230 | case KeyEvent::KEY_f: 231 | setFullScreen( !isFullScreen() ); 232 | break; 233 | case KeyEvent::KEY_q: 234 | quit(); 235 | break; 236 | } 237 | } 238 | 239 | #endif 240 | 241 | void BasicApp::onObjectOutOfBounds( physx::PxShape& shape, physx::PxActor& actor ) 242 | { 243 | mPhysx->eraseActor( actor ); 244 | } 245 | 246 | void BasicApp::onObjectOutOfBounds( PxAggregate& aggregate ) 247 | { 248 | aggregate.release(); 249 | } 250 | 251 | void BasicApp::resize() 252 | { 253 | mCamera.setAspectRatio( getWindowAspectRatio() ); 254 | } 255 | 256 | void BasicApp::update() 257 | { 258 | mPhysx->update(); 259 | 260 | #if defined( CINDER_COCOA_TOUCH ) 261 | if ( mTouching ) { 262 | addActor(); 263 | } 264 | #endif 265 | } 266 | 267 | 268 | #if defined( CINDER_COCOA_TOUCH ) 269 | CINDER_APP( BasicApp, RendererGl( RendererGl::Options().msaa( 16 ) ), 270 | []( App::Settings* settings ) 271 | { 272 | settings->disableFrameRate(); 273 | settings->setMultiTouchEnabled( true ); 274 | } ) 275 | #else 276 | CINDER_APP( BasicApp, RendererGl( RendererGl::Options().msaa( 16 ) ), 277 | []( App::Settings* settings ) 278 | { 279 | settings->disableFrameRate(); 280 | settings->setWindowSize( 1280, 720 ); 281 | } ) 282 | #endif 283 | -------------------------------------------------------------------------------- /samples/BasicApp/vc2013/BasicApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicApp", "BasicApp.vcxproj", "{DE98CD04-6E27-4E14-992C-3F2E23826393}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x64 = Debug|x64 9 | Release|x64 = Release|x64 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Debug|x64.ActiveCfg = Debug|x64 13 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Debug|x64.Build.0 = Debug|x64 14 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Release|x64.ActiveCfg = Release|x64 15 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Release|x64.Build.0 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /samples/BasicApp/vc2013/BasicApp.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x64 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {DE98CD04-6E27-4E14-992C-3F2E23826393} 15 | BasicApp 16 | Win32Proj 17 | BasicApp 18 | 19 | 20 | 21 | Application 22 | false 23 | v120 24 | Unicode 25 | true 26 | 27 | 28 | Application 29 | true 30 | v120 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | <_ProjectFileVersion>10.0.30319.1 44 | true 45 | false 46 | 47 | 48 | $(SolutionDir)\bin\ 49 | 50 | 51 | $(SolutionDir)\bin\ 52 | 53 | 54 | 55 | Disabled 56 | ..\include;..\..\..\src;..\..\..\Physx-3.3\PhysXSDK\Include;..\..\..\..\..\include 57 | WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) 58 | EnableFastChecks 59 | MultiThreadedDebug 60 | 61 | Level3 62 | ProgramDatabase 63 | true 64 | 65 | 66 | "..\..\..\..\..\include";..\include 67 | 68 | 69 | cinder-$(PlatformToolset)_d.lib;OpenGL32.lib;PhysX3DEBUG_x64.lib;PhysXProfileSDKDEBUG.lib;PhysX3CommonDEBUG_x64.lib;PhysX3CookingDEBUG_x64.lib;PhysX3ExtensionsDEBUG.lib;PhysX3GpuDEBUG_x64.lib;PhysXVisualDebuggerSDKDEBUG.lib;PvdRuntimeDEBUG.lib;PxTaskDEBUG.lib;%(AdditionalDependencies) 70 | ..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\PhysX-3.3\PhysXSDK\Lib\vc12win64 71 | true 72 | Windows 73 | false 74 | 75 | LIBCMT;LIBCPMT 76 | 77 | 78 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\nvToolsExt64_1.dll" "$(SolutionDir)bin\" /Y /C 79 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3DEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 80 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3CookingDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 81 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3CommonDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 82 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysXDevice64.dll" "$(SolutionDir)bin\" /Y /C 83 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3GpuDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 84 | 85 | 86 | 87 | 88 | ..\include;..\..\..\src;..\..\..\Physx-3.3\PhysXSDK\Include;..\..\..\..\..\include 89 | WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) 90 | MultiThreaded 91 | 92 | Level3 93 | ProgramDatabase 94 | true 95 | 96 | 97 | true 98 | 99 | 100 | "..\..\..\..\..\include";..\include 101 | 102 | 103 | cinder-$(PlatformToolset).lib;OpenGL32.lib;PhysX3_x64.lib;PhysXProfileSDK.lib;PhysX3Cooking_x64.lib;PhysX3Common_x64.lib;PhysX3Extensions.lib;PhysX3Gpu_x64.lib;PhysXVisualDebuggerSDK.lib;PvdRuntime.lib;PxTask.lib;%(AdditionalDependencies) 104 | ..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\PhysX-3.3\PhysXSDK\Lib\vc12win64 105 | false 106 | true 107 | Windows 108 | true 109 | 110 | false 111 | 112 | 113 | 114 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\nvToolsExt64_1.dll" "$(SolutionDir)bin\" /Y /C 115 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3_x64.dll" "$(SolutionDir)bin\" /Y /C 116 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Cooking_x64.dll" "$(SolutionDir)bin\" /Y /C 117 | 118 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Common_x64.dll" "$(SolutionDir)bin\" /Y /C 119 | 120 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysXDevice64.dll" "$(SolutionDir)bin\" /Y /C 121 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Gpu_x64.dll" "$(SolutionDir)bin\" /Y /C 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /samples/BasicApp/vc2013/BasicApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | {23c9d643-b464-4f7f-aee5-8f1cf092a41b} 18 | 19 | 20 | {edd8f36f-5bfc-4093-b1b4-8a75724cd833} 21 | 22 | 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | blocks\Cinder-Physx 35 | 36 | 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | blocks\Cinder-Physx 46 | 47 | 48 | 49 | 50 | Resource Files 51 | 52 | 53 | -------------------------------------------------------------------------------- /samples/BasicApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- 1 | #include "../include/Resources.h" 2 | 3 | 1 ICON "..\\resources\\cinder_app_icon.ico" 4 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode/BasicApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; 11 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; 12 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; 13 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; 14 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; 15 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; 16 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; 17 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 18 | AE1AB4E31BBC717E005BB87D /* BasicApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE1AB4E21BBC717E005BB87D /* BasicApp.cpp */; settings = {ASSET_TAGS = (); }; }; 19 | AE50D2781B261985007FFE25 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D2771B261985007FFE25 /* AVFoundation.framework */; }; 20 | AE50D27A1B2619A3007FFE25 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D2791B2619A3007FFE25 /* CoreMedia.framework */; }; 21 | AE50D27C1B2619C1007FFE25 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D27B1B2619C1007FFE25 /* IOSurface.framework */; }; 22 | AE50D2801B261A88007FFE25 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D27F1B261A88007FFE25 /* IOKit.framework */; }; 23 | AED55B251BBEFBCD000F6637 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = AED55B241BBEFBCD000F6637 /* CinderApp.icns */; settings = {ASSET_TAGS = (); }; }; 24 | AED55B281BBEFBDB000F6637 /* CinderPhysx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */; settings = {ASSET_TAGS = (); }; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXCopyFilesBuildPhase section */ 28 | AE362B621668013A0094CD37 /* CopyFiles */ = { 29 | isa = PBXCopyFilesBuildPhase; 30 | buildActionMask = 12; 31 | dstPath = ""; 32 | dstSubfolderSpec = 6; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 41 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 42 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 43 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 44 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 45 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 46 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 47 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 48 | 334F79182B9947F2A1A4632B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 50 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 51 | 8D1107320486CEB800E47090 /* BasicApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasicApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | AE1AB4E21BBC717E005BB87D /* BasicApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicApp.cpp; path = ../src/BasicApp.cpp; sourceTree = ""; }; 53 | AE50D2771B261985007FFE25 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 54 | AE50D2791B2619A3007FFE25 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 55 | AE50D27B1B2619C1007FFE25 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; }; 56 | AE50D27F1B261A88007FFE25 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 57 | AED55B241BBEFBCD000F6637 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../resources/CinderApp.icns; sourceTree = ""; }; 58 | AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CinderPhysx.cpp; path = ../../../src/CinderPhysx.cpp; sourceTree = ""; }; 59 | AED55B271BBEFBDB000F6637 /* CinderPhysx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CinderPhysx.h; path = ../../../src/CinderPhysx.h; sourceTree = ""; }; 60 | CC680A809AF041E8BE4D8AE5 /* BasicApp_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BasicApp_Prefix.pch; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 8D11072E0486CEB800E47090 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | AE50D2801B261A88007FFE25 /* IOKit.framework in Frameworks */, 69 | AE50D27C1B2619C1007FFE25 /* IOSurface.framework in Frameworks */, 70 | AE50D27A1B2619A3007FFE25 /* CoreMedia.framework in Frameworks */, 71 | AE50D2781B261985007FFE25 /* AVFoundation.framework in Frameworks */, 72 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, 73 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, 74 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, 75 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, 76 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, 77 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, 78 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, 79 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 01B97315FEAEA392516A2CEA /* Blocks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | AE51D6151B85124000DCEFBF /* Cinder-Physx */, 90 | ); 91 | name = Blocks; 92 | sourceTree = ""; 93 | }; 94 | 080E96DDFE201D6D7F000001 /* Source */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | AE1AB4E21BBC717E005BB87D /* BasicApp.cpp */, 98 | ); 99 | name = Source; 100 | sourceTree = ""; 101 | }; 102 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | AE50D27F1B261A88007FFE25 /* IOKit.framework */, 106 | AE50D27B1B2619C1007FFE25 /* IOSurface.framework */, 107 | AE50D2791B2619A3007FFE25 /* CoreMedia.framework */, 108 | AE50D2771B261985007FFE25 /* AVFoundation.framework */, 109 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, 110 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, 111 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, 112 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, 113 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, 114 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, 115 | 0091D8F80E81B9330029341E /* OpenGL.framework */, 116 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, 117 | ); 118 | name = "Linked Frameworks"; 119 | sourceTree = ""; 120 | }; 121 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */, 125 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */, 126 | ); 127 | name = "Other Frameworks"; 128 | sourceTree = ""; 129 | }; 130 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 8D1107320486CEB800E47090 /* BasicApp.app */, 134 | ); 135 | name = Products; 136 | sourceTree = ""; 137 | }; 138 | 29B97314FDCFA39411CA2CEA /* TuioMultitouchBasic */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 01B97315FEAEA392516A2CEA /* Blocks */, 142 | 29B97315FDCFA39411CA2CEA /* Headers */, 143 | 080E96DDFE201D6D7F000001 /* Source */, 144 | 29B97317FDCFA39411CA2CEA /* Resources */, 145 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 146 | 19C28FACFE9D520D11CA2CBB /* Products */, 147 | ); 148 | name = TuioMultitouchBasic; 149 | sourceTree = ""; 150 | }; 151 | 29B97315FDCFA39411CA2CEA /* Headers */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | CC680A809AF041E8BE4D8AE5 /* BasicApp_Prefix.pch */, 155 | ); 156 | name = Headers; 157 | sourceTree = ""; 158 | }; 159 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | AED55B241BBEFBCD000F6637 /* CinderApp.icns */, 163 | 334F79182B9947F2A1A4632B /* Info.plist */, 164 | ); 165 | name = Resources; 166 | sourceTree = ""; 167 | }; 168 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 172 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, 173 | ); 174 | name = Frameworks; 175 | sourceTree = ""; 176 | }; 177 | AE51D6151B85124000DCEFBF /* Cinder-Physx */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | AE51D6161B85124E00DCEFBF /* src */, 181 | ); 182 | name = "Cinder-Physx"; 183 | sourceTree = ""; 184 | }; 185 | AE51D6161B85124E00DCEFBF /* src */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */, 189 | AED55B271BBEFBDB000F6637 /* CinderPhysx.h */, 190 | ); 191 | name = src; 192 | path = "../../../blocks/Cinder-Physx/src"; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | 8D1107260486CEB800E47090 /* BasicApp */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BasicApp" */; 201 | buildPhases = ( 202 | 8D1107290486CEB800E47090 /* Resources */, 203 | 8D11072C0486CEB800E47090 /* Sources */, 204 | 8D11072E0486CEB800E47090 /* Frameworks */, 205 | AE362B621668013A0094CD37 /* CopyFiles */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | ); 211 | name = BasicApp; 212 | productInstallPath = "$(HOME)/Applications"; 213 | productName = TuioMultitouchBasic; 214 | productReference = 8D1107320486CEB800E47090 /* BasicApp.app */; 215 | productType = "com.apple.product-type.application"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | LastUpgradeCheck = 0700; 224 | }; 225 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BasicApp" */; 226 | compatibilityVersion = "Xcode 3.2"; 227 | developmentRegion = English; 228 | hasScannedForEncodings = 1; 229 | knownRegions = ( 230 | English, 231 | Japanese, 232 | French, 233 | German, 234 | ); 235 | mainGroup = 29B97314FDCFA39411CA2CEA /* TuioMultitouchBasic */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | 8D1107260486CEB800E47090 /* BasicApp */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | 8D1107290486CEB800E47090 /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | AED55B251BBEFBCD000F6637 /* CinderApp.icns in Resources */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXResourcesBuildPhase section */ 254 | 255 | /* Begin PBXSourcesBuildPhase section */ 256 | 8D11072C0486CEB800E47090 /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | AE1AB4E31BBC717E005BB87D /* BasicApp.cpp in Sources */, 261 | AED55B281BBEFBDB000F6637 /* CinderPhysx.cpp in Sources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | /* End PBXSourcesBuildPhase section */ 266 | 267 | /* Begin XCBuildConfiguration section */ 268 | C01FCF4B08A954540054247B /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | COMBINE_HIDPI_IMAGES = YES; 272 | COPY_PHASE_STRIP = NO; 273 | GCC_DYNAMIC_NO_PIC = NO; 274 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 275 | GCC_OPTIMIZATION_LEVEL = 0; 276 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 277 | GCC_PREFIX_HEADER = BasicApp_Prefix.pch; 278 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 279 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 280 | INFOPLIST_FILE = Info.plist; 281 | INSTALL_PATH = "$(HOME)/Applications"; 282 | LD_RUNPATH_SEARCH_PATHS = "@loader_path"; 283 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 284 | MACOSX_DEPLOYMENT_TARGET = 10.7; 285 | OTHER_LDFLAGS = ( 286 | "\"$(CINDER_PATH)lib/libcinder_d.a\"", 287 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelClothCHECKED.a", 288 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelCHECKED.a", 289 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CharacterKinematicCHECKED.a", 290 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CommonCHECKED.a", 291 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CookingCHECKED.a", 292 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CHECKED.a", 293 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3ExtensionsCHECKED.a", 294 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3VehicleCHECKED.a", 295 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXProfileSDKCHECKED.a", 296 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXVisualDebuggerSDKCHECKED.a", 297 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPvdRuntimeCHECKED.a", 298 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPxTaskCHECKED.a", 299 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSceneQueryCHECKED.a", 300 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSimulationControllerCHECKED.a", 301 | ); 302 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx; 303 | PRODUCT_NAME = BasicApp; 304 | SYMROOT = ./build; 305 | VALID_ARCHS = x86_64; 306 | WRAPPER_EXTENSION = app; 307 | }; 308 | name = Debug; 309 | }; 310 | C01FCF4C08A954540054247B /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | COMBINE_HIDPI_IMAGES = YES; 314 | DEAD_CODE_STRIPPING = YES; 315 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 316 | GCC_FAST_MATH = YES; 317 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 318 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 319 | GCC_OPTIMIZATION_LEVEL = 3; 320 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 321 | GCC_PREFIX_HEADER = BasicApp_Prefix.pch; 322 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 323 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 324 | INFOPLIST_FILE = Info.plist; 325 | INSTALL_PATH = "$(HOME)/Applications"; 326 | LD_RUNPATH_SEARCH_PATHS = "@loader_path"; 327 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 328 | MACOSX_DEPLOYMENT_TARGET = 10.7; 329 | OTHER_LDFLAGS = ( 330 | "\"$(CINDER_PATH)lib/libcinder.a\"", 331 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevel.a", 332 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelCloth.a", 333 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3.a", 334 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CharacterKinematic.a", 335 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Common.a", 336 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Cooking.a", 337 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Extensions.a", 338 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Vehicle.a", 339 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXProfileSDK.a", 340 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXVisualDebuggerSDK.a", 341 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPvdRuntime.a", 342 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPxTask.a", 343 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSceneQuery.a", 344 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSimulationController.a", 345 | ); 346 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx; 347 | PRODUCT_NAME = BasicApp; 348 | STRIP_INSTALLED_PRODUCT = YES; 349 | SYMROOT = ./build; 350 | VALID_ARCHS = x86_64; 351 | WRAPPER_EXTENSION = app; 352 | }; 353 | name = Release; 354 | }; 355 | C01FCF4F08A954540054247B /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ALWAYS_SEARCH_USER_PATHS = NO; 359 | CINDER_PATH = ../../../../../; 360 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 361 | CLANG_CXX_LIBRARY = "libc++"; 362 | ENABLE_TESTABILITY = YES; 363 | GCC_PREPROCESSOR_DEFINITIONS = _DEBUG; 364 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 365 | GCC_WARN_UNUSED_VARIABLE = YES; 366 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 367 | LD_DYLIB_INSTALL_NAME = ""; 368 | LIBRARY_SEARCH_PATHS = ( 369 | ../../../../../lib/, 370 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64", 371 | ); 372 | MACOSX_DEPLOYMENT_TARGET = 10.7; 373 | ONLY_ACTIVE_ARCH = YES; 374 | SDKROOT = macosx; 375 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\" ../../../src/ ../../../PhysX-3.3/PhysXSDK/Include"; 376 | VALID_ARCHS = x86_64; 377 | }; 378 | name = Debug; 379 | }; 380 | C01FCF5008A954540054247B /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CINDER_PATH = ../../../../../; 385 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 386 | CLANG_CXX_LIBRARY = "libc++"; 387 | GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1"; 388 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 391 | LD_DYLIB_INSTALL_NAME = ""; 392 | LIBRARY_SEARCH_PATHS = ( 393 | ../../../../../lib/, 394 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64", 395 | ); 396 | MACOSX_DEPLOYMENT_TARGET = 10.7; 397 | SDKROOT = macosx; 398 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\" ../../../src/ ../../../PhysX-3.3/PhysXSDK/Include"; 399 | VALID_ARCHS = x86_64; 400 | }; 401 | name = Release; 402 | }; 403 | /* End XCBuildConfiguration section */ 404 | 405 | /* Begin XCConfigurationList section */ 406 | C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "BasicApp" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | C01FCF4B08A954540054247B /* Debug */, 410 | C01FCF4C08A954540054247B /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "BasicApp" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | C01FCF4F08A954540054247B /* Debug */, 419 | C01FCF5008A954540054247B /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | defaultConfigurationName = Release; 423 | }; 424 | /* End XCConfigurationList section */ 425 | }; 426 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 427 | } 428 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode/BasicApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode/BasicApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode_ios/BasicApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; 11 | 00A66A361965AC8800B17EB3 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00A66A351965AC8800B17EB3 /* Accelerate.framework */; }; 12 | 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; 13 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 14 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 15 | 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; 16 | 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; 17 | 63A7DBB0CAFD47C885AA6479 /* BasicApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B4390B615C44F949F3027CE /* BasicApp.cpp */; }; 18 | AE51D60A1B84FE3800DCEFBF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */; }; 19 | AED55B321BBF38F1000F6637 /* CinderPhysx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */; settings = {ASSET_TAGS = (); }; }; 20 | C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 21 | C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 22 | C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; 23 | C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 24 | C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; 25 | DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 00692BCF14FF149000D0A05E /* BasicApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasicApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; 31 | 00A66A351965AC8800B17EB3 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 32 | 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 33 | 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 34 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 35 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 36 | 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 37 | 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 38 | 3B4390B615C44F949F3027CE /* BasicApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = BasicApp.cpp; path = ../src/BasicApp.cpp; sourceTree = ""; }; 39 | 8DCB9557F2964A4787BFB459 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; 40 | AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; 41 | AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CinderPhysx.cpp; path = ../../../src/CinderPhysx.cpp; sourceTree = ""; }; 42 | AED55B311BBF38F1000F6637 /* CinderPhysx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CinderPhysx.h; path = ../../../src/CinderPhysx.h; sourceTree = ""; }; 43 | C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 44 | C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 45 | C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 46 | C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 47 | CAD250B823774C4999DF70EA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | D0E24CF6E3AF40BF807C2109 /* BasicApp_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = BasicApp_Prefix.pch; sourceTree = ""; }; 49 | DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 00692BCC14FF149000D0A05E /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | AE51D60A1B84FE3800DCEFBF /* CoreMotion.framework in Frameworks */, 58 | C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, 59 | C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, 60 | C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, 61 | DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, 62 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 63 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 64 | 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, 65 | 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, 66 | 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, 67 | C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, 68 | C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, 69 | 00A66A361965AC8800B17EB3 /* Accelerate.framework in Frameworks */, 70 | 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 00692BC414FF149000D0A05E = { 78 | isa = PBXGroup; 79 | children = ( 80 | 99692BD914FF149000DFFFFF /* Blocks */, 81 | 99692BD914FF149000D0A05F /* Headers */, 82 | 00692BD914FF149000D0A05E /* Source */, 83 | 00692BD914FF149000D0FFFF /* Resources */, 84 | 00692BD214FF149000D0A05E /* Frameworks */, 85 | 00692BD014FF149000D0A05E /* Products */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | 00692BD014FF149000D0A05E /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 00692BCF14FF149000D0A05E /* BasicApp.app */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 00692BD214FF149000D0A05E /* Frameworks */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */, 101 | C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, 102 | 00A66A351965AC8800B17EB3 /* Accelerate.framework */, 103 | C727C02B121B400300192073 /* CoreMedia.framework */, 104 | C727C02D121B400300192073 /* CoreVideo.framework */, 105 | 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, 106 | 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, 107 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 108 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 109 | 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, 110 | 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, 111 | DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, 112 | C725E000121DAC8F00FA186B /* AVFoundation.framework */, 113 | 0087D25412CD809F002CD69F /* CoreText.framework */, 114 | ); 115 | name = Frameworks; 116 | sourceTree = ""; 117 | }; 118 | 00692BD914FF149000D0A05E /* Source */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 3B4390B615C44F949F3027CE /* BasicApp.cpp */, 122 | ); 123 | name = Source; 124 | sourceTree = ""; 125 | }; 126 | 00692BD914FF149000D0FFFF /* Resources */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | CAD250B823774C4999DF70EA /* Info.plist */, 130 | ); 131 | name = Resources; 132 | sourceTree = ""; 133 | }; 134 | 99692BD914FF149000D0A05F /* Headers */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | D0E24CF6E3AF40BF807C2109 /* BasicApp_Prefix.pch */, 138 | 8DCB9557F2964A4787BFB459 /* Resources.h */, 139 | ); 140 | name = Headers; 141 | sourceTree = ""; 142 | }; 143 | 99692BD914FF149000DFFFFF /* Blocks */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | AE51D60B1B84FF5600DCEFBF /* Cinder-Physx */, 147 | ); 148 | name = Blocks; 149 | sourceTree = ""; 150 | }; 151 | AE51D60B1B84FF5600DCEFBF /* Cinder-Physx */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | AE51D60C1B84FF7200DCEFBF /* src */, 155 | ); 156 | name = "Cinder-Physx"; 157 | sourceTree = ""; 158 | }; 159 | AE51D60C1B84FF7200DCEFBF /* src */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */, 163 | AED55B311BBF38F1000F6637 /* CinderPhysx.h */, 164 | ); 165 | name = src; 166 | path = "../../../blocks/Cinder-Physx/src"; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXGroup section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | 00692BCE14FF149000D0A05E /* BasicApp */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "BasicApp" */; 175 | buildPhases = ( 176 | 00692BCB14FF149000D0A05E /* Sources */, 177 | 00692BCC14FF149000D0A05E /* Frameworks */, 178 | 00692BCD14FF149000D0A05E /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = BasicApp; 185 | productName = BasicApp; 186 | productReference = 00692BCF14FF149000D0A05E /* BasicApp.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | /* End PBXNativeTarget section */ 190 | 191 | /* Begin PBXProject section */ 192 | 00692BC614FF149000D0A05E /* Project object */ = { 193 | isa = PBXProject; 194 | attributes = { 195 | LastUpgradeCheck = 0700; 196 | }; 197 | buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "BasicApp" */; 198 | compatibilityVersion = "Xcode 3.2"; 199 | developmentRegion = English; 200 | hasScannedForEncodings = 0; 201 | knownRegions = ( 202 | en, 203 | ); 204 | mainGroup = 00692BC414FF149000D0A05E; 205 | productRefGroup = 00692BD014FF149000D0A05E /* Products */; 206 | projectDirPath = ""; 207 | projectRoot = ""; 208 | targets = ( 209 | 00692BCE14FF149000D0A05E /* BasicApp */, 210 | ); 211 | }; 212 | /* End PBXProject section */ 213 | 214 | /* Begin PBXResourcesBuildPhase section */ 215 | 00692BCD14FF149000D0A05E /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 00692BCB14FF149000D0A05E /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 63A7DBB0CAFD47C885AA6479 /* BasicApp.cpp in Sources */, 230 | AED55B321BBF38F1000F6637 /* CinderPhysx.cpp in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin XCBuildConfiguration section */ 237 | 00692BF314FF149000D0A05E /* Debug */ = { 238 | isa = XCBuildConfiguration; 239 | buildSettings = { 240 | ALWAYS_SEARCH_USER_PATHS = NO; 241 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 242 | CINDER_PATH = ../../../../..; 243 | CLANG_CXX_LANGUAGE_STANDARD = "c++14"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_WARN_BOOL_CONVERSION = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_EMPTY_BODY = YES; 248 | CLANG_WARN_ENUM_CONVERSION = YES; 249 | CLANG_WARN_INT_CONVERSION = YES; 250 | CLANG_WARN_UNREACHABLE_CODE = YES; 251 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 252 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 253 | COPY_PHASE_STRIP = NO; 254 | DEAD_CODE_STRIPPING = YES; 255 | ENABLE_BITCODE = NO; 256 | ENABLE_STRICT_OBJC_MSGSEND = YES; 257 | ENABLE_TESTABILITY = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_DYNAMIC_NO_PIC = NO; 260 | GCC_NO_COMMON_BLOCKS = YES; 261 | GCC_OPTIMIZATION_LEVEL = 0; 262 | GCC_PREPROCESSOR_DEFINITIONS = ( 263 | "$(inherited)", 264 | "DEBUG=1", 265 | _DEBUG, 266 | ); 267 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 268 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 271 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 272 | GCC_WARN_UNDECLARED_SELECTOR = YES; 273 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 274 | GCC_WARN_UNUSED_FUNCTION = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; 277 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 278 | ONLY_ACTIVE_ARCH = YES; 279 | SDKROOT = iphoneos; 280 | TARGETED_DEVICE_FAMILY = 1; 281 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src ../../../PhysX-3.3/PhysXSDK/Include"; 282 | VALID_ARCHS = arm64; 283 | }; 284 | name = Debug; 285 | }; 286 | 00692BF414FF149000D0A05E /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 291 | CINDER_PATH = ../../../../..; 292 | CLANG_CXX_LANGUAGE_STANDARD = "c++14"; 293 | CLANG_CXX_LIBRARY = "libc++"; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_UNREACHABLE_CODE = YES; 300 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 301 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 302 | COPY_PHASE_STRIP = YES; 303 | DEAD_CODE_STRIPPING = YES; 304 | ENABLE_BITCODE = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | GCC_PREPROCESSOR_DEFINITIONS = ( 309 | "$(inherited)", 310 | "NDEBUG=1", 311 | ); 312 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; 321 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 322 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 323 | SDKROOT = iphoneos; 324 | TARGETED_DEVICE_FAMILY = 1; 325 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src ../../../PhysX-3.3/PhysXSDK/Include"; 326 | VALIDATE_PRODUCT = YES; 327 | VALID_ARCHS = arm64; 328 | }; 329 | name = Release; 330 | }; 331 | 00692BF614FF149000D0A05E /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 335 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 336 | GCC_PREFIX_HEADER = BasicApp_Prefix.pch; 337 | INFOPLIST_FILE = Info.plist; 338 | "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( 339 | "\"$(CINDER_PATH)/lib/libcinder-iphone_d.a\"", 340 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelClothCHECKED.a", 341 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelCHECKED.a", 342 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CharacterKinematicCHECKED.a", 343 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CommonCHECKED.a", 344 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CookingCHECKED.a", 345 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CHECKED.a", 346 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3ExtensionsCHECKED.a", 347 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3VehicleCHECKED.a", 348 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXProfileSDKCHECKED.a", 349 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXVisualDebuggerSDKCHECKED.a", 350 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPvdRuntimeCHECKED.a", 351 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPxTaskCHECKED.a", 352 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSceneQueryCHECKED.a", 353 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSimulationControllerCHECKED.a", 354 | "-lz", 355 | ); 356 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx.BasicApp; 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | VALID_ARCHS = arm64; 360 | WRAPPER_EXTENSION = app; 361 | }; 362 | name = Debug; 363 | }; 364 | 00692BF714FF149000D0A05E /* Release */ = { 365 | isa = XCBuildConfiguration; 366 | buildSettings = { 367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 368 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 369 | GCC_PREFIX_HEADER = BasicApp_Prefix.pch; 370 | INFOPLIST_FILE = Info.plist; 371 | "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( 372 | "\"$(CINDER_PATH)/lib/libcinder-iphone.a\"", 373 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevel.a", 374 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelCloth.a", 375 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3.a", 376 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CharacterKinematic.a", 377 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Common.a", 378 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Cooking.a", 379 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Extensions.a", 380 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Vehicle.a", 381 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXProfileSDK.a", 382 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXVisualDebuggerSDK.a", 383 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPvdRuntime.a", 384 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPxTask.a", 385 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSceneQuery.a", 386 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSimulationController.a", 387 | "-lz", 388 | ); 389 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx.BasicApp; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | TARGETED_DEVICE_FAMILY = "1,2"; 392 | VALID_ARCHS = arm64; 393 | WRAPPER_EXTENSION = app; 394 | }; 395 | name = Release; 396 | }; 397 | /* End XCBuildConfiguration section */ 398 | 399 | /* Begin XCConfigurationList section */ 400 | 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "BasicApp" */ = { 401 | isa = XCConfigurationList; 402 | buildConfigurations = ( 403 | 00692BF314FF149000D0A05E /* Debug */, 404 | 00692BF414FF149000D0A05E /* Release */, 405 | ); 406 | defaultConfigurationIsVisible = 0; 407 | defaultConfigurationName = Release; 408 | }; 409 | 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "BasicApp" */ = { 410 | isa = XCConfigurationList; 411 | buildConfigurations = ( 412 | 00692BF614FF149000D0A05E /* Debug */, 413 | 00692BF714FF149000D0A05E /* Release */, 414 | ); 415 | defaultConfigurationIsVisible = 0; 416 | defaultConfigurationName = Release; 417 | }; 418 | /* End XCConfigurationList section */ 419 | }; 420 | rootObject = 00692BC614FF149000D0A05E /* Project object */; 421 | } 422 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode_ios/BasicApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/BasicApp/xcode_ios/BasicApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | #if defined( __cplusplus ) 2 | #include "cinder/Cinder.h" 3 | 4 | #include "cinder/app/App.h" 5 | 6 | #include "cinder/gl/gl.h" 7 | 8 | #include "cinder/CinderMath.h" 9 | #include "cinder/Matrix.h" 10 | #include "cinder/Vector.h" 11 | #include "cinder/Quaternion.h" 12 | #endif -------------------------------------------------------------------------------- /samples/BasicApp/xcode_ios/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIcons 14 | 15 | CFBundleIcons~ipad 16 | 17 | CFBundleIdentifier 18 | $(PRODUCT_BUNDLE_IDENTIFIER) 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | ${PRODUCT_NAME} 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | 1.0 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 1 31 | LSRequiresIPhoneOS 32 | 33 | NSMainNibFile 34 | 35 | NSMainNibFile~ipad 36 | 37 | UILaunchStoryboardName 38 | LaunchScreen.xib 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/InstancedApp/assets/frag.glsl: -------------------------------------------------------------------------------- 1 | #if __VERSION__ == 300 2 | precision highp float; 3 | #endif 4 | 5 | 6 | const vec3 kLightPosition = vec3( 0.0 ); 7 | const float kShininess = 100.0; 8 | const float kNormalization = ( kShininess + 8.0 ) / ( 3.141592653589 * 8.0 ); 9 | const vec3 Is = vec3( 1.0 ); 10 | 11 | in Vertex 12 | { 13 | vec3 color; 14 | vec3 normal; 15 | vec3 position; 16 | } vertex; 17 | 18 | layout (location = 0) out vec4 oColor; 19 | 20 | void main( void ) 21 | { 22 | vec3 L = normalize( kLightPosition - vertex.position ); 23 | vec3 E = normalize( -vertex.position ); 24 | vec3 N = normalize( vertex.normal ); 25 | vec3 H = normalize( L + E ); 26 | 27 | float Kd = max( dot( N, L ), 0.0 ); 28 | vec3 Id = vertex.color * Kd; 29 | 30 | float Ks = pow( max( dot( N, H ), 0.0 ), kShininess ); 31 | vec3 Is = kNormalization * Is * Ks; 32 | 33 | oColor = vec4( Id + Is, 1.0 ); 34 | } 35 | -------------------------------------------------------------------------------- /samples/InstancedApp/assets/vert.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 ciModelView; 2 | uniform mat4 ciModelViewProjection; 3 | #if !defined( INSTANCED_MODEL ) 4 | uniform mat3 ciNormalMatrix; 5 | #endif 6 | in vec4 ciPosition; 7 | in vec3 ciNormal; 8 | in vec4 ciColor; 9 | 10 | out Vertex 11 | { 12 | vec3 color; 13 | vec3 normal; 14 | vec3 position; 15 | } vertex; 16 | 17 | #if defined( INSTANCED_MODEL ) 18 | in mat4 vInstanceModelMatrix; 19 | in mat3 vInstanceNormalMatrix; 20 | #endif 21 | 22 | void main( void ) 23 | { 24 | vertex.color = ciColor.rgb; 25 | 26 | #if defined( INSTANCED_MODEL ) 27 | mat3 normalMatrix = vInstanceNormalMatrix; 28 | #else 29 | mat3 normalMatrix = ciNormalMatrix; 30 | #endif 31 | vec3 n = ciNormal; 32 | vertex.normal = normalMatrix * n; 33 | 34 | vertex.position = ( ciModelView * ciPosition ).xyz; 35 | 36 | mat4 m = ciModelViewProjection; 37 | vec4 p = ciPosition; 38 | #if defined( INSTANCED_MODEL ) 39 | m = m * vInstanceModelMatrix; 40 | #endif 41 | gl_Position = m * p; 42 | } 43 | -------------------------------------------------------------------------------- /samples/InstancedApp/include/Model.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cinder/Matrix.h" 4 | 5 | class Model 6 | { 7 | public: 8 | Model(); 9 | Model( const Model& rhs ); 10 | 11 | Model& operator=( const Model& rhs ); 12 | 13 | Model& modelMatrix( const ci::mat4& m ); 14 | Model& normalMatrix( const ci::mat3& m ); 15 | 16 | const ci::mat4& getModelMatrix() const; 17 | const ci::mat3& getNormalMatrix() const; 18 | 19 | void setModelMatrix( const ci::mat4& m ); 20 | void setNormalMatrix( const ci::mat3& m ); 21 | protected: 22 | ci::mat4 mModelMatrix; 23 | ci::mat3 mNormalMatrix; 24 | }; 25 | -------------------------------------------------------------------------------- /samples/InstancedApp/include/Resources.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "cinder/CinderResources.h" 3 | 4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/InstancedApp/resources/CinderApp.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-Physx/7c4cdb33cb00a37e046fb2ca7d257791d23fa7a0/samples/InstancedApp/resources/CinderApp.icns -------------------------------------------------------------------------------- /samples/InstancedApp/resources/cinder_app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BanTheRewind/Cinder-Physx/7c4cdb33cb00a37e046fb2ca7d257791d23fa7a0/samples/InstancedApp/resources/cinder_app_icon.ico -------------------------------------------------------------------------------- /samples/InstancedApp/src/InstancedApp.cpp: -------------------------------------------------------------------------------- 1 | #include "cinder/app/App.h" 2 | #include "cinder/Camera.h" 3 | #include "cinder/CameraUi.h" 4 | #include "cinder/gl/gl.h" 5 | 6 | #include "Model.h" 7 | #include "CinderPhysx.h" 8 | 9 | class InstancedApp : public ci::app::App, public physx::PxBroadPhaseCallback 10 | { 11 | public: 12 | InstancedApp(); 13 | 14 | void draw() override; 15 | #if defined( CINDER_COCOA_TOUCH ) 16 | void touchesBegan( ci::app::TouchEvent event ) override; 17 | void touchesEnded( ci::app::TouchEvent event ) override; 18 | #else 19 | void keyDown( ci::app::KeyEvent event ) override; 20 | #endif 21 | void resize() override; 22 | void update() override; 23 | private: 24 | ci::CameraPersp mCamera; 25 | ci::CameraUi mCamUi; 26 | 27 | ci::gl::VboRef mVboInstancedSpheres; 28 | 29 | ci::gl::BatchRef mBatchStockColorPlane; 30 | ci::gl::BatchRef mBatchInstancedSphere; 31 | 32 | void addActor(); 33 | physx::PxMaterial* mMaterial; 34 | PhysxRef mPhysx; 35 | virtual void onObjectOutOfBounds( physx::PxShape& shape, physx::PxActor& actor ) override; 36 | virtual void onObjectOutOfBounds( physx::PxAggregate& aggregate ) override; 37 | #if defined( CINDER_COCOA_TOUCH ) 38 | bool mTouching; 39 | #endif 40 | }; 41 | 42 | using namespace ci; 43 | using namespace ci::app; 44 | using namespace physx; 45 | using namespace std; 46 | 47 | #include "cinder/app/RendererGl.h" 48 | #include "cinder/Log.h" 49 | #include "cinder/Rand.h" 50 | 51 | InstancedApp::InstancedApp() 52 | { 53 | #if defined( CINDER_COCOA_TOUCH ) 54 | mTouching = false; 55 | #endif 56 | 57 | mCamera = CameraPersp( getWindowWidth(), getWindowHeight(), 60.0f, 0.01f, 1000.0f ); 58 | mCamera.lookAt( vec3( 0.0f, 0.0f, 30.0f ), vec3( 0.0f, 0.0f, 0.0f ) ); 59 | mCamUi = CameraUi( &mCamera, getWindow() ); 60 | 61 | // Initialize Physx 62 | mPhysx = Physx::create(); 63 | 64 | // Create a material for all actors 65 | mMaterial = mPhysx->getPhysics()->createMaterial( 0.5f, 0.5f, 0.5f ); 66 | 67 | // Create a scene. Multiples scenes are allowed. 68 | mPhysx->createScene(); 69 | 70 | // Connects onObjectOutOfBounds to scene. This lets us manage 71 | // objects that have gone out of bounds. 72 | mPhysx->getScene()->setBroadPhaseCallback( this ); 73 | 74 | // Add the plane to the scene 75 | mPhysx->addActor( PxCreatePlane( 76 | *mPhysx->getPhysics(), 77 | PxPlane( Physx::to( vec3( 0.0f, 1.0f, 0.0f ) ), 5.0f ), 78 | *mMaterial 79 | ), mPhysx->getScene() ); 80 | 81 | // Add some spheres 82 | #if defined( CINDER_COCOA_TOUCH ) 83 | for ( size_t i = 0; i < 500; ++i ) { 84 | #else 85 | for ( size_t i = 0; i < 2000; ++i ) { 86 | #endif 87 | addActor(); 88 | } 89 | 90 | // Shortcut for shader loading and error handling 91 | auto loadGlslProg = [ &]( const gl::GlslProg::Format& format ) -> gl::GlslProgRef 92 | { 93 | string names = format.getVertexPath().string() + " + " + 94 | format.getFragmentPath().string(); 95 | gl::GlslProgRef glslProg; 96 | try { 97 | glslProg = gl::GlslProg::create( format ); 98 | } catch ( const Exception& ex ) { 99 | CI_LOG_EXCEPTION( names, ex ); 100 | quit(); 101 | } 102 | return glslProg; 103 | }; 104 | 105 | // Load shader files 106 | DataSourceRef frag = loadAsset( "frag.glsl" ); 107 | DataSourceRef vert = loadAsset( "vert.glsl" ); 108 | 109 | // Create GLSL programs 110 | #if defined( CINDER_GL_ES_3 ) 111 | int32_t version = 300; 112 | #else 113 | int32_t version = 330; 114 | #endif 115 | gl::GlslProgRef glslProg = loadGlslProg( gl::GlslProg::Format() 116 | .version( version ) 117 | .vertex( vert ).fragment( frag ) ); 118 | gl::GlslProgRef glslProgInstanced = loadGlslProg( gl::GlslProg::Format() 119 | .version( version ) 120 | .vertex( vert ).fragment( frag ) 121 | .define( "INSTANCED_MODEL" ) ); 122 | 123 | // Create geometry 124 | gl::VboMeshRef plane = gl::VboMesh::create( geom::Plane() 125 | .axes( vec3( 0.0f, 1.0f, 0.0f ), vec3( 0.0f, 0.0f, 1.0f ) ) 126 | .normal( vec3( 1.0f, 0.0f, 0.0f ) ) 127 | .size( vec2( 200.0f ) ) 128 | .subdivisions( ivec2( 32 ) ) ); 129 | gl::VboMeshRef sphere = gl::VboMesh::create( geom::Sphere() 130 | .colors() 131 | .radius( 0.5f ) 132 | .subdivisions( 32 ) ); 133 | 134 | // Initialize instancing data 135 | geom::BufferLayout bufferLayout; 136 | size_t stride = sizeof( Model ); 137 | bufferLayout.append( geom::Attrib::CUSTOM_0, 16, stride, 0, 1 ); 138 | bufferLayout.append( geom::Attrib::CUSTOM_1, 9, stride, sizeof( mat4 ), 1 ); 139 | mVboInstancedSpheres = gl::Vbo::create( GL_ARRAY_BUFFER, 0, nullptr, GL_DYNAMIC_DRAW ); 140 | sphere->appendVbo( bufferLayout, mVboInstancedSpheres ); 141 | 142 | // Create batches 143 | mBatchInstancedSphere = gl::Batch::create( sphere, glslProgInstanced, { 144 | { geom::Attrib::CUSTOM_0, "vInstanceModelMatrix" }, 145 | { geom::Attrib::CUSTOM_1, "vInstanceNormalMatrix" } 146 | } ); 147 | mBatchStockColorPlane = gl::Batch::create( plane, glslProg ); 148 | 149 | #if !defined( CINDER_COCOA_TOUCH ) 150 | // Connect to Physx Visual Debugger 151 | mPhysx->pvdConnect(); 152 | #endif 153 | 154 | resize(); 155 | 156 | gl::enableDepthRead(); 157 | gl::enableDepthWrite(); 158 | gl::enableVerticalSync(); 159 | } 160 | 161 | void InstancedApp::addActor() 162 | { 163 | // Choose random position and size 164 | vec3 p( randVec3() * 5.0f ); 165 | p.y = glm::abs( p.y ); 166 | float r = randFloat( 0.01f, 1.0f ); 167 | 168 | // Create a randomly shaped actor 169 | PxRigidDynamic* actor = PxCreateDynamic( 170 | *mPhysx->getPhysics(), 171 | PxTransform( Physx::to( p ) ), 172 | PxSphereGeometry( r ), 173 | *mMaterial, 174 | r * 100.0f ); 175 | 176 | // Apply some motion and add it to the scene 177 | actor->setLinearVelocity( Physx::to( randVec3() ) ); 178 | mPhysx->addActor( actor, mPhysx->getScene() ); 179 | } 180 | 181 | void InstancedApp::draw() 182 | { 183 | gl::clear(); 184 | const gl::ScopedMatrices scopedMatrices; 185 | gl::setMatrices( mCamera ); 186 | 187 | // Draw floor plane 188 | { 189 | const gl::ScopedModelMatrix scopedModelMatrix; 190 | gl::multModelMatrix( Physx::from( 191 | static_cast( mPhysx->getActor( 0 ) )->getGlobalPose() 192 | ) ); 193 | mBatchStockColorPlane->draw(); 194 | } 195 | 196 | // Draw instanced spheres 197 | mBatchInstancedSphere->drawInstanced( (GLsizei)mPhysx->getActors().size() - 1 ); 198 | } 199 | 200 | #if defined( CINDER_COCOA_TOUCH ) 201 | 202 | void InstancedApp::touchesBegan( TouchEvent event ) 203 | { 204 | mTouching = true; 205 | } 206 | 207 | void InstancedApp::touchesEnded( TouchEvent event ) 208 | { 209 | mTouching = false; 210 | } 211 | 212 | #else 213 | 214 | void InstancedApp::keyDown( ci::app::KeyEvent event ) 215 | { 216 | switch ( event.getCode() ) { 217 | case KeyEvent::KEY_SPACE: 218 | { 219 | int32_t count = randInt( 10 ); 220 | for ( size_t i = 0; i < count; ++i ) { 221 | addActor(); 222 | } 223 | } 224 | break; 225 | case KeyEvent::KEY_f: 226 | setFullScreen( !isFullScreen() ); 227 | break; 228 | case KeyEvent::KEY_q: 229 | quit(); 230 | break; 231 | } 232 | } 233 | 234 | #endif 235 | 236 | void InstancedApp::onObjectOutOfBounds( physx::PxShape& shape, physx::PxActor& actor ) 237 | { 238 | mPhysx->eraseActor( actor ); 239 | addActor(); 240 | } 241 | 242 | void InstancedApp::onObjectOutOfBounds( PxAggregate& aggregate ) 243 | { 244 | aggregate.release(); 245 | } 246 | 247 | void InstancedApp::resize() 248 | { 249 | mCamera.setAspectRatio( getWindowAspectRatio() ); 250 | } 251 | 252 | void InstancedApp::update() 253 | { 254 | mPhysx->update(); 255 | 256 | #if defined( CINDER_COCOA_TOUCH ) 257 | if ( mTouching ) { 258 | addActor(); 259 | } 260 | #endif 261 | 262 | vector spheres; 263 | for ( const auto& iter : mPhysx->getActors() ) { 264 | if ( iter.second->getType() == PxActorType::eRIGID_DYNAMIC ) { 265 | PxRigidDynamic* actor = static_cast( iter.second ); 266 | mat4 m = glm::scale( Physx::from( actor->getGlobalPose() ), Physx::from( actor->getWorldBounds() ).getSize() ); 267 | spheres.push_back( Model() 268 | .modelMatrix( m ) 269 | .normalMatrix( glm::inverseTranspose( mat3( mCamera.getViewMatrix() * m ) ) ) ); 270 | } 271 | } 272 | mVboInstancedSpheres->bufferData( sizeof( Model ) * spheres.size(), spheres.data(), GL_DYNAMIC_DRAW ); 273 | } 274 | 275 | 276 | #if defined( CINDER_COCOA_TOUCH ) 277 | CINDER_APP( InstancedApp, RendererGl( RendererGl::Options().msaa( 16 ) ), 278 | []( App::Settings* settings ) 279 | { 280 | settings->disableFrameRate(); 281 | settings->setMultiTouchEnabled( true ); 282 | } ) 283 | #else 284 | CINDER_APP( InstancedApp, RendererGl( RendererGl::Options().msaa( 16 ) ), 285 | []( App::Settings* settings ) 286 | { 287 | settings->disableFrameRate(); 288 | settings->setWindowSize( 1280, 720 ); 289 | } ) 290 | #endif 291 | -------------------------------------------------------------------------------- /samples/InstancedApp/src/Model.cpp: -------------------------------------------------------------------------------- 1 | #include "Model.h" 2 | 3 | using namespace ci; 4 | 5 | Model::Model() 6 | : mModelMatrix( mat4( 1.0f ) ), mNormalMatrix( mat3( 1.0f ) ) 7 | { 8 | } 9 | 10 | Model::Model( const Model& rhs ) 11 | { 12 | *this = rhs; 13 | } 14 | 15 | Model& Model::operator=( const Model& rhs ) 16 | { 17 | mModelMatrix = rhs.mModelMatrix; 18 | mNormalMatrix = rhs.mNormalMatrix; 19 | return *this; 20 | } 21 | 22 | Model& Model::modelMatrix( const mat4& m ) 23 | { 24 | mModelMatrix = m; 25 | return *this; 26 | } 27 | 28 | Model& Model::normalMatrix( const mat3& m ) 29 | { 30 | mNormalMatrix = m; 31 | return *this; 32 | } 33 | 34 | const mat4& Model::getModelMatrix() const 35 | { 36 | return mModelMatrix; 37 | } 38 | 39 | const mat3& Model::getNormalMatrix() const 40 | { 41 | return mNormalMatrix; 42 | } 43 | 44 | void Model::setModelMatrix( const mat4& m ) 45 | { 46 | mModelMatrix = m; 47 | } 48 | 49 | void Model::setNormalMatrix( const mat3& m ) 50 | { 51 | mNormalMatrix = m; 52 | } 53 | -------------------------------------------------------------------------------- /samples/InstancedApp/vc2013/InstancedApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstancedApp", "InstancedApp.vcxproj", "{DE98CD04-6E27-4E14-992C-3F2E23826393}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x64 = Debug|x64 9 | Release|x64 = Release|x64 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Debug|x64.ActiveCfg = Debug|x64 13 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Debug|x64.Build.0 = Debug|x64 14 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Release|x64.ActiveCfg = Release|x64 15 | {DE98CD04-6E27-4E14-992C-3F2E23826393}.Release|x64.Build.0 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /samples/InstancedApp/vc2013/InstancedApp.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x64 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {DE98CD04-6E27-4E14-992C-3F2E23826393} 15 | InstancedApp 16 | Win32Proj 17 | InstancedApp 18 | 19 | 20 | 21 | Application 22 | false 23 | v120 24 | Unicode 25 | true 26 | 27 | 28 | Application 29 | true 30 | v120 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | <_ProjectFileVersion>10.0.30319.1 44 | true 45 | false 46 | 47 | 48 | $(SolutionDir)\bin\ 49 | 50 | 51 | $(SolutionDir)\bin\ 52 | 53 | 54 | 55 | Disabled 56 | ..\include;..\..\..\src;..\..\..\Physx-3.3\PhysXSDK\Include;..\..\..\..\..\include 57 | WIN32;_DEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) 58 | EnableFastChecks 59 | MultiThreadedDebug 60 | 61 | Level3 62 | ProgramDatabase 63 | true 64 | 65 | 66 | "..\..\..\..\..\include";..\include 67 | 68 | 69 | cinder-$(PlatformToolset)_d.lib;OpenGL32.lib;PhysX3DEBUG_x64.lib;PhysXProfileSDKDEBUG.lib;PhysX3CommonDEBUG_x64.lib;PhysX3CookingDEBUG_x64.lib;PhysX3ExtensionsDEBUG.lib;PhysX3GpuDEBUG_x64.lib;PhysXVisualDebuggerSDKDEBUG.lib;PvdRuntimeDEBUG.lib;PxTaskDEBUG.lib;%(AdditionalDependencies) 70 | ..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\PhysX-3.3\PhysXSDK\Lib\vc12win64 71 | true 72 | Windows 73 | false 74 | 75 | LIBCMT;LIBCPMT 76 | 77 | 78 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\nvToolsExt64_1.dll" "$(SolutionDir)bin\" /Y /C 79 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3DEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 80 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3CookingDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 81 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3CommonDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 82 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysXDevice64.dll" "$(SolutionDir)bin\" /Y /C 83 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3GpuDEBUG_x64.dll" "$(SolutionDir)bin\" /Y /C 84 | 85 | 86 | 87 | 88 | ..\include;..\..\..\src;..\..\..\Physx-3.3\PhysXSDK\Include;..\..\..\..\..\include 89 | WIN32;NDEBUG;_WINDOWS;NOMINMAX;_WIN32_WINNT=0x0502;%(PreprocessorDefinitions) 90 | MultiThreaded 91 | 92 | Level3 93 | ProgramDatabase 94 | true 95 | 96 | 97 | true 98 | 99 | 100 | "..\..\..\..\..\include";..\include 101 | 102 | 103 | cinder-$(PlatformToolset).lib;OpenGL32.lib;PhysX3_x64.lib;PhysXProfileSDK.lib;PhysX3Cooking_x64.lib;PhysX3Common_x64.lib;PhysX3Extensions.lib;PhysX3Gpu_x64.lib;PhysXVisualDebuggerSDK.lib;PvdRuntime.lib;PxTask.lib;%(AdditionalDependencies) 104 | ..\..\..\..\..\lib\msw\$(PlatformTarget);..\..\..\PhysX-3.3\PhysXSDK\Lib\vc12win64 105 | false 106 | true 107 | Windows 108 | true 109 | 110 | false 111 | 112 | 113 | 114 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\nvToolsExt64_1.dll" "$(SolutionDir)bin\" /Y /C 115 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3_x64.dll" "$(SolutionDir)bin\" /Y /C 116 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Cooking_x64.dll" "$(SolutionDir)bin\" /Y /C 117 | 118 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Common_x64.dll" "$(SolutionDir)bin\" /Y /C 119 | 120 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysXDevice64.dll" "$(SolutionDir)bin\" /Y /C 121 | xcopy "$(SolutionDir)..\..\..\PhysX-3.3\PhysXSDK\Bin\vc12win64\PhysX3Gpu_x64.dll" "$(SolutionDir)bin\" /Y /C 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /samples/InstancedApp/vc2013/InstancedApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | {23c9d643-b464-4f7f-aee5-8f1cf092a41b} 18 | 19 | 20 | {edd8f36f-5bfc-4093-b1b4-8a75724cd833} 21 | 22 | 23 | {a6384427-6e86-44ae-9a10-6d8abb1d7f9c} 24 | 25 | 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | blocks\Cinder-Physx 38 | 39 | 40 | Source Files 41 | 42 | 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | blocks\Cinder-Physx 52 | 53 | 54 | Header Files 55 | 56 | 57 | 58 | 59 | Resource Files 60 | 61 | 62 | 63 | 64 | assets 65 | 66 | 67 | assets 68 | 69 | 70 | -------------------------------------------------------------------------------- /samples/InstancedApp/vc2013/Resources.rc: -------------------------------------------------------------------------------- 1 | #include "../include/Resources.h" 2 | 3 | 1 ICON "..\\resources\\cinder_app_icon.ico" 4 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | CinderApp.icns 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode/InstancedApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; }; 11 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; }; 12 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; }; 13 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; }; 14 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; }; 15 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; }; 16 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; }; 17 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 18 | AE1AB4E31BBC717E005BB87D /* InstancedApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE1AB4E21BBC717E005BB87D /* InstancedApp.cpp */; settings = {ASSET_TAGS = (); }; }; 19 | AE50D2781B261985007FFE25 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D2771B261985007FFE25 /* AVFoundation.framework */; }; 20 | AE50D27A1B2619A3007FFE25 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D2791B2619A3007FFE25 /* CoreMedia.framework */; }; 21 | AE50D27C1B2619C1007FFE25 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D27B1B2619C1007FFE25 /* IOSurface.framework */; }; 22 | AE50D2801B261A88007FFE25 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE50D27F1B261A88007FFE25 /* IOKit.framework */; }; 23 | AED55B251BBEFBCD000F6637 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = AED55B241BBEFBCD000F6637 /* CinderApp.icns */; settings = {ASSET_TAGS = (); }; }; 24 | AED55B281BBEFBDB000F6637 /* CinderPhysx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */; settings = {ASSET_TAGS = (); }; }; 25 | AED55B2B1BBF2D11000F6637 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = AED55B2A1BBF2D11000F6637 /* assets */; settings = {ASSET_TAGS = (); }; }; 26 | AED55B2F1BBF2D3B000F6637 /* Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED55B2E1BBF2D3B000F6637 /* Model.cpp */; settings = {ASSET_TAGS = (); }; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXCopyFilesBuildPhase section */ 30 | AE362B621668013A0094CD37 /* CopyFiles */ = { 31 | isa = PBXCopyFilesBuildPhase; 32 | buildActionMask = 12; 33 | dstPath = ""; 34 | dstSubfolderSpec = 6; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 43 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 44 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 45 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 46 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 47 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 48 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 49 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 50 | 334F79182B9947F2A1A4632B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 52 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 53 | 8D1107320486CEB800E47090 /* InstancedApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstancedApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | AE1AB4E21BBC717E005BB87D /* InstancedApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InstancedApp.cpp; path = ../src/InstancedApp.cpp; sourceTree = ""; }; 55 | AE50D2771B261985007FFE25 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 56 | AE50D2791B2619A3007FFE25 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 57 | AE50D27B1B2619C1007FFE25 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; }; 58 | AE50D27F1B261A88007FFE25 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 59 | AED55B241BBEFBCD000F6637 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../resources/CinderApp.icns; sourceTree = ""; }; 60 | AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CinderPhysx.cpp; path = ../../../src/CinderPhysx.cpp; sourceTree = ""; }; 61 | AED55B271BBEFBDB000F6637 /* CinderPhysx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CinderPhysx.h; path = ../../../src/CinderPhysx.h; sourceTree = ""; }; 62 | AED55B2A1BBF2D11000F6637 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../assets; sourceTree = ""; }; 63 | AED55B2C1BBF2D36000F6637 /* Model.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Model.h; path = ../include/Model.h; sourceTree = ""; }; 64 | AED55B2D1BBF2D36000F6637 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; 65 | AED55B2E1BBF2D3B000F6637 /* Model.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Model.cpp; path = ../src/Model.cpp; sourceTree = ""; }; 66 | CC680A809AF041E8BE4D8AE5 /* InstancedApp_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstancedApp_Prefix.pch; sourceTree = ""; }; 67 | /* End PBXFileReference section */ 68 | 69 | /* Begin PBXFrameworksBuildPhase section */ 70 | 8D11072E0486CEB800E47090 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | AE50D2801B261A88007FFE25 /* IOKit.framework in Frameworks */, 75 | AE50D27C1B2619C1007FFE25 /* IOSurface.framework in Frameworks */, 76 | AE50D27A1B2619A3007FFE25 /* CoreMedia.framework in Frameworks */, 77 | AE50D2781B261985007FFE25 /* AVFoundation.framework in Frameworks */, 78 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, 79 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */, 80 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */, 81 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */, 82 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */, 83 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */, 84 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */, 85 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */, 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | /* End PBXFrameworksBuildPhase section */ 90 | 91 | /* Begin PBXGroup section */ 92 | 01B97315FEAEA392516A2CEA /* Blocks */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | AE51D6151B85124000DCEFBF /* Cinder-Physx */, 96 | ); 97 | name = Blocks; 98 | sourceTree = ""; 99 | }; 100 | 080E96DDFE201D6D7F000001 /* Source */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | AED55B2E1BBF2D3B000F6637 /* Model.cpp */, 104 | AE1AB4E21BBC717E005BB87D /* InstancedApp.cpp */, 105 | ); 106 | name = Source; 107 | sourceTree = ""; 108 | }; 109 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | AE50D27F1B261A88007FFE25 /* IOKit.framework */, 113 | AE50D27B1B2619C1007FFE25 /* IOSurface.framework */, 114 | AE50D2791B2619A3007FFE25 /* CoreMedia.framework */, 115 | AE50D2771B261985007FFE25 /* AVFoundation.framework */, 116 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */, 117 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */, 118 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */, 119 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */, 120 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */, 121 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */, 122 | 0091D8F80E81B9330029341E /* OpenGL.framework */, 123 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, 124 | ); 125 | name = "Linked Frameworks"; 126 | sourceTree = ""; 127 | }; 128 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */, 132 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */, 133 | ); 134 | name = "Other Frameworks"; 135 | sourceTree = ""; 136 | }; 137 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 8D1107320486CEB800E47090 /* InstancedApp.app */, 141 | ); 142 | name = Products; 143 | sourceTree = ""; 144 | }; 145 | 29B97314FDCFA39411CA2CEA /* TuioMultitouchBasic */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | AED55B2A1BBF2D11000F6637 /* assets */, 149 | 01B97315FEAEA392516A2CEA /* Blocks */, 150 | 29B97315FDCFA39411CA2CEA /* Headers */, 151 | 080E96DDFE201D6D7F000001 /* Source */, 152 | 29B97317FDCFA39411CA2CEA /* Resources */, 153 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 154 | 19C28FACFE9D520D11CA2CBB /* Products */, 155 | ); 156 | name = TuioMultitouchBasic; 157 | sourceTree = ""; 158 | }; 159 | 29B97315FDCFA39411CA2CEA /* Headers */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | CC680A809AF041E8BE4D8AE5 /* InstancedApp_Prefix.pch */, 163 | AED55B2C1BBF2D36000F6637 /* Model.h */, 164 | AED55B2D1BBF2D36000F6637 /* Resources.h */, 165 | ); 166 | name = Headers; 167 | sourceTree = ""; 168 | }; 169 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | AED55B241BBEFBCD000F6637 /* CinderApp.icns */, 173 | 334F79182B9947F2A1A4632B /* Info.plist */, 174 | ); 175 | name = Resources; 176 | sourceTree = ""; 177 | }; 178 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 182 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, 183 | ); 184 | name = Frameworks; 185 | sourceTree = ""; 186 | }; 187 | AE51D6151B85124000DCEFBF /* Cinder-Physx */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | AE51D6161B85124E00DCEFBF /* src */, 191 | ); 192 | name = "Cinder-Physx"; 193 | sourceTree = ""; 194 | }; 195 | AE51D6161B85124E00DCEFBF /* src */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | AED55B261BBEFBDB000F6637 /* CinderPhysx.cpp */, 199 | AED55B271BBEFBDB000F6637 /* CinderPhysx.h */, 200 | ); 201 | name = src; 202 | path = "../../../blocks/Cinder-Physx/src"; 203 | sourceTree = ""; 204 | }; 205 | /* End PBXGroup section */ 206 | 207 | /* Begin PBXNativeTarget section */ 208 | 8D1107260486CEB800E47090 /* InstancedApp */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "InstancedApp" */; 211 | buildPhases = ( 212 | 8D1107290486CEB800E47090 /* Resources */, 213 | 8D11072C0486CEB800E47090 /* Sources */, 214 | 8D11072E0486CEB800E47090 /* Frameworks */, 215 | AE362B621668013A0094CD37 /* CopyFiles */, 216 | ); 217 | buildRules = ( 218 | ); 219 | dependencies = ( 220 | ); 221 | name = InstancedApp; 222 | productInstallPath = "$(HOME)/Applications"; 223 | productName = TuioMultitouchBasic; 224 | productReference = 8D1107320486CEB800E47090 /* InstancedApp.app */; 225 | productType = "com.apple.product-type.application"; 226 | }; 227 | /* End PBXNativeTarget section */ 228 | 229 | /* Begin PBXProject section */ 230 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 231 | isa = PBXProject; 232 | attributes = { 233 | LastUpgradeCheck = 0700; 234 | }; 235 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstancedApp" */; 236 | compatibilityVersion = "Xcode 3.2"; 237 | developmentRegion = English; 238 | hasScannedForEncodings = 1; 239 | knownRegions = ( 240 | English, 241 | Japanese, 242 | French, 243 | German, 244 | ); 245 | mainGroup = 29B97314FDCFA39411CA2CEA /* TuioMultitouchBasic */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 8D1107260486CEB800E47090 /* InstancedApp */, 250 | ); 251 | }; 252 | /* End PBXProject section */ 253 | 254 | /* Begin PBXResourcesBuildPhase section */ 255 | 8D1107290486CEB800E47090 /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | AED55B251BBEFBCD000F6637 /* CinderApp.icns in Resources */, 260 | AED55B2B1BBF2D11000F6637 /* assets in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXResourcesBuildPhase section */ 265 | 266 | /* Begin PBXSourcesBuildPhase section */ 267 | 8D11072C0486CEB800E47090 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | AED55B2F1BBF2D3B000F6637 /* Model.cpp in Sources */, 272 | AE1AB4E31BBC717E005BB87D /* InstancedApp.cpp in Sources */, 273 | AED55B281BBEFBDB000F6637 /* CinderPhysx.cpp in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | /* End PBXSourcesBuildPhase section */ 278 | 279 | /* Begin XCBuildConfiguration section */ 280 | C01FCF4B08A954540054247B /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | COMBINE_HIDPI_IMAGES = YES; 284 | COPY_PHASE_STRIP = NO; 285 | GCC_DYNAMIC_NO_PIC = NO; 286 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 287 | GCC_OPTIMIZATION_LEVEL = 0; 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = InstancedApp_Prefix.pch; 290 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 291 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 292 | INFOPLIST_FILE = Info.plist; 293 | INSTALL_PATH = "$(HOME)/Applications"; 294 | LD_RUNPATH_SEARCH_PATHS = "@loader_path"; 295 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 296 | MACOSX_DEPLOYMENT_TARGET = 10.7; 297 | OTHER_LDFLAGS = ( 298 | "\"$(CINDER_PATH)lib/libcinder_d.a\"", 299 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelClothCHECKED.a", 300 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelCHECKED.a", 301 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CharacterKinematicCHECKED.a", 302 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CommonCHECKED.a", 303 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CookingCHECKED.a", 304 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CHECKED.a", 305 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3ExtensionsCHECKED.a", 306 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3VehicleCHECKED.a", 307 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXProfileSDKCHECKED.a", 308 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXVisualDebuggerSDKCHECKED.a", 309 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPvdRuntimeCHECKED.a", 310 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPxTaskCHECKED.a", 311 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSceneQueryCHECKED.a", 312 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSimulationControllerCHECKED.a", 313 | ); 314 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx; 315 | PRODUCT_NAME = InstancedApp; 316 | SYMROOT = ./build; 317 | VALID_ARCHS = x86_64; 318 | WRAPPER_EXTENSION = app; 319 | }; 320 | name = Debug; 321 | }; 322 | C01FCF4C08A954540054247B /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | COMBINE_HIDPI_IMAGES = YES; 326 | DEAD_CODE_STRIPPING = YES; 327 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 328 | GCC_FAST_MATH = YES; 329 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 330 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES; 331 | GCC_OPTIMIZATION_LEVEL = 3; 332 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 333 | GCC_PREFIX_HEADER = InstancedApp_Prefix.pch; 334 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 335 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 336 | INFOPLIST_FILE = Info.plist; 337 | INSTALL_PATH = "$(HOME)/Applications"; 338 | LD_RUNPATH_SEARCH_PATHS = "@loader_path"; 339 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 340 | MACOSX_DEPLOYMENT_TARGET = 10.7; 341 | OTHER_LDFLAGS = ( 342 | "\"$(CINDER_PATH)lib/libcinder.a\"", 343 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevel.a", 344 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libLowLevelCloth.a", 345 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3.a", 346 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3CharacterKinematic.a", 347 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Common.a", 348 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Cooking.a", 349 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Extensions.a", 350 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysX3Vehicle.a", 351 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXProfileSDK.a", 352 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPhysXVisualDebuggerSDK.a", 353 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPvdRuntime.a", 354 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libPxTask.a", 355 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSceneQuery.a", 356 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64/libSimulationController.a", 357 | ); 358 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx; 359 | PRODUCT_NAME = InstancedApp; 360 | STRIP_INSTALLED_PRODUCT = YES; 361 | SYMROOT = ./build; 362 | VALID_ARCHS = x86_64; 363 | WRAPPER_EXTENSION = app; 364 | }; 365 | name = Release; 366 | }; 367 | C01FCF4F08A954540054247B /* Debug */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ALWAYS_SEARCH_USER_PATHS = NO; 371 | CINDER_PATH = ../../../../../; 372 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 373 | CLANG_CXX_LIBRARY = "libc++"; 374 | ENABLE_TESTABILITY = YES; 375 | GCC_PREPROCESSOR_DEFINITIONS = _DEBUG; 376 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 379 | LD_DYLIB_INSTALL_NAME = ""; 380 | LIBRARY_SEARCH_PATHS = ( 381 | ../../../../../lib/, 382 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64", 383 | ); 384 | MACOSX_DEPLOYMENT_TARGET = 10.7; 385 | ONLY_ACTIVE_ARCH = YES; 386 | SDKROOT = macosx; 387 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\" ../../../src/ ../../../PhysX-3.3/PhysXSDK/Include"; 388 | VALID_ARCHS = x86_64; 389 | }; 390 | name = Debug; 391 | }; 392 | C01FCF5008A954540054247B /* Release */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ALWAYS_SEARCH_USER_PATHS = NO; 396 | CINDER_PATH = ../../../../../; 397 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 398 | CLANG_CXX_LIBRARY = "libc++"; 399 | GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1"; 400 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\""; 403 | LD_DYLIB_INSTALL_NAME = ""; 404 | LIBRARY_SEARCH_PATHS = ( 405 | ../../../../../lib/, 406 | "../../../PhysX-3.3/PhysXSDK/Lib/osx64", 407 | ); 408 | MACOSX_DEPLOYMENT_TARGET = 10.7; 409 | SDKROOT = macosx; 410 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)include/\" ../../../src/ ../../../PhysX-3.3/PhysXSDK/Include"; 411 | VALID_ARCHS = x86_64; 412 | }; 413 | name = Release; 414 | }; 415 | /* End XCBuildConfiguration section */ 416 | 417 | /* Begin XCConfigurationList section */ 418 | C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "InstancedApp" */ = { 419 | isa = XCConfigurationList; 420 | buildConfigurations = ( 421 | C01FCF4B08A954540054247B /* Debug */, 422 | C01FCF4C08A954540054247B /* Release */, 423 | ); 424 | defaultConfigurationIsVisible = 0; 425 | defaultConfigurationName = Release; 426 | }; 427 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstancedApp" */ = { 428 | isa = XCConfigurationList; 429 | buildConfigurations = ( 430 | C01FCF4F08A954540054247B /* Debug */, 431 | C01FCF5008A954540054247B /* Release */, 432 | ); 433 | defaultConfigurationIsVisible = 0; 434 | defaultConfigurationName = Release; 435 | }; 436 | /* End XCConfigurationList section */ 437 | }; 438 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 439 | } 440 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode/InstancedApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode/InstancedApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'basicApp' target in the 'basicApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode_ios/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIcons 14 | 15 | CFBundleIcons~ipad 16 | 17 | CFBundleIdentifier 18 | $(PRODUCT_BUNDLE_IDENTIFIER) 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | ${PRODUCT_NAME} 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | 1.0 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 1 31 | LSRequiresIPhoneOS 32 | 33 | NSMainNibFile 34 | 35 | NSMainNibFile~ipad 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode_ios/InstancedApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0087D25412CD809F002CD69F /* CoreText.framework */; }; 11 | 00A66A361965AC8800B17EB3 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00A66A351965AC8800B17EB3 /* Accelerate.framework */; }; 12 | 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */; }; 13 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 14 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 15 | 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; 16 | 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; }; 17 | AE51D60A1B84FE3800DCEFBF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */; }; 18 | AED55B321BBF38F1000F6637 /* CinderPhysx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */; settings = {ASSET_TAGS = (); }; }; 19 | AEE66AB31BBF4253003983AD /* InstancedApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEE66AB11BBF4253003983AD /* InstancedApp.cpp */; settings = {ASSET_TAGS = (); }; }; 20 | AEE66AB41BBF4253003983AD /* Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEE66AB21BBF4253003983AD /* Model.cpp */; settings = {ASSET_TAGS = (); }; }; 21 | AEE66AB71BBF437D003983AD /* assets in Resources */ = {isa = PBXBuildFile; fileRef = AEE66AB61BBF437D003983AD /* assets */; settings = {ASSET_TAGS = (); }; }; 22 | C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02B121B400300192073 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 23 | C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C725E000121DAC8F00FA186B /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 24 | C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFDF6A1138442D0091FFFF /* ImageIO.framework */; }; 25 | C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C727C02D121B400300192073 /* CoreVideo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 26 | C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */; }; 27 | DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 00692BCF14FF149000D0A05E /* BasicApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasicApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 0087D25412CD809F002CD69F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; 33 | 00A66A351965AC8800B17EB3 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 34 | 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 35 | 00CFDF6A1138442D0091FFFF /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 36 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 37 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 38 | 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 39 | 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 40 | 8DCB9557F2964A4787BFB459 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; }; 41 | AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; 42 | AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CinderPhysx.cpp; path = ../../../src/CinderPhysx.cpp; sourceTree = ""; }; 43 | AED55B311BBF38F1000F6637 /* CinderPhysx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CinderPhysx.h; path = ../../../src/CinderPhysx.h; sourceTree = ""; }; 44 | AEE66AB01BBF424A003983AD /* InstancedApp_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstancedApp_Prefix.pch; sourceTree = ""; }; 45 | AEE66AB11BBF4253003983AD /* InstancedApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InstancedApp.cpp; path = ../src/InstancedApp.cpp; sourceTree = ""; }; 46 | AEE66AB21BBF4253003983AD /* Model.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Model.cpp; path = ../src/Model.cpp; sourceTree = ""; }; 47 | AEE66AB51BBF425A003983AD /* Model.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Model.h; path = ../include/Model.h; sourceTree = ""; }; 48 | AEE66AB61BBF437D003983AD /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../assets; sourceTree = ""; }; 49 | C725E000121DAC8F00FA186B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 50 | C727C02B121B400300192073 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; 51 | C727C02D121B400300192073 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 52 | C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 53 | CAD250B823774C4999DF70EA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 55 | /* End PBXFileReference section */ 56 | 57 | /* Begin PBXFrameworksBuildPhase section */ 58 | 00692BCC14FF149000D0A05E /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | AE51D60A1B84FE3800DCEFBF /* CoreMotion.framework in Frameworks */, 63 | C725E001121DAC8F00FA186B /* AVFoundation.framework in Frameworks */, 64 | C725DFFE121DAC7F00FA186B /* CoreMedia.framework in Frameworks */, 65 | C725E001121DAC8FFFFA18FF /* ImageIO.framework in Frameworks */, 66 | DDDDE001121DAC8FFFFADDDD /* MobileCoreServices.framework in Frameworks */, 67 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 68 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 69 | 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */, 70 | 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, 71 | 00CFDF6B1138442D0091E310 /* CoreGraphics.framework in Frameworks */, 72 | C727C02E121B400300192073 /* CoreVideo.framework in Frameworks */, 73 | C7FB19D6124BC0D70045AFD2 /* AudioToolbox.framework in Frameworks */, 74 | 00A66A361965AC8800B17EB3 /* Accelerate.framework in Frameworks */, 75 | 0087D25512CD809F002CD69F /* CoreText.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 00692BC414FF149000D0A05E = { 83 | isa = PBXGroup; 84 | children = ( 85 | AEE66AB61BBF437D003983AD /* assets */, 86 | 99692BD914FF149000DFFFFF /* Blocks */, 87 | 99692BD914FF149000D0A05F /* Headers */, 88 | 00692BD914FF149000D0A05E /* Source */, 89 | 00692BD914FF149000D0FFFF /* Resources */, 90 | 00692BD214FF149000D0A05E /* Frameworks */, 91 | 00692BD014FF149000D0A05E /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 00692BD014FF149000D0A05E /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 00692BCF14FF149000D0A05E /* BasicApp.app */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 00692BD214FF149000D0A05E /* Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | AE51D6091B84FE3800DCEFBF /* CoreMotion.framework */, 107 | C7FB19D5124BC0D70045AFD2 /* AudioToolbox.framework */, 108 | 00A66A351965AC8800B17EB3 /* Accelerate.framework */, 109 | C727C02B121B400300192073 /* CoreMedia.framework */, 110 | C727C02D121B400300192073 /* CoreVideo.framework */, 111 | 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, 112 | 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, 113 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 114 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 115 | 00CFDF6A1138442D0091E310 /* CoreGraphics.framework */, 116 | 00CFDF6A1138442D0091FFFF /* ImageIO.framework */, 117 | DDDDDF6A1138442D0091DDDD /* MobileCoreServices.framework */, 118 | C725E000121DAC8F00FA186B /* AVFoundation.framework */, 119 | 0087D25412CD809F002CD69F /* CoreText.framework */, 120 | ); 121 | name = Frameworks; 122 | sourceTree = ""; 123 | }; 124 | 00692BD914FF149000D0A05E /* Source */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | AEE66AB11BBF4253003983AD /* InstancedApp.cpp */, 128 | AEE66AB21BBF4253003983AD /* Model.cpp */, 129 | ); 130 | name = Source; 131 | sourceTree = ""; 132 | }; 133 | 00692BD914FF149000D0FFFF /* Resources */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | CAD250B823774C4999DF70EA /* Info.plist */, 137 | ); 138 | name = Resources; 139 | sourceTree = ""; 140 | }; 141 | 99692BD914FF149000D0A05F /* Headers */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | AEE66AB01BBF424A003983AD /* InstancedApp_Prefix.pch */, 145 | AEE66AB51BBF425A003983AD /* Model.h */, 146 | 8DCB9557F2964A4787BFB459 /* Resources.h */, 147 | ); 148 | name = Headers; 149 | sourceTree = ""; 150 | }; 151 | 99692BD914FF149000DFFFFF /* Blocks */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | AE51D60B1B84FF5600DCEFBF /* Cinder-Physx */, 155 | ); 156 | name = Blocks; 157 | sourceTree = ""; 158 | }; 159 | AE51D60B1B84FF5600DCEFBF /* Cinder-Physx */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | AE51D60C1B84FF7200DCEFBF /* src */, 163 | ); 164 | name = "Cinder-Physx"; 165 | sourceTree = ""; 166 | }; 167 | AE51D60C1B84FF7200DCEFBF /* src */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | AED55B301BBF38F1000F6637 /* CinderPhysx.cpp */, 171 | AED55B311BBF38F1000F6637 /* CinderPhysx.h */, 172 | ); 173 | name = src; 174 | path = "../../../blocks/Cinder-Physx/src"; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXGroup section */ 178 | 179 | /* Begin PBXNativeTarget section */ 180 | 00692BCE14FF149000D0A05E /* InstancedApp */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "InstancedApp" */; 183 | buildPhases = ( 184 | 00692BCB14FF149000D0A05E /* Sources */, 185 | 00692BCC14FF149000D0A05E /* Frameworks */, 186 | 00692BCD14FF149000D0A05E /* Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = InstancedApp; 193 | productName = BasicApp; 194 | productReference = 00692BCF14FF149000D0A05E /* BasicApp.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 00692BC614FF149000D0A05E /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 0700; 204 | }; 205 | buildConfigurationList = 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "InstancedApp" */; 206 | compatibilityVersion = "Xcode 3.2"; 207 | developmentRegion = English; 208 | hasScannedForEncodings = 0; 209 | knownRegions = ( 210 | en, 211 | ); 212 | mainGroup = 00692BC414FF149000D0A05E; 213 | productRefGroup = 00692BD014FF149000D0A05E /* Products */; 214 | projectDirPath = ""; 215 | projectRoot = ""; 216 | targets = ( 217 | 00692BCE14FF149000D0A05E /* InstancedApp */, 218 | ); 219 | }; 220 | /* End PBXProject section */ 221 | 222 | /* Begin PBXResourcesBuildPhase section */ 223 | 00692BCD14FF149000D0A05E /* Resources */ = { 224 | isa = PBXResourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | AEE66AB71BBF437D003983AD /* assets in Resources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXResourcesBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 00692BCB14FF149000D0A05E /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | AEE66AB41BBF4253003983AD /* Model.cpp in Sources */, 239 | AED55B321BBF38F1000F6637 /* CinderPhysx.cpp in Sources */, 240 | AEE66AB31BBF4253003983AD /* InstancedApp.cpp in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin XCBuildConfiguration section */ 247 | 00692BF314FF149000D0A05E /* Debug */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 252 | CINDER_PATH = ../../../../..; 253 | CLANG_CXX_LANGUAGE_STANDARD = "c++14"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_WARN_BOOL_CONVERSION = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEAD_CODE_STRIPPING = YES; 265 | ENABLE_BITCODE = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | ENABLE_TESTABILITY = YES; 268 | GCC_C_LANGUAGE_STANDARD = gnu99; 269 | GCC_DYNAMIC_NO_PIC = NO; 270 | GCC_NO_COMMON_BLOCKS = YES; 271 | GCC_OPTIMIZATION_LEVEL = 0; 272 | GCC_PREPROCESSOR_DEFINITIONS = ( 273 | "$(inherited)", 274 | "DEBUG=1", 275 | _DEBUG, 276 | CINDER_GL_ES_3, 277 | ); 278 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 279 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 280 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 281 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 282 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 283 | GCC_WARN_UNDECLARED_SELECTOR = YES; 284 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 285 | GCC_WARN_UNUSED_FUNCTION = YES; 286 | GCC_WARN_UNUSED_VARIABLE = YES; 287 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; 288 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 289 | ONLY_ACTIVE_ARCH = YES; 290 | SDKROOT = iphoneos; 291 | TARGETED_DEVICE_FAMILY = 1; 292 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src ../../../PhysX-3.3/PhysXSDK/Include"; 293 | VALID_ARCHS = arm64; 294 | }; 295 | name = Debug; 296 | }; 297 | 00692BF414FF149000D0A05E /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 302 | CINDER_PATH = ../../../../..; 303 | CLANG_CXX_LANGUAGE_STANDARD = "c++14"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_CONSTANT_CONVERSION = YES; 307 | CLANG_WARN_EMPTY_BODY = YES; 308 | CLANG_WARN_ENUM_CONVERSION = YES; 309 | CLANG_WARN_INT_CONVERSION = YES; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 313 | COPY_PHASE_STRIP = YES; 314 | DEAD_CODE_STRIPPING = YES; 315 | ENABLE_BITCODE = NO; 316 | ENABLE_STRICT_OBJC_MSGSEND = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu99; 318 | GCC_NO_COMMON_BLOCKS = YES; 319 | GCC_PREPROCESSOR_DEFINITIONS = ( 320 | "$(inherited)", 321 | "NDEBUG=1", 322 | CINDER_GL_ES_3, 323 | ); 324 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 327 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 328 | GCC_WARN_UNDECLARED_SELECTOR = YES; 329 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 330 | GCC_WARN_UNUSED_FUNCTION = YES; 331 | GCC_WARN_UNUSED_VARIABLE = YES; 332 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\""; 333 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 334 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 335 | SDKROOT = iphoneos; 336 | TARGETED_DEVICE_FAMILY = 1; 337 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../../../src ../../../PhysX-3.3/PhysXSDK/Include"; 338 | VALIDATE_PRODUCT = YES; 339 | VALID_ARCHS = arm64; 340 | }; 341 | name = Release; 342 | }; 343 | 00692BF614FF149000D0A05E /* Debug */ = { 344 | isa = XCBuildConfiguration; 345 | buildSettings = { 346 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 347 | GCC_PREFIX_HEADER = InstancedApp_Prefix.pch; 348 | INFOPLIST_FILE = Info.plist; 349 | "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( 350 | "\"$(CINDER_PATH)/lib/libcinder-iphone_d.a\"", 351 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelClothCHECKED.a", 352 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelCHECKED.a", 353 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CharacterKinematicCHECKED.a", 354 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CommonCHECKED.a", 355 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CookingCHECKED.a", 356 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CHECKED.a", 357 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3ExtensionsCHECKED.a", 358 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3VehicleCHECKED.a", 359 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXProfileSDKCHECKED.a", 360 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXVisualDebuggerSDKCHECKED.a", 361 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPvdRuntimeCHECKED.a", 362 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPxTaskCHECKED.a", 363 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSceneQueryCHECKED.a", 364 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSimulationControllerCHECKED.a", 365 | "-lz", 366 | ); 367 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx.InstancedApp; 368 | PRODUCT_NAME = InstancedApp; 369 | TARGETED_DEVICE_FAMILY = "1,2"; 370 | VALID_ARCHS = arm64; 371 | WRAPPER_EXTENSION = app; 372 | }; 373 | name = Debug; 374 | }; 375 | 00692BF714FF149000D0A05E /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | buildSettings = { 378 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 379 | GCC_PREFIX_HEADER = InstancedApp_Prefix.pch; 380 | INFOPLIST_FILE = Info.plist; 381 | "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( 382 | "\"$(CINDER_PATH)/lib/libcinder-iphone.a\"", 383 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevel.a", 384 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libLowLevelCloth.a", 385 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3.a", 386 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3CharacterKinematic.a", 387 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Common.a", 388 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Cooking.a", 389 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Extensions.a", 390 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysX3Vehicle.a", 391 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXProfileSDK.a", 392 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPhysXVisualDebuggerSDK.a", 393 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPvdRuntime.a", 394 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libPxTask.a", 395 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSceneQuery.a", 396 | "../../../PhysX-3.3/PhysXSDK/Lib/ios64/libSimulationController.a", 397 | "-lz", 398 | ); 399 | PRODUCT_BUNDLE_IDENTIFIER = com.bantherewind.CinderPhysx.InstancedApp; 400 | PRODUCT_NAME = InstancedApp; 401 | TARGETED_DEVICE_FAMILY = "1,2"; 402 | VALID_ARCHS = arm64; 403 | WRAPPER_EXTENSION = app; 404 | }; 405 | name = Release; 406 | }; 407 | /* End XCBuildConfiguration section */ 408 | 409 | /* Begin XCConfigurationList section */ 410 | 00692BC914FF149000D0A05E /* Build configuration list for PBXProject "InstancedApp" */ = { 411 | isa = XCConfigurationList; 412 | buildConfigurations = ( 413 | 00692BF314FF149000D0A05E /* Debug */, 414 | 00692BF414FF149000D0A05E /* Release */, 415 | ); 416 | defaultConfigurationIsVisible = 0; 417 | defaultConfigurationName = Release; 418 | }; 419 | 00692BF514FF149000D0A05E /* Build configuration list for PBXNativeTarget "InstancedApp" */ = { 420 | isa = XCConfigurationList; 421 | buildConfigurations = ( 422 | 00692BF614FF149000D0A05E /* Debug */, 423 | 00692BF714FF149000D0A05E /* Release */, 424 | ); 425 | defaultConfigurationIsVisible = 0; 426 | defaultConfigurationName = Release; 427 | }; 428 | /* End XCConfigurationList section */ 429 | }; 430 | rootObject = 00692BC614FF149000D0A05E /* Project object */; 431 | } 432 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode_ios/InstancedApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/InstancedApp/xcode_ios/InstancedApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | #if defined( __cplusplus ) 2 | #include "cinder/Cinder.h" 3 | 4 | #include "cinder/app/App.h" 5 | 6 | #include "cinder/gl/gl.h" 7 | 8 | #include "cinder/CinderMath.h" 9 | #include "cinder/Matrix.h" 10 | #include "cinder/Vector.h" 11 | #include "cinder/Quaternion.h" 12 | #endif -------------------------------------------------------------------------------- /src/CinderPhysx.cpp: -------------------------------------------------------------------------------- 1 | #include "CinderPhysx.h" 2 | 3 | #include "cinder/CinderAssert.h" 4 | #include "cinder/Log.h" 5 | #include "cinder/System.h" 6 | 7 | using namespace ci; 8 | using namespace physx; 9 | using namespace physx::debugger; 10 | using namespace physx::debugger::comm; 11 | using namespace std; 12 | 13 | PxFilterFlags FilterShader( 14 | PxFilterObjectAttributes attributes0, PxFilterData filterData0, 15 | PxFilterObjectAttributes attributes1, PxFilterData filterData1, 16 | PxPairFlags& pairFlags, const void* constantBlock, PxU32 constantBlockSize ) 17 | { 18 | pairFlags = PxPairFlag::eTRIGGER_DEFAULT | PxPairFlag::eCONTACT_DEFAULT | PxPairFlag::eNOTIFY_TOUCH_FOUND; 19 | return PxFilterFlag::eDEFAULT; 20 | } 21 | 22 | #if defined( CINDER_COCOA_TOUCH ) 23 | PhysxRef Physx::create() 24 | { 25 | return create( PxTolerancesScale() ); 26 | } 27 | 28 | PhysxRef Physx::create( const PxTolerancesScale& scale ) 29 | { 30 | PxCookingParams params( scale ); 31 | params.meshWeldTolerance = 0.001f; 32 | params.meshPreprocessParams = PxMeshPreprocessingFlags( 33 | PxMeshPreprocessingFlag::eWELD_VERTICES | 34 | PxMeshPreprocessingFlag::eREMOVE_UNREFERENCED_VERTICES | 35 | PxMeshPreprocessingFlag::eREMOVE_DUPLICATED_TRIANGLES ); 36 | return PhysxRef( new Physx( scale, params ) ); 37 | } 38 | 39 | PhysxRef Physx::create( const PxTolerancesScale& scale, const PxCookingParams& params ) 40 | { 41 | return PhysxRef( new Physx( scale, params ) ); 42 | } 43 | #else 44 | PhysxRef Physx::create( bool connectToPvd ) 45 | { 46 | return create( PxTolerancesScale(), connectToPvd ); 47 | } 48 | 49 | PhysxRef Physx::create( const PxTolerancesScale& scale, bool connectToPvd ) 50 | { 51 | PxCookingParams params( scale ); 52 | params.meshWeldTolerance = 0.001f; 53 | params.meshPreprocessParams = PxMeshPreprocessingFlags( 54 | PxMeshPreprocessingFlag::eWELD_VERTICES | 55 | PxMeshPreprocessingFlag::eREMOVE_UNREFERENCED_VERTICES | 56 | PxMeshPreprocessingFlag::eREMOVE_DUPLICATED_TRIANGLES ); 57 | return PhysxRef( new Physx( scale, params, connectToPvd ) ); 58 | } 59 | 60 | PhysxRef Physx::create( const PxTolerancesScale& scale, const PxCookingParams& params, bool connectToPvd ) 61 | { 62 | return PhysxRef( new Physx( scale, params, connectToPvd ) ); 63 | } 64 | #endif 65 | 66 | Physx::Physx( const PxTolerancesScale& scale, const PxCookingParams& params 67 | #if !defined( CINDER_COCOA_TOUCH ) 68 | , bool connectToPvd 69 | #endif 70 | ) 71 | : mCooking( nullptr ), mCpuDispatcher( nullptr ), mFoundation( nullptr ), 72 | mPhysics( nullptr ), mProfileZoneManager( nullptr ) 73 | #if !defined( CINDER_COCOA_TOUCH ) 74 | , mPvdConnection( nullptr ) 75 | #endif 76 | #if PX_SUPPORT_GPU_PHYSX 77 | , mCudaContextManager( nullptr ) 78 | #endif 79 | { 80 | mFoundation = PxCreateFoundation( PX_PHYSICS_VERSION, mAllocator, getErrorCallback() ); 81 | CI_ASSERT( mFoundation != nullptr ); 82 | 83 | #if !defined( CINDER_COCOA_TOUCH ) 84 | if ( connectToPvd ) { 85 | mProfileZoneManager = &PxProfileZoneManager::createProfileZoneManager( mFoundation ); 86 | CI_ASSERT( mProfileZoneManager != nullptr ); 87 | } 88 | #endif 89 | 90 | #if defined( CINDER_COCOA_TOUCH ) 91 | mPhysics = PxCreatePhysics( PX_PHYSICS_VERSION, *mFoundation, scale, false, mProfileZoneManager ); 92 | #else 93 | mPhysics = PxCreatePhysics( PX_PHYSICS_VERSION, *mFoundation, scale, connectToPvd, mProfileZoneManager ); 94 | #endif 95 | CI_ASSERT( mPhysics != nullptr ); 96 | CI_ASSERT( PxInitExtensions( *mPhysics ) ); 97 | 98 | mCooking = PxCreateCooking( PX_PHYSICS_VERSION, *mFoundation, params ); 99 | CI_ASSERT( mCooking != nullptr ); 100 | 101 | mCpuDispatcher = PxDefaultCpuDispatcherCreate( System::getNumCores() ); 102 | CI_ASSERT( mCpuDispatcher != nullptr ); 103 | 104 | #if PX_SUPPORT_GPU_PHYSX 105 | PxCudaContextManagerDesc cudaContextManagerDesc; 106 | mCudaContextManager = PxCreateCudaContextManager( *mFoundation, cudaContextManagerDesc, mProfileZoneManager ); 107 | if ( mCudaContextManager && !mCudaContextManager->contextIsValid() ) { 108 | mCudaContextManager->release(); 109 | mCudaContextManager = nullptr; 110 | } 111 | #endif 112 | 113 | #if !defined( CINDER_COCOA_TOUCH ) 114 | if ( connectToPvd && mPhysics->getPvdConnectionManager() ) { 115 | mPhysics->getPvdConnectionManager()->addHandler( *this ); 116 | } 117 | #endif 118 | } 119 | 120 | Physx::~Physx() 121 | { 122 | #if !defined( CINDER_COCOA_TOUCH ) 123 | pvdDisconnect(); 124 | #endif 125 | for ( auto& iter : mActors ) { 126 | iter.second->release(); 127 | } 128 | mActors.clear(); 129 | 130 | for ( auto& iter : mScenes ) { 131 | iter.second->release(); 132 | } 133 | mScenes.clear(); 134 | 135 | if ( mCooking != nullptr ) { 136 | mCooking->release(); 137 | mCooking = nullptr; 138 | } 139 | if ( mCpuDispatcher != nullptr ) { 140 | mCpuDispatcher->release(); 141 | mCpuDispatcher = nullptr; 142 | } 143 | #if PX_SUPPORT_GPU_PHYSX 144 | if ( mCudaContextManager != nullptr ) { 145 | mCudaContextManager->release(); 146 | mCudaContextManager = nullptr; 147 | } 148 | #endif 149 | if ( mPhysics != nullptr ) { 150 | mPhysics->release(); 151 | mPhysics = nullptr; 152 | } 153 | if ( mFoundation != nullptr ) { 154 | mFoundation->release(); 155 | mFoundation = nullptr; 156 | } 157 | } 158 | 159 | mat3 Physx::from( const PxMat33& m ) 160 | { 161 | return mat3( 162 | m.column0.x, m.column0.y, m.column0.z, 163 | m.column1.x, m.column1.y, m.column1.z, 164 | m.column2.x, m.column2.y, m.column2.z 165 | ); 166 | } 167 | 168 | mat4 Physx::from( const PxMat44& m ) 169 | { 170 | return mat4( 171 | m.column0.x, m.column0.y, m.column0.z, m.column0.w, 172 | m.column1.x, m.column1.y, m.column1.z, m.column1.w, 173 | m.column2.x, m.column2.y, m.column2.z, m.column2.w, 174 | m.column3.x, m.column3.y, m.column3.z, m.column3.w 175 | ); 176 | } 177 | 178 | mat4 Physx::from( const PxTransform& t ) 179 | { 180 | return from( t.q, t.p ); 181 | } 182 | 183 | mat4 Physx::from( const PxQuat& q, const PxVec3& v ) 184 | { 185 | return from( PxMat33( q ), v ); 186 | } 187 | 188 | mat4 Physx::from( const PxMat33& m, const PxVec3& v ) 189 | { 190 | return mat4( 191 | m.column0.x, m.column0.y, m.column0.z, 0.0f, 192 | m.column1.x, m.column1.y, m.column1.z, 0.0f, 193 | m.column2.x, m.column2.y, m.column2.z, 0.0f, 194 | v.x, v.y, v.z, 1.0f 195 | ); 196 | } 197 | 198 | quat Physx::from( const PxQuat& q ) 199 | { 200 | return quat( q.w, q.x, q.y, q.z ); 201 | } 202 | 203 | vec2 Physx::from( const PxVec2& v ) 204 | { 205 | return vec2( v.x, v.y ); 206 | } 207 | 208 | vec3 Physx::from( const PxVec3& v ) 209 | { 210 | return vec3( v.x, v.y, v.z ); 211 | } 212 | 213 | vec4 Physx::from( const PxVec4& v ) 214 | { 215 | return vec4( v.x, v.y, v.z, v.w ); 216 | } 217 | 218 | AxisAlignedBox Physx::from( const PxBounds3& b ) 219 | { 220 | return AxisAlignedBox( from( b.minimum ), from( b.maximum ) ); 221 | } 222 | 223 | PxMat33 Physx::to( const mat3& m ) 224 | { 225 | return PxMat33( 226 | to( vec3( m[ 0 ] ) ), 227 | to( vec3( m[ 1 ] ) ), 228 | to( vec3( m[ 2 ] ) ) 229 | ); 230 | } 231 | 232 | PxMat44 Physx::to( const mat4& m ) 233 | { 234 | return PxMat44( 235 | to( vec4( m[ 0 ] ) ), 236 | to( vec4( m[ 1 ] ) ), 237 | to( vec4( m[ 2 ] ) ), 238 | to( vec4( m[ 3 ] ) ) 239 | ); 240 | } 241 | 242 | PxQuat Physx::to( const quat& q ) 243 | { 244 | return PxQuat( q.x, q.y, q.z, q.w ); 245 | } 246 | 247 | PxVec2 Physx::to( const vec2& v ) 248 | { 249 | return PxVec2( v.x, v.y ); 250 | } 251 | 252 | PxVec3 Physx::to( const vec3& v ) 253 | { 254 | return PxVec3( v.x, v.y, v.z ); 255 | } 256 | 257 | PxVec4 Physx::to( const vec4& v ) 258 | { 259 | return PxVec4( v.x, v.y, v.z, v.w ); 260 | } 261 | 262 | PxTransform Physx::to( const quat& q, const vec3& v ) 263 | { 264 | return PxTransform( to( v ), to( q ) ); 265 | } 266 | 267 | PxBounds3 Physx::to( const AxisAlignedBox& b ) 268 | { 269 | return PxBounds3( to( b.getMin() ), to( b.getMax() ) ); 270 | } 271 | 272 | PxDefaultAllocator Physx::getAllocator() const 273 | { 274 | return mAllocator; 275 | } 276 | 277 | PxCooking* Physx::getCooking() const 278 | { 279 | return mCooking; 280 | } 281 | 282 | PxDefaultCpuDispatcher* Physx::getCpuDispatcher() const 283 | { 284 | return mCpuDispatcher; 285 | } 286 | 287 | #if PX_SUPPORT_GPU_PHYSX 288 | PxCudaContextManager* Physx::getCudaContextManager() const 289 | { 290 | return mCudaContextManager; 291 | } 292 | #endif 293 | 294 | PxFoundation* Physx::getFoundation() const 295 | { 296 | return mFoundation; 297 | } 298 | 299 | PxPhysics* Physx::getPhysics() const 300 | { 301 | return mPhysics; 302 | } 303 | 304 | PxProfileZoneManager* Physx::getProfileZoneManager() const 305 | { 306 | return mProfileZoneManager; 307 | } 308 | 309 | #if !defined( CINDER_COCOA_TOUCH ) 310 | PvdConnection* Physx::getPvdConnection() const 311 | { 312 | return mPvdConnection; 313 | } 314 | #endif 315 | 316 | void Physx::update( float deltaInSeconds ) 317 | { 318 | for ( uint32_t id : mDeletedActors ) { 319 | map::iterator iter = mActors.find( id ); 320 | if ( iter != mActors.end() ) { 321 | if ( iter->second != nullptr ) { 322 | iter->second->release(); 323 | iter->second = nullptr; 324 | } 325 | mActors.erase( iter ); 326 | } 327 | } 328 | mDeletedActors.clear(); 329 | 330 | for ( auto& iter : mScenes ) { 331 | iter.second->simulate( deltaInSeconds ); 332 | while ( !iter.second->fetchResults( true ) ) { 333 | } 334 | } 335 | } 336 | 337 | uint32_t Physx::addActor( PxActor* actor, uint32_t sceneId ) 338 | { 339 | return addActor( actor, getScene( sceneId ) ); 340 | } 341 | 342 | uint32_t Physx::addActor( PxActor* actor, PxScene* scene ) 343 | { 344 | uint32_t id = mActors.empty() ? 0 : mActors.rbegin()->first + 1; 345 | uintptr_t userData = id; 346 | actor->userData = (void*)userData; 347 | mActors[ id ] = actor; 348 | scene->addActor( *actor ); 349 | return id; 350 | } 351 | 352 | void Physx::clearActors() 353 | { 354 | for ( const auto& iter : mActors ) { 355 | eraseActor( iter.first ); 356 | } 357 | } 358 | 359 | void Physx::eraseActor( uint32_t id ) 360 | { 361 | mDeletedActors.push_back( id ); 362 | } 363 | 364 | void Physx::eraseActor( PxActor& actor ) 365 | { 366 | uintptr_t id = (uintptr_t)actor.userData; 367 | eraseActor( (uint32_t)id ); 368 | } 369 | 370 | void Physx::eraseActor( PxActor* actor ) 371 | { 372 | uintptr_t id = (uintptr_t)actor->userData; 373 | eraseActor( (uint32_t)id ); 374 | } 375 | 376 | PxActor* Physx::getActor( uint32_t id ) const 377 | { 378 | if ( mActors.find( id ) != mActors.end() ) { 379 | return mActors.at( id ); 380 | } 381 | return nullptr; 382 | } 383 | 384 | const map& Physx::getActors() const 385 | { 386 | return mActors; 387 | } 388 | 389 | void Physx::clearScenes() 390 | { 391 | vector ids; 392 | for ( const auto& iter : mScenes ) { 393 | ids.push_back( iter.first ); 394 | } 395 | for ( uint32_t id : ids ) { 396 | eraseScene( id ); 397 | } 398 | } 399 | 400 | uint32_t Physx::createScene() 401 | { 402 | CI_ASSERT( mPhysics != nullptr ); 403 | CI_ASSERT( mCpuDispatcher != nullptr ); 404 | PxSceneDesc desc( mPhysics->getTolerancesScale() ); 405 | desc.broadPhaseType = PxBroadPhaseType::eMBP; 406 | desc.cpuDispatcher = mCpuDispatcher; 407 | desc.filterShader = FilterShader; 408 | 409 | desc.flags |= PxSceneFlag::eENABLE_ACTIVETRANSFORMS; 410 | desc.gravity = PxVec3( 0.0f, -9.81f, 0.0f ); 411 | 412 | #if PX_SUPPORT_GPU_PHYSX 413 | if ( mCudaContextManager != nullptr && mCudaContextManager->contextIsValid() ) { 414 | desc.gpuDispatcher = mCudaContextManager->getGpuDispatcher(); 415 | } 416 | #endif 417 | return createScene( desc ); 418 | } 419 | 420 | uint32_t Physx::createScene( const PxSceneDesc& desc ) 421 | { 422 | CI_ASSERT( mPhysics != nullptr ); 423 | PxScene* scene = mPhysics->createScene( desc ); 424 | PxBroadPhaseRegion broadPhaseRegion; 425 | broadPhaseRegion.bounds = to( AxisAlignedBox( vec3( -100.0f ), vec3( 100.0f ) ) ); 426 | scene->addBroadPhaseRegion( broadPhaseRegion ); 427 | CI_ASSERT( scene != nullptr ); 428 | uint32_t id = mScenes.empty() ? 0 : mScenes.rbegin()->first + 1; 429 | mScenes[ id ] = scene; 430 | return id; 431 | } 432 | 433 | void Physx::eraseScene( uint32_t id ) 434 | { 435 | map::iterator iter = mScenes.find( id ); 436 | if ( iter != mScenes.end() ) { 437 | if ( iter->second != nullptr ) { 438 | iter->second->release(); 439 | iter->second = nullptr; 440 | } 441 | mScenes.erase( iter ); 442 | } 443 | } 444 | 445 | void Physx::eraseScene( PxScene* scene ) 446 | { 447 | for ( map::iterator iter = mScenes.begin(); iter != mScenes.end(); ) { 448 | if ( iter->second == scene ) { 449 | if ( scene != nullptr ) { 450 | scene->release(); 451 | scene = nullptr; 452 | } 453 | iter = mScenes.erase( iter ); 454 | break; 455 | } else { 456 | ++iter; 457 | } 458 | } 459 | } 460 | 461 | PxScene* Physx::getScene( uint32_t id ) const 462 | { 463 | if ( mScenes.find( id ) != mScenes.end() ) { 464 | return mScenes.at( id ); 465 | } 466 | return nullptr; 467 | } 468 | 469 | const map& Physx::getScenes() const 470 | { 471 | return mScenes; 472 | } 473 | 474 | PxConvexMesh* Physx::createConvexMesh( const vector& positions, PxConvexFlags flags ) 475 | { 476 | if ( positions.empty() ) { 477 | return nullptr; 478 | } 479 | PxConvexMeshDesc desc; 480 | desc.points.count = (PxU32)positions.size(); 481 | desc.points.data = (PxVec3*)&positions[ 0 ]; 482 | desc.points.stride = sizeof( PxVec3 ); 483 | desc.flags = flags; 484 | 485 | PxDefaultMemoryOutputStream buffer; 486 | if ( !mCooking->cookConvexMesh( desc, buffer ) ) { 487 | return nullptr; 488 | } 489 | 490 | PxDefaultMemoryInputData input( buffer.getData(), buffer.getSize() ); 491 | return mPhysics->createConvexMesh( input ); 492 | } 493 | 494 | PxTriangleMesh* Physx::createTriangleMesh( const vector& positions, size_t numTriangles, vector indices ) 495 | { 496 | if ( positions.empty() ) { 497 | return nullptr; 498 | } 499 | if ( indices.empty() ) { 500 | CI_ASSERT( positions.size() % 3 == 0 ); 501 | uint32_t count = (uint32_t)positions.size(); 502 | for ( uint32_t i = 0; i < count; ++i ) { 503 | indices.push_back( i ); 504 | } 505 | numTriangles = indices.size() / 3; 506 | } 507 | 508 | PxTriangleMeshDesc desc; 509 | desc.points.count = (PxU32)positions.size(); 510 | desc.points.data = (PxVec3*)&positions[ 0 ]; 511 | desc.points.stride = sizeof( PxVec3 ); 512 | desc.triangles.count = (PxU32)numTriangles; 513 | desc.triangles.data = (PxU32*)&indices[ 0 ]; 514 | desc.triangles.stride = sizeof( PxU32 ) * 3; 515 | 516 | PxDefaultMemoryOutputStream writeBuffer; 517 | if ( !mCooking->cookTriangleMesh( desc, writeBuffer ) ) { 518 | return nullptr; 519 | } 520 | 521 | PxDefaultMemoryInputData readBuffer( writeBuffer.getData(), writeBuffer.getSize() ); 522 | return mPhysics->createTriangleMesh( readBuffer ); 523 | } 524 | 525 | #if !defined( CINDER_COCOA_TOUCH ) 526 | void Physx::pvdConnect( const string& host, int32_t port, 527 | int32_t timeout, PxVisualDebuggerConnectionFlags connectionFlags ) 528 | { 529 | pvdDisconnect(); 530 | if ( mPhysics->getPvdConnectionManager() ) { 531 | mPvdConnection = PxVisualDebuggerExt::createConnection( 532 | mPhysics->getPvdConnectionManager(), 533 | host.c_str(), port, timeout, connectionFlags ); 534 | } 535 | } 536 | 537 | void Physx::pvdDisconnect() 538 | { 539 | if ( mPhysics->getPvdConnectionManager() ) { 540 | if ( mPvdConnection != nullptr ) { 541 | if ( mPvdConnection->isConnected() ) { 542 | mPvdConnection->disconnect(); 543 | } 544 | mPvdConnection->release(); 545 | mPvdConnection = nullptr; 546 | } 547 | if ( mPhysics->getPvdConnectionManager()->isConnected() ) { 548 | mPhysics->getPvdConnectionManager()->disconnect(); 549 | } 550 | } 551 | } 552 | 553 | void Physx::onPvdSendClassDescriptions( PvdConnection& ) 554 | { 555 | } 556 | 557 | void Physx::onPvdConnected( PvdConnection& ) 558 | { 559 | mPhysics->getVisualDebugger()->setVisualizeConstraints( true ); 560 | mPhysics->getVisualDebugger()->setVisualDebuggerFlag( PxVisualDebuggerFlag::eTRANSMIT_CONSTRAINTS, true ); 561 | mPhysics->getVisualDebugger()->setVisualDebuggerFlag( PxVisualDebuggerFlag::eTRANSMIT_CONTACTS, true ); 562 | mPhysics->getVisualDebugger()->setVisualDebuggerFlag( PxVisualDebuggerFlag::eTRANSMIT_SCENEQUERIES, true ); 563 | } 564 | 565 | void Physx::onPvdDisconnected( PvdConnection& ) 566 | { 567 | } 568 | #endif 569 | 570 | PxErrorCallback& Physx::getErrorCallback() 571 | { 572 | static PxDefaultErrorCallback defaultErrorCallback; 573 | return defaultErrorCallback; 574 | } 575 | -------------------------------------------------------------------------------- /src/CinderPhysx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cinder/AxisAlignedBox.h" 4 | #include "cinder/Matrix.h" 5 | #include "cinder/Quaternion.h" 6 | #include "PxPhysics.h" 7 | #include "PxPhysicsAPI.h" 8 | #include "extensions/PxExtensionsAPI.h" 9 | #include 10 | #include 11 | #include 12 | 13 | physx::PxFilterFlags FilterShader( 14 | physx::PxFilterObjectAttributes, physx::PxFilterData, 15 | physx::PxFilterObjectAttributes, physx::PxFilterData, 16 | physx::PxPairFlags&, const void*, physx::PxU32 ); 17 | 18 | typedef std::shared_ptr PhysxRef; 19 | 20 | class Physx 21 | #if !defined( CINDER_COCOA_TOUCH ) 22 | : public physx::debugger::comm::PvdConnectionHandler 23 | #endif 24 | { 25 | public: 26 | #if defined( CINDER_COCOA_TOUCH ) 27 | static PhysxRef create(); 28 | static PhysxRef create( const physx::PxTolerancesScale& scale ); 29 | static PhysxRef create( const physx::PxTolerancesScale& scale, 30 | const physx::PxCookingParams& params ); 31 | #else 32 | static PhysxRef create( bool connectToPvd = true ); 33 | static PhysxRef create( const physx::PxTolerancesScale& scale, bool connectToPvd = true ); 34 | static PhysxRef create( const physx::PxTolerancesScale& scale, 35 | const physx::PxCookingParams& params, bool connectToPvd = true ); 36 | #endif 37 | ~Physx(); 38 | 39 | static ci::mat3 from( const physx::PxMat33& m ); 40 | static ci::mat4 from( const physx::PxMat44& m ); 41 | static ci::mat4 from( const physx::PxTransform& t ); 42 | static ci::mat4 from( const physx::PxQuat& q, const physx::PxVec3& v ); 43 | static ci::mat4 from( const physx::PxMat33& m, const physx::PxVec3& v ); 44 | static ci::quat from( const physx::PxQuat& q ); 45 | static ci::vec2 from( const physx::PxVec2& v ); 46 | static ci::vec3 from( const physx::PxVec3& v ); 47 | static ci::vec4 from( const physx::PxVec4& v ); 48 | static ci::AxisAlignedBox from( const physx::PxBounds3& b ); 49 | 50 | static physx::PxMat33 to( const ci::mat3& m ); 51 | static physx::PxMat44 to( const ci::mat4& m ); 52 | static physx::PxQuat to( const ci::quat& m ); 53 | static physx::PxVec2 to( const ci::vec2& v ); 54 | static physx::PxVec3 to( const ci::vec3& v ); 55 | static physx::PxVec4 to( const ci::vec4& v ); 56 | static physx::PxTransform to( const ci::quat& q, const ci::vec3& v ); 57 | static physx::PxBounds3 to( const ci::AxisAlignedBox& b ); 58 | 59 | physx::PxDefaultAllocator getAllocator() const; 60 | physx::PxActiveTransform* getBufferedActiveTransforms() const; 61 | physx::PxCooking* getCooking() const; 62 | physx::PxDefaultCpuDispatcher* getCpuDispatcher() const; 63 | #if PX_SUPPORT_GPU_PHYSX 64 | physx::PxCudaContextManager* getCudaContextManager() const; 65 | #endif 66 | physx::PxFoundation* getFoundation() const; 67 | physx::PxPhysics* getPhysics() const; 68 | physx::PxProfileZoneManager* getProfileZoneManager() const; 69 | #if !defined( CINDER_COCOA_TOUCH ) 70 | physx::debugger::comm::PvdConnection* getPvdConnection() const; 71 | #endif 72 | 73 | void update( float deltaInSeconds = 1.0f / 60.0f ); 74 | 75 | uint32_t addActor( physx::PxActor* actor, uint32_t sceneId ); 76 | uint32_t addActor( physx::PxActor* actor, physx::PxScene* scene ); 77 | void clearActors(); 78 | void eraseActor( uint32_t id ); 79 | void eraseActor( physx::PxActor& actor ); 80 | void eraseActor( physx::PxActor* actor ); 81 | physx::PxActor* getActor( uint32_t id = 0 ) const; 82 | const std::map& getActors() const; 83 | 84 | void clearScenes(); 85 | uint32_t createScene(); 86 | uint32_t createScene( const physx::PxSceneDesc& desc ); 87 | void eraseScene( uint32_t id ); 88 | void eraseScene( physx::PxScene* scene ); 89 | physx::PxScene* getScene( uint32_t id = 0 ) const; 90 | const std::map& getScenes() const; 91 | 92 | #if !defined( CINDER_COCOA_TOUCH ) 93 | void pvdConnect( const std::string& host = "127.0.0.1", int32_t port = 5425, 94 | int32_t timeout = 1000, 95 | physx::debugger::PxVisualDebuggerConnectionFlags connectionFlags = 96 | physx::debugger::PxVisualDebuggerExt::getAllConnectionFlags() ); 97 | void pvdDisconnect(); 98 | #endif 99 | 100 | physx::PxConvexMesh* createConvexMesh( const std::vector& positions, 101 | physx::PxConvexFlags flags = physx::PxConvexFlag::eCOMPUTE_CONVEX ); 102 | physx::PxTriangleMesh* createTriangleMesh( const std::vector& positions, 103 | size_t numTriangles = 0, 104 | std::vector indices = std::vector() ); 105 | protected: 106 | #if defined( CINDER_COCOA_TOUCH ) 107 | Physx( const physx::PxTolerancesScale& scale, const physx::PxCookingParams& params ); 108 | #else 109 | Physx( const physx::PxTolerancesScale& scale, const physx::PxCookingParams& params, bool connectToPvd ); 110 | 111 | virtual void onPvdSendClassDescriptions( physx::debugger::comm::PvdConnection& ); 112 | virtual void onPvdConnected( physx::debugger::comm::PvdConnection& ); 113 | virtual void onPvdDisconnected( physx::debugger::comm::PvdConnection& ); 114 | #endif 115 | 116 | physx::PxErrorCallback& getErrorCallback(); 117 | std::map mActors; 118 | physx::PxDefaultAllocator mAllocator; 119 | physx::PxCooking* mCooking; 120 | physx::PxDefaultCpuDispatcher* mCpuDispatcher; 121 | #if PX_SUPPORT_GPU_PHYSX 122 | physx::PxCudaContextManager* mCudaContextManager; 123 | #endif 124 | std::vector mDeletedActors; 125 | physx::PxFoundation* mFoundation; 126 | physx::PxPhysics* mPhysics; 127 | physx::PxProfileZoneManager* mProfileZoneManager; 128 | #if !defined( CINDER_COCOA_TOUCH ) 129 | physx::debugger::comm::PvdConnection* mPvdConnection; 130 | #endif 131 | std::map mScenes; 132 | }; 133 | --------------------------------------------------------------------------------