Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How to insert Bullet Physics into iOS: <a href="https://github.com/RudyAramayo/iOSOpenGLBulletPhysics" rel="nofollow">iOS OpenGL BulletPhysics Sample Code</a></p> <p>Download the sample code or follow on a new project form Xcode with iOS openGL template:</p> <ol> <li>Download bullet physics... put it into a folder like the following:</li> </ol> <p>*(notice that there is a folder for the project that contains the Xcode project file)</p> <pre><code>/MyProjectFolder/bullet-2.78/ /MyProjectFolder/MyProject/MyProject.xcproj </code></pre> <p>1.5. Run CMake in the physics directory to compile the frameworks (assuming you installed cmake already <a href="http://www.cmake.org/cmake/resources/software.html" rel="nofollow">CMake</a>) This step is optional with the sample code I uploaded since it already included the compiled frameworks in it....that made the file 100 megs but what is 100 megs these days anyway?</p> <pre><code>cmake . -G "Unix Makefiles" -DINSTALL_LIBS=ON -DBUILD_SHARED_LIBS=ON -DFRAMEWORK=ON -DCMAKE_OSX_ARCHITECTURES='i386;x86_64' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/Library/Frameworks -DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks -DBUILD_DEMOS:BOOL=OFF make -j4 sudo make install </code></pre> <ol> <li>Goto your MyProject.xcproj and open in Xcode...</li> </ol> <p>in XCode goto any file you wish to add the physics code to... you must understand that cpp files are c++ and .m .h files are generally cocoa. You must change the Class you wish to add the physics engine code to have a .mm extension signifying it should be compiled as Objective-C++ code...</p> <ol> <li><p>In the particular class you want to add the physics which is now an Objective-C++ file or a cpp file, add the line </p> <pre><code>#include "btBulletDynamicsCommon.h" </code></pre></li> </ol> <p>and you should compile...the error is that the file is not found...</p> <ol> <li>Next goto the MyProjectFolder/bullet-2.78/src and drag the src folder into your project.</li> <li><p>Delete the folder named BulletMultiThread...it will eliminate the error of trying to compile some openCL (.cl) files</p></li> <li><p>Last step, copy the following frameworks from the src folder of your bullet physics installation into your project:</p> <p>/MyProjectFolder/bullet-2.78/LinearMath/LinearMath.framework /MyProjectFolder/bullet-2.78/BulletCollision/BulletCollision.framework /MyProjectFolder/bullet-2.78/LinearMath/LinearMath.framework</p></li> <li><p>Build and Run... should compile smoothly to iOS and Mac now...</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload