├── .gitignore
├── CHANGELOG.txt
├── CMakeLists.txt
├── COPYING
├── CSR.txt
├── GIMPACT
├── GIMPACT-LICENSE-BSD.TXT
├── GIMPACT-LICENSE-LGPL.TXT
├── Makefile.am
├── include
│ ├── GIMPACT
│ │ ├── Makefile.am
│ │ ├── gim_boxpruning.h
│ │ ├── gim_contact.h
│ │ ├── gim_geometry.h
│ │ ├── gim_math.h
│ │ ├── gim_memory.h
│ │ ├── gim_radixsort.h
│ │ ├── gim_tri_capsule_collision.h
│ │ ├── gim_tri_collision.h
│ │ ├── gim_tri_sphere_collision.h
│ │ ├── gim_trimesh.h
│ │ └── gimpact.h
│ └── Makefile.am
└── src
│ ├── Makefile.am
│ ├── gim_boxpruning.cpp
│ ├── gim_contact.cpp
│ ├── gim_math.cpp
│ ├── gim_memory.cpp
│ ├── gim_tri_tri_overlap.cpp
│ ├── gim_trimesh.cpp
│ ├── gim_trimesh_capsule_collision.cpp
│ ├── gim_trimesh_ray_collision.cpp
│ ├── gim_trimesh_sphere_collision.cpp
│ ├── gim_trimesh_trimesh_collision.cpp
│ └── gimpact.cpp
├── INSTALL.txt
├── LICENSE-BSD.TXT
├── LICENSE.TXT
├── Makefile.am
├── OPCODE
├── COPYING
├── Ice
│ ├── IceAABB.cpp
│ ├── IceAABB.h
│ ├── IceAxes.h
│ ├── IceBoundingSphere.h
│ ├── IceContainer.cpp
│ ├── IceContainer.h
│ ├── IceFPU.h
│ ├── IceHPoint.cpp
│ ├── IceHPoint.h
│ ├── IceIndexedTriangle.cpp
│ ├── IceIndexedTriangle.h
│ ├── IceLSS.h
│ ├── IceMatrix3x3.cpp
│ ├── IceMatrix3x3.h
│ ├── IceMatrix4x4.cpp
│ ├── IceMatrix4x4.h
│ ├── IceMemoryMacros.h
│ ├── IceOBB.cpp
│ ├── IceOBB.h
│ ├── IcePairs.h
│ ├── IcePlane.cpp
│ ├── IcePlane.h
│ ├── IcePoint.cpp
│ ├── IcePoint.h
│ ├── IcePreprocessor.h
│ ├── IceRandom.cpp
│ ├── IceRandom.h
│ ├── IceRay.cpp
│ ├── IceRay.h
│ ├── IceRevisitedRadix.cpp
│ ├── IceRevisitedRadix.h
│ ├── IceSegment.cpp
│ ├── IceSegment.h
│ ├── IceTriList.h
│ ├── IceTriangle.cpp
│ ├── IceTriangle.h
│ ├── IceTypes.h
│ ├── IceUtils.cpp
│ ├── IceUtils.h
│ └── Makefile.am
├── Makefile.am
├── OPC_AABBCollider.cpp
├── OPC_AABBCollider.h
├── OPC_AABBTree.cpp
├── OPC_AABBTree.h
├── OPC_BaseModel.cpp
├── OPC_BaseModel.h
├── OPC_BoxBoxOverlap.h
├── OPC_Collider.cpp
├── OPC_Collider.h
├── OPC_Common.cpp
├── OPC_Common.h
├── OPC_HybridModel.cpp
├── OPC_HybridModel.h
├── OPC_IceHook.h
├── OPC_LSSAABBOverlap.h
├── OPC_LSSCollider.cpp
├── OPC_LSSCollider.h
├── OPC_LSSTriOverlap.h
├── OPC_MeshInterface.cpp
├── OPC_MeshInterface.h
├── OPC_Model.cpp
├── OPC_Model.h
├── OPC_OBBCollider.cpp
├── OPC_OBBCollider.h
├── OPC_OptimizedTree.cpp
├── OPC_OptimizedTree.h
├── OPC_Picking.cpp
├── OPC_Picking.h
├── OPC_PlanesAABBOverlap.h
├── OPC_PlanesCollider.cpp
├── OPC_PlanesCollider.h
├── OPC_PlanesTriOverlap.h
├── OPC_RayAABBOverlap.h
├── OPC_RayCollider.cpp
├── OPC_RayCollider.h
├── OPC_RayTriOverlap.h
├── OPC_Settings.h
├── OPC_SphereAABBOverlap.h
├── OPC_SphereCollider.cpp
├── OPC_SphereCollider.h
├── OPC_SphereTriOverlap.h
├── OPC_TreeBuilders.cpp
├── OPC_TreeBuilders.h
├── OPC_TreeCollider.cpp
├── OPC_TreeCollider.h
├── OPC_TriBoxOverlap.h
├── OPC_TriTriOverlap.h
├── OPC_VolumeCollider.cpp
├── OPC_VolumeCollider.h
├── Opcode.cpp
├── Opcode.dsp
├── Opcode.dsw
├── Opcode.h
├── README-ODE.txt
├── ReadMe.txt
├── StdAfx.cpp
├── Stdafx.h
└── TemporalCoherence.txt
├── README.md
├── bindings
└── python
│ ├── INSTALL.txt
│ ├── TODO.txt
│ ├── demos
│ ├── tutorial1.py
│ ├── tutorial2.py
│ └── tutorial3.py
│ ├── ode.pxd
│ ├── ode.pyx
│ └── setup.py
├── bitbucket-pipelines.yml
├── bootstrap
├── build
├── config-default.h
├── premake4.exe
└── premake4.lua
├── cmake
└── cmake_uninstall.cmake.in
├── config.h.cmake.in
├── configure.ac
├── contrib
├── BreakableJoints
│ ├── README.txt
│ ├── common.h
│ ├── diff
│ │ ├── common.h.diff
│ │ ├── joint.cpp.diff
│ │ ├── joint.h.diff
│ │ ├── objects.h.diff
│ │ ├── ode.cpp.diff
│ │ ├── step.cpp.diff
│ │ ├── stepfast.cpp.diff
│ │ └── test_buggy.cpp.diff
│ ├── joint.cpp
│ ├── joint.h
│ ├── objects.h
│ ├── ode.cpp
│ ├── step.cpp
│ ├── stepfast.cpp
│ ├── test_breakable.cpp
│ └── test_buggy.cpp
├── DotNetManaged
│ ├── AssemblyInfo.cpp
│ ├── Body.cpp
│ ├── Body.h
│ ├── CommonMgd.h
│ ├── DotNetManaged.sln
│ ├── DotNetManaged.vcproj
│ ├── Geom.cpp
│ ├── Geom.h
│ ├── Joint.cpp
│ ├── Joint.h
│ ├── JointAMotor.cpp
│ ├── JointAMotor.h
│ ├── JointBall.cpp
│ ├── JointBall.h
│ ├── JointFixed.cpp
│ ├── JointFixed.h
│ ├── JointGroup.cpp
│ ├── JointGroup.h
│ ├── JointHinge.cpp
│ ├── JointHinge.h
│ ├── JointHinge2.cpp
│ ├── JointHinge2.h
│ ├── JointSlider.cpp
│ ├── JointSlider.h
│ ├── Release
│ │ └── ode.dll
│ ├── Space.cpp
│ ├── Space.h
│ ├── Stdafx.cpp
│ ├── Stdafx.h
│ ├── TEST.h
│ ├── World.cpp
│ └── World.h
├── GeomTransformGroup
│ ├── GeomTransformGroup.cpp
│ ├── GeomTransformGroup.h
│ └── README.txt
├── InteractiveCollisions
│ ├── AUTHORS
│ ├── COPYING
│ ├── ChangeLog
│ ├── INSTALL
│ ├── Makefile.am
│ ├── NEWS
│ ├── README
│ ├── bootstrap
│ ├── configure.ac
│ ├── deps
│ │ ├── AntTweakBar
│ │ │ ├── AntTweakBar_Doc.url
│ │ │ ├── ChangeLog.txt
│ │ │ ├── License.txt
│ │ │ ├── Makefile.am
│ │ │ ├── Readme.txt
│ │ │ ├── bootstrap
│ │ │ ├── configure.ac
│ │ │ ├── include
│ │ │ │ ├── AntTweakBar.h
│ │ │ │ └── Makefile.am
│ │ │ └── src
│ │ │ │ ├── AntPerfTimer.h
│ │ │ │ ├── LoadOGL.cpp
│ │ │ │ ├── LoadOGL.h
│ │ │ │ ├── LoadOGLCore.cpp
│ │ │ │ ├── LoadOGLCore.h
│ │ │ │ ├── Makefile.am
│ │ │ │ ├── MiniGLFW.h
│ │ │ │ ├── MiniGLUT.h
│ │ │ │ ├── MiniSDL12.h
│ │ │ │ ├── MiniSDL13.h
│ │ │ │ ├── MiniSFML16.h
│ │ │ │ ├── TwBar.cpp
│ │ │ │ ├── TwBar.h
│ │ │ │ ├── TwColors.cpp
│ │ │ │ ├── TwColors.h
│ │ │ │ ├── TwDirect3D10.cpp
│ │ │ │ ├── TwDirect3D10.h
│ │ │ │ ├── TwDirect3D11.cpp
│ │ │ │ ├── TwDirect3D11.h
│ │ │ │ ├── TwDirect3D11.hlsl
│ │ │ │ ├── TwDirect3D9.cpp
│ │ │ │ ├── TwDirect3D9.h
│ │ │ │ ├── TwEventGLFW.c
│ │ │ │ ├── TwEventGLUT.c
│ │ │ │ ├── TwEventSDL.c
│ │ │ │ ├── TwEventSDL12.c
│ │ │ │ ├── TwEventSDL13.c
│ │ │ │ ├── TwEventSFML.cpp
│ │ │ │ ├── TwEventWin.c
│ │ │ │ ├── TwFonts.cpp
│ │ │ │ ├── TwFonts.h
│ │ │ │ ├── TwGraph.h
│ │ │ │ ├── TwMgr.cpp
│ │ │ │ ├── TwMgr.h
│ │ │ │ ├── TwOpenGL.cpp
│ │ │ │ ├── TwOpenGL.h
│ │ │ │ ├── TwOpenGLCore.cpp
│ │ │ │ ├── TwOpenGLCore.h
│ │ │ │ ├── TwPrecomp.cpp
│ │ │ │ ├── TwPrecomp.h
│ │ │ │ ├── d3d10vs2003.h
│ │ │ │ ├── res
│ │ │ │ ├── FontChars.txt
│ │ │ │ ├── FontLargeAA.pgm
│ │ │ │ ├── FontNormal.pgm
│ │ │ │ ├── FontNormalAA.pgm
│ │ │ │ ├── FontSmall.pgm
│ │ │ │ ├── TwXCursors.h
│ │ │ │ ├── cur00000.cur
│ │ │ │ ├── cur00001.cur
│ │ │ │ ├── cur00002.cur
│ │ │ │ ├── cur00003.cur
│ │ │ │ ├── cur00004.cur
│ │ │ │ ├── cur00005.cur
│ │ │ │ ├── cur00006.cur
│ │ │ │ ├── cur00007.cur
│ │ │ │ ├── cur00008.cur
│ │ │ │ ├── cur00009.cur
│ │ │ │ ├── cur00010.cur
│ │ │ │ ├── cur00011.cur
│ │ │ │ ├── cur00012.cur
│ │ │ │ ├── cur00013.cur
│ │ │ │ ├── curs00.pbm
│ │ │ │ ├── curs01.pbm
│ │ │ │ ├── curs02.pbm
│ │ │ │ ├── curs03.pbm
│ │ │ │ ├── curs04.pbm
│ │ │ │ ├── curs05.pbm
│ │ │ │ ├── curs06.pbm
│ │ │ │ ├── curs07.pbm
│ │ │ │ ├── curs08.pbm
│ │ │ │ ├── curs09.pbm
│ │ │ │ ├── curs10.pbm
│ │ │ │ ├── curs11.pbm
│ │ │ │ ├── curs12.pbm
│ │ │ │ ├── curs13.pbm
│ │ │ │ ├── mask00.pbm
│ │ │ │ ├── mask01.pbm
│ │ │ │ ├── mask02.pbm
│ │ │ │ ├── mask03.pbm
│ │ │ │ ├── mask04.pbm
│ │ │ │ ├── mask05.pbm
│ │ │ │ ├── mask06.pbm
│ │ │ │ ├── mask07.pbm
│ │ │ │ ├── mask08.pbm
│ │ │ │ ├── mask09.pbm
│ │ │ │ ├── mask10.pbm
│ │ │ │ ├── mask11.pbm
│ │ │ │ ├── mask12.pbm
│ │ │ │ └── mask13.pbm
│ │ │ │ └── resource.h
│ │ └── Makefile.am
│ └── src
│ │ ├── Makefile.am
│ │ ├── camera.cpp
│ │ ├── camera.hpp
│ │ └── main.cpp
├── Mac_CFMCarbon
│ ├── CW7_projects.sit.bin
│ ├── README.txt
│ └── mac_source
│ │ ├── CommonPrefix.h
│ │ ├── DSPrefix.h
│ │ ├── DebugPrefix.h
│ │ ├── ExamplesPrefix.h
│ │ ├── ODETestPrefix.h
│ │ ├── ReleasePrefix.h
│ │ ├── drawstuff
│ │ └── src
│ │ │ └── mac_glut_carbon.cpp
│ │ ├── include
│ │ ├── GL
│ │ │ ├── gl.h
│ │ │ └── glu.h
│ │ └── ode
│ │ │ └── config.h
│ │ └── ode
│ │ └── test
│ │ ├── test_stability1.cpp
│ │ └── test_stacktest.c
├── Ode.NET
│ ├── Drawstuff
│ │ ├── AssemblyInfo.cs
│ │ ├── Drawstuff.cs
│ │ └── premake.lua
│ ├── Ode
│ │ ├── AssemblyInfo.cs
│ │ ├── Ode.cs
│ │ └── premake.lua
│ ├── README.TXT
│ ├── Tests
│ │ ├── BoxStack.cs
│ │ └── premake.lua
│ └── premake.lua
├── OdeModelProcessor
│ ├── LICENSE-BSD.TXT
│ ├── LICENSE.TXT
│ ├── OdeModelProcessor.sln
│ ├── OdeModelProcessor
│ │ ├── OdeModelProcessor.cs
│ │ ├── OdeModelProcessor.csproj
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ └── README.TXT
├── README
├── TerrainAndCone
│ ├── collision_std_internal.h
│ ├── dCone.cpp
│ ├── dTerrainY.cpp
│ ├── dTerrainZ.cpp
│ ├── readme.txt
│ └── test_boxstackb.cpp
├── dCylinder
│ ├── dCylinder.cpp
│ ├── dCylinder.h
│ └── readme.txt
└── dRay
│ ├── Include
│ └── dRay.h
│ ├── README.txt
│ ├── Test
│ └── test_ray.cpp
│ ├── dRay.cpp
│ ├── dRay_Box.cpp
│ ├── dRay_CCylinder.cpp
│ ├── dRay_Plane.cpp
│ ├── dRay_Sphere.cpp
│ └── dxRay.h
├── drawstuff
├── Makefile.am
├── dstest
│ ├── Makefile.am
│ └── dstest.cpp
├── src
│ ├── Makefile.am
│ ├── drawstuff.cpp
│ ├── internal.h
│ ├── osx.cpp
│ ├── resource.h
│ ├── resources.rc
│ ├── windows.cpp
│ └── x11.cpp
└── textures
│ ├── checkered.ppm
│ ├── ground.ppm
│ ├── sky.ppm
│ └── wood.ppm
├── include
├── Makefile.am
├── drawstuff
│ ├── Makefile.am
│ ├── drawstuff.h
│ └── version.h
└── ode
│ ├── Makefile.am
│ ├── README
│ ├── collision.h
│ ├── collision_space.h
│ ├── collision_trimesh.h
│ ├── common.h
│ ├── compatibility.h
│ ├── contact.h
│ ├── cooperative.h
│ ├── error.h
│ ├── export-dif.h
│ ├── mass.h
│ ├── matrix.h
│ ├── matrix_coop.h
│ ├── memory.h
│ ├── misc.h
│ ├── objects.h
│ ├── ode.h
│ ├── odeconfig.h
│ ├── odecpp.h
│ ├── odecpp_collision.h
│ ├── odeinit.h
│ ├── odemath.h
│ ├── odemath_legacy.h
│ ├── precision.h.in
│ ├── rotation.h
│ ├── threading.h
│ ├── threading_impl.h
│ ├── timer.h
│ └── version.h.in
├── libccd
├── BSD-LICENSE
├── Makefile.am
├── README
├── bootstrap
├── configure.ac
└── src
│ ├── Makefile.am
│ ├── Makefile.include
│ ├── alloc.c
│ ├── ccd.c
│ ├── ccd
│ ├── alloc.h
│ ├── ccd.h
│ ├── compiler.h
│ ├── dbg.h
│ ├── list.h
│ ├── polytope.h
│ ├── precision.h.in
│ ├── quat.h
│ ├── simplex.h
│ ├── support.h
│ └── vec3.h
│ ├── custom
│ └── ccdcustom
│ │ ├── quat.h
│ │ └── vec3.h
│ ├── mpr.c
│ ├── polytope.c
│ ├── support.c
│ ├── testsuites
│ ├── Makefile.am
│ ├── bench.c
│ ├── bench2.c
│ ├── boxbox.c
│ ├── boxbox.h
│ ├── boxcyl.c
│ ├── boxcyl.h
│ ├── common.c
│ ├── common.h
│ ├── cu
│ │ ├── COPYING
│ │ ├── COPYING.LESSER
│ │ ├── Makefile.am
│ │ ├── check-regressions
│ │ ├── cu.c
│ │ ├── cu.h
│ │ └── latest.sh
│ ├── cylcyl.c
│ ├── cylcyl.h
│ ├── main.c
│ ├── mpr_boxbox.c
│ ├── mpr_boxbox.h
│ ├── mpr_boxcyl.c
│ ├── mpr_boxcyl.h
│ ├── mpr_cylcyl.c
│ ├── mpr_cylcyl.h
│ ├── polytope.c
│ ├── polytope.h
│ ├── regressions
│ │ ├── TSBoxBox.err
│ │ ├── TSBoxBox.out
│ │ ├── TSBoxCyl.out
│ │ ├── TSCylCyl.err
│ │ ├── TSCylCyl.out
│ │ ├── TSMPRBoxBox.err
│ │ ├── TSMPRBoxBox.out
│ │ ├── TSMPRBoxCyl.out
│ │ ├── TSMPRCylCyl.err
│ │ ├── TSMPRCylCyl.out
│ │ └── TSPt.err
│ ├── spheresphere.c
│ ├── spheresphere.h
│ ├── support.c
│ ├── support.h
│ ├── vec3.c
│ └── vec3.h
│ └── vec3.c
├── m4
└── pkg.m4
├── ode-config.cmake.in
├── ode-config.in
├── ode.pc.in
├── ode
├── Makefile.am
├── README
├── TODO
├── demo
│ ├── Makefile.am
│ ├── basket_geom.h
│ ├── bunny_geom.h
│ ├── convex_bunny_geom.h
│ ├── convex_prism.h
│ ├── demo_I.cpp
│ ├── demo_basket.cpp
│ ├── demo_boxstack.cpp
│ ├── demo_buggy.cpp
│ ├── demo_cards.cpp
│ ├── demo_chain1.c
│ ├── demo_chain2.cpp
│ ├── demo_collision.cpp
│ ├── demo_convex.cpp
│ ├── demo_crash.cpp
│ ├── demo_cyl.cpp
│ ├── demo_cylvssphere.cpp
│ ├── demo_dball.cpp
│ ├── demo_dhinge.cpp
│ ├── demo_feedback.cpp
│ ├── demo_friction.cpp
│ ├── demo_gyro2.cpp
│ ├── demo_gyroscopic.cpp
│ ├── demo_heightfield.cpp
│ ├── demo_hinge.cpp
│ ├── demo_jointPR.cpp
│ ├── demo_jointPU.cpp
│ ├── demo_joints.cpp
│ ├── demo_kinematic.cpp
│ ├── demo_motion.cpp
│ ├── demo_motor.cpp
│ ├── demo_moving_convex.cpp
│ ├── demo_moving_trimesh.cpp
│ ├── demo_ode.cpp
│ ├── demo_piston.cpp
│ ├── demo_plane2d.cpp
│ ├── demo_rfriction.cpp
│ ├── demo_slider.cpp
│ ├── demo_space.cpp
│ ├── demo_space_stress.cpp
│ ├── demo_step.cpp
│ ├── demo_tracks.cpp
│ ├── demo_transmission.cpp
│ ├── demo_trimesh.cpp
│ ├── halton235_geom.h
│ ├── icosahedron_geom.h
│ ├── texturepath.h
│ └── world_geom3.h
├── doc
│ ├── Doxyfile.in
│ ├── Makefile.am
│ ├── main.dox
│ └── pix
│ │ ├── amotor.jpg
│ │ ├── ball-and-socket-bad.jpg
│ │ ├── ball-and-socket.jpg
│ │ ├── body.jpg
│ │ ├── contact.jpg
│ │ ├── hinge.jpg
│ │ ├── hinge2.jpg
│ │ ├── joints.jpg
│ │ ├── rollingcontact.jpg
│ │ ├── sf-graph1.jpg
│ │ ├── sf-graph2.jpg
│ │ ├── slider.jpg
│ │ └── universal.jpg
└── src
│ ├── Makefile.am
│ ├── array.cpp
│ ├── array.h
│ ├── box.cpp
│ ├── capsule.cpp
│ ├── collision_convex_trimesh.cpp
│ ├── collision_cylinder_box.cpp
│ ├── collision_cylinder_plane.cpp
│ ├── collision_cylinder_sphere.cpp
│ ├── collision_cylinder_trimesh.cpp
│ ├── collision_kernel.cpp
│ ├── collision_kernel.h
│ ├── collision_libccd.cpp
│ ├── collision_libccd.h
│ ├── collision_quadtreespace.cpp
│ ├── collision_sapspace.cpp
│ ├── collision_space.cpp
│ ├── collision_space_internal.h
│ ├── collision_std.h
│ ├── collision_transform.cpp
│ ├── collision_transform.h
│ ├── collision_trimesh_box.cpp
│ ├── collision_trimesh_ccylinder.cpp
│ ├── collision_trimesh_colliders.h
│ ├── collision_trimesh_disabled.cpp
│ ├── collision_trimesh_gimpact.cpp
│ ├── collision_trimesh_gimpact.h
│ ├── collision_trimesh_internal.cpp
│ ├── collision_trimesh_internal.h
│ ├── collision_trimesh_internal_impl.h
│ ├── collision_trimesh_opcode.cpp
│ ├── collision_trimesh_opcode.h
│ ├── collision_trimesh_plane.cpp
│ ├── collision_trimesh_ray.cpp
│ ├── collision_trimesh_sphere.cpp
│ ├── collision_trimesh_trimesh.cpp
│ ├── collision_trimesh_trimesh_old.cpp
│ ├── collision_util.cpp
│ ├── collision_util.h
│ ├── common.h
│ ├── convex.cpp
│ ├── coop_matrix_types.h
│ ├── cylinder.cpp
│ ├── default_threading.cpp
│ ├── default_threading.h
│ ├── error.cpp
│ ├── error.h
│ ├── export-dif.cpp
│ ├── fastdot.cpp
│ ├── fastdot_impl.h
│ ├── fastldltfactor.cpp
│ ├── fastldltfactor_impl.h
│ ├── fastldltsolve.cpp
│ ├── fastldltsolve_impl.h
│ ├── fastlsolve.cpp
│ ├── fastlsolve_impl.h
│ ├── fastltsolve.cpp
│ ├── fastltsolve_impl.h
│ ├── fastvecscale.cpp
│ ├── fastvecscale_impl.h
│ ├── gimpact_contact_export_helper.cpp
│ ├── gimpact_contact_export_helper.h
│ ├── gimpact_gim_contact_accessor.h
│ ├── gimpact_plane_contact_accessor.h
│ ├── heightfield.cpp
│ ├── heightfield.h
│ ├── joints
│ ├── Makefile.am
│ ├── amotor.cpp
│ ├── amotor.h
│ ├── ball.cpp
│ ├── ball.h
│ ├── contact.cpp
│ ├── contact.h
│ ├── dball.cpp
│ ├── dball.h
│ ├── dhinge.cpp
│ ├── dhinge.h
│ ├── fixed.cpp
│ ├── fixed.h
│ ├── hinge.cpp
│ ├── hinge.h
│ ├── hinge2.cpp
│ ├── hinge2.h
│ ├── joint.cpp
│ ├── joint.h
│ ├── joint_internal.h
│ ├── joints.h
│ ├── lmotor.cpp
│ ├── lmotor.h
│ ├── null.cpp
│ ├── null.h
│ ├── piston.cpp
│ ├── piston.h
│ ├── plane2d.cpp
│ ├── plane2d.h
│ ├── pr.cpp
│ ├── pr.h
│ ├── pu.cpp
│ ├── pu.h
│ ├── slider.cpp
│ ├── slider.h
│ ├── transmission.cpp
│ ├── transmission.h
│ ├── universal.cpp
│ └── universal.h
│ ├── lcp.cpp
│ ├── lcp.h
│ ├── mass.cpp
│ ├── mat.cpp
│ ├── mat.h
│ ├── matrix.cpp
│ ├── matrix.h
│ ├── memory.cpp
│ ├── misc.cpp
│ ├── nextafterf.c
│ ├── objects.cpp
│ ├── objects.h
│ ├── obstack.cpp
│ ├── obstack.h
│ ├── ode.cpp
│ ├── odeinit.cpp
│ ├── odemath.cpp
│ ├── odemath.h
│ ├── odeou.cpp
│ ├── odeou.h
│ ├── odetls.cpp
│ ├── odetls.h
│ ├── plane.cpp
│ ├── quickstep.cpp
│ ├── quickstep.h
│ ├── ray.cpp
│ ├── resource_control.cpp
│ ├── resource_control.h
│ ├── rotation.cpp
│ ├── scrapbook.cpp_deprecated
│ ├── simple_cooperative.cpp
│ ├── simple_cooperative.h
│ ├── sphere.cpp
│ ├── stack.cpp_deprecated
│ ├── stack.h_deprecated
│ ├── step.cpp
│ ├── step.h
│ ├── threaded_solver_ldlt.h
│ ├── threading_atomics_provs.h
│ ├── threading_base.cpp
│ ├── threading_base.h
│ ├── threading_fake_sync.h
│ ├── threading_impl.cpp
│ ├── threading_impl.h
│ ├── threading_impl_posix.h
│ ├── threading_impl_templates.h
│ ├── threading_impl_win.h
│ ├── threading_pool_posix.cpp
│ ├── threading_pool_win.cpp
│ ├── threadingutils.h
│ ├── timer.cpp
│ ├── typedefs.h
│ ├── util.cpp
│ └── util.h
├── ou
├── CHANGELOG.TXT
├── INSTALL.TXT
├── LICENSE-BSD.TXT
├── LICENSE-LESSER.TXT
├── LICENSE-ZLIB.TXT
├── LICENSE.TXT
├── Makefile.am
├── README.TXT
├── bootstrap
├── build
│ ├── make
│ │ ├── makefile
│ │ └── makefile.os
│ ├── vs2005
│ │ ├── ou.sln
│ │ └── ou.vcproj
│ └── vs6
│ │ ├── ou.dsp
│ │ └── ou.dsw
├── configure.ac
├── include
│ └── ou
│ │ ├── Makefile.am
│ │ ├── assert.h
│ │ ├── atomic.h
│ │ ├── atomicflags.h
│ │ ├── customization.h
│ │ ├── enumarrays.h
│ │ ├── features.h
│ │ ├── flags.h
│ │ ├── flagsdefines.h
│ │ ├── inttypes.h
│ │ ├── macros.h
│ │ ├── malloc.h
│ │ ├── namespace.h
│ │ ├── platform.h
│ │ ├── simpleflags.h
│ │ ├── templates.h
│ │ ├── threadlocalstorage.h
│ │ └── typewrapper.h
├── src
│ └── ou
│ │ ├── Makefile.am
│ │ ├── atomic.cpp
│ │ ├── customization.cpp
│ │ ├── malloc.cpp
│ │ └── threadlocalstorage.cpp
└── test
│ ├── Makefile.am
│ ├── outest.cpp
│ ├── vs2005
│ └── outest.vcproj
│ └── vs6
│ └── outest.dsp
├── tests
├── Makefile.am
├── UnitTest++
│ ├── COPYING
│ ├── Makefile.am
│ ├── Makefile.ori
│ ├── README
│ ├── TestUnitTest++.vsnet2003.vcproj
│ ├── TestUnitTest++.vsnet2005.vcproj
│ ├── UnitTest++.vsnet2003.sln
│ ├── UnitTest++.vsnet2003.vcproj
│ ├── UnitTest++.vsnet2005.sln
│ ├── UnitTest++.vsnet2005.vcproj
│ ├── docs
│ │ └── UnitTest++.html
│ └── src
│ │ ├── AssertException.cpp
│ │ ├── AssertException.h
│ │ ├── CheckMacros.h
│ │ ├── Checks.cpp
│ │ ├── Checks.h
│ │ ├── Config.h
│ │ ├── DeferredTestReporter.cpp
│ │ ├── DeferredTestReporter.h
│ │ ├── DeferredTestResult.cpp
│ │ ├── DeferredTestResult.h
│ │ ├── Makefile.am
│ │ ├── MemoryOutStream.cpp
│ │ ├── MemoryOutStream.h
│ │ ├── Posix
│ │ ├── Makefile.am
│ │ ├── SignalTranslator.cpp
│ │ ├── SignalTranslator.h
│ │ ├── TimeHelpers.cpp
│ │ └── TimeHelpers.h
│ │ ├── ReportAssert.cpp
│ │ ├── ReportAssert.h
│ │ ├── Test.cpp
│ │ ├── Test.h
│ │ ├── TestDetails.cpp
│ │ ├── TestDetails.h
│ │ ├── TestList.cpp
│ │ ├── TestList.h
│ │ ├── TestMacros.h
│ │ ├── TestReporter.cpp
│ │ ├── TestReporter.h
│ │ ├── TestReporterStdout.cpp
│ │ ├── TestReporterStdout.h
│ │ ├── TestResults.cpp
│ │ ├── TestResults.h
│ │ ├── TestRunner.cpp
│ │ ├── TestRunner.h
│ │ ├── TestSuite.h
│ │ ├── TimeConstraint.cpp
│ │ ├── TimeConstraint.h
│ │ ├── TimeHelpers.h
│ │ ├── UnitTest++.h
│ │ ├── Win32
│ │ ├── Makefile.am
│ │ ├── TimeHelpers.cpp
│ │ └── TimeHelpers.h
│ │ ├── XmlTestReporter.cpp
│ │ ├── XmlTestReporter.h
│ │ └── tests
│ │ ├── Main.cpp
│ │ ├── RecordingReporter.h
│ │ ├── TestAssertHandler.cpp
│ │ ├── TestCheckMacros.cpp
│ │ ├── TestChecks.cpp
│ │ ├── TestDeferredTestReporter.cpp
│ │ ├── TestMemoryOutStream.cpp
│ │ ├── TestTest.cpp
│ │ ├── TestTestList.cpp
│ │ ├── TestTestMacros.cpp
│ │ ├── TestTestResults.cpp
│ │ ├── TestTestRunner.cpp
│ │ ├── TestTestSuite.cpp
│ │ ├── TestTimeConstraint.cpp
│ │ ├── TestTimeConstraintMacro.cpp
│ │ ├── TestUnitTest++.cpp
│ │ └── TestXmlTestReporter.cpp
├── collision.cpp
├── collision_point_depth.cpp
├── friction.cpp
├── joint.cpp
├── joints
│ ├── Makefile.am
│ ├── amotor.cpp
│ ├── ball.cpp
│ ├── dball.cpp
│ ├── fixed.cpp
│ ├── hinge.cpp
│ ├── hinge2.cpp
│ ├── piston.cpp
│ ├── pr.cpp
│ ├── pu.cpp
│ ├── slider.cpp
│ └── universal.cpp
├── main.cpp
└── odemath.cpp
├── tools
├── README.txt
├── msw-release.bat
├── ode_convex_export.py
└── src-release.sh
└── web
└── ODElogo.png
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.dll
3 | *.la
4 | *.lo
5 | *.o
6 | .deps/
7 | .libs/
8 | aclocal.m4
9 | autom4te.cache
10 | compile
11 | config.guess
12 | config.h
13 | config.h.in
14 | config.log
15 | config.status
16 | config.sub
17 | configure
18 | depcomp
19 | install-sh
20 | libtool
21 | ltmain.sh
22 | Makefile.in
23 | Makefile
24 | missing
25 | ode.pc
26 | ode-config
27 | stamp-h1
28 | test-driver
29 |
30 | # these need to be matched in specific directories
31 | /m4/libtool.m4
32 | /m4/lt*.m4
33 | /drawstuff/dstest/dstest
34 | /drawstuff/src/*.aps
35 | /include/ode/precision.h
36 | /include/ode/version.h
37 | /libccd/src/ccd/precision.h
38 | /ou/test/outest
39 | /tests/tests/
40 | /tests/tests.log
41 | /tests/tests.trs
42 | /tests/test-suite.log
43 | /ode/doc/Doxyfile
44 |
45 | # ignore all demo binaries, but not the sources
46 | /ode/demo/demo_*
47 | !/ode/demo/demo_*.c*
48 | /ode/doc/html/
49 |
50 | # ignore folders created by premake
51 | /build/codeblocks
52 | /build/codelite
53 | /build/gmake
54 | /build/vs2002
55 | /build/vs2003
56 | /build/vs2005
57 | /build/vs2008
58 | /build/vs2010
59 |
60 | # ignore folder created during compilation
61 | /lib/
62 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | ODE is dual-licensed under either:
2 |
3 | * GNU Lesser General Public License v 2.1 or later.
4 | see LICENSE.TXT
5 |
6 | * Modified 3-clause BSD license.
7 | see LICENSE-BSD.TXT
8 |
9 |
10 | Third-party libraries bundled with ODE:
11 |
12 | * GIMPACT: dual-licensed under either:
13 | - GNU Lesser General Public License v 2.1 or later.
14 | see GIMPACT-LICENSE-LGPL.TXT
15 | - Modified 3-clause BSD license.
16 | see GIMPACT/GIMPACT-LICENSE-BSD.TXT
17 |
18 | * libccd: Modified 3-clause BSD License
19 | see libccd/BSD-LICENSE
20 |
21 | * OU/ODER: triple-licensed under either:
22 | - GNU Lesser General Public License v 3 or later.
23 | see ou/LICENSE.TXT
24 | see ou/LICENSE-LESSER.TXT
25 | - Modified 3-clause BSD license.
26 | see ou/LICENSE-BSD.TXT
27 | - ZLIB license.
28 | see ou/LICENSE-ZLIB.TXT
29 |
30 | * OPCODE: under the same terms as ODE
31 | see OPCODE/COPYING
32 |
33 |
--------------------------------------------------------------------------------
/GIMPACT/GIMPACT-LICENSE-BSD.TXT:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/GIMPACT/GIMPACT-LICENSE-BSD.TXT
--------------------------------------------------------------------------------
/GIMPACT/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = GIMPACT-LICENSE-BSD.TXT GIMPACT-LICENSE-LGPL.TXT
2 |
3 | SUBDIRS = include src
4 |
5 |
--------------------------------------------------------------------------------
/GIMPACT/include/GIMPACT/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_HEADERS = \
2 | gim_boxpruning.h gim_contact.h gim_geometry.h \
3 | gim_math.h gim_memory.h gimpact.h \
4 | gim_radixsort.h gim_tri_capsule_collision.h gim_tri_collision.h \
5 | gim_trimesh.h gim_tri_sphere_collision.h
6 |
7 |
--------------------------------------------------------------------------------
/GIMPACT/include/GIMPACT/gim_math.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/GIMPACT/include/GIMPACT/gim_math.h
--------------------------------------------------------------------------------
/GIMPACT/include/GIMPACT/gim_radixsort.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/GIMPACT/include/GIMPACT/gim_radixsort.h
--------------------------------------------------------------------------------
/GIMPACT/include/GIMPACT/gim_tri_sphere_collision.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/GIMPACT/include/GIMPACT/gim_tri_sphere_collision.h
--------------------------------------------------------------------------------
/GIMPACT/include/GIMPACT/gimpact.h:
--------------------------------------------------------------------------------
1 | #ifndef GIMPACT_H_INCLUDED
2 | #define GIMPACT_H_INCLUDED
3 |
4 | /*! \file gimpact.h
5 | \author Francisco Le�n
6 | */
7 | /*
8 | -----------------------------------------------------------------------------
9 | This source file is part of GIMPACT Library.
10 |
11 | For the latest info, see http://gimpact.sourceforge.net/
12 |
13 | Copyright (c) 2006 Francisco Leon. C.C. 80087371.
14 | email: projectileman@yahoo.com
15 |
16 | This library is free software; you can redistribute it and/or
17 | modify it under the terms of EITHER:
18 | (1) The GNU Lesser General Public License as published by the Free
19 | Software Foundation; either version 2.1 of the License, or (at
20 | your option) any later version. The text of the GNU Lesser
21 | General Public License is included with this library in the
22 | file GIMPACT-LICENSE-LGPL.TXT.
23 | (2) The BSD-style license that is included with this library in
24 | the file GIMPACT-LICENSE-BSD.TXT.
25 |
26 | This library is distributed in the hope that it will be useful,
27 | but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
29 | GIMPACT-LICENSE-LGPL.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
30 |
31 | -----------------------------------------------------------------------------
32 | */
33 |
34 |
35 | #include "GIMPACT/gim_trimesh.h"
36 |
37 | /*! \defgroup GIMPACT_INIT
38 | */
39 | //! @{
40 | //! Call this to initialize GIMPACT system structures.
41 | void gimpact_init();
42 | //! Call this to clean GIMPACT system structures.
43 | void gimpact_terminate();
44 | //! @}
45 | #endif // GIMPACT_H_INCLUDED
46 |
--------------------------------------------------------------------------------
/GIMPACT/include/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = GIMPACT
2 |
--------------------------------------------------------------------------------
/GIMPACT/src/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libGIMPACT.la
2 | AM_CPPFLAGS = -fno-strict-aliasing \
3 | -I$(top_srcdir)/include \
4 | -I$(top_builddir)/include \
5 | -I$(top_srcdir)/ode/src \
6 | -I$(top_srcdir)/GIMPACT/include
7 |
8 | libGIMPACT_la_SOURCES = gim_boxpruning.cpp \
9 | gim_contact.cpp \
10 | gim_math.cpp \
11 | gim_memory.cpp \
12 | gim_tri_tri_overlap.cpp \
13 | gim_trimesh.cpp \
14 | gim_trimesh_capsule_collision.cpp \
15 | gim_trimesh_ray_collision.cpp \
16 | gim_trimesh_sphere_collision.cpp \
17 | gim_trimesh_trimesh_collision.cpp \
18 | gimpact.cpp
19 |
20 |
--------------------------------------------------------------------------------
/GIMPACT/src/gim_math.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | -----------------------------------------------------------------------------
3 | This source file is part of GIMPACT Library.
4 |
5 | For the latest info, see http://gimpact.sourceforge.net/
6 |
7 | Copyright (c) 2006 Francisco Leon. C.C. 80087371.
8 | email: projectileman@yahoo.com
9 |
10 | This library is free software; you can redistribute it and/or
11 | modify it under the terms of EITHER:
12 | (1) The GNU Lesser General Public License as published by the Free
13 | Software Foundation; either version 2.1 of the License, or (at
14 | your option) any later version. The text of the GNU Lesser
15 | General Public License is included with this library in the
16 | file GIMPACT-LICENSE-LGPL.TXT.
17 | (2) The BSD-style license that is included with this library in
18 | the file GIMPACT-LICENSE-BSD.TXT.
19 |
20 | This library is distributed in the hope that it will be useful,
21 | but WITHOUT ANY WARRANTY; without even the implied warranty of
22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
23 | GIMPACT-LICENSE-LGPL.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
24 |
25 | -----------------------------------------------------------------------------
26 | */
27 |
28 |
29 | #include "GIMPACT/gim_math.h"
30 | #include "stdlib.h"
31 | #include "time.h"
32 |
33 |
34 | GREAL gim_inv_sqrt(GREAL f)
35 | {
36 | GREAL r;
37 | GIM_INV_SQRT(f,r);
38 | return r;
39 | }
40 |
41 | GREAL gim_sqrt(GREAL f)
42 | {
43 | GREAL r;
44 | GIM_SQRT(f,r);
45 | return r;
46 | }
47 |
48 | //!Initializes mathematical functions
49 | void gim_init_math()
50 | {
51 | srand( static_cast< unsigned int >( time( 0 ) ) );
52 | }
53 |
54 | //! Generates an unit random
55 | GREAL gim_unit_random()
56 | {
57 | GREAL rn = static_cast< GREAL >( rand() );
58 | rn/=(GREAL)RAND_MAX;
59 | return rn;
60 | }
61 |
--------------------------------------------------------------------------------
/GIMPACT/src/gimpact.cpp:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | -----------------------------------------------------------------------------
4 | This source file is part of GIMPACT Library.
5 |
6 | For the latest info, see http://gimpact.sourceforge.net/
7 |
8 | Copyright (c) 2006 Francisco Leon. C.C. 80087371.
9 | email: projectileman@yahoo.com
10 |
11 | This library is free software; you can redistribute it and/or
12 | modify it under the terms of EITHER:
13 | (1) The GNU Lesser General Public License as published by the Free
14 | Software Foundation; either version 2.1 of the License, or (at
15 | your option) any later version. The text of the GNU Lesser
16 | General Public License is included with this library in the
17 | file GIMPACT-LICENSE-LGPL.TXT.
18 | (2) The BSD-style license that is included with this library in
19 | the file GIMPACT-LICENSE-BSD.TXT.
20 |
21 | This library is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
24 | GIMPACT-LICENSE-LGPL.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
25 |
26 | -----------------------------------------------------------------------------
27 | */
28 |
29 | #include "GIMPACT/gimpact.h"
30 |
31 |
32 |
33 | void gimpact_init()
34 | {
35 | gim_init_math();
36 | }
37 |
38 | void gimpact_terminate()
39 | {
40 | }
41 |
--------------------------------------------------------------------------------
/LICENSE-BSD.TXT:
--------------------------------------------------------------------------------
1 |
2 | This is the BSD-style license for the Open Dynamics Engine
3 | ----------------------------------------------------------
4 |
5 | Open Dynamics Engine
6 | Copyright (c) 2001-2007, Russell L. Smith.
7 | All rights reserved.
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions
11 | are met:
12 |
13 | Redistributions of source code must retain the above copyright notice,
14 | this list of conditions and the following disclaimer.
15 |
16 | Redistributions in binary form must reproduce the above copyright notice,
17 | this list of conditions and the following disclaimer in the documentation
18 | and/or other materials provided with the distribution.
19 |
20 | Neither the names of ODE's copyright owner nor the names of its
21 | contributors may be used to endorse or promote products derived from
22 | this software without specific prior written permission.
23 |
24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
30 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = foreign
2 | ACLOCAL_AMFLAGS = -I m4 --install
3 |
4 | if ENABLE_OU
5 | OU_DIR = ou
6 | endif
7 |
8 | if LIBCCD
9 | if LIBCCD_INTERNAL
10 | LIBCCD_DIR = libccd
11 | endif
12 | endif
13 |
14 | if ENABLE_DEMOS
15 | DRAWSTUFF_DIR = drawstuff
16 | endif
17 |
18 | if GIMPACT
19 | GIMPACT_DIR = GIMPACT
20 | endif
21 |
22 | if OPCODE
23 | OPCODE_DIR = OPCODE
24 | endif
25 |
26 | SUBDIRS = include \
27 | $(DRAWSTUFF_DIR) \
28 | $(GIMPACT_DIR) \
29 | $(OPCODE_DIR) \
30 | $(OU_DIR) \
31 | $(LIBCCD_DIR) \
32 | ode \
33 | tests
34 |
35 | bin_SCRIPTS = ode-config
36 |
37 | # Utility rule for making a release
38 | release: dist-gzip dist-bzip2
39 | @echo Created release packages for ${PACKAGE}-${VERSION}.
40 |
41 | EXTRA_DIST = bootstrap build tools \
42 | CHANGELOG.txt COPYING INSTALL.txt CSR.txt README.md \
43 | LICENSE.TXT LICENSE-BSD.TXT \
44 | bindings \
45 | CMakeLists.txt ode-config.cmake.in config.h.cmake.in cmake
46 |
47 | pkgconfigdir = $(libdir)/pkgconfig
48 | pkgconfig_DATA = ode.pc
49 |
--------------------------------------------------------------------------------
/OPCODE/COPYING:
--------------------------------------------------------------------------------
1 | The OPCODE library distributed as part of ODE is licensed under
2 | the same terms as ODE (LGPLv2.1+ and BSD).
3 |
4 | Quoting a public e-mail from the author:
5 |
6 | Re: TriMesh support and OPCODE added to ODE core
7 | Pierre Terdiman
wanadoo.fr>
8 | 2003-07-01 21:18:44 GMT
9 |
10 | > If he wants
11 | > to explicitly make it clear that OpCode is good under ODE's
12 | > license, that would be A-1 Super...
13 |
14 | "Opcode is good under ODE's license"
15 |
16 | I didn't put a license to prevent boring questions about licenses, but it
17 | seems it's not enough - I still get as many questions, regarding missing
18 | license.
19 |
20 | The only thing that would NOT be good would be renaming it "TopCode",
21 | changing the author's name, selling it at a very expensive price, and still
22 | managing to make money out of it :)
23 |
24 | ...I should add a license explicitely against this :)
25 |
26 | Pierre
27 |
28 | Source:
29 | http://permalink.gmane.org/gmane.comp.lib.ode/3237
30 |
31 |
--------------------------------------------------------------------------------
/OPCODE/Ice/IceAxes.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Contains axes definition.
4 | * \file IceAxes.h
5 | * \author Pierre Terdiman
6 | * \date January, 29, 2000
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 | // Include Guard
12 | #ifndef __ICEAXES_H__
13 | #define __ICEAXES_H__
14 |
15 | enum PointComponent
16 | {
17 | X = 0,
18 | Y = 1,
19 | Z = 2,
20 | W = 3,
21 |
22 | FORCE_DWORD = 0x7fffffff
23 | };
24 |
25 | enum AxisOrder
26 | {
27 | AXES_XYZ = (X)|(Y<<2)|(Z<<4),
28 | AXES_XZY = (X)|(Z<<2)|(Y<<4),
29 | AXES_YXZ = (Y)|(X<<2)|(Z<<4),
30 | AXES_YZX = (Y)|(Z<<2)|(X<<4),
31 | AXES_ZXY = (Z)|(X<<2)|(Y<<4),
32 | AXES_ZYX = (Z)|(Y<<2)|(X<<4),
33 |
34 | AXES_FORCE_DWORD = 0x7fffffff
35 | };
36 |
37 | class ICEMATHS_API Axes
38 | {
39 | public:
40 |
41 | inline_ Axes(AxisOrder order)
42 | {
43 | mAxis0 = (order ) & 3;
44 | mAxis1 = (order>>2) & 3;
45 | mAxis2 = (order>>4) & 3;
46 | }
47 | inline_ ~Axes() {}
48 |
49 | udword mAxis0;
50 | udword mAxis1;
51 | udword mAxis2;
52 | };
53 |
54 | #endif // __ICEAXES_H__
55 |
--------------------------------------------------------------------------------
/OPCODE/Ice/IcePairs.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Contains a simple pair class.
4 | * \file IcePairs.h
5 | * \author Pierre Terdiman
6 | * \date January, 13, 2003
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 | // Include Guard
12 | #ifndef __ICEPAIRS_H__
13 | #define __ICEPAIRS_H__
14 |
15 | //! A generic couple structure
16 | struct ICECORE_API Pair
17 | {
18 | inline_ Pair() {}
19 | inline_ Pair(udword i0, udword i1) : id0(i0), id1(i1) {}
20 |
21 | udword id0; //!< First index of the pair
22 | udword id1; //!< Second index of the pair
23 | };
24 |
25 | class ICECORE_API Pairs : private Container
26 | {
27 | public:
28 | // Constructor / Destructor
29 | Pairs() {}
30 | ~Pairs() {}
31 |
32 | inline_ udword GetNbPairs() const { return GetNbEntries()>>1; }
33 | inline_ const Pair* GetPairs() const { return (const Pair*)GetEntries(); }
34 | inline_ const Pair* GetPair(udword i) const { return (const Pair*)&GetEntries()[i+i]; }
35 |
36 | inline_ BOOL HasPairs() const { return IsNotEmpty(); }
37 |
38 | inline_ void ResetPairs() { Reset(); }
39 | inline_ void DeleteLastPair() { DeleteLastEntry(); DeleteLastEntry(); }
40 |
41 | inline_ void AddPair(const Pair& p) { Add(p.id0).Add(p.id1); }
42 | inline_ void AddPair(udword id0, udword id1) { Add(id0).Add(id1); }
43 | };
44 |
45 | #endif // __ICEPAIRS_H__
46 |
--------------------------------------------------------------------------------
/OPCODE/Ice/IceRandom.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Contains code for random generators.
4 | * \file IceRandom.cpp
5 | * \author Pierre Terdiman
6 | * \date August, 9, 2001
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 | // Precompiled Header
12 | #include "Stdafx.h"
13 |
14 | using namespace IceCore;
15 |
16 | void IceCore:: SRand(udword seed)
17 | {
18 | srand(seed);
19 | }
20 |
21 | udword IceCore::Rand()
22 | {
23 | return rand();
24 | }
25 |
26 |
27 | static BasicRandom gRandomGenerator(42);
28 |
29 | udword IceCore::GetRandomIndex(udword max_index)
30 | {
31 | // We don't use rand() since it's limited to RAND_MAX
32 | udword Index = gRandomGenerator.Randomize();
33 | return Index % max_index;
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/OPCODE/Ice/IceRandom.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Contains code for random generators.
4 | * \file IceRandom.h
5 | * \author Pierre Terdiman
6 | * \date August, 9, 2001
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 | // Include Guard
12 | #ifndef __ICERANDOM_H__
13 | #define __ICERANDOM_H__
14 |
15 | FUNCTION ICECORE_API void SRand(udword seed);
16 | FUNCTION ICECORE_API udword Rand();
17 |
18 | //! Returns a unit random floating-point value
19 | inline_ float UnitRandomFloat() { return float(Rand()) * ONE_OVER_RAND_MAX; }
20 |
21 | //! Returns a random index so that 0<= index < max_index
22 | ICECORE_API udword GetRandomIndex(udword max_index);
23 |
24 | class ICECORE_API BasicRandom
25 | {
26 | public:
27 |
28 | //! Constructor
29 | inline_ BasicRandom(udword seed=0) : mRnd(seed) {}
30 | //! Destructor
31 | inline_ ~BasicRandom() {}
32 |
33 | inline_ void SetSeed(udword seed) { mRnd = seed; }
34 | inline_ udword GetCurrentValue() const { return mRnd; }
35 | inline_ udword Randomize() { mRnd = mRnd * 2147001325 + 715136305; return mRnd; }
36 |
37 | private:
38 | udword mRnd;
39 | };
40 |
41 | #endif // __ICERANDOM_H__
42 |
43 |
--------------------------------------------------------------------------------
/OPCODE/Ice/IceUtils.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Contains misc. useful macros & defines.
4 | * \file IceUtils.cpp
5 | * \author Pierre Terdiman (collected from various sources)
6 | * \date April, 4, 2000
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 | // Precompiled Header
12 | #include "Stdafx.h"
13 |
14 | using namespace IceCore;
15 |
16 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
17 | /**
18 | * Returns the alignment of the input address.
19 | * \fn Alignment()
20 | * \param address [in] address to check
21 | * \return the best alignment (e.g. 1 for odd addresses, etc)
22 | */
23 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
24 | udword IceCore::Alignment(udword address)
25 | {
26 | // Returns 0 for null addresses
27 | if(!address) return 0;
28 |
29 | // Test all bits
30 | udword Align = 1;
31 | for(udword i=1;i<32;i++)
32 | {
33 | // Returns as soon as the alignment is broken
34 | if(address&Align) return Align;
35 | Align<<=1;
36 | }
37 | // Here all bits are null, except the highest one (else the address would be null)
38 | return Align;
39 | }
40 |
--------------------------------------------------------------------------------
/OPCODE/Ice/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(top_srcdir)/OPCODE \
2 | -I$(top_srcdir)/include \
3 | -I$(top_builddir)/include
4 |
5 | noinst_LTLIBRARIES = libIce.la
6 | libIce_la_SOURCES = \
7 | IceAABB.cpp IceAABB.h IceAxes.h \
8 | IceBoundingSphere.h IceContainer.cpp IceContainer.h \
9 | IceFPU.h IceHPoint.cpp IceHPoint.h \
10 | IceIndexedTriangle.cpp IceIndexedTriangle.h IceLSS.h \
11 | IceMatrix3x3.cpp IceMatrix3x3.h IceMatrix4x4.cpp \
12 | IceMatrix4x4.h IceMemoryMacros.h IceOBB.cpp \
13 | IceOBB.h IcePairs.h IcePlane.cpp \
14 | IcePlane.h IcePoint.cpp IcePoint.h \
15 | IcePreprocessor.h IceRandom.cpp IceRandom.h \
16 | IceRay.cpp IceRay.h IceRevisitedRadix.cpp \
17 | IceRevisitedRadix.h IceSegment.cpp IceSegment.h \
18 | IceTriangle.cpp IceTriangle.h IceTriList.h \
19 | IceTypes.h IceUtils.cpp IceUtils.h
20 |
21 |
--------------------------------------------------------------------------------
/OPCODE/OPC_PlanesAABBOverlap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/OPCODE/OPC_PlanesAABBOverlap.h
--------------------------------------------------------------------------------
/OPCODE/OPC_PlanesTriOverlap.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /**
3 | * Planes-triangle overlap test.
4 | * \param in_clip_mask [in] bitmask for active planes
5 | * \return TRUE if triangle overlap planes
6 | * \warning THIS IS A CONSERVATIVE TEST !! Some triangles will be returned as intersecting, while they're not!
7 | */
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9 | inline_ BOOL PlanesCollider::PlanesTriOverlap(udword in_clip_mask)
10 | {
11 | // Stats
12 | mNbVolumePrimTests++;
13 |
14 | const Plane* p = mPlanes;
15 | udword Mask = 1;
16 |
17 | while(Mask<=in_clip_mask)
18 | {
19 | if(in_clip_mask & Mask)
20 | {
21 | float d0 = p->Distance(*mVP.Vertex[0]);
22 | float d1 = p->Distance(*mVP.Vertex[1]);
23 | float d2 = p->Distance(*mVP.Vertex[2]);
24 | if(d0>0.0f && d1>0.0f && d2>0.0f) return FALSE;
25 | // if(!(IR(d0)&SIGN_BITMASK) && !(IR(d1)&SIGN_BITMASK) && !(IR(d2)&SIGN_BITMASK)) return FALSE;
26 | }
27 | Mask+=Mask;
28 | p++;
29 | }
30 | /*
31 | for(udword i=0;i<6;i++)
32 | {
33 | float d0 = p[i].Distance(mLeafVerts[0]);
34 | float d1 = p[i].Distance(mLeafVerts[1]);
35 | float d2 = p[i].Distance(mLeafVerts[2]);
36 | if(d0>0.0f && d1>0.0f && d2>0.0f) return false;
37 | }
38 | */
39 | return TRUE;
40 | }
41 |
--------------------------------------------------------------------------------
/OPCODE/OPC_RayTriOverlap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/OPCODE/OPC_RayTriOverlap.h
--------------------------------------------------------------------------------
/OPCODE/OPC_TriBoxOverlap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/OPCODE/OPC_TriBoxOverlap.h
--------------------------------------------------------------------------------
/OPCODE/Opcode.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "OPCODE"=.\Opcode.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Global:
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<3>
25 | {{{
26 | }}}
27 |
28 | ###############################################################################
29 |
30 |
--------------------------------------------------------------------------------
/OPCODE/README-ODE.txt:
--------------------------------------------------------------------------------
1 |
2 | This is a copy of the OPCODE collision detection library by Pierre Terdiman.
3 | See http://www.codercorner.com/Opcode.htm for more information, and read
4 | the ReadMe.txt in this directory.
5 |
6 | If you want to use the TriList (triangle mesh) geometry class in ODE, the
7 | OPCODE library must be compiled. If you are using the autotools support to
8 | compile ODE, you just have to specify --with-trimesh=opcode when calling ./configure.
9 |
10 | This code was originally written for and compiled on windows, but it has been
11 | ported so that it should compile under unix/gcc too. Your mileage may vary.
12 |
13 | Russ Smith, April 12 2005.
14 |
--------------------------------------------------------------------------------
/OPCODE/ReadMe.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/OPCODE/ReadMe.txt
--------------------------------------------------------------------------------
/OPCODE/StdAfx.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /*
3 | * OPCODE - Optimized Collision Detection
4 | * Copyright (C) 2001 Pierre Terdiman
5 | * Homepage: http://www.codercorner.com/Opcode.htm
6 | */
7 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8 |
9 | //#define ICE_MAIN
10 | #include "Stdafx.h"
11 |
--------------------------------------------------------------------------------
/OPCODE/Stdafx.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 | /*
3 | * OPCODE - Optimized Collision Detection
4 | * Copyright (C) 2001 Pierre Terdiman
5 | * Homepage: http://www.codercorner.com/Opcode.htm
6 | */
7 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8 |
9 | #if !defined(AFX_STDAFX_H__EFB95044_1D31_11D5_8B0F_0050BAC83302__INCLUDED_)
10 | #define AFX_STDAFX_H__EFB95044_1D31_11D5_8B0F_0050BAC83302__INCLUDED_
11 |
12 | #if _MSC_VER > 1000
13 | #pragma once
14 | #endif // _MSC_VER > 1000
15 |
16 | // Insert your headers here
17 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
18 |
19 | #include "Opcode.h"
20 |
21 | //{{AFX_INSERT_LOCATION}}
22 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
23 |
24 | #endif // !defined(AFX_STDAFX_H__EFB95044_1D31_11D5_8B0F_0050BAC83302__INCLUDED_)
25 |
--------------------------------------------------------------------------------
/OPCODE/TemporalCoherence.txt:
--------------------------------------------------------------------------------
1 |
2 | > Hi John,
3 | >
4 | > I know I'll forget to tell you this if I don't write it right now....
5 | >
6 | > >(2) How is the receiving geometry for the shadow decided?
7 | >
8 | > I wrote about an LSS-test but actually performing a new VFC test (from the
9 | > light's view) is the same. In both cases, here's a trick to take advantage
10 | > of temporal coherence : test the world against a slightly larger than
11 | > necessary LSS or frustum. Keep the list of touched surfaces. Then next
12 | > frame, if the new volume is still contained within the previous one used
13 | for
14 | > the query, you can reuse the same list immediately. Actually it's a bit
15 | > similar to what you did in your sphere-tree, I think. Anyway, now the
16 | O(log
17 | > N) VFC is O(1) for some frames. It's not worth it for the "real" VFC, but
18 | > when you have N virtual frustum to test to drop N shadows, that's another
19 | > story.
20 | >
21 | > Two downsides:
22 | > - You need more ram to keep track of one list of meshes / shadow, but
23 | > usually it's not a lot.
24 | > - By using a larger volume for the query you possibly touch more
25 | > faces/surfaces, which will be rendered in the shadow pass. Usually it's
26 | not
27 | > a problem either since rendering is simply faster than geometric queries
28 | > those days. But of course, "your mileage may vary".
29 | >
30 | > Happy new year !
31 | >
32 | > Pierre
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The Open Dynamics Engine (ODE)
2 | ==============================
3 |
4 | 
5 |
6 | Copyright (C) 2001-2007 Russell L. Smith.
7 |
8 |
9 | ODE is a free, industrial quality library for simulating articulated
10 | rigid body dynamics - for example ground vehicles, legged creatures,
11 | and moving objects in VR environments. It is fast, flexible, robust
12 | and platform independent, with advanced joints, contact with friction,
13 | and built-in collision detection.
14 |
15 | This library is free software; you can redistribute it and/or
16 | modify it under the terms of EITHER:
17 |
18 | * The GNU Lesser General Public License version 2.1 or any later.
19 |
20 | * The BSD-style License.
21 |
22 | See the [COPYING](https://bitbucket.org/odedevs/ode/raw/master/COPYING) file for more details.
23 |
24 | * Installation instructions are in the [INSTALL.txt](https://bitbucket.org/odedevs/ode/raw/master/INSTALL.txt) file.
25 |
26 | * The ODE web pages are at [ode.org](https://www.ode.org/).
27 |
28 | * An online manual is at [the Wiki](https://ode.org/wiki/index.php?title=Manual).
29 |
30 | * API documentation is in the file ode/docs/index.html, or you
31 | can view it on the web at [opende.sf.net/docs/index.html](http://opende.sf.net/docs/index.html).
32 |
33 | * Coding style requirements can be found in the [CSR.txt](https://bitbucket.org/odedevs/ode/raw/master/CSR.txt) file.
34 |
35 |
--------------------------------------------------------------------------------
/bindings/python/TODO.txt:
--------------------------------------------------------------------------------
1 | CODE:
2 | * (setup.py) add package information (version, authors, etc.)
3 | * (setup.py) add 'install' action
4 | * (setup.py) add configurable ODE DLL (currently hard-coded to default single precision)
5 | * (ode.pxd) clean up, add more comments
6 | * (ode.pyx) refactor for a more Pythonic implementation (e.g. replace getters and setters with
7 | properties)?
8 | * (?) Add option to build bindings in ODE's makefiles
9 |
10 |
11 | DOCS:
12 |
13 | * Update and include API docs from PyODE
14 | * Adapt and include PyODE tutorials/demos
15 | * Update license text in ode.pxd and ode.pyx
16 |
--------------------------------------------------------------------------------
/bindings/python/demos/tutorial1.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | # http://pyode.sourceforge.net/tutorials/tutorial1.html
4 |
5 | # pyODE example 1: Getting started
6 |
7 | # modified by Gideon Klompje (removed literals and using
8 | # 'ode.Mass.setSphereTotal' instead of 'ode.Mass.setSphere')
9 |
10 | import ode
11 |
12 | # Simulation constants
13 | GRAVITY = (0, -9.81, 0)
14 |
15 | SPHERE_RADIUS = 0.05
16 | SPHERE_MASS = 1.0
17 | SPHERE_START_POS = (0, 2, 0)
18 | SPHERE_FORCE = (0, 200, 0) # Initial force to apply to the sphere
19 |
20 | TIME_STEP = 0.04
21 | TIME_STOP = 2.0 # When to stop the simulation
22 |
23 | # Create a world object
24 | world = ode.World()
25 | world.setGravity(GRAVITY)
26 |
27 | # Create a spherical body inside the world
28 | body = ode.Body(world)
29 | mass = ode.Mass()
30 | mass.setSphereTotal(SPHERE_MASS, SPHERE_RADIUS)
31 | body.setMass(mass)
32 |
33 | body.setPosition(SPHERE_START_POS)
34 | body.addForce(SPHERE_FORCE)
35 |
36 | # Do the simulation...
37 | if __name__ == "__main__":
38 | total_time = 0.0
39 | while total_time < TIME_STOP:
40 | # output the body's position and velocity
41 | x, y, z = body.getPosition()
42 | u, v, w = body.getLinearVel()
43 | print "%1.2fsec: pos=(%6.3f, %6.3f, %6.3f) vel=(%6.3f, %6.3f, %6.3f)" % \
44 | (total_time, x, y, z, u, v, w)
45 |
46 | # advance the simulation
47 | world.step(TIME_STEP)
48 | total_time += TIME_STEP
49 |
50 |
--------------------------------------------------------------------------------
/bindings/python/setup.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env python
2 | from distutils.core import setup
3 | from distutils.extension import Extension
4 | from subprocess import Popen, PIPE, CalledProcessError
5 |
6 |
7 | try:
8 | from Cython.Distutils import build_ext
9 | except ImportError:
10 | raise SystemExit("Requires Cython (http://cython.org/)")
11 |
12 | try:
13 | ode_cflags = Popen(
14 | ["pkg-config", "--cflags", "ode"],
15 | stdout=PIPE).stdout.read().decode('ascii').split()
16 | ode_libs = Popen(
17 | ["pkg-config", "--libs", "ode"],
18 | stdout=PIPE).stdout.read().decode('ascii').split()
19 | except (OSError, CalledProcessError):
20 | raise SystemExit("Failed to find ODE with 'pkg-config'. Please make sure "
21 | "that it is installed and available on your system path.")
22 |
23 | ode_ext = Extension("ode", ["ode.pyx"],
24 | extra_compile_args=ode_cflags,
25 | extra_link_args=ode_libs)
26 |
27 | if __name__ == "__main__":
28 | setup(
29 | name="Open Dynamics Engine",
30 | version="0.12",
31 | author="Gideon Klompje",
32 | # author_email="",
33 | # maintainer="",
34 | # maintainer_email="",
35 | url="http://www.ode.org",
36 | description="Bindings for the Open Dynamics Engine",
37 | long_description=(
38 | "A free, industrial quality library for simulating articulated "
39 | "rigid body dynamics - for example ground vehicles, legged "
40 | "creatures, and moving objects in VR environments. It's fast, "
41 | "flexible & robust. Built-in collision detection."),
42 | # download_url="https://opende.svn.sourceforge.net/svnroot/opende",
43 | # classifiers=[],
44 | # platforms=[],
45 | license="BSD License, GNU Lesser General Public License (LGPL)",
46 | cmdclass={"build_ext": build_ext},
47 | ext_modules=[ode_ext]
48 | )
49 |
--------------------------------------------------------------------------------
/bitbucket-pipelines.yml:
--------------------------------------------------------------------------------
1 | image: atlassian/default-image:2
2 |
3 | pipelines:
4 | default:
5 | - step:
6 | script:
7 | - apt-get update
8 | - apt-get -y install autoconf automake libtool
9 | - ./bootstrap
10 | - ./configure --enable-double-precision --enable-ou --enable-libccd
11 | - make
12 |
--------------------------------------------------------------------------------
/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Please make sure that you use automake 1.11 or later"
4 | echo "Warnings about underquoted definitions are harmless"
5 | if [ `uname -s` = Darwin ]; then
6 | echo "On OSX, install latest libtool, as the OS provided glibtoolize will not work"
7 | fi
8 |
9 | echo "Running aclocal"
10 | aclocal -I m4 --install || exit 1
11 | echo "Running libtoolize"
12 | which glibtoolize >/dev/null 2>&1 &&! which libtoolize >/dev/null 2>&1 &&LIBTOOLIZE=glibtoolize ||LIBTOOLIZE=libtoolize
13 | $LIBTOOLIZE --copy --automake --install || exit 1
14 | echo "Running autoheader"
15 | autoheader || exit 1
16 | echo "Running automake"
17 | automake --foreign --add-missing --copy || exit 1
18 | echo "Running autoconf"
19 | autoconf || exit 1
20 |
21 | echo "Running bootstrap in ou directory"
22 | (cd ou && ./bootstrap)
23 |
24 | if [ -d libccd ]; then
25 | echo "Running bootstrap in libccd directory"
26 | (cd libccd && ./bootstrap)
27 | fi;
28 |
29 | echo "Now you are ready to run ./configure"
30 |
--------------------------------------------------------------------------------
/build/premake4.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/build/premake4.exe
--------------------------------------------------------------------------------
/cmake/cmake_uninstall.cmake.in:
--------------------------------------------------------------------------------
1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3 | endif()
4 |
5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" FILES)
6 | string(REGEX REPLACE "\n" ";" FILES "${FILES}")
7 |
8 | foreach(FILE ${FILES})
9 | message(STATUS "Uninstalling: ${FILE}")
10 | if(EXISTS "${FILE}")
11 | file(REMOVE ${FILE})
12 | elseif(IS_SYMLINK "${FILE}")
13 | file(REMOVE ${FILE})
14 | else()
15 | message(STATUS "File \"${FILE}\" does not exist.")
16 | endif()
17 | endforeach()
18 |
--------------------------------------------------------------------------------
/contrib/BreakableJoints/diff/common.h.diff:
--------------------------------------------------------------------------------
1 | 208,227d207
2 | < /******************** breakable joint contribution ***********************/
3 | < /* joint break callback function */
4 | < typedef void dJointBreakCallback (dJointID joint);
5 | <
6 | < /* joint break modes */
7 | < enum {
8 | < // if this flag is set, the joint wil break
9 | < dJOINT_BROKEN = 0x0001,
10 | < // if this flag is set, the joint wil be deleted when it breaks
11 | < dJOINT_DELETE_ON_BREAK = 0x0002,
12 | < // if this flag is set, the joint can break at a certain force on body 1
13 | < dJOINT_BREAK_AT_B1_FORCE = 0x0004,
14 | < // if this flag is set, the joint can break at a certain torque on body 1
15 | < dJOINT_BREAK_AT_B1_TORQUE = 0x0008,
16 | < // if this flag is set, the joint can break at a certain force on body 2
17 | < dJOINT_BREAK_AT_B2_FORCE = 0x0010,
18 | < // if this flag is set, the joint can break at a certain torque on body 2
19 | < dJOINT_BREAK_AT_B2_TORQUE = 0x0020
20 | < };
21 | < /*************************************************************************/
22 |
--------------------------------------------------------------------------------
/contrib/BreakableJoints/diff/joint.h.diff:
--------------------------------------------------------------------------------
1 | 61,70d60
2 | < /******************** breakable joint contribution ***********************/
3 | < struct dxJointBreakInfo : public dBase {
4 | < int flags;
5 | < dReal b1MaxF[3]; // maximum force on body 1
6 | < dReal b1MaxT[3]; // maximum torque on body 1
7 | < dReal b2MaxF[3]; // maximum force on body 2
8 | < dReal b2MaxT[3]; // maximum torque on body 2
9 | < dJointBreakCallback *callback; // function that is called when this joint breaks
10 | < };
11 | < /*************************************************************************/
12 | 135,140d124
13 | <
14 | < /******************** breakable joint contribution ***********************/
15 | < // optional break info structure. if this is not NULL the the joint is
16 | < // breakable.
17 | < dxJointBreakInfo *breakInfo;
18 | < /*************************************************************************/
19 |
--------------------------------------------------------------------------------
/contrib/BreakableJoints/diff/objects.h.diff:
--------------------------------------------------------------------------------
1 | 168,179d167
2 | < /******************** breakable joint contribution ***********************/
3 | < void dJointSetBreakable (dJointID, int b);
4 | < void dJointSetBreakCallback (dJointID, dJointBreakCallback *callbackFunc);
5 | < void dJointSetBreakMode (dJointID, int mode);
6 | < int dJointGetBreakMode (dJointID);
7 | < void dJointSetBreakForce (dJointID, int body, dReal x, dReal y, dReal z);
8 | < void dJointSetBreakTorque (dJointID, int body, dReal x, dReal y, dReal z);
9 | < int dJointIsBreakable (dJointID);
10 | < void dJointGetBreakForce (dJointID, int body, dReal *force);
11 | < void dJointGetBreakTorque (dJointID, int body, dReal *torque);
12 | < /*************************************************************************/
13 | <
14 |
--------------------------------------------------------------------------------
/contrib/BreakableJoints/diff/ode.cpp.diff:
--------------------------------------------------------------------------------
1 | 212,230d211
2 | < /******************** breakable joint contribution ***********************/
3 | < dxJoint* nextJ;
4 | < if (!world->firstjoint)
5 | < nextJ = 0;
6 | < else
7 | < nextJ = (dxJoint*)world->firstjoint->next;
8 | < for (j=world->firstjoint; j; j=nextJ) {
9 | < nextJ = (dxJoint*)j->next;
10 | < // check if joint is breakable and broken
11 | < if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) {
12 | < // detach (break) the joint
13 | < dJointAttach (j, 0, 0);
14 | < // call the callback function if it is set
15 | < if (j->breakInfo->callback) j->breakInfo->callback (j);
16 | < // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set
17 | < if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j);
18 | < }
19 | < }
20 | < /*************************************************************************/
21 | 931,933d911
22 | < /******************** breakable joint contribution ***********************/
23 | < j->breakInfo = 0;
24 | < /*************************************************************************/
25 | 1011,1013d988
26 | < /******************** breakable joint contribution ***********************/
27 | < if (j->breakInfo) delete j->breakInfo;
28 | < /*************************************************************************/
29 |
--------------------------------------------------------------------------------
/contrib/BreakableJoints/diff/test_buggy.cpp.diff:
--------------------------------------------------------------------------------
1 | 266,270d265
2 | <
3 | < // breakable joints contribution
4 | < dJointSetBreakable (joint[i], 1);
5 | < dJointSetBreakMode (joint[i], dJOINT_BREAK_AT_FORCE);
6 | < dJointSetBreakForce (joint[i], 0.5);
7 | 298c293
8 | < ground_box = dCreateBox (space,2,1.5,5);
9 | ---
10 | > ground_box = dCreateBox (space,2,1.5,1);
11 | 300,301c295,296
12 | < dRFromAxisAndAngle (R,0,1,0,-0.85);
13 | < dGeomSetPosition (ground_box,5,0,-1);
14 | ---
15 | > dRFromAxisAndAngle (R,0,1,0,-0.15);
16 | > dGeomSetPosition (ground_box,2,0,-0.34);
17 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/CommonMgd.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace ODEManaged
4 | {
5 |
6 | __value public struct Vector3
7 | {
8 | double x;
9 | double y;
10 | double z;
11 | };
12 |
13 |
14 | __value public struct Vector4
15 | {
16 | double W;
17 | double x;
18 | double y;
19 | double z;
20 | };
21 |
22 |
23 | __value public struct Matrix3
24 | {
25 | double m11;
26 | double m12;
27 | double m13;
28 | double m21;
29 | double m22;
30 | double m23;
31 | double m31;
32 | double m32;
33 | double m33;
34 | };
35 |
36 | //__value public struct NearCallback
37 | //{
38 | // void *data;
39 | // dGeomID o1;
40 | // dGeomID o2;
41 | //};
42 |
43 | }
--------------------------------------------------------------------------------
/contrib/DotNetManaged/DotNetManaged.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 7.00
2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DotNetManaged", "DotNetManaged.vcproj", "{4B75AC19-971A-4CC6-A4F5-0695C9F8562F}"
3 | EndProject
4 | Global
5 | GlobalSection(SolutionConfiguration) = preSolution
6 | ConfigName.0 = Debug
7 | ConfigName.1 = Release
8 | EndGlobalSection
9 | GlobalSection(ProjectDependencies) = postSolution
10 | EndGlobalSection
11 | GlobalSection(ProjectConfiguration) = postSolution
12 | {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Debug.ActiveCfg = Debug|Win32
13 | {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Debug.Build.0 = Debug|Win32
14 | {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Release.ActiveCfg = Release|Win32
15 | {4B75AC19-971A-4CC6-A4F5-0695C9F8562F}.Release.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(ExtensibilityGlobals) = postSolution
18 | EndGlobalSection
19 | GlobalSection(ExtensibilityAddIns) = postSolution
20 | EndGlobalSection
21 | EndGlobal
22 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Geom.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Body.h"
4 | #include "Space.h"
5 | #include "CommonMgd.h"
6 |
7 | namespace ODEManaged
8 | {
9 | __gc public class Geom
10 | {
11 | public:
12 |
13 |
14 | //Constructor
15 |
16 | Geom (void);
17 |
18 |
19 | //Destructor
20 |
21 | ~Geom (void);
22 |
23 |
24 | //Methods
25 |
26 | //Basic Stuff
27 |
28 | dGeomID Id (void);
29 | dBodyID GetBody (void);
30 |
31 | //Overloaded SetBody
32 | void SetBody (Body &body);
33 | /*void SetBody (dBodyID b);*/
34 |
35 | Vector3 GetPosition (void);
36 | void SetPosition (double x, double y, double z);
37 |
38 | Matrix3 GetRotation (void);
39 | void SetRotation (Matrix3 rotation);
40 |
41 | void SetData (void *data);
42 | void *GetData (void);
43 |
44 |
45 | //Create Objects
46 |
47 | void CreateSphere (Space &space, double radius);
48 | void CreateBox (Space &space, double lx, double ly, double lz);
49 | void CreatePlane (Space &space, double a, double b, double c, double d);
50 | void CreateCCylinder (Space &space, double radius, double length);
51 |
52 |
53 | //Destroy Objects
54 |
55 | void Destroy (void);
56 |
57 |
58 | //Get Object's Parameters
59 |
60 | double SphereGetRadius (void);
61 | Vector3 BoxGetLengths (void);
62 | Vector4 PlaneGetParams (void);
63 | void CCylinderGetParams (double *radius, double *length);
64 | int GetClass (void);
65 |
66 |
67 | //Properties
68 |
69 | private:
70 |
71 | dGeomID _id;
72 |
73 | };
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Joint.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "joint.h"
5 | #include "CommonMgd.h"
6 | #include "world.h"
7 |
8 | namespace ODEManaged
9 | {
10 |
11 | //Constructor
12 |
13 | Joint::Joint(void)
14 | {
15 | _id=0;
16 | }
17 |
18 |
19 | //Destructor
20 |
21 | Joint::~Joint(void)
22 | {
23 | dJointDestroy(this->_id);
24 | }
25 |
26 |
27 | //Methods
28 |
29 | //Id
30 | dJointID Joint::Id(void)
31 | {
32 | return _id;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Joint.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "JointGroup.h"
4 | #include "World.h"
5 | #include "Body.h"
6 |
7 | namespace ODEManaged
8 | {
9 | __gc public class Joint
10 | {
11 | protected:
12 | //Constructor and Destructor Defenition
13 | Joint(void);
14 | ~Joint(void);
15 |
16 | //Public Methods
17 | dJointID Id(void);
18 |
19 | dJointID _id;
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointAMotor.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Joint.h"
4 |
5 | namespace ODEManaged
6 | {
7 | __gc public class JointAMotor : public Joint
8 | {
9 | public:
10 |
11 |
12 | //Constructors
13 |
14 | JointAMotor (void);
15 | JointAMotor (World &world);
16 | JointAMotor (World &world, JointGroup &jointGroup);
17 |
18 |
19 | //Destructor
20 |
21 | virtual ~JointAMotor (void);
22 |
23 |
24 | //Methods
25 |
26 | //Basic Stuff
27 |
28 | //Overloaded Create
29 | void Create (World &world, JointGroup &jointGroup);
30 | void Create (World &world);
31 |
32 | void SetNumAxes (int num);
33 | int GetNumAxes (void);
34 |
35 | void SetAxis (int anum, int rel, double x, double y, double z);
36 | Vector3 GetAxis (int anum);
37 |
38 | void SetAngle (int anum, double angle);
39 | double GetAngle (int anum);
40 |
41 | void SetMode (int mode);
42 | int GetMode (void);
43 |
44 | int GetAxisRel (int anum);
45 | double GetAngleRate (int anum);
46 |
47 | //Overloaded Attach
48 | void Attach (Body &body1, Body &body2);
49 | void Attach (Body &body1);
50 |
51 |
52 | //Movement Parameters
53 |
54 | void SetParam (int parameter, double value);
55 | double GetParam (int parameter);
56 |
57 |
58 |
59 |
60 |
61 | };
62 | }
63 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointBall.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "jointball.h"
5 |
6 | namespace ODEManaged
7 | {
8 |
9 | //Constructors
10 |
11 | JointBall::JointBall(void) : Joint(){}
12 |
13 |
14 | JointBall::JointBall(World &world)
15 | {
16 | if(this->_id) dJointDestroy(this->_id);
17 | _id = dJointCreateBall(world.Id(), 0);
18 | }
19 |
20 |
21 | JointBall::JointBall(World &world, JointGroup &jointGroup)
22 | {
23 | if(this->_id) dJointDestroy(this->_id);
24 | _id = dJointCreateBall(world.Id(), jointGroup.Id());
25 | }
26 |
27 |
28 | //Destructor
29 |
30 | JointBall::~JointBall(void){}
31 |
32 |
33 | //Methods
34 |
35 | //Overloaded Create
36 | void JointBall::Create(World &world, JointGroup &jointGroup)
37 | {
38 | if(this->_id) dJointDestroy(this->_id);
39 | _id = dJointCreateBall(world.Id(), jointGroup.Id());
40 | }
41 |
42 | void JointBall::Create(World &world)
43 | {
44 | if(this->_id) dJointDestroy(this->_id);
45 | _id = dJointCreateBall(world.Id(), 0);
46 | }
47 |
48 |
49 | //Overloaded Attach
50 | void JointBall::Attach(Body &body1, Body &body2)
51 | {
52 | dJointAttach(this->_id, body1.Id(), body2.Id());
53 | }
54 |
55 | void JointBall::Attach(Body &body1)
56 | {
57 | dJointAttach(this->_id, body1.Id(), 0);
58 | }
59 |
60 |
61 | //SetAnchor
62 | void JointBall::SetAnchor(double x, double y ,double z)
63 | {
64 | dJointSetBallAnchor(this->_id, x, y, z);
65 | }
66 |
67 | //GetAnchor
68 | Vector3 JointBall::GetAnchor(void)
69 | {
70 | Vector3 retVal;
71 | dVector3 temp;
72 | dJointGetBallAnchor(this->_id,temp);
73 | retVal.x = temp[0];
74 | retVal.y = temp[1];
75 | retVal.z = temp[2];
76 | return retVal;
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointBall.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Joint.h"
4 |
5 | namespace ODEManaged
6 | {
7 | __gc public class JointBall : public Joint
8 | {
9 | public:
10 |
11 | //Constructors
12 |
13 | JointBall(void);
14 | JointBall(World &world);
15 | JointBall(World &world, JointGroup &jointGroup);
16 |
17 |
18 | //Destructors
19 |
20 | virtual ~JointBall(void);
21 |
22 |
23 | //Methods
24 |
25 | //Overloaded Create
26 | void Create(World &world, JointGroup &jointGroup);
27 | void Create(World &world);
28 |
29 | //Overloaded Attach
30 | void Attach(Body &body1, Body &body2);
31 | void Attach(Body &body1);
32 |
33 | void SetAnchor(double x, double y, double z);
34 | Vector3 GetAnchor(void);
35 |
36 | };
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointFixed.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "jointfixed.h"
5 |
6 | namespace ODEManaged
7 | {
8 |
9 | //Constructors
10 |
11 | JointFixed::JointFixed(void) : Joint(){}
12 |
13 |
14 | JointFixed::JointFixed(World &world)
15 | {
16 | if(this->_id) dJointDestroy(this->_id);
17 | _id = dJointCreateFixed(world.Id(),0);
18 | }
19 |
20 |
21 | JointFixed::JointFixed(World &world, JointGroup &jointGroup)
22 | {
23 | if(this->_id) dJointDestroy(this->_id);
24 | _id = dJointCreateFixed(world.Id(), jointGroup.Id());
25 | }
26 |
27 |
28 | //Destructor
29 |
30 | JointFixed::~JointFixed(void){}
31 |
32 |
33 | //Methods
34 |
35 | //Overloaded Create
36 | void JointFixed::Create(World &world, JointGroup &jointGroup)
37 | {
38 | if(this->_id) dJointDestroy(this->_id);
39 | _id = dJointCreateFixed(world.Id(), jointGroup.Id());
40 | }
41 |
42 | void JointFixed::Create(World &world)
43 | {
44 | if(this->_id) dJointDestroy(this->_id);
45 | _id = dJointCreateFixed(world.Id(), 0);
46 | }
47 |
48 |
49 | //Overloaded Attach
50 | void JointFixed::Attach(Body &body1, Body &body2)
51 | {
52 | dJointAttach(this->_id, body1.Id(), body2.Id());
53 | }
54 |
55 | void JointFixed::Attach(Body &body1)
56 | {
57 | dJointAttach(this->_id, body1.Id(), 0);
58 | }
59 |
60 |
61 | //Fixed
62 | void JointFixed::SetFixed(void)
63 | {
64 | dJointSetFixed(this->_id);
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointFixed.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Joint.h"
4 |
5 | namespace ODEManaged
6 | {
7 | __gc public class JointFixed : public Joint
8 | {
9 | public:
10 |
11 | //Constructors
12 |
13 | JointFixed(void);
14 | JointFixed(World &world);
15 | JointFixed(World &world, JointGroup &jointGroup);
16 |
17 |
18 | //Destructor
19 |
20 | virtual ~JointFixed(void);
21 |
22 |
23 | //Methods
24 |
25 | //Overloaded Create
26 | void Create(World &world, JointGroup &jointGroup);
27 | void Create(World &world);
28 |
29 | //Overloaded Attach
30 | void Attach(Body &body1, Body &body2);
31 | void Attach(Body &body1);
32 |
33 | void SetFixed(void);
34 |
35 | };
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointGroup.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "jointgroup.h"
5 |
6 | namespace ODEManaged
7 | {
8 |
9 | //Constructors
10 |
11 | JointGroup::JointGroup(void)
12 | {
13 | _id=0;
14 | }
15 |
16 | JointGroup::JointGroup (int maxSize)
17 | {
18 | _id = dJointGroupCreate(maxSize);
19 | }
20 |
21 |
22 | //Destructor
23 |
24 | JointGroup::~JointGroup(void)
25 | {
26 | dJointGroupDestroy(this->_id);
27 | }
28 |
29 |
30 | //Methods
31 |
32 | //ID
33 | dJointGroupID JointGroup::Id()
34 | {
35 | return _id;
36 | }
37 |
38 |
39 | //Create
40 | void JointGroup::Create (int maxSize)
41 | {
42 | if(_id) dJointGroupDestroy(_id);
43 | _id = dJointGroupCreate(maxSize);
44 | }
45 |
46 |
47 | //Empty
48 | void JointGroup::Empty (void)
49 | {
50 | dJointGroupEmpty(this->_id);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointGroup.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace ODEManaged
4 | {
5 | __gc public class JointGroup
6 | {
7 | public:
8 |
9 | //Constructors
10 |
11 | JointGroup(void);
12 | JointGroup(int maxSize);
13 |
14 |
15 | //Destructor
16 |
17 | ~JointGroup(void);
18 |
19 |
20 | //Methods
21 |
22 | dJointGroupID Id(void);
23 | void Create(int maxSize);
24 | void Empty(void);
25 |
26 |
27 | private:
28 |
29 | dJointGroupID _id;
30 |
31 | };
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/JointHinge2.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Joint.h"
4 | #include "CommonMgd.h"
5 |
6 | namespace ODEManaged
7 | {
8 | __gc public class JointHinge2 : public Joint
9 | {
10 | public:
11 |
12 |
13 | //Constructors
14 |
15 | JointHinge2 (void);
16 | JointHinge2 (World &world);
17 | JointHinge2 (World &world, JointGroup &jointGroup);
18 |
19 | //Destructors
20 |
21 | virtual ~JointHinge2 (void);
22 |
23 |
24 | //Methods
25 |
26 | //Overloaded Hinge.Create
27 | void Create (World &world, JointGroup &jointGroup);
28 | void Create (World &world);
29 |
30 | void SetAnchor (double x, double y, double z);
31 | Vector3 GetAnchor (void);
32 |
33 | void SetAxis1 (double x, double y, double z);
34 | Vector3 GetAxis1 (void);
35 |
36 | void SetAxis2 (double x, double y, double z);
37 | Vector3 GetAxis2 (void);
38 |
39 | double GetAngle1 (void);
40 | double GetAngle1Rate (void);
41 |
42 | //double GetAngle2 (void);
43 | double GetAngle2Rate (void);
44 |
45 | void Attach (Body &body1, Body &body2);
46 | void Attach( Body &body1);
47 | };
48 | }
49 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Release/ode.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/DotNetManaged/Release/ode.dll
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Space.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "Space.h"
5 | #include "TEST.h"
6 |
7 | namespace ODEManaged
8 | {
9 |
10 | //Constructor
11 |
12 | Space::Space(void)
13 | {
14 | _id = dSimpleSpaceCreate();
15 | }
16 |
17 | Space::Space(int minlevel, int maxlevel)
18 | {
19 | _id = dHashSpaceCreate();
20 | dHashSpaceSetLevels(this->_id, minlevel, maxlevel);
21 | }
22 |
23 |
24 | //Destructor
25 |
26 | Space::~Space(void)
27 | {
28 | dSpaceDestroy(this->_id);
29 | }
30 |
31 |
32 | //Methods
33 |
34 | //Id
35 | dSpaceID Space::Id()
36 | {
37 | return _id;
38 | }
39 |
40 |
41 | //Collide
42 | void Space::Collide(void *data, dNearCallback *callback)
43 | {
44 | dSpaceCollide(this->_id, data, callback);
45 | }
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Space.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "CommonMgd.h"
4 |
5 | namespace ODEManaged
6 | {
7 | __gc public class Space
8 | {
9 | public:
10 |
11 | //Constructor
12 |
13 | Space(void);
14 | Space(int minlevel, int maxlevel);
15 |
16 | //Destructor
17 |
18 | ~Space(void);
19 |
20 |
21 | //Methods
22 |
23 | dSpaceID Id(void);
24 | void Collide(void *data, dNearCallback *callback);
25 |
26 |
27 | private:
28 |
29 | dSpaceID _id;
30 |
31 | };
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // ODEManaged.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/Stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently,
3 | // but are changed infrequently
4 |
5 | #pragma once
6 |
7 | #using
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/TEST.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 | #include "CommonMgd.h"
5 |
6 | namespace ODEManaged
7 | {
8 |
9 | void RnearCallback(void *data, dGeomID o1, dGeomID o2)
10 | {
11 | }
12 |
13 | }
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/World.cpp:
--------------------------------------------------------------------------------
1 | #include "StdAfx.h"
2 |
3 | #include
4 | #include "World.h"
5 |
6 | namespace ODEManaged
7 | {
8 |
9 | //Constructor
10 |
11 | World::World(void)
12 | {
13 | /*dWorldID _temp = dWorldCreate();
14 | _id = _temp;*/
15 | _id = dWorldCreate();
16 | }
17 |
18 |
19 | //Destructor
20 |
21 | World::~World(void)
22 | {
23 | dWorldDestroy(this->_id);
24 | }
25 |
26 |
27 | //Methods
28 |
29 | //Id
30 | dWorldID World::Id()
31 | {
32 | return _id;
33 | }
34 |
35 |
36 | //SetGravity
37 | void World::SetGravity(double x, double y, double z)
38 | {
39 | dWorldSetGravity(this->_id, x, y, z);
40 | }
41 |
42 |
43 | //Overloaded GetGravity
44 | Vector3 World::GetGravity(void)
45 | {
46 | Vector3 retVal;
47 | dVector3 temp;
48 | dWorldGetGravity(this->_id, temp);
49 | retVal.x = temp[0];
50 | retVal.y = temp[1];
51 | retVal.z = temp[2];
52 | return retVal;
53 | }
54 |
55 | void World::GetGravity(double gravity __gc[])
56 | {
57 | dVector3 temp;
58 | dWorldGetGravity(this->_id, temp);
59 | gravity[0] = temp[0];
60 | gravity[1] = temp[1];
61 | gravity[2] = temp[2];
62 | }
63 |
64 |
65 | //Step
66 | void World::Step(double stepSize)
67 | {
68 | dWorldStep(this->_id, stepSize);
69 | }
70 |
71 | }
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/contrib/DotNetManaged/World.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "CommonMgd.h"
4 |
5 | namespace ODEManaged
6 | {
7 | __gc public class World
8 | {
9 | public:
10 |
11 | //Constructor
12 |
13 | World(void);
14 |
15 |
16 | //Destructor
17 |
18 | ~World(void);
19 |
20 |
21 | // Methods
22 |
23 | dWorldID Id(void);
24 |
25 | void SetGravity(double x, double y, double z);
26 |
27 | //Overloaded GetGravity
28 | Vector3 GetGravity(void);
29 | void GetGravity(double gravity __gc[]);
30 |
31 | void Step(double stepSize);
32 |
33 |
34 | //Properties
35 |
36 | //Constraint Force Mixing
37 | __property void set_CFM(double cfm)
38 | {
39 | dWorldSetCFM(this->_id,cfm);
40 | }
41 |
42 | __property double get_CFM(void)
43 | {
44 | return dWorldGetCFM(this->_id);
45 | }
46 |
47 |
48 | //Error Reduction Parameter
49 | __property void set_ERP(double erp)
50 | {
51 | dWorldSetERP(this->_id,erp);
52 | }
53 |
54 | __property double get_ERP(void)
55 | {
56 | return dWorldGetERP(this->_id);
57 | }
58 |
59 |
60 | private:
61 |
62 | dWorldID _id;
63 |
64 | };
65 |
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/contrib/GeomTransformGroup/GeomTransformGroup.h:
--------------------------------------------------------------------------------
1 |
2 | /* ************************************************************************ */
3 | /*
4 | grouped and transformed geometry functions
5 | author: Tim Schmidt tisch@uni-paderborn.de
6 | */
7 |
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 |
14 | extern int dGeomTransformGroupClass;
15 |
16 | void dGeomTransformGroupSetRelativePosition (dGeomID g, dReal x, dReal y, dReal z);
17 | void dGeomTransformGroupSetRelativeRotation (dGeomID g, const dMatrix3 R);
18 | const dReal * dGeomTransformGroupGetRelativePosition (dxGeom *g);
19 | const dReal * dGeomTransformGroupGetRelativeRotation (dxGeom *g);
20 | dGeomID dCreateGeomTransformGroup (dSpaceID space);
21 | void dGeomTransformGroupAddGeom (dGeomID tg, dGeomID obj);
22 | void dGeomTransformGroupRemoveGeom (dGeomID tg, dGeomID obj);
23 | dGeomID dGeomTransformGroupGetGeom (dGeomID tg, int i);
24 | int dGeomTransformGroupGetNumGeoms (dGeomID tg);
25 |
26 |
27 | #ifdef __cplusplus
28 | }
29 | #endif
30 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/AUTHORS:
--------------------------------------------------------------------------------
1 | Daniel K. O.
2 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/ChangeLog:
--------------------------------------------------------------------------------
1 | 2011-11-13 First version.
2 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = deps src
2 |
3 | EXTRA_DIST = bootstrap
4 |
5 |
6 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/NEWS:
--------------------------------------------------------------------------------
1 | 2011-11-13 Basic functionality implemented (Sphere, Box, Capsule)
2 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/README:
--------------------------------------------------------------------------------
1 | This is a simple tool to test pairs of ODE geoms.
2 |
3 | It uses AntTweakBar for the GUI.
4 |
5 | Dependencies are currently GLFW, but other backends (SDL, GLUT, etc)
6 | can be easily implemented, that part of the code is only used to open
7 | a windows and get mouse and keyboard events.
8 |
9 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | libtoolize
3 | aclocal
4 | autoconf
5 | autoheader
6 | automake -a
7 | (echo "Running ./bootstrap in dependencies/AntTweakBar" && cd deps/AntTweakBar && ./bootstrap)
8 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/configure.ac:
--------------------------------------------------------------------------------
1 | # -*- Autoconf -*-
2 | # Process this file with autoconf to produce a configure script.
3 |
4 | AC_PREREQ([2.68])
5 | AC_INIT([interactive-collision], [0.1], [danielosmari@users.sourceforge.net])
6 | AC_CONFIG_SRCDIR([src/main.cpp])
7 | AC_CONFIG_HEADERS([config.h])
8 |
9 | AM_INIT_AUTOMAKE
10 |
11 | LT_INIT
12 |
13 | # Checks for programs.
14 | AC_PROG_CC
15 | AC_PROG_CXX
16 | PKG_PROG_PKG_CONFIG
17 | AC_LANG(C++)
18 |
19 | # Checks for libraries.
20 | PKG_CHECK_MODULES(ODE, ode)
21 | PKG_CHECK_MODULES(OPENGL, gl glu)
22 | PKG_CHECK_MODULES(GLFW, libglfw, [have_glfw=true], [have_glfw=false])
23 |
24 | AM_CONDITIONAL([GLFW], [test x$have_glfw = xtrue])
25 | if test x$have_glfw = xtrue
26 | then
27 | AC_DEFINE([USE_GLFW], [1], [define if GLFW is available])
28 | fi
29 |
30 | # TODO: when I get around implementing other backends...
31 | # PKG_CHECK_MODULES(SDL, sdl, AC_DEFINE(HAVE_SDL))
32 | # PKG_CHECK_MODULES(GLUT, glut, AC_DEFINE(HAVE_GLUT))
33 |
34 | # Checks for header files.
35 | AC_CHECK_HEADERS
36 |
37 | # Checks for typedefs, structures, and compiler characteristics.
38 |
39 | # Checks for library functions.
40 | AC_CHECK_FUNCS([atexit])
41 | AC_CHECK_FUNCS([sqrt])
42 | AC_HEADER_STDBOOL
43 |
44 | AC_CONFIG_SUBDIRS([deps/AntTweakBar])
45 |
46 | AC_CONFIG_FILES([Makefile
47 | deps/Makefile
48 | src/Makefile])
49 | AC_OUTPUT
50 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/AntTweakBar_Doc.url:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=http://www.antisphere.com/Wiki/tools:anttweakbar
3 | Modified=C043A0DCA0FFC801E7
4 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/License.txt:
--------------------------------------------------------------------------------
1 | --- AntTweakBar license ---
2 |
3 | Copyright (C) 2005-2011 Philippe Decaudin
4 |
5 | This software is provided 'as-is', without any express or implied warranty.
6 | In no event will the authors be held liable for any damages arising from the
7 | use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose, including
10 | commercial applications, and to alter it and redistribute it freely, subject to
11 | the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not claim
14 | that you wrote the original software. If you use this software in a product,
15 | an acknowledgment in the product documentation would be appreciated but is not
16 | required.
17 |
18 | 2. Altered source versions must be plainly marked as such, and must not be
19 | misrepresented as being the original software.
20 |
21 | 3. This notice may not be removed or altered from any source distribution.
22 |
23 |
24 | http://www.antisphere.com
25 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = foreign
2 |
3 | SUBDIRS = include src
4 |
5 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/Readme.txt:
--------------------------------------------------------------------------------
1 | --- AntTweakBar development library ---
2 |
3 |
4 | AntTweakBar is a small and easy-to-use C/C++ library that allows programmers
5 | to quickly add a light and intuitive GUI into OpenGL and DirectX based
6 | graphic programs to interactively tweak parameters.
7 |
8 | This package includes the development version of the AntTweakBar library
9 | for Windows, GNU/Linux and OSX, and some program examples (sources + binaries).
10 |
11 | For installation and documentation please refer to:
12 | http://www.antisphere.com/Wiki/tools:anttweakbar
13 |
14 |
15 | Philippe Decaudin - http://www.antisphere.com
16 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | libtoolize
3 | aclocal
4 | autoconf
5 | automake -a
6 |
7 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/configure.ac:
--------------------------------------------------------------------------------
1 | # -*- Autoconf -*-
2 | # Process this file with autoconf to produce a configure script.
3 |
4 | AC_PREREQ([2.68])
5 | AC_INIT([AntTweakBar], [1.14])
6 | AC_CONFIG_SRCDIR([include/AntTweakBar.h])
7 |
8 | AM_INIT_AUTOMAKE(foreign)
9 |
10 | LT_INIT
11 |
12 | # Checks for programs.
13 | AC_PROG_CXX
14 | AC_PROG_AWK
15 | AC_PROG_CC
16 | AC_PROG_CPP
17 | AC_PROG_INSTALL
18 | AC_PROG_LN_S
19 | AC_PROG_MAKE_SET
20 | PKG_PROG_PKG_CONFIG
21 |
22 | # Checks for libraries.
23 | PKG_CHECK_MODULES(OPENGL, gl glu)
24 |
25 | # Checks for header files.
26 | AC_CHECK_HEADERS([malloc.h memory.h stddef.h sys/time.h unistd.h])
27 |
28 | # Checks for typedefs, structures, and compiler characteristics.
29 | AC_HEADER_STDBOOL
30 | AC_C_INLINE
31 | AC_TYPE_INT64_T
32 | AC_TYPE_SIZE_T
33 | AC_CHECK_TYPES([ptrdiff_t])
34 |
35 | # Checks for library functions.
36 | AC_CHECK_FUNCS([gettimeofday memset sqrt strstr])
37 |
38 | AC_CONFIG_FILES([Makefile
39 | include/Makefile
40 | src/Makefile])
41 | AC_OUTPUT
42 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/include/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_HEADERS = AntTweakBar.h
2 |
3 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LTLIBRARIES = libAntTweakBar.la
2 |
3 | AM_CPPFLAGS = -I${top_srcdir}/include $(OPENGL_FLAGS)
4 | AM_LDFLAGS = $(OPENGL_LIBS)
5 |
6 | libAntTweakBar_la_SOURCES = AntPerfTimer.h \
7 | LoadOGL.cpp \
8 | LoadOGL.h \
9 | MiniGLFW.h \
10 | MiniGLUT.h \
11 | MiniSDL12.h \
12 | MiniSDL13.h \
13 | MiniSFML16.h \
14 | resource.h \
15 | TwBar.cpp \
16 | TwBar.h \
17 | TwColors.cpp \
18 | TwColors.h \
19 | TwEventGLFW.c \
20 | TwEventGLUT.c \
21 | TwEventSDL.c \
22 | TwEventSDL12.c \
23 | TwEventSDL13.c \
24 | TwEventSFML.cpp \
25 | TwFonts.cpp \
26 | TwFonts.h \
27 | TwGraph.h \
28 | TwMgr.cpp \
29 | TwMgr.h \
30 | TwOpenGL.cpp \
31 | TwOpenGL.h \
32 | TwPrecomp.cpp \
33 | TwPrecomp.h
34 |
35 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwFonts.h
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwMgr.cpp
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/TwPrecomp.cpp:
--------------------------------------------------------------------------------
1 | #include "TwPrecomp.h"
2 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/d3d10vs2003.h:
--------------------------------------------------------------------------------
1 | // Workaround to include D3D10.h with VS2003
2 | #ifndef __out
3 | #define __out
4 | #endif
5 | #ifndef __in
6 | #define __in
7 | #endif
8 | #ifndef __inout
9 | #define __inout
10 | #endif
11 | #ifndef __in_opt
12 | #define __in_opt
13 | #endif
14 | #ifndef __out_opt
15 | #define __out_opt
16 | #endif
17 | #ifndef __inout_opt
18 | #define __inout_opt
19 | #endif
20 | #ifndef __in_ecount
21 | #define __in_ecount(x)
22 | #endif
23 | #ifndef __in_ecount_opt
24 | #define __in_ecount_opt(x)
25 | #endif
26 | #ifndef __out_ecount
27 | #define __out_ecount(x)
28 | #endif
29 | #ifndef __out_ecount_opt
30 | #define __out_ecount_opt(x)
31 | #endif
32 | #ifndef __inout_ecount
33 | #define __inout_ecount(x)
34 | #endif
35 | #ifndef __inout_ecount_opt
36 | #define __inout_ecount_opt(x)
37 | #endif
38 | #ifndef __in_bcount_opt
39 | #define __in_bcount_opt(x)
40 | #endif
41 | #ifndef __out_bcount_opt
42 | #define __out_bcount_opt(x)
43 | #endif
44 | #ifndef __inout_bcount_opt
45 | #define __inout_bcount_opt(x)
46 | #endif
47 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00000.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00000.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00001.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00001.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00002.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00002.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00003.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00003.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00004.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00004.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00005.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00005.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00006.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00006.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00007.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00007.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00008.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00008.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00009.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00009.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00010.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00010.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00011.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00011.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00012.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00012.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00013.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/InteractiveCollisions/deps/AntTweakBar/src/res/cur00013.cur
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/AntTweakBar/src/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by AntTweakBar.rc
4 | //
5 | #define IDC_CURSOR1 101
6 | #define IDC_CURSOR2 102
7 | #define IDC_CURSOR3 103
8 | #define IDC_CURSOR4 104
9 | #define IDC_CURSOR5 105
10 | #define IDC_CURSOR6 106
11 | #define IDC_CURSOR7 107
12 | #define IDC_CURSOR8 108
13 | #define IDC_CURSOR9 109
14 | #define IDC_CURSOR10 110
15 | #define IDC_CURSOR11 111
16 | #define IDC_CURSOR12 112
17 | #define IDC_CURSOR13 113
18 | #define IDC_CURSOR14 114
19 |
20 | // Next default values for new objects
21 | //
22 | #ifdef APSTUDIO_INVOKED
23 | #ifndef APSTUDIO_READONLY_SYMBOLS
24 | #define _APS_NEXT_RESOURCE_VALUE 115
25 | #define _APS_NEXT_COMMAND_VALUE 40001
26 | #define _APS_NEXT_CONTROL_VALUE 1001
27 | #define _APS_NEXT_SYMED_VALUE 101
28 | #endif
29 | #endif
30 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/deps/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = AntTweakBar
2 |
3 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/src/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = $(ODE_CFLAGS) $(OPENGL_CFLAGS) \
2 | -I${top_srcdir}/deps/AntTweakBar/include
3 |
4 | AM_LDFLAGS = ../deps/AntTweakBar/src/libAntTweakBar.la \
5 | $(ODE_LIBS) $(OPENGL_LIBS)
6 |
7 |
8 | if GLFW
9 | AM_CPPFLAGS += $(GLFW_CFLAGS)
10 | AM_LDFLAGS += $(GLFW_LIBS)
11 | endif
12 |
13 | bin_PROGRAMS = icollision
14 |
15 | icollision_SOURCES = main.cpp \
16 | camera.cpp camera.hpp
17 |
18 |
--------------------------------------------------------------------------------
/contrib/InteractiveCollisions/src/camera.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CAMERA_H
2 | #define CAMERA_H
3 |
4 | #include
5 |
6 | /*
7 | Simple implementatino of a camera that orbits the origin
8 | */
9 |
10 |
11 | struct Camera {
12 |
13 | float fov, aspect,
14 | znear, zfar;
15 |
16 | float x, y, z; // eye pos
17 | float tx, ty, tz; // target
18 | dVector3 up;
19 | dVector3 right;
20 |
21 | int width, height, window_x, window_y;
22 |
23 |
24 | Camera();
25 | void transform_proj() const;
26 | void transform_model() const;
27 |
28 | void reshape(int w, int h);
29 |
30 | void press(int x, int y);
31 | void arcball(int x, int y);
32 |
33 | double dist() const;
34 |
35 | void zoom(float d); // >1 to zoom out, <1 to zoom in
36 |
37 | private:
38 | float old_x, old_y;
39 |
40 | void reset();
41 | float normx(int x) const;
42 | float normy(int y) const;
43 |
44 | float to_sphere_z(float r, float x, float y);
45 | };
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/CW7_projects.sit.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/contrib/Mac_CFMCarbon/CW7_projects.sit.bin
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/CommonPrefix.h:
--------------------------------------------------------------------------------
1 | #define TARGET_API_MAC_CARBON 1
2 | #define finite isfinite
3 | #define dNODEBUG 1
4 |
5 | // Comment out for single precision
6 | #define PRECISION_DOUBLE 1
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/DSPrefix.h:
--------------------------------------------------------------------------------
1 | #ifndef prefix_h
2 | #define prefix_h
3 |
4 | #include "CommonPrefix.h"
5 |
6 | #endif // prefix_h
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/DebugPrefix.h:
--------------------------------------------------------------------------------
1 | #ifndef prefix_h
2 | #define prefix_h
3 |
4 | #include "CommonPrefix.h"
5 |
6 | #ifdef dNODEBUG
7 | #undef dNODEBUG
8 | #endif
9 |
10 | #endif // prefix_h
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/ExamplesPrefix.h:
--------------------------------------------------------------------------------
1 | #ifndef prefix_h
2 | #define prefix_h
3 |
4 | #include "CommonPrefix.h"
5 |
6 | // Hack to automatically call SIOUX's CLI interface for the test apps
7 | #include
8 | #include
9 | int fmain (int argc, char **argv);
10 | int main (int argc, char **argv) { argc = ccommand(&argv); return fmain(argc, argv); }
11 | #define main(argc, argv) fmain(argc, argv)
12 |
13 | #endif // prefix_h
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/ODETestPrefix.h:
--------------------------------------------------------------------------------
1 | #ifndef prefix_h
2 | #define prefix_h
3 |
4 | #include "CommonPrefix.h"
5 |
6 | // Hack to automatically call SIOUX's CLI interface for the test apps
7 | #include
8 | #include
9 | int fmain ();
10 | int main (int argc, char **argv) { argc = ccommand(&argv); return fmain(); }
11 | #define main() fmain()
12 |
13 | #endif // prefix_h
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/ReleasePrefix.h:
--------------------------------------------------------------------------------
1 | #ifndef prefix_h
2 | #define prefix_h
3 |
4 | #include "CommonPrefix.h"
5 |
6 | #endif // prefix_h
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/include/GL/gl.h:
--------------------------------------------------------------------------------
1 | // A little hackaround (Apple use / in the FILENAME, which doesn't work when following DOS paths)
2 | #include
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/include/GL/glu.h:
--------------------------------------------------------------------------------
1 | // A little hackaround (Apple use / in the FILENAME, which doesn't work when following DOS paths)
2 | #include
--------------------------------------------------------------------------------
/contrib/Mac_CFMCarbon/mac_source/include/ode/config.h:
--------------------------------------------------------------------------------
1 | /* This file has been manually hacked together for the Mac CFM Carbon build - Frank. */
2 |
3 | #ifndef _ODE_CONFIG_H_
4 | #define _ODE_CONFIG_H_
5 |
6 | /* standard system headers */
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 |
16 | #ifdef __cplusplus
17 | extern "C" {
18 | #endif
19 |
20 | /* #define PENTIUM 1 -- not a pentium */
21 |
22 | /* integer types (we assume int >= 32 bits) */
23 | typedef char int8;
24 | typedef unsigned char uint8;
25 | typedef int int32;
26 | typedef unsigned int uint32;
27 |
28 |
29 | #ifdef PRECISION_DOUBLE
30 |
31 | /*select the base floating point type*/
32 | #define dDOUBLE 1
33 |
34 | /* the floating point infinity */
35 | #define dInfinity DBL_MAX
36 |
37 | #else
38 |
39 | /* select the base floating point type */
40 | #define dSINGLE 1
41 |
42 | /* the floating point infinity */
43 | #define dInfinity FLT_MAX
44 |
45 | #endif
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 | #endif
--------------------------------------------------------------------------------
/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | [assembly: AssemblyTitle("Drawstuff.NET")]
7 | [assembly: AssemblyDescription("")]
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Ode.NET")]
11 | [assembly: AssemblyCopyright("")]
12 | [assembly: AssemblyTrademark("")]
13 | [assembly: AssemblyCulture("")]
14 | [assembly: ComVisible(false)]
15 | [assembly: Guid("b2a39dd4-dd67-4e8a-af70-d3b412da8850")]
16 | [assembly: AssemblyVersion("0.7.0.0")]
17 | [assembly: AssemblyFileVersion("0.7.0.0")]
18 | [assembly: CLSCompliantAttribute(true)]
19 |
--------------------------------------------------------------------------------
/contrib/Ode.NET/Drawstuff/premake.lua:
--------------------------------------------------------------------------------
1 | package.name = "Drawstuff.NET"
2 | package.kind = "dll"
3 | package.language = "c#"
4 |
5 | if (options["with-doubles"]) then
6 | package.defines = { "dDOUBLE" }
7 | else
8 | package.defines = { "dSINGLE " }
9 | end
10 |
11 | package.links = {
12 | "System",
13 | "Ode.NET"
14 | }
15 |
16 | package.files = {
17 | "AssemblyInfo.cs",
18 | "Drawstuff.cs"
19 | }
20 |
--------------------------------------------------------------------------------
/contrib/Ode.NET/Ode/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | [assembly: AssemblyTitle("Ode.NET")]
7 | [assembly: AssemblyDescription("")]
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Ode.NET")]
11 | [assembly: AssemblyCopyright("")]
12 | [assembly: AssemblyTrademark("")]
13 | [assembly: AssemblyCulture("")]
14 | [assembly: ComVisible(false)]
15 | [assembly: Guid("1347a35e-c32b-4ff6-8064-7d10b2cc113b")]
16 | [assembly: AssemblyVersion("0.10.1.0")]
17 | [assembly: AssemblyFileVersion("0.10.1.0")]
18 | [assembly: CLSCompliantAttribute(true)]
19 |
--------------------------------------------------------------------------------
/contrib/Ode.NET/Ode/premake.lua:
--------------------------------------------------------------------------------
1 | package.name = "Ode.NET"
2 | package.kind = "dll"
3 | package.language = "c#"
4 |
5 | -- Build options
6 |
7 | package.defines = { }
8 |
9 | if (options["with-doubles"]) then
10 | table.insert(package.defines, "dDOUBLE")
11 | else
12 | table.insert(package.defines, "dSINGLE")
13 | end
14 |
15 | if (options["no-unsafe"]) then
16 | table.insert(package.defines, "dNO_UNSAFE_CODE")
17 | else
18 | package.buildflags = { "unsafe" }
19 | end
20 |
21 |
22 | -- Files & Libraries
23 |
24 | package.files = {
25 | "AssemblyInfo.cs",
26 | "Ode.cs"
27 | }
28 |
29 | package.links = {
30 | "System"
31 | }
32 |
--------------------------------------------------------------------------------
/contrib/Ode.NET/Tests/premake.lua:
--------------------------------------------------------------------------------
1 | -- This function creates the test packages
2 | function maketest(name)
3 |
4 | package = newpackage()
5 | package.name = name
6 | package.kind = "exe"
7 | package.language = "c#"
8 |
9 | if (options["with-doubles"]) then
10 | package.defines = { "dDOUBLE" }
11 | else
12 | package.defines = { "dSINGLE " }
13 | end
14 |
15 | package.links = {
16 | "System",
17 | "Ode.NET",
18 | "Drawstuff.NET"
19 | }
20 |
21 | package.files = {
22 | name .. ".cs"
23 | }
24 |
25 | end
26 |
27 | maketest("BoxStack")
28 |
--------------------------------------------------------------------------------
/contrib/Ode.NET/premake.lua:
--------------------------------------------------------------------------------
1 | project.name = "Ode.NET"
2 |
3 | -- Target checking
4 |
5 | if (target and target ~= "vs2005" and target ~= "gnu") then
6 | error("Ode.NET requires a .NET 2.0 compiler")
7 | end
8 |
9 |
10 | -- Project options
11 |
12 | addoption("with-doubles", "Use double instead of float as base numeric type")
13 | addoption("with-tests", "Builds the test applications and DrawStuff library")
14 | addoption("no-unsafe", "Exclude functions using unsafe code (dBodyGetPosition, etc.)")
15 |
16 |
17 | -- Build settings
18 |
19 | project.config["Debug"].bindir = "bin/Debug"
20 | project.config["Release"].bindir = "bin/Release"
21 |
22 |
23 | -- Packages
24 |
25 | if (options["with-tests"]) then
26 | dopackage("Tests")
27 | dopackage("Drawstuff")
28 | end
29 | dopackage("Ode")
30 |
--------------------------------------------------------------------------------
/contrib/OdeModelProcessor/LICENSE-BSD.TXT:
--------------------------------------------------------------------------------
1 |
2 | This is the BSD-style license for The ODE Model Processor
3 | ----------------------------------------------------------
4 |
5 | The ODE Model Processor
6 | Copyright (c) 2007, Department Of Information Science,
7 | University of Otago, Dunedin, New Zealand.
8 | All rights reserved.
9 |
10 | Author: Richard Barrington
11 |
12 | Redistribution and use in source and binary forms, with or without
13 | modification, are permitted provided that the following conditions
14 | are met:
15 |
16 | Redistributions of source code must retain the above copyright notice,
17 | this list of conditions and the following disclaimer.
18 |
19 | Redistributions in binary form must reproduce the above copyright notice,
20 | this list of conditions and the following disclaimer in the documentation
21 | and/or other materials provided with the distribution.
22 |
23 | Neither the names of the copyright owner nor the names of its
24 | contributors may be used to endorse or promote products derived from
25 | this software without specific prior written permission.
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
34 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 |
--------------------------------------------------------------------------------
/contrib/OdeModelProcessor/OdeModelProcessor.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual C# Express 2005
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OdeModelProcessor", "OdeModelProcessor\OdeModelProcessor.csproj", "{246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {246F3075-FEE3-45F9-8CB6-47DADBFFD1F2}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/contrib/OdeModelProcessor/OdeModelProcessor/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("OdeModelProcessor")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("OdeModelProcessor")]
13 | [assembly: AssemblyCopyright("Copyright © 2007")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("29c5609a-cd5f-480b-b4ef-5c11de022268")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.832
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace OdeModelProcessor.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/contrib/OdeModelProcessor/OdeModelProcessor/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/contrib/README:
--------------------------------------------------------------------------------
1 | This directory contains ODE-related things that have been generously
2 | contributed by ODE's users. Why is this stuff here and not integrated
3 | into the main ODE source tree? There may be several reasons:
4 |
5 | * The author(s) and ODE maintainers(s) may not have had time to do
6 | the job.
7 |
8 | * It may not be finished.
9 |
10 | * It may contribute functionality that is useful but not considered
11 | to be part of ODE's core.
12 |
13 | No guarantees are made about the code in this directory - it may not
14 | be documented, it may not have been tested, and it may not even
15 | compile for you.
16 |
17 | Each package has its own subdirectory, with a README file in that
18 | directory explaining what the package is.
19 |
20 |
--------------------------------------------------------------------------------
/contrib/dCylinder/dCylinder.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef dCylinder_h
3 | #define dCylinder_h
4 |
5 | struct dxCylinder;
6 | extern int dCylinderClassUser;
7 |
8 |
9 | dxGeom *dCreateCylinder (dSpaceID space, dReal r, dReal lz);
10 | void dGeomCylinderSetParams (dGeomID g, dReal radius, dReal length);
11 |
12 | void dGeomCylinderGetParams (dGeomID g, dReal *radius, dReal *length);
13 | #endif //dCylinder_h
14 |
15 |
--------------------------------------------------------------------------------
/contrib/dRay/Include/dRay.h:
--------------------------------------------------------------------------------
1 | #include "ode\ode.h"
2 |
3 | /* Class ID */
4 | extern int dRayClass;
5 |
6 | /* Creates a ray */
7 | dxGeom* dGeomCreateRay(dSpaceID space, dReal Length);
8 |
9 | /* Set/Get length */
10 | void dGeomRaySetLength(dxGeom* g, dReal Length);
11 | dReal dGeomRayGetLength(dxGeom* g);
12 |
13 | /* Utility function to override the ray's pos + rot */
14 | void dGeomRaySet(dxGeom* g, dVector3 Origin, dVector3 Direction);
15 | void dGeomRayGet(dxGeom* g, dVector3 Origin, dVector3 Direction);
16 |
--------------------------------------------------------------------------------
/contrib/dRay/README.txt:
--------------------------------------------------------------------------------
1 | From: "Erwin de Vries"
2 | To:
3 | Subject: [ODE] dRay class
4 | Date: Thu, 25 Jul 2002 13:05:28 +0200
5 |
6 | Yesterday and today i've written a dRay class. It interacts with dPlane,
7 | dSphere, dBox and dCCylinder. It does not generate full contact information.
8 | It only generates the pos member. I dont think its useful to anyone to go
9 | through hoops and find a reasonable normal and penetration depth, as i dont
10 | think anyone will want to use it for dynamics. Just for CD.
11 |
12 | It should compile in single and double precision mode, and should be
13 | platform independant. I hope.
14 |
15 | The next Tri-Collider release using Opcode 1.1 will also implement a ray
16 | collision function along with some other not too interesting improvements.
17 |
--------------------------------------------------------------------------------
/contrib/dRay/dRay_Plane.cpp:
--------------------------------------------------------------------------------
1 | // Ripped from Paul Bourke
2 |
3 | #include "Include\dRay.h"
4 | #include "dxRay.h"
5 |
6 | int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contact, int Stride){
7 | dVector3 Plane;
8 | dGeomPlaneGetParams(PlaneGeom, Plane);
9 |
10 | dVector3 Origin, Direction;
11 | dGeomRayGet(RayGeom, Origin, Direction);
12 |
13 | dReal Length = dGeomRayGetLength(RayGeom);
14 |
15 | dReal Denom = Plane[0] * Direction[0] + Plane[1] * Direction[1] + Plane[2] * Direction[2];
16 | if (dFabs(Denom) < 0.00001f){
17 | return 0; // Ray never hits
18 | }
19 |
20 | float T = -(Plane[3] + Plane[0] * Origin[0] + Plane[1] * Origin[1] + Plane[2] * Origin[2]) / Denom;
21 |
22 | if (T < 0 || T > Length){
23 | return 0; // Ray hits but not within boundaries
24 | }
25 |
26 | Contact->pos[0] = Origin[0] + T * Direction[0];
27 | Contact->pos[1] = Origin[1] + T * Direction[1];
28 | Contact->pos[2] = Origin[2] + T * Direction[2];
29 | Contact->pos[3] = REAL(0.0);
30 | //Contact->normal = 0;
31 | Contact->depth = 0.0f;
32 | Contact->g1 = RayGeom;
33 | Contact->g2 = PlaneGeom;
34 | return 1;
35 | }
--------------------------------------------------------------------------------
/contrib/dRay/dxRay.h:
--------------------------------------------------------------------------------
1 | struct dxRay{
2 | dReal Length;
3 | };
4 |
5 | inline void Decompose(const dMatrix3 Matrix, dVector3 Right, dVector3 Up, dVector3 Direction){
6 | Right[0] = Matrix[0 * 4 + 0];
7 | Right[1] = Matrix[1 * 4 + 0];
8 | Right[2] = Matrix[2 * 4 + 0];
9 | Right[3] = Matrix[3 * 4 + 0];
10 | Up[0] = Matrix[0 * 4 + 1];
11 | Up[1] = Matrix[1 * 4 + 1];
12 | Up[2] = Matrix[2 * 4 + 1];
13 | Up[3] = Matrix[3 * 4 + 1];
14 | Direction[0] = Matrix[0 * 4 + 2];
15 | Direction[1] = Matrix[1 * 4 + 2];
16 | Direction[2] = Matrix[2 * 4 + 2];
17 | Direction[3] = Matrix[3 * 4 + 2];
18 | }
19 |
20 | inline void Decompose(const dMatrix3 Matrix, dVector3 Vectors[3]){
21 | Decompose(Matrix, Vectors[0], Vectors[1], Vectors[2]);
22 | }
23 |
24 | inline dContactGeom* CONTACT(int Flags, dContactGeom* Contacts, int Index, int Stride){
25 | dIASSERT(Index >= 0 && Index < (Flags & 0x0ffff));
26 | return ((dContactGeom*)(((char*)Contacts) + (Index * Stride)));
27 | }
28 |
29 | int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contacts, int Stride);
30 | int dCollideSR(dxGeom* RayGeom, dxGeom* SphereGeom, int Flags, dContactGeom* Contacts, int Stride);
31 | int dCollideBR(dxGeom* RayGeom, dxGeom* BoxGeom, int Flags, dContactGeom* Contacts, int Stride);
32 | int dCollideCCR(dxGeom* RayGeom, dxGeom* CCylinderGeom, int Flags, dContactGeom* Contacts, int Stride);
--------------------------------------------------------------------------------
/drawstuff/Makefile.am:
--------------------------------------------------------------------------------
1 | if ENABLE_DRAWSTUFF
2 | SUBDIRS = src dstest
3 | EXTRA_DIST = textures
4 | endif
5 |
--------------------------------------------------------------------------------
/drawstuff/dstest/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_PROGRAMS= dstest
2 | AM_CPPFLAGS = -I$(top_srcdir)/drawstuff/src -I$(top_srcdir)/include
3 |
4 | dstest_SOURCES= dstest.cpp
5 | dstest_LDADD=$(top_builddir)/drawstuff/src/libdrawstuff.la \
6 | @GL_LIBS@
7 |
8 | if WIN32
9 | resources.o: $(top_srcdir)/drawstuff/src/resources.rc $(top_srcdir)/drawstuff/src/resource.h
10 | $(WINDRES) $(top_srcdir)/drawstuff/src/resources.rc -o resources.o
11 |
12 | dstest_LDADD += resources.o
13 | endif
14 |
15 |
--------------------------------------------------------------------------------
/drawstuff/src/Makefile.am:
--------------------------------------------------------------------------------
1 | # Drawstuff is meant as an aid for testing and not as a full
2 | # rendering library.
3 |
4 | noinst_LTLIBRARIES = libdrawstuff.la
5 | libdrawstuff_la_SOURCES = drawstuff.cpp internal.h
6 | AM_CPPFLAGS = -I$(top_srcdir)/include \
7 | -I$(top_builddir)/include \
8 | -I$(top_srcdir)/ode/src \
9 | -DDEFAULT_PATH_TO_TEXTURES='"$(top_srcdir)/drawstuff/textures/"' \
10 | -DGL_SILENCE_DEPRECATION \
11 | $(X11_CFLAGS)
12 |
13 | if WIN32
14 | libdrawstuff_la_SOURCES+= windows.cpp resource.h resources.rc
15 | libdrawstuff_la_LIBADD = -lwinmm -lgdi32
16 | libdrawstuff_la_LDFLAGS = -no-undefined
17 | endif
18 |
19 | if X11
20 | libdrawstuff_la_SOURCES+= x11.cpp
21 | libdrawstuff_la_LIBADD = $(X11_LIBS)
22 | endif
23 |
24 | if OSX
25 | libdrawstuff_la_SOURCES+= osx.cpp
26 | endif
27 |
28 |
--------------------------------------------------------------------------------
/drawstuff/src/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Developer Studio generated include file.
3 | // Used by resources.rc
4 | //
5 | #define IDD_MSGDLG 101
6 | #define IDR_MENU1 102
7 | #define IDD_ABOUT 103
8 | #define IDR_ACCELERATOR1 104
9 | #define IDC_LIST1 1000
10 | #define IDM_EXIT 40001
11 | #define IDM_ABOUT 40002
12 | #define IDM_PAUSE 40003
13 | #define IDM_PERF_MONITOR 40004
14 | #define IDM_SHADOWS 40005
15 | #define IDM_TEXTURES 40006
16 | #define IDM_SAVE_SETTINGS 40007
17 | #define IDM_SINGLE_STEP 40008
18 | #ifndef IDC_STATIC
19 | #define IDC_STATIC -1
20 | #endif
21 |
22 | // Next default values for new objects
23 | //
24 | #ifdef APSTUDIO_INVOKED
25 | #ifndef APSTUDIO_READONLY_SYMBOLS
26 | #define _APS_NEXT_RESOURCE_VALUE 108
27 | #define _APS_NEXT_COMMAND_VALUE 40009
28 | #define _APS_NEXT_CONTROL_VALUE 1001
29 | #define _APS_NEXT_SYMED_VALUE 101
30 | #endif
31 | #endif
32 |
--------------------------------------------------------------------------------
/drawstuff/textures/checkered.ppm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/drawstuff/textures/checkered.ppm
--------------------------------------------------------------------------------
/drawstuff/textures/ground.ppm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/drawstuff/textures/ground.ppm
--------------------------------------------------------------------------------
/drawstuff/textures/sky.ppm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/drawstuff/textures/sky.ppm
--------------------------------------------------------------------------------
/drawstuff/textures/wood.ppm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/drawstuff/textures/wood.ppm
--------------------------------------------------------------------------------
/include/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = ode drawstuff
2 |
--------------------------------------------------------------------------------
/include/drawstuff/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_HEADERS = drawstuff.h version.h
2 |
3 |
--------------------------------------------------------------------------------
/include/drawstuff/version.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | * *
3 | * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 | * All rights reserved. Email: russ@q12.org Web: www.q12.org *
5 | * *
6 | * This library is free software; you can redistribute it and/or *
7 | * modify it under the terms of EITHER: *
8 | * (1) The GNU Lesser General Public License as published by the Free *
9 | * Software Foundation; either version 2.1 of the License, or (at *
10 | * your option) any later version. The text of the GNU Lesser *
11 | * General Public License is included with this library in the *
12 | * file LICENSE.TXT. *
13 | * (2) The BSD-style license that is included with this library in *
14 | * the file LICENSE-BSD.TXT. *
15 | * *
16 | * This library is distributed in the hope that it will be useful, *
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 | * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
20 | * *
21 | *************************************************************************/
22 |
23 | #ifndef __VERSION_H
24 | #define __VERSION_H
25 |
26 | /* high byte is major version, low byte is minor version */
27 | #define DS_VERSION 0x0002
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/include/ode/Makefile.am:
--------------------------------------------------------------------------------
1 | libode_la_includedir = $(includedir)/ode
2 | libode_la_include_HEADERS = \
3 | collision.h \
4 | collision_space.h \
5 | collision_trimesh.h \
6 | common.h \
7 | compatibility.h \
8 | contact.h \
9 | cooperative.h \
10 | error.h \
11 | export-dif.h \
12 | mass.h \
13 | matrix.h matrix_coop.h \
14 | memory.h \
15 | misc.h \
16 | objects.h \
17 | ode.h \
18 | odeconfig.h \
19 | odecpp.h \
20 | odecpp_collision.h \
21 | odeinit.h \
22 | odemath.h \
23 | odemath_legacy.h \
24 | rotation.h \
25 | threading.h \
26 | threading_impl.h \
27 | timer.h
28 |
29 |
30 | EXTRA_DIST = README precision.h.in version.h.in
31 |
32 | dist_libode_la_include_HEADERS = precision.h version.h
33 |
34 |
35 |
--------------------------------------------------------------------------------
/include/ode/README:
--------------------------------------------------------------------------------
1 |
2 | this is the public C interface to the ODE library.
3 |
4 | all these files should be includable from C, i.e. they should not use any
5 | C++ features. everything should be protected with
6 |
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 |
11 | ...
12 |
13 | #ifdef __cplusplus
14 | }
15 | #endif
16 |
17 | the only exceptions are the odecpp.h and odecpp_collisioh.h files, which define a C++ wrapper for
18 | the C interface. remember to keep this in sync!
19 |
--------------------------------------------------------------------------------
/include/ode/export-dif.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | * *
3 | * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 | * All rights reserved. Email: russ@q12.org Web: www.q12.org *
5 | * *
6 | * This library is free software; you can redistribute it and/or *
7 | * modify it under the terms of EITHER: *
8 | * (1) The GNU Lesser General Public License as published by the Free *
9 | * Software Foundation; either version 2.1 of the License, or (at *
10 | * your option) any later version. The text of the GNU Lesser *
11 | * General Public License is included with this library in the *
12 | * file LICENSE.TXT. *
13 | * (2) The BSD-style license that is included with this library in *
14 | * the file LICENSE-BSD.TXT. *
15 | * *
16 | * This library is distributed in the hope that it will be useful, *
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 | * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
20 | * *
21 | *************************************************************************/
22 |
23 | #ifndef _ODE_EXPORT_DIF_
24 | #define _ODE_EXPORT_DIF_
25 |
26 | #include
27 |
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif
32 |
33 | ODE_API void dWorldExportDIF (dWorldID w, FILE *file, const char *world_name);
34 |
35 |
36 | #ifdef __cplusplus
37 | }
38 | #endif
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/include/ode/precision.h.in:
--------------------------------------------------------------------------------
1 | #ifndef _ODE_PRECISION_H_
2 | #define _ODE_PRECISION_H_
3 |
4 | /* Define dSINGLE for single precision, dDOUBLE for double precision,
5 | * but never both!
6 | */
7 |
8 | #if defined(dIDESINGLE)
9 | #define dSINGLE
10 | #elif defined(dIDEDOUBLE)
11 | #define dDOUBLE
12 | #else
13 | #define @ODE_PRECISION@
14 | #endif
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/include/ode/version.h.in:
--------------------------------------------------------------------------------
1 | #ifndef _ODE_VERSION_H_
2 | #define _ODE_VERSION_H_
3 |
4 | #define dODE_VERSION "@ODE_VERSION@"
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/libccd/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = src
2 |
3 | EXTRA_DIST = \
4 | bootstrap \
5 | BSD-LICENSE \
6 | README
7 |
--------------------------------------------------------------------------------
/libccd/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # on Mac libtoolize is called glibtoolize
4 | LIBTOOLIZE=libtoolize
5 | if [ `uname -s` = Darwin ]; then
6 | LIBTOOLIZE=glibtoolize
7 | fi
8 | $LIBTOOLIZE -c --automake
9 | aclocal
10 | autoheader
11 | autoconf
12 | automake -a --foreign -c
13 |
--------------------------------------------------------------------------------
/libccd/configure.ac:
--------------------------------------------------------------------------------
1 | # -*- Autoconf -*-
2 | # Process this file with autoconf to produce a configure script.
3 |
4 | #AC_PREREQ([2.65])
5 | AC_INIT([libccd], [1.0], [danfis@danfis.cz])
6 | AC_CONFIG_SRCDIR([src/ccd.c])
7 | AC_CONFIG_HEADERS([src/config.h])
8 | AM_INIT_AUTOMAKE(foreign)
9 |
10 | # Checks for programs.
11 | AC_PROG_CXX
12 | AC_PROG_CC
13 | AC_PROG_INSTALL
14 | AC_DISABLE_SHARED
15 | LT_INIT
16 |
17 | # Checks for libraries.
18 | AC_CHECK_LIB([m], [main])
19 | # FIXME: Replace `main' with a function in `-lrt':
20 | AC_CHECK_LIB([rt], [main])
21 |
22 | # Checks for header files.
23 | AC_CHECK_HEADERS([float.h stdlib.h string.h unistd.h])
24 |
25 | # Checks for typedefs, structures, and compiler characteristics.
26 | AC_TYPE_SIZE_T
27 |
28 | # Checks for library functions.
29 | AC_FUNC_FORK
30 | AC_CHECK_FUNCS([clock_gettime])
31 |
32 | AC_ARG_VAR([CCD_FPUARCH_FLAGS], [FPU Architecture Flags])
33 | CFLAGS="$CCD_FPUARCH_FLAGS $CFLAGS"
34 | CXXFLAGS="$CCD_FPUARCH_FLAGS $CXXFLAGS"
35 |
36 | use_double=no
37 | AC_ARG_ENABLE(double-precision,
38 | AS_HELP_STRING([--enable-double-precision],
39 | [enable double precision computations instead of single precision]),
40 | [use_double=$enableval])
41 | if test x$use_double = xno
42 | then
43 | CCD_PRECISION=CCD_SINGLE
44 | else
45 | CCD_PRECISION=CCD_DOUBLE
46 | fi
47 | AC_SUBST(CCD_PRECISION)
48 |
49 | AC_CONFIG_FILES([Makefile
50 | src/Makefile
51 | src/ccd/precision.h
52 | src/testsuites/Makefile
53 | src/testsuites/cu/Makefile])
54 | AC_OUTPUT
55 |
--------------------------------------------------------------------------------
/libccd/src/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = testsuites
2 |
3 | AM_CPPFLAGS = -I$(top_srcdir)/src/custom
4 | AM_CFLAGS = -std=c99
5 |
6 | noinst_LTLIBRARIES = libccd.la
7 |
8 | libccd_la_SOURCES = alloc.c ccd/alloc.h \
9 | ccd/compiler.h \
10 | ccd/dbg.h \
11 | ccd.c ccd/ccd.h \
12 | ccd/list.h \
13 | polytope.c ccd/polytope.h \
14 | ccd/quat.h custom/ccdcustom/quat.h \
15 | ccd/simplex.h \
16 | support.c ccd/support.h \
17 | vec3.c ccd/vec3.h custom/ccdcustom/vec3.h \
18 | mpr.c
19 |
20 | nodist_libccd_la_SOURCES = ccd/precision.h
21 |
22 | EXTRA_DIST = ccd/precision.h.in
23 |
--------------------------------------------------------------------------------
/libccd/src/alloc.c:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #include
19 | #include
20 |
21 | #ifdef HAVE_CONFIG_H
22 | #include "config.h"
23 | #endif
24 |
25 |
26 | void *ccdRealloc(void *ptr, size_t size)
27 | {
28 | void *ret = realloc(ptr, size);
29 | if (ret == NULL && size != 0){
30 | fprintf(stderr, "Fatal error: Allocation of memory failed!\n");
31 | fflush(stderr);
32 | exit(-1);
33 | }
34 |
35 | return ret;
36 | }
37 |
38 |
39 |
--------------------------------------------------------------------------------
/libccd/src/ccd/alloc.h:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #ifndef __CCD_ALLOC_H__
19 | #define __CCD_ALLOC_H__
20 |
21 | #include
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif /* __cplusplus */
26 |
27 | /**
28 | * Functions and macros required for memory allocation.
29 | */
30 |
31 | /* Memory allocation: */
32 | #define __CCD_ALLOC_MEMORY(type, ptr_old, size) \
33 | (type *)ccdRealloc((void *)ptr_old, (size))
34 |
35 | /** Allocate memory for one element of type. */
36 | #define CCD_ALLOC(type) \
37 | __CCD_ALLOC_MEMORY(type, NULL, sizeof(type))
38 |
39 | /** Allocate memory for array of elements of type type. */
40 | #define CCD_ALLOC_ARR(type, num_elements) \
41 | __CCD_ALLOC_MEMORY(type, NULL, sizeof(type) * (num_elements))
42 |
43 | #define CCD_REALLOC_ARR(ptr, type, num_elements) \
44 | __CCD_ALLOC_MEMORY(type, ptr, sizeof(type) * (num_elements))
45 |
46 | void *ccdRealloc(void *ptr, size_t size);
47 |
48 | #ifdef __cplusplus
49 | } /* extern "C" */
50 | #endif /* __cplusplus */
51 |
52 | #endif /* __CCD_ALLOC_H__ */
53 |
--------------------------------------------------------------------------------
/libccd/src/ccd/compiler.h:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #ifndef __CCD_COMPILER_H__
19 | #define __CCD_COMPILER_H__
20 |
21 | #include
22 |
23 | #define ccd_offsetof(TYPE, MEMBER) offsetof(TYPE, MEMBER)
24 |
25 | #define ccd_container_of(ptr, type, member) \
26 | (type *)( (char *)ptr - ccd_offsetof(type, member))
27 |
28 |
29 | /**
30 | * Marks inline function.
31 | */
32 | #ifdef __GNUC__
33 | /*# define _ccd_inline static inline __attribute__((always_inline))*/
34 | # define _ccd_inline static inline
35 | #else /* __GNUC__ */
36 | # define _ccd_inline static __inline
37 | #endif /* __GNUC__ */
38 |
39 |
40 | /**
41 | * __prefetch(x) - prefetches the cacheline at "x" for read
42 | * __prefetchw(x) - prefetches the cacheline at "x" for write
43 | */
44 | #ifdef __GNUC__
45 | # define _ccd_prefetch(x) __builtin_prefetch(x)
46 | # define _ccd_prefetchw(x) __builtin_prefetch(x,1)
47 | #else /* __GNUC__ */
48 | # define _ccd_prefetch(x) ((void)0)
49 | # define _ccd_prefetchw(x) ((void)0)
50 | #endif /* __GNUC__ */
51 |
52 |
53 | #ifdef __ICC
54 | /* disable unused parameter warning */
55 | # pragma warning(disable:869)
56 | /* disable annoying "operands are evaluated in unspecified order" warning */
57 | # pragma warning(disable:981)
58 | #endif /* __ICC */
59 |
60 | #endif /* __CCD_COMPILER_H__ */
61 |
62 |
--------------------------------------------------------------------------------
/libccd/src/ccd/dbg.h:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #ifndef __CCD_DBG_H__
19 | #define __CCD_DBG_H__
20 |
21 | /**
22 | * Some macros which can be used for printing debug info to stderr if macro
23 | * NDEBUG not defined.
24 | *
25 | * DBG_PROLOGUE can be specified as string and this string will be
26 | * prepended to output text
27 | */
28 | #ifndef NDEBUG
29 |
30 | #include
31 |
32 | #ifndef DBG_PROLOGUE
33 | # define DBG_PROLOGUE
34 | #endif
35 |
36 | # define DBG(format, ...) do { \
37 | fprintf(stderr, DBG_PROLOGUE "%s :: " format "\n", __func__, ## __VA_ARGS__); \
38 | fflush(stderr); \
39 | } while (0)
40 |
41 | # define DBG2(str) do { \
42 | fprintf(stderr, DBG_PROLOGUE "%s :: " str "\n", __func__); \
43 | fflush(stderr); \
44 | } while (0)
45 |
46 | # define DBG_VEC3(vec, prefix) do {\
47 | fprintf(stderr, DBG_PROLOGUE "%s :: %s[%lf %lf %lf]\n", \
48 | __func__, prefix, ccdVec3X(vec), ccdVec3Y(vec), ccdVec3Z(vec)); \
49 | fflush(stderr); \
50 | } while (0)
51 | /*
52 | # define DBG_VEC3(vec, prefix) do {\
53 | fprintf(stderr, DBG_PROLOGUE "%s :: %s[%.20lf %.20lf %.20lf]\n", \
54 | __func__, prefix, ccdVec3X(vec), ccdVec3Y(vec), ccdVec3Z(vec)); \
55 | fflush(stderr); \
56 | } while (0)
57 | */
58 |
59 | #else
60 | # define DBG(format, ...)
61 | # define DBG2(str)
62 | # define DBG_VEC3(v, prefix)
63 | #endif
64 |
65 | #endif /* __CCD_DBG_H__ */
66 |
--------------------------------------------------------------------------------
/libccd/src/ccd/precision.h.in:
--------------------------------------------------------------------------------
1 | #ifndef __CCD_PRECISION_H__
2 | #define __CCD_PRECISION_H__
3 |
4 | /* define either CCD_SINGLE or CCD_DOUBLE */
5 |
6 | #if defined(CCD_IDESINGLE)
7 | #define CCD_SINGLE
8 | #elif defined(CCD_IDEDOUBLE)
9 | #define CCD_DOUBLE
10 | #else
11 | #define @CCD_PRECISION@
12 | #endif
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/libccd/src/ccd/support.h:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #ifndef __CCD_SUPPORT_H__
19 | #define __CCD_SUPPORT_H__
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif /* __cplusplus */
28 |
29 | struct _ccd_support_t {
30 | ccd_vec3_t v; /*!< Support point in minkowski sum*/
31 | ccd_vec3_t v1; /*!< Support point in obj1*/
32 | ccd_vec3_t v2; /*!< Support point in obj2*/
33 | };
34 | typedef struct _ccd_support_t ccd_support_t;
35 |
36 | _ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s);
37 |
38 | /**
39 | * Computes support point of obj1 and obj2 in direction dir.
40 | * Support point is returned via supp.
41 | */
42 | void __ccdSupport(const void *obj1, const void *obj2,
43 | const ccd_vec3_t *dir, const ccd_t *ccd,
44 | ccd_support_t *supp);
45 |
46 |
47 | /**** INLINES ****/
48 | _ccd_inline void ccdSupportCopy(ccd_support_t *d, const ccd_support_t *s)
49 | {
50 | *d = *s;
51 | }
52 |
53 | #ifdef __cplusplus
54 | } /* extern "C" */
55 | #endif /* __cplusplus */
56 |
57 | #endif /* __CCD_SUPPORT_H__ */
58 |
--------------------------------------------------------------------------------
/libccd/src/support.c:
--------------------------------------------------------------------------------
1 | /***
2 | * libccd
3 | * ---------------------------------
4 | * Copyright (c)2010 Daniel Fiser
5 | *
6 | *
7 | * This file is part of libccd.
8 | *
9 | * Distributed under the OSI-approved BSD License (the "License");
10 | * see accompanying file BDS-LICENSE for details or see
11 | * .
12 | *
13 | * This software is distributed WITHOUT ANY WARRANTY; without even the
14 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 | * See the License for more information.
16 | */
17 |
18 | #include
19 |
20 | #ifdef HAVE_CONFIG_H
21 | #include "config.h"
22 | #endif
23 |
24 |
25 | void __ccdSupport(const void *obj1, const void *obj2,
26 | const ccd_vec3_t *_dir, const ccd_t *ccd,
27 | ccd_support_t *supp)
28 | {
29 | ccd_vec3_t dir;
30 |
31 | ccdVec3Copy(&dir, _dir);
32 |
33 | ccd->support1(obj1, &dir, &supp->v1);
34 |
35 | ccdVec3Scale(&dir, -CCD_ONE);
36 | ccd->support2(obj2, &dir, &supp->v2);
37 |
38 | ccdVec3Sub2(&supp->v, &supp->v1, &supp->v2);
39 | }
40 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = cu
2 |
3 | AM_CPPFLAGS = -I $(srcdir)/.. -I $(builddir)/.. -I $(srcdir)/cu
4 |
5 | LDADD = $(builddir)/cu/libcu.la $(builddir)/../libccd.la
6 |
7 |
8 | check_PROGRAMS = test bench bench2
9 |
10 | test_SOURCES = main.c \
11 | common.c common.h \
12 | support.c support.h \
13 | vec3.c vec3.h \
14 | polytope.c polytope.h \
15 | boxbox.c boxbox.h \
16 | spheresphere.c spheresphere.h \
17 | cylcyl.c cylcyl.h \
18 | boxcyl.c boxcyl.h \
19 | mpr_boxbox.c mpr_boxbox.h \
20 | mpr_cylcyl.c mpr_cylcyl.h \
21 | mpr_boxcyl.c mpr_boxcyl.h
22 |
23 | bench_SOURCES = bench.c \
24 | support.c support.h
25 |
26 | bench2_SOURCES = bench2.c \
27 | support.c support.h
28 |
29 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/boxbox.h:
--------------------------------------------------------------------------------
1 | #ifndef BOX_BOX
2 | #define BOX_BOX
3 |
4 | #include
5 |
6 | TEST(boxboxSetUp);
7 | TEST(boxboxTearDown);
8 |
9 | TEST(boxboxAlignedX);
10 | TEST(boxboxAlignedY);
11 | TEST(boxboxAlignedZ);
12 |
13 | TEST(boxboxRot);
14 |
15 | TEST(boxboxSeparate);
16 | TEST(boxboxPenetration);
17 |
18 | TEST_SUITE(TSBoxBox) {
19 | TEST_ADD(boxboxSetUp),
20 |
21 | TEST_ADD(boxboxAlignedX),
22 | TEST_ADD(boxboxAlignedY),
23 | TEST_ADD(boxboxAlignedZ),
24 | TEST_ADD(boxboxRot),
25 | TEST_ADD(boxboxSeparate),
26 | TEST_ADD(boxboxPenetration),
27 |
28 | TEST_ADD(boxboxTearDown),
29 | TEST_SUITE_CLOSURE
30 | };
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/boxcyl.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_BOXCYL_H
2 | #define TEST_BOXCYL_H
3 |
4 | #include
5 |
6 | TEST(boxcylIntersect);
7 | TEST(boxcylPenEPA);
8 |
9 | TEST_SUITE(TSBoxCyl){
10 | TEST_ADD(boxcylIntersect),
11 | TEST_ADD(boxcylPenEPA),
12 |
13 | TEST_SUITE_CLOSURE
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/common.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_COMMON
2 | #define TEST_COMMON
3 |
4 | #include
5 | #include
6 |
7 | void svtObj(void *o, FILE *out, const char *color, const char *name);
8 | void svtObjPen(void *o1, void *o2,
9 | FILE *out, const char *name,
10 | ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos);
11 | void recPen(ccd_real_t depth, const ccd_vec3_t *dir, const ccd_vec3_t *pos,
12 | FILE *out, const char *note);
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/cu/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -DCU_ENABLE_TIMER
2 |
3 | check_LTLIBRARIES = libcu.la
4 |
5 | libcu_la_SOURCES = cu.c cu.h
6 |
7 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/cu/latest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | repo=http://git.danfis.cz/cu.git
4 | files="COPYING \
5 | COPYING.LESSER \
6 | cu.h \
7 | cu.c \
8 | Makefile \
9 | check-regressions \
10 | .gitignore \
11 | "
12 | rm -rf cu
13 | git clone $repo
14 | for file in $files; do
15 | mv cu/"$file" .
16 | done;
17 | rm -rf cu
18 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/cylcyl.h:
--------------------------------------------------------------------------------
1 | #ifndef CYL_CYL
2 | #define CYL_CYL
3 |
4 | #include
5 |
6 | TEST(cylcylSetUp);
7 | TEST(cylcylTearDown);
8 |
9 | TEST(cylcylAlignedX);
10 | TEST(cylcylAlignedY);
11 | TEST(cylcylAlignedZ);
12 |
13 | TEST(cylcylPenetrationEPA);
14 |
15 | TEST_SUITE(TSCylCyl) {
16 | TEST_ADD(cylcylSetUp),
17 |
18 | TEST_ADD(cylcylAlignedX),
19 | TEST_ADD(cylcylAlignedY),
20 | TEST_ADD(cylcylAlignedZ),
21 |
22 | TEST_ADD(cylcylPenetrationEPA),
23 |
24 | TEST_ADD(cylcylTearDown),
25 | TEST_SUITE_CLOSURE
26 | };
27 |
28 | #endif
29 |
30 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/main.c:
--------------------------------------------------------------------------------
1 | #include "vec3.h"
2 | #include "polytope.h"
3 | #include "boxbox.h"
4 | #include "spheresphere.h"
5 | #include "cylcyl.h"
6 | #include "boxcyl.h"
7 |
8 | #include "mpr_boxbox.h"
9 | #include "mpr_cylcyl.h"
10 | #include "mpr_boxcyl.h"
11 |
12 | TEST_SUITES {
13 | TEST_SUITE_ADD(TSVec3),
14 | TEST_SUITE_ADD(TSPt),
15 | TEST_SUITE_ADD(TSBoxBox),
16 | TEST_SUITE_ADD(TSSphereSphere),
17 | TEST_SUITE_ADD(TSCylCyl),
18 | TEST_SUITE_ADD(TSBoxCyl),
19 |
20 | TEST_SUITE_ADD(TSMPRBoxBox),
21 | TEST_SUITE_ADD(TSMPRCylCyl),
22 | TEST_SUITE_ADD(TSMPRBoxCyl),
23 |
24 | TEST_SUITES_CLOSURE
25 | };
26 | int main(int argc, char *argv[])
27 | {
28 | CU_SET_OUT_PREFIX("regressions/");
29 | CU_RUN(argc, argv);
30 |
31 | return 0;
32 | }
33 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/mpr_boxbox.h:
--------------------------------------------------------------------------------
1 | #ifndef MPR_BOX_BOX
2 | #define MPR_BOX_BOX
3 |
4 | #include
5 |
6 | TEST(mprBoxboxAlignedX);
7 | TEST(mprBoxboxAlignedY);
8 | TEST(mprBoxboxAlignedZ);
9 |
10 | TEST(mprBoxboxRot);
11 |
12 | TEST(mprBoxboxSeparate);
13 | TEST(mprBoxboxPenetration);
14 |
15 | TEST_SUITE(TSMPRBoxBox) {
16 | TEST_ADD(mprBoxboxAlignedX),
17 | TEST_ADD(mprBoxboxAlignedY),
18 | TEST_ADD(mprBoxboxAlignedZ),
19 | TEST_ADD(mprBoxboxRot),
20 | //TEST_ADD(mprBoxboxSeparate),
21 | TEST_ADD(mprBoxboxPenetration),
22 |
23 | TEST_SUITE_CLOSURE
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/mpr_boxcyl.h:
--------------------------------------------------------------------------------
1 | #ifndef MPR_TEST_BOXCYL_H
2 | #define MPR_TEST_BOXCYL_H
3 |
4 | #include
5 |
6 | TEST(mprBoxcylIntersect);
7 | TEST(mprBoxcylPen);
8 |
9 | TEST_SUITE(TSMPRBoxCyl){
10 | TEST_ADD(mprBoxcylIntersect),
11 | TEST_ADD(mprBoxcylPen),
12 |
13 | TEST_SUITE_CLOSURE
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/mpr_cylcyl.h:
--------------------------------------------------------------------------------
1 | #ifndef MPR_CYL_CYL
2 | #define MPR_CYL_CYL
3 |
4 | #include
5 |
6 | TEST(mprCylcylAlignedX);
7 | TEST(mprCylcylAlignedY);
8 | TEST(mprCylcylAlignedZ);
9 |
10 | TEST(mprCylcylPenetration);
11 |
12 | TEST_SUITE(TSMPRCylCyl) {
13 | TEST_ADD(mprCylcylAlignedX),
14 | TEST_ADD(mprCylcylAlignedY),
15 | TEST_ADD(mprCylcylAlignedZ),
16 |
17 | TEST_ADD(mprCylcylPenetration),
18 |
19 | TEST_SUITE_CLOSURE
20 | };
21 |
22 | #endif
23 |
24 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/polytope.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_POLYTOPE_H
2 | #define TEST_POLYTOPE_H
3 |
4 | #include
5 |
6 | TEST(ptSetUp);
7 | TEST(ptTearDown);
8 |
9 | TEST(ptCreate1);
10 | TEST(ptCreate2);
11 | TEST(ptNearest);
12 |
13 | TEST_SUITE(TSPt) {
14 | TEST_ADD(ptSetUp),
15 |
16 | TEST_ADD(ptCreate1),
17 | TEST_ADD(ptCreate2),
18 | TEST_ADD(ptNearest),
19 |
20 | TEST_ADD(ptTearDown),
21 | TEST_SUITE_CLOSURE
22 | };
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSBoxBox.err:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ---- boxboxSeparate ----
5 |
6 |
7 |
8 |
9 |
10 | ---- boxboxPenetration ----
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSBoxBox.out:
--------------------------------------------------------------------------------
1 | # box1.pos: [-0.500000 0.000000 0.000000]
2 | # box1->quat: [0.000000 0.000000 0.382683 0.923880]
3 | # box2->pos: [0.000000 0.000000 0.000000]
4 | # box2->quat: [0.000000 0.000000 0.000000 1.000000]
5 | # sep: [0.707107 0.000000 0.000000]
6 | #
7 | # box1.pos: [-0.500000 0.100000 0.400000]
8 | # box1->quat: [0.000000 0.270598 0.270598 0.923880]
9 | # box2->pos: [0.000000 0.000000 0.000000]
10 | # box2->quat: [0.000000 0.000000 0.000000 1.000000]
11 | # sep: [0.633939 0.000000 -0.371353]
12 | #
13 | # Pen 1: depth: 0.650000
14 | # Pen 1: dir: [1.000000 0.000000 0.000000]
15 | # Pen 1: pos: [0.096875 0.000000 0.000000]
16 | #
17 | # Pen 2: depth: 0.250000
18 | # Pen 2: dir: [-0.000000 0.000000 -1.000000]
19 | # Pen 2: pos: [-0.058333 0.250000 0.583333]
20 | #
21 | # Pen 3: depth: 0.900000
22 | # Pen 3: dir: [0.000000 0.000000 -1.000000]
23 | # Pen 3: pos: [0.111506 0.000000 0.050000]
24 | #
25 | # Pen 4: depth: 0.607107
26 | # Pen 4: dir: [1.000000 0.000000 0.000000]
27 | # Pen 4: pos: [-0.153585 0.000000 0.000000]
28 | #
29 | # Pen 5: depth: 0.429289
30 | # Pen 5: dir: [0.707107 -0.707107 0.000000]
31 | # Pen 5: pos: [-0.167157 0.379289 0.000000]
32 | #
33 | # Pen 6: depth: 0.648412
34 | # Pen 6: dir: [0.862856 0.000000 -0.505449]
35 | # Pen 6: pos: [-0.148223 0.055362 0.319638]
36 | #
37 | # Pen 7: depth: 0.622622
38 | # Pen 7: dir: [1.000000 0.000000 -0.000000]
39 | # Pen 7: pos: [-0.095997 0.063593 0.067678]
40 | #
41 | # Pen 8: depth: 0.053553
42 | # Pen 8: dir: [1.000000 0.000000 0.000000]
43 | # Pen 8: pos: [-0.523223 -0.073223 0.020711]
44 | #
45 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSBoxCyl.out:
--------------------------------------------------------------------------------
1 | # Pen 1: depth: 0.549996
2 | # Pen 1: dir: [0.999992 -0.003902 0.000000]
3 | # Pen 1: pos: [0.020284 0.000000 0.000000]
4 | #
5 | # Pen 2: depth: 0.050000
6 | # Pen 2: dir: [0.999992 -0.003902 0.000000]
7 | # Pen 2: pos: [0.253480 0.000000 0.025000]
8 | #
9 | # Pen 3: depth: 0.030994
10 | # Pen 3: dir: [0.950248 0.311493 0.000000]
11 | # Pen 3: pos: [0.246546 0.420744 0.000000]
12 | #
13 | # Pen 4: depth: 0.033436
14 | # Pen 4: dir: [0.976101 0.217308 0.001900]
15 | # Pen 4: pos: [0.243648 0.480401 0.450000]
16 | #
17 | # Pen 5: depth: 0.142160
18 | # Pen 5: dir: [0.968442 0.249235 0.001146]
19 | # Pen 5: pos: [0.190887 0.421462 0.605496]
20 | #
21 | # Pen 6: depth: 0.179282
22 | # Pen 6: dir: [0.999995 0.001057 0.002913]
23 | # Pen 6: pos: [0.176026 0.036944 0.488189]
24 | #
25 | # Pen 7: depth: 0.750000
26 | # Pen 7: dir: [-0.853795 -0.143509 -0.500438]
27 | # Pen 7: pos: [0.572744 0.014828 0.562324]
28 | #
29 | # Pen 8: depth: 0.142666
30 | # Pen 8: dir: [-0.475515 -0.841074 0.257839]
31 | # Pen 8: pos: [0.824886 0.230213 0.463136]
32 | #
33 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSCylCyl.err:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ---- cylcylPenetration ----
5 |
6 |
7 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSCylCyl.out:
--------------------------------------------------------------------------------
1 | # Pen 1: depth: 0.750000
2 | # Pen 1: dir: [0.000000 0.000000 1.000000]
3 | # Pen 1: pos: [0.004079 -0.012238 0.009615]
4 | #
5 | # Pen 2: depth: 0.531931
6 | # Pen 2: dir: [-0.926428 -0.376463 -0.002666]
7 | # Pen 2: pos: [0.218566 0.072232 0.025000]
8 | #
9 | # Pen 3: depth: 0.645740
10 | # Pen 3: dir: [-0.500000 -0.146447 -0.853553]
11 | # Pen 3: pos: [0.177594 0.070484 0.186987]
12 | #
13 | # Pen 4: depth: 0.104445
14 | # Pen 4: dir: [-0.482095 0.866317 0.130685]
15 | # Pen 4: pos: [0.123724 0.348390 0.269312]
16 | #
17 | # Pen 5: depth: 0.093082
18 | # Pen 5: dir: [0.034600 -0.999228 -0.018627]
19 | # Pen 5: pos: [0.311257 -0.203923 -0.064270]
20 | #
21 | # Pen 6: depth: 0.198749
22 | # Pen 6: dir: [0.411370 -0.911372 0.013223]
23 | # Pen 6: pos: [0.405836 -0.130066 0.121441]
24 | #
25 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSMPRBoxBox.err:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ---- boxboxPenetration ----
5 |
6 |
7 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSMPRBoxBox.out:
--------------------------------------------------------------------------------
1 | # Pen 1: depth: 0.650000
2 | # Pen 1: dir: [1.000000 0.000000 0.000000]
3 | # Pen 1: pos: [0.175000 0.000000 0.000000]
4 | #
5 | # Pen 2: depth: 0.250000
6 | # Pen 2: dir: [-0.000000 0.000000 -1.000000]
7 | # Pen 2: pos: [-0.033333 0.250000 0.600000]
8 | #
9 | # Pen 3: depth: 0.900000
10 | # Pen 3: dir: [0.000000 0.000000 -1.000000]
11 | # Pen 3: pos: [0.100000 0.000000 0.050000]
12 | #
13 | # Pen 4: depth: 0.607107
14 | # Pen 4: dir: [1.000000 0.000000 0.000000]
15 | # Pen 4: pos: [-0.096447 0.000000 0.000000]
16 | #
17 | # Pen 5: depth: 0.429289
18 | # Pen 5: dir: [0.707107 -0.707107 0.000000]
19 | # Pen 5: pos: [-0.222183 0.322183 0.000000]
20 | #
21 | # Pen 6: depth: 0.648412
22 | # Pen 6: dir: [0.862856 -0.000000 -0.505449]
23 | # Pen 6: pos: [-0.163060 0.012676 0.263060]
24 | #
25 | # Pen 7: depth: 0.622928
26 | # Pen 7: dir: [0.999509 0.028016 -0.014008]
27 | # Pen 7: pos: [-0.145374 0.170833 0.176732]
28 | #
29 | # Pen 8: depth: 0.053553
30 | # Pen 8: dir: [1.000000 0.000000 0.000000]
31 | # Pen 8: pos: [-0.480217 -0.140652 0.000000]
32 | #
33 | # Pen 9: depth: 0.020000
34 | # Pen 9: dir: [0.000000 1.000000 0.000000]
35 | # Pen 9: pos: [0.000000 0.490000 0.000000]
36 | #
37 | # Pen 10: depth: 0.012000
38 | # Pen 10: dir: [-0.000000 1.000000 0.000000]
39 | # Pen 10: pos: [0.200000 0.492000 0.000000]
40 | #
41 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSMPRBoxCyl.out:
--------------------------------------------------------------------------------
1 | # Pen 1: depth: 0.550000
2 | # Pen 1: dir: [1.000000 0.000000 0.000000]
3 | # Pen 1: pos: [-0.025000 0.000000 0.000000]
4 | #
5 | # Pen 2: depth: 0.050000
6 | # Pen 2: dir: [1.000000 0.000000 0.000000]
7 | # Pen 2: pos: [0.225000 0.000000 0.000000]
8 | #
9 | # Pen 3: depth: 0.038532
10 | # Pen 3: dir: [0.788956 0.614450 -0.000000]
11 | # Pen 3: pos: [0.238587 0.477175 0.000000]
12 | #
13 | # Pen 4: depth: 0.038654
14 | # Pen 4: dir: [0.779134 0.626832 -0.005696]
15 | # Pen 4: pos: [0.238603 0.477206 0.340909]
16 | #
17 | # Pen 5: depth: 0.166653
18 | # Pen 5: dir: [0.734126 0.679013 -0.000000]
19 | # Pen 5: pos: [0.208320 0.416640 0.595113]
20 | #
21 | # Pen 6: depth: 0.180673
22 | # Pen 6: dir: [1.000000 0.000003 -0.000000]
23 | # Pen 6: pos: [0.192142 0.009404 0.479162]
24 | #
25 | # Pen 7: depth: 0.771410
26 | # Pen 7: dir: [-0.922598 -0.242256 -0.300208]
27 | # Pen 7: pos: [0.600000 0.000000 0.500000]
28 | #
29 | # Pen 8: depth: 0.142813
30 | # Pen 8: dir: [-0.476782 -0.840534 0.257259]
31 | # Pen 8: pos: [0.776128 0.285646 0.436629]
32 | #
33 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSMPRCylCyl.err:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ---- mprCylcylPenetration ----
5 |
6 |
7 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSMPRCylCyl.out:
--------------------------------------------------------------------------------
1 | # Pen 1: depth: 0.450000
2 | # Pen 1: dir: [0.000000 0.000000 1.000000]
3 | # Pen 1: pos: [0.000000 0.000000 0.025000]
4 | #
5 | # Pen 2: depth: 0.533732
6 | # Pen 2: dir: [-0.952492 -0.304562 0.000000]
7 | # Pen 2: pos: [0.176471 0.058824 0.166667]
8 | #
9 | # Pen 3: depth: 0.720933
10 | # Pen 3: dir: [-0.947406 -0.320033 0.000085]
11 | # Pen 3: pos: [0.198747 0.066309 0.050800]
12 | #
13 | # Pen 4: depth: 0.106076
14 | # Pen 4: dir: [-0.524820 0.835278 0.163936]
15 | # Pen 4: pos: [0.138692 0.362418 0.320024]
16 | #
17 | # Pen 5: depth: 0.103863
18 | # Pen 5: dir: [0.291494 -0.956567 -0.003314]
19 | # Pen 5: pos: [0.337721 -0.209314 -0.094587]
20 | #
21 | # Pen 6: depth: 0.202625
22 | # Pen 6: dir: [0.347225 -0.937782 -0.000000]
23 | # Pen 6: pos: [0.399554 -0.164780 0.199941]
24 | #
25 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/regressions/TSPt.err:
--------------------------------------------------------------------------------
1 | ptCreate1 :: ------
2 | ptCreate1 :: e[0]->dist: 0.200000
3 | ptCreate1 :: ->witness: [0.200000 -0.400000 0.000000]
4 | ptCreate1 :: e[1]->dist: 0.500000
5 | ptCreate1 :: ->witness: [0.500000 0.000000 0.500000]
6 | ptCreate1 :: e[2]->dist: 0.666667
7 | ptCreate1 :: ->witness: [-0.333333 -0.333333 0.666667]
8 | ptCreate1 :: f->dist: 0.166667
9 | ptCreate1 :: ->witness: [0.166667 -0.333333 0.166667]
10 | ptCreate2 :: ------
11 | ptCreate2 :: v[0]->dist: 2.000000
12 | ptCreate2 :: ->witness: [-1.000000 -1.000000 0.000000]
13 | ptCreate2 :: v[1]->dist: 1.000000
14 | ptCreate2 :: ->witness: [1.000000 0.000000 0.000000]
15 | ptCreate2 :: v[2]->dist: 1.000000
16 | ptCreate2 :: ->witness: [0.000000 0.000000 1.000000]
17 | ptCreate2 :: v[3]->dist: 1.000000
18 | ptCreate2 :: ->witness: [0.000000 1.000000 0.000000]
19 | ptCreate2 :: e[0]->dist: 0.200000
20 | ptCreate2 :: ->witness: [0.200000 -0.400000 0.000000]
21 | ptCreate2 :: e[1]->dist: 0.500000
22 | ptCreate2 :: ->witness: [0.500000 0.000000 0.500000]
23 | ptCreate2 :: e[2]->dist: 0.666667
24 | ptCreate2 :: ->witness: [-0.333333 -0.333333 0.666667]
25 | ptCreate2 :: e[3]->dist: 0.200000
26 | ptCreate2 :: ->witness: [-0.400000 0.200000 0.000000]
27 | ptCreate2 :: e[4]->dist: 0.500000
28 | ptCreate2 :: ->witness: [0.500000 0.500000 0.000000]
29 | ptCreate2 :: e[5]->dist: 0.500000
30 | ptCreate2 :: ->witness: [0.000000 0.500000 0.500000]
31 | ptCreate2 :: f[0]->dist: 0.166667
32 | ptCreate2 :: ->witness: [0.166667 -0.333333 0.166667]
33 | ptCreate2 :: f[1]->dist: 0.000000
34 | ptCreate2 :: ->witness: [0.000000 0.000000 0.000000]
35 | ptCreate2 :: f[2]->dist: 0.333333
36 | ptCreate2 :: ->witness: [0.333333 0.333333 0.333333]
37 | ptCreate2 :: f[3]->dist: 0.166667
38 | ptCreate2 :: ->witness: [-0.333333 0.166667 0.166667]
39 | ptNearest :: ------
40 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/spheresphere.h:
--------------------------------------------------------------------------------
1 | #ifndef SPHERE_SPHERE
2 | #define SPHERE_SPHERE
3 |
4 | #include
5 |
6 | TEST(spheresphereSetUp);
7 | TEST(spheresphereTearDown);
8 |
9 | TEST(spheresphereAlignedX);
10 | TEST(spheresphereAlignedY);
11 | TEST(spheresphereAlignedZ);
12 |
13 | TEST_SUITE(TSSphereSphere) {
14 | TEST_ADD(spheresphereSetUp),
15 |
16 | TEST_ADD(spheresphereAlignedX),
17 | TEST_ADD(spheresphereAlignedY),
18 | TEST_ADD(spheresphereAlignedZ),
19 |
20 | TEST_ADD(spheresphereTearDown),
21 | TEST_SUITE_CLOSURE
22 | };
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/libccd/src/testsuites/vec3.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_VEC3_H
2 | #define TEST_VEC3_H
3 |
4 | #include
5 |
6 | TEST(vec3SetUp);
7 | TEST(vec3TearDown);
8 | TEST(vec3PointSegmentDist);
9 | TEST(vec3PointTriDist);
10 |
11 | TEST_SUITE(TSVec3) {
12 | TEST_ADD(vec3SetUp),
13 |
14 | TEST_ADD(vec3PointSegmentDist),
15 | TEST_ADD(vec3PointTriDist),
16 |
17 | TEST_ADD(vec3TearDown),
18 | TEST_SUITE_CLOSURE
19 | };
20 | #endif
21 |
--------------------------------------------------------------------------------
/ode-config.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | prefix=@prefix@
4 | exec_prefix=@exec_prefix@
5 | exec_prefix_set=no
6 |
7 | usage="\
8 | Usage: ode-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
9 |
10 | if test $# -eq 0; then
11 | echo "${usage}" 1>&2
12 | exit 1
13 | fi
14 |
15 | while test $# -gt 0; do
16 | case "$1" in
17 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
18 | *) optarg= ;;
19 | esac
20 |
21 | case $1 in
22 | --prefix=*)
23 | prefix=$optarg
24 | if test $exec_prefix_set = no ; then
25 | exec_prefix=$optarg
26 | fi
27 | ;;
28 | --prefix)
29 | echo $prefix
30 | ;;
31 | --exec-prefix=*)
32 | exec_prefix=$optarg
33 | exec_prefix_set=yes
34 | ;;
35 | --exec-prefix)
36 | echo $exec_prefix
37 | ;;
38 | --version)
39 | echo @ODE_VERSION@
40 | ;;
41 | --cflags)
42 | echo -I@includedir@
43 | ;;
44 | --libs)
45 | echo -L@libdir@ -lode
46 | ;;
47 | *)
48 | echo "${usage}" 1>&2
49 | exit 1
50 | ;;
51 | esac
52 | shift
53 | done
54 |
--------------------------------------------------------------------------------
/ode.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 | precision=@ODE_PRECISION@
6 |
7 | Name: ode
8 | Description: Open Dynamics Engine
9 | Version: @ODE_VERSION@
10 | Libs: -L${libdir} -lode
11 | Libs.private: -lstdc++ -lm
12 | Cflags: -I${includedir}
13 |
--------------------------------------------------------------------------------
/ode/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = src doc
2 | if ENABLE_DEMOS
3 | SUBDIRS += demo
4 | endif
5 |
6 | #EXTRA_DIST = doc
7 |
--------------------------------------------------------------------------------
/ode/demo/convex_prism.h:
--------------------------------------------------------------------------------
1 | unsigned int prism_pointcount = 8;
2 | unsigned int prism_planecount = 6;
3 | dReal prism_points[24]={
4 | 10.0, 1.0,-1.0,
5 | 10.0,-1.0,-1.0,
6 | -10.0,-1.0,-1.0,
7 | -10.0, 1.0,-1.0,
8 | 10.0, 1.0, 1.0,
9 | 10.0,-1.0, 1.0,
10 | -10.0,-1.0, 1.0,
11 | -10.0, 1.0, 1.0
12 | };
13 | unsigned int prism_polygons[]={
14 | 4,0,1,2,3,
15 | 4,4,7,6,5,
16 | 4,0,4,5,1,
17 | 4,1,5,6,2,
18 | 4,2,6,7,3,
19 | 4,4,0,3,7,
20 | };
21 | dReal prism_planes[]={
22 | 0.0,0.0,-1.0,1.0,
23 | 0.0,0.0,1.0,1.0,
24 | 1.0,0.0,0.0,10.0,
25 | 0.0,-1.0,0.0,1.0,
26 | -1.0,0.0,-0.0,10.0,
27 | 0.0,1.0,0.0,1.0,
28 | };
29 |
--------------------------------------------------------------------------------
/ode/demo/texturepath.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | * *
3 | * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 | * All rights reserved. Email: russ@q12.org Web: www.q12.org *
5 | * *
6 | * This library is free software; you can redistribute it and/or *
7 | * modify it under the terms of EITHER: *
8 | * (1) The GNU Lesser General Public License as published by the Free *
9 | * Software Foundation; either version 2.1 of the License, or (at *
10 | * your option) any later version. The text of the GNU Lesser *
11 | * General Public License is included with this library in the *
12 | * file LICENSE.TXT. *
13 | * (2) The BSD-style license that is included with this library in *
14 | * the file LICENSE-BSD.TXT. *
15 | * *
16 | * This library is distributed in the hope that it will be useful, *
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 | * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
20 | * *
21 | *************************************************************************/
22 |
23 | #ifndef DRAWSTUFF_TEXTURE_PATH
24 | #define DRAWSTUFF_TEXTURE_PATH "../../drawstuff/textures"
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/ode/doc/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = Doxyfile.in main.dox pix
2 |
3 | if HAVE_DOXYGEN
4 |
5 | mostlyclean-local:
6 | rm -rf html
7 |
8 | html-local: Doxyfile
9 | $(DOXYGEN) Doxyfile
10 |
11 | endif
12 |
--------------------------------------------------------------------------------
/ode/doc/main.dox:
--------------------------------------------------------------------------------
1 | /**
2 | @mainpage Open Dynamics Engine API Reference
3 |
4 | This document is © Russell Smith and the ODE Project
5 |
6 | The Open Dynamics Engine (ODE) is a free, industrial quality library for
7 | simulating articulated rigid body dynamics. ODE is being developed by
8 | Russell Smith with help from several
9 | contributors.
10 |
11 | This document describes the library API. For a more general introduction
12 | to ODE, please see the
13 | Online Handbook.
14 |
15 | Important: this document is not yet complete!
16 |
17 | We are still working on getting the full API documentated. In the meantime,
18 | please refer to the
19 | Online Handbook
20 |
21 | */
22 |
23 |
--------------------------------------------------------------------------------
/ode/doc/pix/amotor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/amotor.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/ball-and-socket-bad.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/ball-and-socket-bad.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/ball-and-socket.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/ball-and-socket.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/body.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/body.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/contact.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/contact.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/hinge.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/hinge.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/hinge2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/hinge2.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/joints.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/joints.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/rollingcontact.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/rollingcontact.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/sf-graph1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/sf-graph1.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/sf-graph2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/sf-graph2.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/slider.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/slider.jpg
--------------------------------------------------------------------------------
/ode/doc/pix/universal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/ode/doc/pix/universal.jpg
--------------------------------------------------------------------------------
/ode/src/collision_transform.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | * *
3 | * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 | * All rights reserved. Email: russ@q12.org Web: www.q12.org *
5 | * *
6 | * This library is free software; you can redistribute it and/or *
7 | * modify it under the terms of EITHER: *
8 | * (1) The GNU Lesser General Public License as published by the Free *
9 | * Software Foundation; either version 2.1 of the License, or (at *
10 | * your option) any later version. The text of the GNU Lesser *
11 | * General Public License is included with this library in the *
12 | * file LICENSE.TXT. *
13 | * (2) The BSD-style license that is included with this library in *
14 | * the file LICENSE-BSD.TXT. *
15 | * *
16 | * This library is distributed in the hope that it will be useful, *
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
19 | * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
20 | * *
21 | *************************************************************************/
22 |
23 | /*
24 |
25 | geom transform
26 |
27 | */
28 |
29 | #ifndef _ODE_COLLISION_TRANSFORM_H_
30 | #define _ODE_COLLISION_TRANSFORM_H_
31 |
32 | #include
33 | #include "collision_kernel.h"
34 |
35 |
36 | int dCollideTransform (dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, int skip);
37 |
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/ode/src/joints/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(top_srcdir)/include \
2 | -I$(top_builddir)/include \
3 | -I$(top_srcdir)/ode/src \
4 | -D__ODE__
5 |
6 |
7 | if ENABLE_OU
8 |
9 | AM_CPPFLAGS += -I$(top_srcdir)/ou/include
10 |
11 |
12 | endif
13 |
14 |
15 | noinst_LTLIBRARIES = libjoints.la
16 |
17 | libjoints_la_SOURCES = joints.h \
18 | joint.h joint.cpp \
19 | joint_internal.h \
20 | ball.h ball.cpp \
21 | dball.h dball.cpp \
22 | dhinge.h dhinge.cpp \
23 | transmission.h transmission.cpp \
24 | hinge.h hinge.cpp \
25 | slider.h slider.cpp \
26 | contact.h contact.cpp \
27 | universal.h universal.cpp \
28 | hinge2.h hinge2.cpp \
29 | fixed.h fixed.cpp \
30 | null.h null.cpp \
31 | amotor.h amotor.cpp \
32 | lmotor.h lmotor.cpp \
33 | plane2d.h plane2d.cpp \
34 | pu.h pu.cpp \
35 | pr.h pr.cpp \
36 | piston.h piston.cpp
37 |
38 |
--------------------------------------------------------------------------------
/ou/CHANGELOG.TXT:
--------------------------------------------------------------------------------
1 | =======================
2 | Legend
3 | =======================
4 | [+] A feature added
5 | [-] A bug fixed
6 | [*] A change
7 | [!] An important note
8 | =======================
9 |
10 | 2015/12/28 oleh_derevenko
11 |
12 | [*] Atomics assembler implementation has been improved and enabled for
13 | GCC and _OU_TARGET_ARCH_X86/_OU_TARGET_ARCH_X64 with _OU_TARGET_OS_GENUNIX
14 |
15 | 2010/04/24 oleh_derevenko
16 |
17 | [+] A cast operator to non-const reference of contained type added for
18 | CTypeSimpleWrapper.
19 |
20 | 2009/10/07 oleh_derevenko
21 |
22 | [-] Tests corrected to avoid checking int64ou alignment on Macs
23 | (just like for uint64ou)
24 |
25 | 2009/09/08 oleh_derevenko
26 |
27 | [-] Enumerated type increment/decrement operators re-implemented in a way that
28 | can't produce bad code with modern GCCs due to aliasing rules violation.
29 |
30 | 2008/06/26 oleh_derevenko
31 |
32 | [+] --disable-asserts option support added for configure.
33 |
34 | 2008/04/19 oleh_derevenko
35 |
36 | [+] Atomic functions via i486 assembler implementation added (manuall
37 | selection with a preprocessor symbol only).
38 |
39 | 2008/04/16 oleh_derevenko
40 |
41 | [-] Fixed bug with storage memory not being properly zeroed at allocation.
42 |
43 | [*] Memory customization changed to match assertion failure handler
44 | customization. Now it is not necessary to save original pointers,
45 | just NULL-s are to be assigned to revert from customized to
46 | default memory menager.
47 |
48 | 2008/04/08 oleh_derevenko
49 |
50 | [!] Licensing changed: permission to distribute/use library under zlib/libpng
51 | license added.
52 |
53 | 2008/04/07 oleh_derevenko
54 |
55 | [+] Initial commit
56 |
--------------------------------------------------------------------------------
/ou/INSTALL.TXT:
--------------------------------------------------------------------------------
1 | Currently OU provides project files for Visual Studio 6, Visual Studio 2005
2 | and makefile for GCC. These are located in "build" directory.
3 | Makefile is quite simple and may not work on some platforms. Makefile does not
4 | have "clean" targets and does not track header changes. Further in this file
5 | you can find how to delete build output files to re-run a clean build.
6 |
7 | There is also a test project file in "test" directory that covers all the
8 | library functionality and allows to make sure everything is fine on
9 | a particular platform.
10 |
11 | All the intermediate files are generated in "intermediate" directory.
12 | Library output files are placed in "lib" directory.
13 | Test binary is placed in "bin" directory.
14 | Having these three folders deleted you can return to initial state.
15 |
--------------------------------------------------------------------------------
/ou/LICENSE-BSD.TXT:
--------------------------------------------------------------------------------
1 |
2 | This is the BSD-style license for the ODER's Utilities Library
3 | --------------------------------------------------------------
4 |
5 | ODER's Utilities Library
6 | Copyright (c) 2008, Oleh Derevenko.
7 | All rights reserved.
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions
11 | are met:
12 |
13 | Redistributions of source code must retain the above copyright notice,
14 | this list of conditions and the following disclaimer.
15 |
16 | Redistributions in binary form must reproduce the above copyright notice,
17 | this list of conditions and the following disclaimer in the documentation
18 | and/or other materials provided with the distribution.
19 |
20 | Neither the names of ODER's Utilities' copyright owner nor the names of
21 | its contributors may be used to endorse or promote products derived from
22 | this software without specific prior written permission.
23 |
24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
30 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 |
--------------------------------------------------------------------------------
/ou/LICENSE-ZLIB.TXT:
--------------------------------------------------------------------------------
1 | The zlib/libpng License for the ODER's Utilities Library
2 |
3 | Copyright (c) 2008 Oleh Derevenko
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 |
18 | 2. Altered source versions must be plainly marked as such, and must not be
19 | misrepresented as being the original software.
20 |
21 | 3. This notice may not be removed or altered from any source
22 | distribution.
23 |
--------------------------------------------------------------------------------
/ou/Makefile.am:
--------------------------------------------------------------------------------
1 | AUTOMAKE_OPTIONS = foreign
2 |
3 | EXTRA_DIST = bootstrap \
4 | CHANGELOG.TXT INSTALL.TXT \
5 | LICENSE.TXT LICENSE-BSD.TXT LICENSE-LESSER.TXT LICENSE-ZLIB.TXT \
6 | README.TXT \
7 | build
8 |
9 | SUBDIRS = include/ou src/ou test
10 |
11 |
--------------------------------------------------------------------------------
/ou/bootstrap:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | aclocal || exit 1
4 | # on Mac libtoolize is called glibtoolize
5 | LIBTOOLIZE=libtoolize
6 | if [ `uname -s` = Darwin ]; then
7 | LIBTOOLIZE=glibtoolize
8 | fi
9 | $LIBTOOLIZE --automake -c || exit 1
10 | autoconf -f || exit 1
11 | automake -a -c --foreign || exit 1
12 |
--------------------------------------------------------------------------------
/ou/build/make/makefile.os:
--------------------------------------------------------------------------------
1 | ifeq ($(OS), Windows_NT)
2 |
3 | OS_TYPE = WIN32
4 | OS_PLATFORM := i386
5 |
6 | OS_OBJ_EXT = .obj
7 | OS_LIB_EXT = .lib
8 | OS_LIB_PRE =
9 | OS_EXE_EXT = .exe
10 |
11 | FN_CONVERT_PATH = $(subst /,\,$(subst //,/,$(1)))
12 |
13 | FN_RM = $(OS_VP)erase "$(strip $(call FN_CONVERT_PATH, $(1)))"
14 | FN_MKDIR = $(OS_VP)if NOT EXIST "$(strip $(call FN_CONVERT_PATH, $(1)))" mkdir "$(strip $(call FN_CONVERT_PATH, $(1)))"
15 |
16 | OS_INCLUDE_PATH = $(GCC_PATH)/include $(GCC_PATH)/include/win32
17 | OS_LIB_PATH += $(GCC_PATH)/lib $(GCC_PATH)/lib/win32
18 | OS_VP=@
19 |
20 | else
21 |
22 | OS_OBJ_EXT = .o
23 | OS_LIB_EXT = .a
24 | OS_LIB_PRE = lib
25 | OS_EXE_EXT =
26 |
27 | OS_TYPE = $(subst SunOS,SUN,$(shell uname))
28 | OS_PLATFORM := $(shell uname -p)
29 | OS_PLATFORM := $(subst x86_64,i386,$(OS_PLATFORM))
30 | OS_PLATFORM := $(subst i586,i386,$(OS_PLATFORM))
31 | OS_PLATFORM := $(subst i686,i386,$(OS_PLATFORM))
32 |
33 | FN_RM = $(OS_VP)rm -rf $(1)
34 | FN_MKDIR = $(OS_VP)test -d $(1) || mkdir -p $(patsubst %/,%,$(1))
35 |
36 | OS_INCLUDE_PATH = /include /usr/include
37 | OS_LIB_PATH = /lib /usr/lib
38 | OS_VP=@
39 |
40 | endif
41 |
42 |
--------------------------------------------------------------------------------
/ou/build/vs6/ou.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "ou"=.\ou.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Project: "outest"=..\..\test\vs6\outest.dsp - Package Owner=<4>
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<4>
25 | {{{
26 | Begin Project Dependency
27 | Project_Dep_Name ou
28 | End Project Dependency
29 | }}}
30 |
31 | ###############################################################################
32 |
33 | Global:
34 |
35 | Package=<5>
36 | {{{
37 | }}}
38 |
39 | Package=<3>
40 | {{{
41 | }}}
42 |
43 | ###############################################################################
44 |
45 |
--------------------------------------------------------------------------------
/ou/include/ou/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = assert.h \
2 | atomicflags.h \
3 | atomic.h \
4 | customization.h \
5 | enumarrays.h \
6 | features.h \
7 | flagsdefines.h \
8 | flags.h \
9 | inttypes.h \
10 | macros.h \
11 | malloc.h \
12 | namespace.h \
13 | platform.h \
14 | simpleflags.h \
15 | templates.h \
16 | threadlocalstorage.h \
17 | typewrapper.h
18 |
--------------------------------------------------------------------------------
/ou/src/ou/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(top_srcdir)/include
2 |
3 | AM_CXXFLAGS = -fno-exceptions -fno-rtti
4 | AM_LDFLAGS = -fno-exceptions -fno-rtti
5 |
6 | noinst_LTLIBRARIES = libou.la
7 |
8 | libou_la_SOURCES = atomic.cpp \
9 | customization.cpp \
10 | malloc.cpp \
11 | threadlocalstorage.cpp
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ou/test/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(top_srcdir)/include
2 | AM_CXXFLAGS = -fno-exceptions -fno-rtti
3 | AM_LDFLAGS = -fno-exceptions -fno-rtti
4 |
5 | check_PROGRAMS = outest
6 |
7 | outest_SOURCES = outest.cpp
8 |
9 | outest_LDADD = $(top_builddir)/src/ou/libou.la
10 |
11 |
--------------------------------------------------------------------------------
/tests/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = joints UnitTest++
2 |
3 | AM_CPPFLAGS = -I$(srcdir)/UnitTest++/src \
4 | -I$(top_srcdir)/include \
5 | -I$(top_builddir)/include \
6 | -I$(top_srcdir)/ode/src
7 |
8 | if GIMPACT
9 | AM_CPPFLAGS += -DdTRIMESH_ENABLED -DdTRIMESH_GIMPACT
10 |
11 | endif
12 |
13 |
14 | if OPCODE
15 | AM_CPPFLAGS += -DdTRIMESH_ENABLED -DdTRIMESH_OPCODE
16 |
17 | endif
18 |
19 |
20 | if ENABLE_OU
21 | AM_CPPFLAGS += -I$(top_srcdir)/ou/include
22 |
23 | endif
24 |
25 |
26 | check_PROGRAMS = tests
27 |
28 | TESTS = tests
29 |
30 | tests_SOURCES = \
31 | collision.cpp \
32 | friction.cpp \
33 | joint.cpp \
34 | main.cpp \
35 | odemath.cpp
36 |
37 | tests_LDADD = \
38 | $(top_builddir)/ode/src/libode.la \
39 | joints/*.o \
40 | UnitTest++/src/libunittestpp.la
41 |
--------------------------------------------------------------------------------
/tests/UnitTest++/COPYING:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006 Noel Llopis and Charles Nicholson
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included
12 | in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/tests/UnitTest++/Makefile.am:
--------------------------------------------------------------------------------
1 | # Makefile.am for UnitTest++
2 |
3 | SUBDIRS = src
4 |
5 | EXTRA_DIST = docs
6 |
7 |
--------------------------------------------------------------------------------
/tests/UnitTest++/UnitTest++.vsnet2003.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 8.00
2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest++.vsnet2003", "UnitTest++.vsnet2003.vcproj", "{7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}"
3 | ProjectSection(ProjectDependencies) = postProject
4 | EndProjectSection
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestUnitTest++.vsnet2003", "TestUnitTest++.vsnet2003.vcproj", "{ACDF9A6A-874F-49E5-AB7C-74F8150BB4C7}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5} = {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}
9 | EndProjectSection
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfiguration) = preSolution
13 | Debug = Debug
14 | Release = Release
15 | EndGlobalSection
16 | GlobalSection(ProjectConfiguration) = postSolution
17 | {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}.Debug.ActiveCfg = Debug|Win32
18 | {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}.Debug.Build.0 = Debug|Win32
19 | {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}.Release.ActiveCfg = Release|Win32
20 | {7E5DD804-EC63-4FA5-BB6D-53DA86806EF5}.Release.Build.0 = Release|Win32
21 | {ACDF9A6A-874F-49E5-AB7C-74F8150BB4C7}.Debug.ActiveCfg = Debug|Win32
22 | {ACDF9A6A-874F-49E5-AB7C-74F8150BB4C7}.Debug.Build.0 = Debug|Win32
23 | {ACDF9A6A-874F-49E5-AB7C-74F8150BB4C7}.Release.ActiveCfg = Release|Win32
24 | {ACDF9A6A-874F-49E5-AB7C-74F8150BB4C7}.Release.Build.0 = Release|Win32
25 | EndGlobalSection
26 | GlobalSection(ExtensibilityGlobals) = postSolution
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityAddIns) = postSolution
29 | EndGlobalSection
30 | EndGlobal
31 |
--------------------------------------------------------------------------------
/tests/UnitTest++/UnitTest++.vsnet2005.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest++.vsnet2005", "UnitTest++.vsnet2005.vcproj", "{64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestUnitTest++.vsnet2005", "TestUnitTest++.vsnet2005.vcproj", "{9CCC3439-309E-4E85-B3B8-CE704D385D48}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6} = {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}
9 | EndProjectSection
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Win32 = Debug|Win32
14 | Release|Win32 = Release|Win32
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}.Debug|Win32.ActiveCfg = Debug|Win32
18 | {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}.Debug|Win32.Build.0 = Debug|Win32
19 | {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}.Release|Win32.ActiveCfg = Release|Win32
20 | {64A4FEFE-0461-4E95-8CC1-91EF5F57DBC6}.Release|Win32.Build.0 = Release|Win32
21 | {9CCC3439-309E-4E85-B3B8-CE704D385D48}.Debug|Win32.ActiveCfg = Debug|Win32
22 | {9CCC3439-309E-4E85-B3B8-CE704D385D48}.Debug|Win32.Build.0 = Debug|Win32
23 | {9CCC3439-309E-4E85-B3B8-CE704D385D48}.Release|Win32.ActiveCfg = Release|Win32
24 | {9CCC3439-309E-4E85-B3B8-CE704D385D48}.Release|Win32.Build.0 = Release|Win32
25 | EndGlobalSection
26 | GlobalSection(SolutionProperties) = preSolution
27 | HideSolutionNode = FALSE
28 | EndGlobalSection
29 | EndGlobal
30 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/AssertException.cpp:
--------------------------------------------------------------------------------
1 | #include "AssertException.h"
2 | #include
3 |
4 | namespace UnitTest {
5 |
6 | AssertException::AssertException(char const* description, char const* filename, int const lineNumber)
7 | : m_lineNumber(lineNumber)
8 | {
9 | std::strcpy(m_description, description);
10 | std::strcpy(m_filename, filename);
11 | }
12 |
13 | AssertException::~AssertException() throw()
14 | {
15 | }
16 |
17 | char const* AssertException::what() const throw()
18 | {
19 | return m_description;
20 | }
21 |
22 | char const* AssertException::Filename() const
23 | {
24 | return m_filename;
25 | }
26 |
27 | int AssertException::LineNumber() const
28 | {
29 | return m_lineNumber;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/AssertException.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_ASSERTEXCEPTION_H
2 | #define UNITTEST_ASSERTEXCEPTION_H
3 |
4 | #include
5 |
6 |
7 | namespace UnitTest {
8 |
9 | class AssertException : public std::exception
10 | {
11 | public:
12 | AssertException(char const* description, char const* filename, int lineNumber);
13 | virtual ~AssertException() throw();
14 |
15 | virtual char const* what() const throw();
16 |
17 | char const* Filename() const;
18 | int LineNumber() const;
19 |
20 | private:
21 | char m_description[512];
22 | char m_filename[256];
23 | int m_lineNumber;
24 | };
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Checks.cpp:
--------------------------------------------------------------------------------
1 | #include "Checks.h"
2 | #include
3 |
4 | namespace UnitTest {
5 |
6 | namespace {
7 |
8 | void CheckStringsEqual(TestResults& results, char const* expected, char const* actual,
9 | TestDetails const& details)
10 | {
11 | if (std::strcmp(expected, actual))
12 | {
13 | UnitTest::MemoryOutStream stream;
14 | stream << "Expected " << expected << " but was " << actual;
15 |
16 | results.OnTestFailure(details, stream.GetText());
17 | }
18 | }
19 |
20 | }
21 |
22 |
23 | void CheckEqual(TestResults& results, char const* expected, char const* actual,
24 | TestDetails const& details)
25 | {
26 | CheckStringsEqual(results, expected, actual, details);
27 | }
28 |
29 | void CheckEqual(TestResults& results, char* expected, char* actual,
30 | TestDetails const& details)
31 | {
32 | CheckStringsEqual(results, expected, actual, details);
33 | }
34 |
35 | void CheckEqual(TestResults& results, char* expected, char const* actual,
36 | TestDetails const& details)
37 | {
38 | CheckStringsEqual(results, expected, actual, details);
39 | }
40 |
41 | void CheckEqual(TestResults& results, char const* expected, char* actual,
42 | TestDetails const& details)
43 | {
44 | CheckStringsEqual(results, expected, actual, details);
45 | }
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Config.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_CONFIG_H
2 | #define UNITTEST_CONFIG_H
3 |
4 | // Standard defines documented here: http://predef.sourceforge.net
5 |
6 | #if defined _MSC_VER
7 | #pragma warning(disable:4127) // conditional expression is constant
8 | #pragma warning(disable:4702) // unreachable code
9 | #pragma warning(disable:4722) // destructor never returns, potential memory leak
10 | #endif
11 |
12 | #if defined(unix) || defined(__unix__) || defined(__unix) || defined(linux) || \
13 | defined(__APPLE__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
14 | #define UNITTEST_POSIX
15 | #endif
16 |
17 | #if defined (__MINGW32__)
18 | #define UNITTEST_MINGW
19 | #endif
20 |
21 | // by default, MemoryOutStream is implemented in terms of std::ostringstream.
22 | // uncomment this line to use the custom MemoryOutStream (no deps on std::ostringstream).
23 | //#define UNITTEST_USE_CUSTOM_STREAMS
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/DeferredTestReporter.cpp:
--------------------------------------------------------------------------------
1 | #include "DeferredTestReporter.h"
2 | #include "TestDetails.h"
3 |
4 | using namespace UnitTest;
5 |
6 | void DeferredTestReporter::ReportTestStart(TestDetails const& details)
7 | {
8 | m_results.push_back(DeferredTestResult(details.suiteName, details.testName));
9 | }
10 |
11 | void DeferredTestReporter::ReportFailure(TestDetails const& details, char const* failure)
12 | {
13 | DeferredTestResult& r = m_results.back();
14 | r.failed = true;
15 | r.failures.push_back(DeferredTestResult::Failure(details.lineNumber, failure));
16 | r.failureFile = details.filename;
17 | }
18 |
19 | void DeferredTestReporter::ReportTestFinish(TestDetails const&, float const secondsElapsed)
20 | {
21 | DeferredTestResult& r = m_results.back();
22 | r.timeElapsed = secondsElapsed;
23 | }
24 |
25 | DeferredTestReporter::DeferredTestResultList& DeferredTestReporter::GetResults()
26 | {
27 | return m_results;
28 | }
29 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/DeferredTestReporter.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_DEFERREDTESTREPORTER_H
2 | #define UNITTEST_DEFERREDTESTREPORTER_H
3 |
4 | #include "TestReporter.h"
5 | #include "DeferredTestResult.h"
6 |
7 | #include
8 |
9 | namespace UnitTest
10 | {
11 |
12 | class DeferredTestReporter : public TestReporter
13 | {
14 | public:
15 | virtual void ReportTestStart(TestDetails const& details);
16 | virtual void ReportFailure(TestDetails const& details, char const* failure);
17 | virtual void ReportTestFinish(TestDetails const& details, float secondsElapsed);
18 |
19 | typedef std::vector< DeferredTestResult > DeferredTestResultList;
20 | DeferredTestResultList& GetResults();
21 |
22 | private:
23 | DeferredTestResultList m_results;
24 | };
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/DeferredTestResult.cpp:
--------------------------------------------------------------------------------
1 | #include "DeferredTestResult.h"
2 |
3 | #include
4 |
5 | namespace UnitTest
6 | {
7 |
8 | DeferredTestResult::DeferredTestResult()
9 | : suiteName("")
10 | , testName("")
11 | , failureFile("")
12 | , timeElapsed(0.0f)
13 | , failed(false)
14 | {
15 | }
16 |
17 | DeferredTestResult::DeferredTestResult(char const* suite, char const* test)
18 | : suiteName(suite)
19 | , testName(test)
20 | , failureFile("")
21 | , timeElapsed(0.0f)
22 | , failed(false)
23 | {
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/DeferredTestResult.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_DEFERREDTESTRESULT_H
2 | #define UNITTEST_DEFERREDTESTRESULT_H
3 |
4 | #include
5 | #include
6 |
7 | namespace UnitTest
8 | {
9 |
10 | struct DeferredTestResult
11 | {
12 | DeferredTestResult();
13 | DeferredTestResult(char const* suite, char const* test);
14 |
15 | std::string suiteName;
16 | std::string testName;
17 | std::string failureFile;
18 |
19 | typedef std::pair< int, std::string > Failure;
20 | typedef std::vector< Failure > FailureVec;
21 | FailureVec failures;
22 |
23 | float timeElapsed;
24 | bool failed;
25 | };
26 |
27 | }
28 |
29 | #endif //UNITTEST_DEFERREDTESTRESULT_H
30 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Makefile.am:
--------------------------------------------------------------------------------
1 | if WIN32
2 | SUBDIRS = Win32
3 | else
4 | SUBDIRS = Posix
5 | endif
6 |
7 |
8 | check_LTLIBRARIES = libunittestpp.la
9 |
10 | libunittestpp_la_SOURCES = AssertException.cpp AssertException.h \
11 | CheckMacros.h Checks.cpp \
12 | Checks.h Config.h \
13 | DeferredTestReporter.cpp DeferredTestReporter.h \
14 | DeferredTestResult.cpp DeferredTestResult.h \
15 | MemoryOutStream.cpp MemoryOutStream.h \
16 | ReportAssert.cpp ReportAssert.h \
17 | Test.cpp TestDetails.cpp \
18 | TestDetails.h Test.h \
19 | TestList.cpp TestList.h \
20 | TestMacros.h TestReporter.cpp \
21 | TestReporter.h TestReporterStdout.cpp \
22 | TestReporterStdout.h TestResults.cpp \
23 | TestResults.h TestRunner.cpp \
24 | TestRunner.h TestSuite.h \
25 | TimeConstraint.cpp TimeConstraint.h \
26 | TimeHelpers.h UnitTest++.h \
27 | XmlTestReporter.cpp XmlTestReporter.h
28 | if WIN32
29 | libunittestpp_la_LIBADD = $(builddir)/Win32/libhelper.la
30 | else
31 | libunittestpp_la_LIBADD = $(builddir)/Posix/libhelper.la
32 | endif
33 |
34 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/MemoryOutStream.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_MEMORYOUTSTREAM_H
2 | #define UNITTEST_MEMORYOUTSTREAM_H
3 |
4 | #include "Config.h"
5 |
6 | #ifndef UNITTEST_USE_CUSTOM_STREAMS
7 |
8 | #include
9 |
10 | namespace UnitTest
11 | {
12 |
13 | class MemoryOutStream : public std::ostringstream
14 | {
15 | public:
16 | MemoryOutStream() {}
17 | char const* GetText() const;
18 |
19 | private:
20 | MemoryOutStream(MemoryOutStream const&);
21 | void operator =(MemoryOutStream const&);
22 |
23 | mutable std::string m_text;
24 | };
25 |
26 | }
27 |
28 | #else
29 |
30 | #include
31 |
32 | namespace UnitTest
33 | {
34 |
35 | class MemoryOutStream
36 | {
37 | public:
38 | explicit MemoryOutStream(int const size = 256);
39 | ~MemoryOutStream();
40 |
41 | char const* GetText() const;
42 |
43 | MemoryOutStream& operator << (char const* txt);
44 | MemoryOutStream& operator << (int n);
45 | MemoryOutStream& operator << (long n);
46 | MemoryOutStream& operator << (unsigned long n);
47 | MemoryOutStream& operator << (float f);
48 | MemoryOutStream& operator << (double d);
49 | MemoryOutStream& operator << (void const* p);
50 | MemoryOutStream& operator << (unsigned int s);
51 |
52 | enum { GROW_CHUNK_SIZE = 32 };
53 | int GetCapacity() const;
54 |
55 | private:
56 | void operator= (MemoryOutStream const&);
57 | void GrowBuffer(int capacity);
58 |
59 | int m_capacity;
60 | char* m_buffer;
61 | };
62 |
63 | }
64 |
65 | #endif
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Posix/Makefile.am:
--------------------------------------------------------------------------------
1 | check_LTLIBRARIES = libhelper.la
2 |
3 | libhelper_la_SOURCES = SignalTranslator.cpp SignalTranslator.h \
4 | TimeHelpers.cpp TimeHelpers.h
5 |
6 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Posix/SignalTranslator.cpp:
--------------------------------------------------------------------------------
1 | #include "SignalTranslator.h"
2 |
3 | namespace UnitTest {
4 |
5 | sigjmp_buf* SignalTranslator::s_jumpTarget = 0;
6 |
7 | namespace {
8 |
9 | void SignalHandler (int sig)
10 | {
11 | siglongjmp(*SignalTranslator::s_jumpTarget, sig );
12 | }
13 |
14 | }
15 |
16 |
17 | SignalTranslator::SignalTranslator ()
18 | {
19 | m_oldJumpTarget = s_jumpTarget;
20 | s_jumpTarget = &m_currentJumpTarget;
21 |
22 | struct sigaction action;
23 | action.sa_flags = 0;
24 | action.sa_handler = SignalHandler;
25 | sigemptyset( &action.sa_mask );
26 |
27 | sigaction( SIGSEGV, &action, &m_old_SIGSEGV_action );
28 | sigaction( SIGFPE , &action, &m_old_SIGFPE_action );
29 | sigaction( SIGTRAP, &action, &m_old_SIGTRAP_action );
30 | sigaction( SIGBUS , &action, &m_old_SIGBUS_action );
31 | sigaction( SIGILL , &action, &m_old_SIGBUS_action );
32 | }
33 |
34 | SignalTranslator::~SignalTranslator()
35 | {
36 | sigaction( SIGILL , &m_old_SIGBUS_action , 0 );
37 | sigaction( SIGBUS , &m_old_SIGBUS_action , 0 );
38 | sigaction( SIGTRAP, &m_old_SIGTRAP_action, 0 );
39 | sigaction( SIGFPE , &m_old_SIGFPE_action , 0 );
40 | sigaction( SIGSEGV, &m_old_SIGSEGV_action, 0 );
41 |
42 | s_jumpTarget = m_oldJumpTarget;
43 | }
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Posix/SignalTranslator.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_SIGNALTRANSLATOR_H
2 | #define UNITTEST_SIGNALTRANSLATOR_H
3 |
4 | #include
5 | #include
6 |
7 | namespace UnitTest {
8 |
9 | class SignalTranslator
10 | {
11 | public:
12 | SignalTranslator();
13 | ~SignalTranslator();
14 |
15 | static sigjmp_buf* s_jumpTarget;
16 |
17 | private:
18 | sigjmp_buf m_currentJumpTarget;
19 | sigjmp_buf* m_oldJumpTarget;
20 |
21 | struct sigaction m_old_SIGFPE_action;
22 | struct sigaction m_old_SIGTRAP_action;
23 | struct sigaction m_old_SIGSEGV_action;
24 | struct sigaction m_old_SIGBUS_action;
25 | struct sigaction m_old_SIGABRT_action;
26 | struct sigaction m_old_SIGALRM_action;
27 | };
28 |
29 | #ifdef SOLARIS
30 | #define UNITTEST_EXTENSION
31 | #else
32 | #define UNITTEST_EXTENSION __extension__
33 | #endif
34 |
35 | #define UNITTEST_THROW_SIGNALS \
36 | UnitTest::SignalTranslator sig; \
37 | if (UNITTEST_EXTENSION sigsetjmp(*UnitTest::SignalTranslator::s_jumpTarget, 1) != 0) \
38 | throw ("Unhandled system exception");
39 |
40 | }
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Posix/TimeHelpers.cpp:
--------------------------------------------------------------------------------
1 | #include "TimeHelpers.h"
2 | #include
3 |
4 | namespace UnitTest {
5 |
6 | Timer::Timer()
7 | {
8 | m_startTime.tv_sec = 0;
9 | m_startTime.tv_usec = 0;
10 | }
11 |
12 | void Timer::Start()
13 | {
14 | gettimeofday(&m_startTime, 0);
15 | }
16 |
17 |
18 | int Timer::GetTimeInMs() const
19 | {
20 | struct timeval currentTime;
21 | gettimeofday(¤tTime, 0);
22 | int const dsecs = currentTime.tv_sec - m_startTime.tv_sec;
23 | int const dus = currentTime.tv_usec - m_startTime.tv_usec;
24 | return dsecs*1000 + dus/1000;
25 | }
26 |
27 |
28 | void TimeHelpers::SleepMs (int ms)
29 | {
30 | usleep(ms * 1000);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Posix/TimeHelpers.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TIMEHELPERS_H
2 | #define UNITTEST_TIMEHELPERS_H
3 |
4 | #include
5 |
6 | namespace UnitTest {
7 |
8 | class Timer
9 | {
10 | public:
11 | Timer();
12 | void Start();
13 | int GetTimeInMs() const;
14 |
15 | private:
16 | struct timeval m_startTime;
17 | };
18 |
19 |
20 | namespace TimeHelpers
21 | {
22 | void SleepMs (int ms);
23 | }
24 |
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/ReportAssert.cpp:
--------------------------------------------------------------------------------
1 | #include "AssertException.h"
2 |
3 | namespace UnitTest {
4 |
5 | void ReportAssert(char const* description, char const* filename, int const lineNumber)
6 | {
7 | throw AssertException(description, filename, lineNumber);
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/ReportAssert.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_ASSERT_H
2 | #define UNITTEST_ASSERT_H
3 |
4 | namespace UnitTest {
5 |
6 | void ReportAssert(char const* description, char const* filename, int lineNumber);
7 |
8 | }
9 |
10 | #endif
11 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Test.cpp:
--------------------------------------------------------------------------------
1 | #include "Config.h"
2 | #include "Test.h"
3 | #include "TestList.h"
4 | #include "TestResults.h"
5 | #include "AssertException.h"
6 | #include "MemoryOutStream.h"
7 |
8 | #ifdef UNITTEST_POSIX
9 | #include "Posix/SignalTranslator.h"
10 | #endif
11 |
12 | namespace UnitTest {
13 |
14 | TestList& Test::GetTestList()
15 | {
16 | static TestList s_list;
17 | return s_list;
18 | }
19 |
20 | Test::Test(char const* testName, char const* suiteName, char const* filename, int const lineNumber)
21 | : m_details(testName, suiteName, filename, lineNumber)
22 | , next(0)
23 | , m_timeConstraintExempt(false)
24 | {
25 | }
26 |
27 | Test::~Test()
28 | {
29 | }
30 |
31 | void Test::Run(TestResults& testResults) const
32 | {
33 | try
34 | {
35 | #ifdef UNITTEST_POSIX
36 | UNITTEST_THROW_SIGNALS
37 | #endif
38 | RunImpl(testResults);
39 | }
40 | catch (AssertException const& e)
41 | {
42 | testResults.OnTestFailure( TestDetails(m_details.testName, m_details.suiteName, e.Filename(), e.LineNumber()), e.what());
43 | }
44 | catch (std::exception const& e)
45 | {
46 | MemoryOutStream stream;
47 | stream << "Unhandled exception: " << e.what();
48 | testResults.OnTestFailure(m_details, stream.GetText());
49 | }
50 | catch (...)
51 | {
52 | testResults.OnTestFailure(m_details, "Unhandled exception: Crash!");
53 | }
54 | }
55 |
56 |
57 | void Test::RunImpl(TestResults&) const
58 | {
59 | }
60 |
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Test.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TEST_H
2 | #define UNITTEST_TEST_H
3 |
4 | #include "TestDetails.h"
5 |
6 | namespace UnitTest {
7 |
8 | class TestResults;
9 | class TestList;
10 |
11 | class Test
12 | {
13 | public:
14 | Test(char const* testName, char const* suiteName = "DefaultSuite", char const* filename = "", int lineNumber = 0);
15 | virtual ~Test();
16 | void Run(TestResults& testResults) const;
17 |
18 | TestDetails const m_details;
19 | Test* next;
20 | mutable bool m_timeConstraintExempt;
21 |
22 | static TestList& GetTestList();
23 |
24 | private:
25 | virtual void RunImpl(TestResults& testResults_) const;
26 |
27 | Test(Test const&);
28 | Test& operator =(Test const&);
29 | };
30 |
31 |
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestDetails.cpp:
--------------------------------------------------------------------------------
1 | #include "TestDetails.h"
2 |
3 | namespace UnitTest {
4 |
5 | TestDetails::TestDetails(char const* testName_, char const* suiteName_, char const* filename_, int lineNumber_)
6 | : suiteName(suiteName_)
7 | , testName(testName_)
8 | , filename(filename_)
9 | , lineNumber(lineNumber_)
10 | {
11 | }
12 |
13 | TestDetails::TestDetails(const TestDetails& details, int lineNumber_)
14 | : suiteName(details.suiteName)
15 | , testName(details.testName)
16 | , filename(details.filename)
17 | , lineNumber(lineNumber_)
18 | {
19 | }
20 |
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestDetails.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTDETAILS_H
2 | #define UNITTEST_TESTDETAILS_H
3 |
4 | namespace UnitTest {
5 |
6 | class TestDetails
7 | {
8 | public:
9 | TestDetails(char const* testName, char const* suiteName, char const* filename, int lineNumber);
10 | TestDetails(const TestDetails& details, int lineNumber);
11 |
12 | char const* const suiteName;
13 | char const* const testName;
14 | char const* const filename;
15 | int const lineNumber;
16 |
17 | TestDetails(TestDetails const&); // Why is it public? --> http://gcc.gnu.org/bugs.html#cxx_rvalbind
18 | private:
19 | TestDetails& operator=(TestDetails const&);
20 | };
21 |
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestList.cpp:
--------------------------------------------------------------------------------
1 | #include "TestList.h"
2 | #include "Test.h"
3 |
4 | #include
5 |
6 | namespace UnitTest {
7 |
8 | TestList::TestList()
9 | : m_head(0)
10 | , m_tail(0)
11 | {
12 | }
13 |
14 | void TestList::Add(Test* test)
15 | {
16 | if (m_tail == 0)
17 | {
18 | assert(m_head == 0);
19 | m_head = test;
20 | m_tail = test;
21 | }
22 | else
23 | {
24 | m_tail->next = test;
25 | m_tail = test;
26 | }
27 | }
28 |
29 | const Test* TestList::GetHead() const
30 | {
31 | return m_head;
32 | }
33 |
34 | ListAdder::ListAdder(TestList& list, Test* test)
35 | {
36 | list.Add(test);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestList.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTLIST_H
2 | #define UNITTEST_TESTLIST_H
3 |
4 |
5 | namespace UnitTest {
6 |
7 | class Test;
8 |
9 | class TestList
10 | {
11 | public:
12 | TestList();
13 | void Add (Test* test);
14 |
15 | const Test* GetHead() const;
16 |
17 | private:
18 | Test* m_head;
19 | Test* m_tail;
20 | };
21 |
22 |
23 | class ListAdder
24 | {
25 | public:
26 | ListAdder(TestList& list, Test* test);
27 | };
28 |
29 | }
30 |
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestReporter.cpp:
--------------------------------------------------------------------------------
1 | #include "TestReporter.h"
2 |
3 | namespace UnitTest {
4 |
5 |
6 | TestReporter::~TestReporter()
7 | {
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestReporter.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTREPORTER_H
2 | #define UNITTEST_TESTREPORTER_H
3 |
4 | namespace UnitTest {
5 |
6 | class TestDetails;
7 |
8 | class TestReporter
9 | {
10 | public:
11 | virtual ~TestReporter();
12 |
13 | virtual void ReportTestStart(TestDetails const& test) = 0;
14 | virtual void ReportFailure(TestDetails const& test, char const* failure) = 0;
15 | virtual void ReportTestFinish(TestDetails const& test, float secondsElapsed) = 0;
16 | virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed) = 0;
17 | };
18 |
19 | }
20 | #endif
21 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestReporterStdout.cpp:
--------------------------------------------------------------------------------
1 | #include "TestReporterStdout.h"
2 | #include
3 |
4 | #include "TestDetails.h"
5 |
6 | namespace UnitTest {
7 |
8 | void TestReporterStdout::ReportFailure(TestDetails const& details, char const* failure)
9 | {
10 | #ifdef __APPLE__
11 | char const* const errorFormat = "%s:%d: error: Failure in %s: %s\n";
12 | #else
13 | char const* const errorFormat = "%s(%d): error: Failure in %s: %s\n";
14 | #endif
15 | std::printf(errorFormat, details.filename, details.lineNumber, details.testName, failure);
16 | }
17 |
18 | void TestReporterStdout::ReportTestStart(TestDetails const& /*test*/)
19 | {
20 | }
21 |
22 | void TestReporterStdout::ReportTestFinish(TestDetails const& /*test*/, float)
23 | {
24 | }
25 |
26 | void TestReporterStdout::ReportSummary(int const totalTestCount, int const failedTestCount,
27 | int const failureCount, float secondsElapsed)
28 | {
29 | if (failureCount > 0)
30 | std::printf("FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount, totalTestCount, failureCount);
31 | else
32 | std::printf("Success: %d tests passed.\n", totalTestCount);
33 | std::printf("Test time: %.2f seconds.\n", secondsElapsed);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestReporterStdout.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTREPORTERSTDOUT_H
2 | #define UNITTEST_TESTREPORTERSTDOUT_H
3 |
4 | #include "TestReporter.h"
5 |
6 | namespace UnitTest {
7 |
8 | class TestReporterStdout : public TestReporter
9 | {
10 | private:
11 | virtual void ReportTestStart(TestDetails const& test);
12 | virtual void ReportFailure(TestDetails const& test, char const* failure);
13 | virtual void ReportTestFinish(TestDetails const& test, float secondsElapsed);
14 | virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
15 | };
16 |
17 | }
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestResults.cpp:
--------------------------------------------------------------------------------
1 | #include "TestResults.h"
2 | #include "TestReporter.h"
3 |
4 | #include "TestDetails.h"
5 |
6 | namespace UnitTest {
7 |
8 | TestResults::TestResults(TestReporter* testReporter)
9 | : m_testReporter(testReporter)
10 | , m_totalTestCount(0)
11 | , m_failedTestCount(0)
12 | , m_failureCount(0)
13 | , m_currentTestFailed(false)
14 | {
15 | }
16 |
17 | void TestResults::OnTestStart(TestDetails const& test)
18 | {
19 | ++m_totalTestCount;
20 | m_currentTestFailed = false;
21 | if (m_testReporter)
22 | m_testReporter->ReportTestStart(test);
23 | }
24 |
25 | void TestResults::OnTestFailure(TestDetails const& test, char const* failure)
26 | {
27 | ++m_failureCount;
28 | if (!m_currentTestFailed)
29 | {
30 | ++m_failedTestCount;
31 | m_currentTestFailed = true;
32 | }
33 |
34 | if (m_testReporter)
35 | m_testReporter->ReportFailure(test, failure);
36 | }
37 |
38 | void TestResults::OnTestFinish(TestDetails const& test, float secondsElapsed)
39 | {
40 | if (m_testReporter)
41 | m_testReporter->ReportTestFinish(test, secondsElapsed);
42 | }
43 |
44 | int TestResults::GetTotalTestCount() const
45 | {
46 | return m_totalTestCount;
47 | }
48 |
49 | int TestResults::GetFailedTestCount() const
50 | {
51 | return m_failedTestCount;
52 | }
53 |
54 | int TestResults::GetFailureCount() const
55 | {
56 | return m_failureCount;
57 | }
58 |
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestResults.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTRESULTS_H
2 | #define UNITTEST_TESTRESULTS_H
3 |
4 | namespace UnitTest {
5 |
6 | class TestReporter;
7 | class TestDetails;
8 |
9 | class TestResults
10 | {
11 | public:
12 | explicit TestResults(TestReporter* reporter = 0);
13 |
14 | void OnTestStart(TestDetails const& test);
15 | void OnTestFailure(TestDetails const& test, char const* failure);
16 | void OnTestFinish(TestDetails const& test, float secondsElapsed);
17 |
18 | int GetTotalTestCount() const;
19 | int GetFailedTestCount() const;
20 | int GetFailureCount() const;
21 |
22 | private:
23 | TestReporter* m_testReporter;
24 | int m_totalTestCount;
25 | int m_failedTestCount;
26 | int m_failureCount;
27 |
28 | bool m_currentTestFailed;
29 |
30 | TestResults(TestResults const&);
31 | TestResults& operator =(TestResults const&);
32 | };
33 |
34 | }
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestRunner.cpp:
--------------------------------------------------------------------------------
1 | #include "TestRunner.h"
2 | #include "TestResults.h"
3 | #include "Test.h"
4 | #include "TestList.h"
5 | #include "TestReporter.h"
6 | #include "TestReporterStdout.h"
7 | #include "TimeHelpers.h"
8 | #include "MemoryOutStream.h"
9 | #include
10 |
11 |
12 | namespace UnitTest {
13 |
14 |
15 | int RunAllTests(TestReporter& reporter, TestList const& list, char const* suiteName, int const maxTestTimeInMs )
16 | {
17 | TestResults result(&reporter);
18 |
19 | Timer overallTimer;
20 | overallTimer.Start();
21 |
22 | Test const* curTest = list.GetHead();
23 | while (curTest != 0)
24 | {
25 | if (suiteName == 0 || !std::strcmp(curTest->m_details.suiteName, suiteName))
26 | {
27 | Timer testTimer;
28 | testTimer.Start();
29 | result.OnTestStart(curTest->m_details);
30 |
31 | curTest->Run(result);
32 |
33 | int const testTimeInMs = testTimer.GetTimeInMs();
34 | if (maxTestTimeInMs > 0 && testTimeInMs > maxTestTimeInMs && !curTest->m_timeConstraintExempt)
35 | {
36 | MemoryOutStream stream;
37 | stream << "Global time constraint failed. Expected under " << maxTestTimeInMs <<
38 | "ms but took " << testTimeInMs << "ms.";
39 | result.OnTestFailure(curTest->m_details, stream.GetText());
40 | }
41 | result.OnTestFinish(curTest->m_details, testTimeInMs/1000.0f);
42 | }
43 |
44 | curTest = curTest->next;
45 | }
46 |
47 | float const secondsElapsed = overallTimer.GetTimeInMs() / 1000.0f;
48 | reporter.ReportSummary(result.GetTotalTestCount(), result.GetFailedTestCount(), result.GetFailureCount(), secondsElapsed);
49 |
50 | return result.GetFailureCount();
51 | }
52 |
53 |
54 | int RunAllTests()
55 | {
56 | TestReporterStdout reporter;
57 | return RunAllTests(reporter, Test::GetTestList(), 0);
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestRunner.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTRUNNER_H
2 | #define UNITTEST_TESTRUNNER_H
3 |
4 |
5 | namespace UnitTest {
6 |
7 | class TestReporter;
8 | class TestList;
9 |
10 |
11 | int RunAllTests();
12 | int RunAllTests(TestReporter& reporter, TestList const& list, char const* suiteName, int maxTestTimeInMs = 0);
13 |
14 | }
15 |
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TestSuite.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TESTSUITE_H
2 | #define UNITTEST_TESTSUITE_H
3 |
4 | namespace UnitTestSuite {
5 |
6 | inline char const* GetSuiteName ()
7 | {
8 | return "DefaultSuite";
9 | }
10 |
11 | }
12 |
13 | #endif
14 |
15 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TimeConstraint.cpp:
--------------------------------------------------------------------------------
1 | #include "TimeConstraint.h"
2 | #include "TestResults.h"
3 | #include "MemoryOutStream.h"
4 |
5 | namespace UnitTest {
6 |
7 |
8 | TimeConstraint::TimeConstraint(int ms, TestResults& result, TestDetails const& details)
9 | : m_result(result)
10 | , m_details(details)
11 | , m_maxMs(ms)
12 | {
13 | m_timer.Start();
14 | }
15 |
16 | TimeConstraint::~TimeConstraint()
17 | {
18 | int const totalTimeInMs = m_timer.GetTimeInMs();
19 | if (totalTimeInMs > m_maxMs)
20 | {
21 | MemoryOutStream stream;
22 | stream << "Time constraint failed. Expected to run test under " << m_maxMs <<
23 | "ms but took " << totalTimeInMs << "ms.";
24 | m_result.OnTestFailure(m_details, stream.GetText());
25 | }
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TimeConstraint.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TIMECONSTRAINT_H
2 | #define UNITTEST_TIMECONSTRAINT_H
3 |
4 | #include "TimeHelpers.h"
5 |
6 | namespace UnitTest {
7 |
8 | class TestResults;
9 | class TestDetails;
10 |
11 | class TimeConstraint
12 | {
13 | public:
14 | TimeConstraint(int ms, TestResults& result, TestDetails const& details);
15 | ~TimeConstraint();
16 |
17 | private:
18 | void operator=(TimeConstraint const&);
19 | TimeConstraint(TimeConstraint const&);
20 |
21 | Timer m_timer;
22 | TestResults& m_result;
23 | TestDetails const& m_details;
24 | int const m_maxMs;
25 | };
26 |
27 | #define UNITTEST_TIME_CONSTRAINT(ms) \
28 | UnitTest::TimeConstraint unitTest__timeConstraint__(ms, testResults_, UnitTest::TestDetails(m_details, __LINE__))
29 |
30 | #define UNITTEST_TIME_CONSTRAINT_EXEMPT() do { m_timeConstraintExempt = true; } while (0)
31 |
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/TimeHelpers.h:
--------------------------------------------------------------------------------
1 | #include "Config.h"
2 |
3 | #if defined UNITTEST_POSIX
4 | #include "Posix/TimeHelpers.h"
5 | #else
6 | #include "Win32/TimeHelpers.h"
7 | #endif
8 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/UnitTest++.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTESTCPP_H
2 | #define UNITTESTCPP_H
3 |
4 | #include "Config.h"
5 | #include "Test.h"
6 | #include "TestList.h"
7 | #include "TestSuite.h"
8 | #include "TestResults.h"
9 |
10 | #include
11 | #include "TestMacros.h"
12 |
13 | #include "CheckMacros.h"
14 | #include "TestRunner.h"
15 | #include "TimeConstraint.h"
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Win32/Makefile.am:
--------------------------------------------------------------------------------
1 | check_LTLIBRARIES = libhelper.la
2 |
3 | libhelper_la_SOURCES = TimeHelpers.cpp TimeHelpers.h
4 |
5 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Win32/TimeHelpers.cpp:
--------------------------------------------------------------------------------
1 | #include "TimeHelpers.h"
2 | #include
3 |
4 | namespace UnitTest {
5 |
6 | Timer::Timer()
7 | : m_startTime(0)
8 | {
9 | m_threadId = ::GetCurrentThread();
10 | DWORD_PTR systemMask;
11 | ::GetProcessAffinityMask(GetCurrentProcess(), &m_processAffinityMask, &systemMask);
12 |
13 | ::SetThreadAffinityMask(m_threadId, 1);
14 | ::QueryPerformanceFrequency(reinterpret_cast< LARGE_INTEGER* >(&m_frequency));
15 | ::SetThreadAffinityMask(m_threadId, m_processAffinityMask);
16 | }
17 |
18 | void Timer::Start()
19 | {
20 | m_startTime = GetTime();
21 | }
22 |
23 | int Timer::GetTimeInMs() const
24 | {
25 | __int64 const elapsedTime = GetTime() - m_startTime;
26 | double const seconds = double(elapsedTime) / double(m_frequency);
27 | return int(seconds * 1000.0f);
28 | }
29 |
30 | __int64 Timer::GetTime() const
31 | {
32 | LARGE_INTEGER curTime;
33 | ::SetThreadAffinityMask(m_threadId, 1);
34 | ::QueryPerformanceCounter(&curTime);
35 | ::SetThreadAffinityMask(m_threadId, m_processAffinityMask);
36 | return curTime.QuadPart;
37 | }
38 |
39 |
40 |
41 | void TimeHelpers::SleepMs(int const ms)
42 | {
43 | ::Sleep(ms);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/Win32/TimeHelpers.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_TIMEHELPERS_H
2 | #define UNITTEST_TIMEHELPERS_H
3 |
4 | #include "../Config.h"
5 |
6 |
7 | #ifdef UNITTEST_MINGW
8 | #ifndef __int64
9 | #define __int64 long long
10 | #endif
11 | #endif
12 |
13 | namespace UnitTest {
14 |
15 | class Timer
16 | {
17 | public:
18 | Timer();
19 | void Start();
20 | int GetTimeInMs() const;
21 |
22 | private:
23 | __int64 GetTime() const;
24 |
25 | void* m_threadId;
26 |
27 | #if defined(_WIN64)
28 | unsigned __int64 m_processAffinityMask;
29 | #else
30 | unsigned long m_processAffinityMask;
31 | #endif
32 |
33 | __int64 m_startTime;
34 | __int64 m_frequency;
35 | };
36 |
37 |
38 | namespace TimeHelpers
39 | {
40 | void SleepMs (int ms);
41 | }
42 |
43 |
44 | }
45 |
46 |
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/XmlTestReporter.h:
--------------------------------------------------------------------------------
1 | #ifndef UNITTEST_XMLTESTREPORTER_H
2 | #define UNITTEST_XMLTESTREPORTER_H
3 |
4 | #include "DeferredTestReporter.h"
5 |
6 | #include
7 |
8 | namespace UnitTest
9 | {
10 |
11 | class XmlTestReporter : public DeferredTestReporter
12 | {
13 | public:
14 | explicit XmlTestReporter(std::ostream& ostream);
15 |
16 | virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
17 |
18 | private:
19 | XmlTestReporter(XmlTestReporter const&);
20 | XmlTestReporter& operator=(XmlTestReporter const&);
21 |
22 | void AddXmlElement(std::ostream& os, char const* encoding);
23 | void BeginResults(std::ostream& os, int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
24 | void EndResults(std::ostream& os);
25 | void BeginTest(std::ostream& os, DeferredTestResult const& result);
26 | void AddFailure(std::ostream& os, DeferredTestResult const& result);
27 | void EndTest(std::ostream& os, DeferredTestResult const& result);
28 |
29 | std::ostream& m_ostream;
30 | };
31 |
32 | }
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/Main.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 | #include "../TestReporterStdout.h"
3 |
4 |
5 | int main(int, char const *[])
6 | {
7 | return UnitTest::RunAllTests();
8 | }
9 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/TestAssertHandler.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 | #include "../AssertException.h"
3 | #include "../ReportAssert.h"
4 |
5 | using namespace UnitTest;
6 |
7 | namespace {
8 |
9 | TEST(ReportAssertThrowsAssertException)
10 | {
11 | bool caught = false;
12 |
13 | try
14 | {
15 | ReportAssert("", "", 0);
16 | }
17 | catch(AssertException const&)
18 | {
19 | caught = true;
20 | }
21 |
22 | CHECK (true == caught);
23 | }
24 |
25 | TEST(ReportAssertSetsCorrectInfoInException)
26 | {
27 | const int lineNumber = 12345;
28 | const char* description = "description";
29 | const char* filename = "filename";
30 |
31 | try
32 | {
33 | ReportAssert(description, filename, lineNumber);
34 | }
35 | catch(AssertException const& e)
36 | {
37 | CHECK_EQUAL(description, e.what());
38 | CHECK_EQUAL(filename, e.Filename());
39 | CHECK_EQUAL(lineNumber, e.LineNumber());
40 | }
41 | }
42 |
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/TestTestList.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 | #include "../TestList.h"
3 |
4 | using namespace UnitTest;
5 |
6 | namespace {
7 |
8 |
9 | TEST (TestListIsEmptyByDefault)
10 | {
11 | TestList list;
12 | CHECK (list.GetHead() == 0);
13 | }
14 |
15 | TEST (AddingTestSetsHeadToTest)
16 | {
17 | Test test("test");
18 | TestList list;
19 | list.Add(&test);
20 |
21 | CHECK (list.GetHead() == &test);
22 | CHECK (test.next == 0);
23 | }
24 |
25 | TEST (AddingSecondTestAddsItToEndOfList)
26 | {
27 | Test test1("test1");
28 | Test test2("test2");
29 |
30 | TestList list;
31 | list.Add(&test1);
32 | list.Add(&test2);
33 |
34 | CHECK (list.GetHead() == &test1);
35 | CHECK (test1.next == &test2);
36 | CHECK (test2.next == 0);
37 | }
38 |
39 | TEST (ListAdderAddsTestToList)
40 | {
41 | TestList list;
42 |
43 | Test test("");
44 | ListAdder adder(list, &test);
45 |
46 | CHECK (list.GetHead() == &test);
47 | CHECK (test.next == 0);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/TestTestSuite.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 |
3 | // We're really testing if it's possible to use the same suite in two files
4 | // to compile and link successfuly (TestTestSuite.cpp has suite with the same name)
5 | // Note: we are outside of the anonymous namespace
6 | SUITE(SameTestSuite)
7 | {
8 | TEST(DummyTest2)
9 | {
10 | (void)testResults_;
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/TestTimeConstraint.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 | #include "../TestResults.h"
3 | #include "../TimeHelpers.h"
4 | #include "RecordingReporter.h"
5 |
6 | using namespace UnitTest;
7 |
8 | namespace
9 | {
10 |
11 | TEST(TimeConstraintSucceedsWithFastTest)
12 | {
13 | TestResults result;
14 | {
15 | TimeConstraint t(200, result, TestDetails("", "", "", 0));
16 | TimeHelpers::SleepMs(5);
17 | }
18 | CHECK_EQUAL(0, result.GetFailureCount());
19 | }
20 |
21 | TEST(TimeConstraintFailsWithSlowTest)
22 | {
23 | TestResults result;
24 | {
25 | TimeConstraint t(10, result, TestDetails("", "", "", 0));
26 | TimeHelpers::SleepMs(20);
27 | }
28 | CHECK_EQUAL(1, result.GetFailureCount());
29 | }
30 |
31 | TEST(TimeConstraintFailureIncludesCorrectData)
32 | {
33 | RecordingReporter reporter;
34 | TestResults result(&reporter);
35 | {
36 | TestDetails const details("testname", "suitename", "filename", 10);
37 | TimeConstraint t(10, result, details);
38 | TimeHelpers::SleepMs(20);
39 | }
40 | CHECK(std::strstr(reporter.lastFailedFile, "filename"));
41 | CHECK_EQUAL(10, reporter.lastFailedLine);
42 | CHECK(std::strstr(reporter.lastFailedTest, "testname"));
43 | }
44 |
45 | TEST(TimeConstraintFailureIncludesTimeoutInformation)
46 | {
47 | RecordingReporter reporter;
48 | TestResults result(&reporter);
49 | {
50 | TimeConstraint t(10, result, TestDetails("", "", "", 0));
51 | TimeHelpers::SleepMs(20);
52 | }
53 | CHECK(std::strstr(reporter.lastFailedMessage, "ime constraint"));
54 | CHECK(std::strstr(reporter.lastFailedMessage, "under 10ms"));
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/tests/UnitTest++/src/tests/TestTimeConstraintMacro.cpp:
--------------------------------------------------------------------------------
1 | #include "../UnitTest++.h"
2 | #include "../TimeHelpers.h"
3 |
4 | #include "RecordingReporter.h"
5 |
6 | namespace {
7 |
8 | TEST (TimeConstraintMacroQualifiesNamespace)
9 | {
10 | // If this compiles without a "using namespace UnitTest;", all is well.
11 | UNITTEST_TIME_CONSTRAINT(1);
12 | }
13 |
14 | TEST (TimeConstraintMacroUsesCorrectInfo)
15 | {
16 | int testLine = 0;
17 | RecordingReporter reporter;
18 | {
19 | UnitTest::TestResults testResults_(&reporter);
20 | UNITTEST_TIME_CONSTRAINT(10); testLine = __LINE__;
21 | UnitTest::TimeHelpers::SleepMs(20);
22 | }
23 | CHECK_EQUAL (1, reporter.testFailedCount);
24 | CHECK (std::strstr(reporter.lastFailedFile, __FILE__));
25 | CHECK_EQUAL (testLine, reporter.lastFailedLine);
26 | CHECK (std::strstr(reporter.lastFailedTest, "TimeConstraintMacroUsesCorrectInfo"));
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/tests/joints/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CPPFLAGS = -I$(srcdir)/../UnitTest++/src \
2 | -I$(top_srcdir)/include \
3 | -I$(top_builddir)/include \
4 | -I$(top_srcdir)/ode/src
5 |
6 | if ENABLE_OU
7 | AM_CPPFLAGS += -I$(top_srcdir)/ou/include
8 |
9 | endif
10 |
11 | check_LTLIBRARIES = libjoints.la
12 |
13 | libjoints_la_LDFLAGS = -static
14 |
15 | libjoints_la_SOURCES = \
16 | amotor.cpp \
17 | ball.cpp \
18 | dball.cpp \
19 | fixed.cpp \
20 | hinge.cpp \
21 | hinge2.cpp \
22 | piston.cpp \
23 | pr.cpp \
24 | pu.cpp \
25 | slider.cpp \
26 | universal.cpp
27 |
--------------------------------------------------------------------------------
/tests/main.cpp:
--------------------------------------------------------------------------------
1 | // openode_UnitTest++.cpp : Defines the entry point for the console application.
2 | //
3 |
4 | #include
5 | #include
6 |
7 | int main()
8 | {
9 | dInitODE();
10 | int res = UnitTest::RunAllTests();
11 | dCloseODE();
12 | return res;
13 | }
14 |
--------------------------------------------------------------------------------
/web/ODElogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thomasmarsh/ODE/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/web/ODElogo.png
--------------------------------------------------------------------------------