diff --git a/.github/workflows/doxygen-gh-pages.yml b/.github/workflows/doxygen-gh-pages.yml new file mode 100644 index 00000000..83444522 --- /dev/null +++ b/.github/workflows/doxygen-gh-pages.yml @@ -0,0 +1,45 @@ +name: Build documentation + +on: + push: + branches: master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: > + sudo apt-get update && sudo apt-get install -y doxygen + + - name: Configure CMake + run: > + cmake -B . -D BUILD_DOCS=ON -D BUILD_DEMOS=OFF -S ${{ github.workspace + }} + + - name: Build docs + run: cmake --build docs + + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: build/html/ + + deploy: + needs: build + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + + steps: + - name: Deploy docs to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..565501ee --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,521 @@ +# Changelog + +## UPCOMING 8.0 (Munk2D Fork): + +_WIP for next release_ + +TODO Some info about the fork! + +- API: Now possible to to override cpMessage by defining CP_OVERRIDE_MESSAGE +- API: The maxForce property now have effect on DampedSpring and + DampedRotarySpring +- API: Reset velocity and constraint jAcc when body type changes to DYNAMIC +- API: Add transform property to cpSpaceDebugDrawOptions +- API: Use CGFloat as the float type if CP_USE_CGTYPES is set. +- BUG: Fixed total impulse calculation of DampedRotarySpring +- BUG: Fix for compiling cpPolyline with MSVC +- BUG: Fix FFI symbols not exported on windows under mingw +- BUG: Fix a potential divide by zero in ClosestT +- BUG: Fix division by zero in cpPolyShapeSegmentQuery() function. +- BUG: Fix planetmath url (by ccgargantua) +- BUG: Optimized memory allocation of cpPolylineSet (by richardgroves) +- BUG: Fix cast between incompatible function type to reduce warnings (by aganm) +- BUG: Rename body local variable to fix shadow warning (by aganm) +- BUG: Fixes bug in cpSpaceShapeQuery to not miss collisions (by alanmillard) +- BUG: Fix for cpSpaceShapeQuery using cpSegmentShape with null body (by + maniek2332) +- MISC: Fix spelling of positive (by skitt) +- MISC: Github actions that build on Windows/Linux/MacOS with MSVC/GCC/CLang +- MISC: Fix warning for INFINITY on CLang 18+ +- DOC: Reworked the documentation to be easier to maintain + +## 7.0.3 + +- MISC: Replacing GLFW with Sokol in the demo application. No need to push GLFW + binaries and has a nice x-platform renderer to build on. +- MISC: Fixed some 'const' warnings for MSCV. + +## 7.0.2 + +- MISC: Merging pull requests. Build fixes and the like. + +## 7.0.1 + +- BUG: Remove references to M_PI sinces it's not actually part of C and causes + problems with MSVC. +- BUG: Build fixes for Mac/CMake and MSVC 13. +- BUG: Move to using \_\_declspec(dllexport) for Windows builds. +- BUG: Fixed a precision issue with the EPA algorithm that would cause excessive + iteration. +- BUG: cpPolyshapeNewRaw() was undefined. +- BUG: Changing gravity will wake up all objects in a space. + +## 7.0.0 + +- All features from Chipmunk Pro are now free and open source! (threaded and + NEON solver, autogeometry) +- API: Lots of cleanup to the API naming for better consistency. +- API: Renamed nearest point queries to simply point queries. +- API: Removed many deprecated functions. +- API: Struct definitions have become fully opaque instead of mangling names + with the CP_PRIVATE() macro. +- API: Replaced templated accessor functions with concrete ones. Should be + simpler to deal with for FFIs. +- API: Optional automatic mass properties for shapes. Calculates the moment of + inertia and center of gravity for you. +- API: Optional anchor point for bodies that is separate from the center of + gravity. +- API: Added radius parameters to many functions dealing with shapes (moment + calculation, initialization, etc). +- API: The convex hull and winding is automatically calculated when creating a + poly shape. +- API: Added a cpShapesCollide() function to check overlap of arbitrary shapes. +- API: cpShape filter property to supersede layers and groups. +- API: Collision handlers now return a collision handler struct to make it + simpler to set up callbacks. +- API: Wildcard collision types. +- API: The cpArbiterTotalImpulseWithFriction() function was renamed to + cpArbiterTotalImpulse(). The old useless cpArbiterTotalImpulse() + implementation was removed. +- API: Contacts now store the colliding point on the surface of both shapes. +- API: cpArbiterIsRemoval() to check if a separate callback is called due to a + removal and not a true separating collision. +- API: Arbiters now only store one normal per pair of colliding shapes. +- API: cpBBNewForExtents(). +- API: Added a concrete kinematic body type to replace the confusing "rogue" + body concept. +- API: Added a 2x3 affine transform type, cpTransform. +- API: Added a new debug rendering API. +- MISC: Numerous improvements to the collision detection. +- MISC: cpPolyline structs are passed by reference instead of value. (I've + regretted that decision for years!) + +## 6.2.2 + +- Fixed some issues on arm64. +- PRO: Added a 64 bit NEON solver to use on arm64. + +## 6.2.1 + +- Added Android support to the CMake files. (Thanks Eric Wing!) +- Added a MSVC 2012 project file. (Thanks Leonid Usov!) +- Merged a fix for VAOs on Windows. (Thanks Leonid Usov!) +- Merged a couple of other minor fixes. +- BUG: Fixed a crash issue with the ChipmunkTileCache and + ChipmunkPointCloudSampler classes. (Pro only). + +## 6.2.0 + +- Collision detection now primarily uses the GJK and EPA algorithms instead of + SAT. Internally this was a rather huge change. o_O +- Improved collision point quality and better collision point identification. +- All shape types can now be given a rounding radius. +- Collisions are now guaranteed to have a maximum of 2 collision points. +- Poly to poly collision performance is slightly better when they have a radius. + Slightly worse with none. +- Implemented smoothed segment collisions to prevent colliding with the "cracks" + between segment shapes. +- API: (Officially) added cpSegmentShapeSetNeighbors() used to enable smoothed + line collisions. +- API: Added cpBBCenter() to get the center of a bounding box. +- API: Added cpPolyShapeInit2() and cpPolyShapeNew2() to create poly shapes with + a radius. (Horrible names yes, but it will go away in Chipmunk 7) +- API: Added cpBoxShapeInit3() and cpBoxShapeNew3() to create boxes with a + radius. +- API: Added cpPolyShapeGetRadius() and cpPolyShapeSetRadius() (the latter only + in chipmunk_unsafe.h). +- API: Added cpNearestPointQueryInfo.g which returns the gradient of the signed + distance field for the shape. +- BUG: cpMomentForPoly() will now return a correct value for degenerate 2 vertex + polygons. +- BUG: Fixed an issue where certain segment query calls would return a t value + of 0 instead of 1 for a missed query. +- MISC: Passing cpvzero to cpvnormalize() will now return cpvzero. No need to + worry about NaNs or cpvnormalize_safe(). +- MISC: Demo app now uses GLFW instead of GLUT, and has improved drawing and + text rendering routines. + +## 6.1.5 + +- API: Added cpArbiter\*SurfaceVelocity() to allow for custom surface velocity + calculation. +- API: Added cpArbiteSetContactPointSet() to allow changing the contact geometry + on the fly. +- API: Added cpSpaceConvertBodyToStatic() and cpSpaceConvertBodyToDynamic(). +- API: Added [ChipmunkBody velocityAt*Point:] methods to wrap their C + equivalents. (Pro only) +- API: Added overridable [ChipmunkBody updateVelocity:...] and [ChipmunkBody + updatePosition:] methods. (Pro only) +- API: Added .space properties to ChipmunkBody, ChipmunkShape and + ChipmunkConstaint to wrap their C equivalents. (Pro only) +- API: Added overridable [ChipmunkConstraint preSolve:] and [ChipmunkConstraint + postSolve:] methods. (Pro only) +- API: Added an ChipmunkMultiGrab.grabSort property that allows you to + prioritize which shape is grabbed when there is overlap. (Pro only) +- MISC: Segment queries started inside of a shape now return t=0 and n=cpvzero + instead of being undefined. +- MISC: Cleaned up a lot of common assertion messages to be more clear. +- MISC: Added a new demo called Shatter. +- MISC: Added a crushing force estimation example to the ContactGraph demo and a + static/dynamic conversion example to Plink. +- MISC: Modified the Sticky demo to use the new cpArbiteSetContactPointSet() to + avoid the use of unnecessary sensor shapes. +- MISC: [ChipmunkSpace addBounds:...] now returns a NSArray of the bounding + segments. (Pro only) + +## 6.1.4 + +- MISC: Fixed a build script issue that was preventing the documentation from + being generated. + +## 6.1.3 + +- BUG: Fixed a couple of very specific but fatal bugs that occur when sleeping + is enabled and filtering collisions. +- BUG: Fixed an issue with cpvslerp() between very similar vectors. +- BUG: Fixed an issue with grab friction in ChipmunkMultiGrab. (Pro only) +- MISC: Implemented the cpConstraintGetImpulse() functionality for spring + joints. +- MISC: Added more functions to chipmunk_ffi.h + +## 6.1.2 + +- API: Added a cpArbiter.data pointer. Now you can tag collisions with custom + persistent data. +- API: Added segment to segment collisions (thanks to LegoCylon) +- API: cpSpaceAddPostStepCallback() now returns false if the callback was a + duplicate. +- API: Added the ChipmunkAbstractSampler.marchThreshold property instead of + hardcoding it to 0.5. +- API: Added ChipmunkGrooveJoint properties for the groove and joint anchors. +- API: ChipmunkMultiGrab now returns information about grabbed shapes. +- BUG: Fixed a minor (non-crashing, non-leaking) memory pooling issue with + reindexing lots of static shapes. +- BUG: Fixed an issue with the slerp functions that would cause them to return + incorrect results when given non-unit length input. +- BUG: Fixed a precision bug with the ChipmunkImage sampler classes that could + cause artifacts or miss small features. +- BUG: Fixed a number of properties in Objective-Chipmunk that should have been + nonatomic. +- BUG: Fixed a number of types in Objective-Chipmunk that were incorrectly id + that should have been cpGroup, cpCollisionType etc. It's now possible to + redefine them at compile time if you wish. +- MISC: Dropped armv6 support in favor of armv7s on iOS. (You can switch it back + easily if you need.) +- MISC: Updated iOS build scripts to guess the latest SDK. +- MISC: Added the "Sticky Surfaces" demo as a cpArbiter.data example. +- MISC: Updated Objective-Chipmunk build scripts to always use the latest iOS + SDK. + +## 6.1.1 + +- API: Renamed the new block based iterators as soon as possible to match the + Apple convention ("\_b" suffix). + +## 6.1.0 + +- API: Added a pthread based, multi-threaded solver to accelerate the game on + multi-core systems. (Pro only) +- API: Added cpConvexHull() and CP_CONVEX_HULL() for generating convex hulls. +- API: Added cpPolylineConvexDecomposition_BETA() to generate an approximate + concave decomposition of a polyline. (Pro only) +- API: Added [ChipmunkPolyline toConvexHull:] to generate approximate convex + hulls. (Pro only). +- API: Added [ChipmunkPolylineSet toConvexHulls_BETA:]. (Pro only) +- API: Added nearest point queries. +- API: Added a push mode to ChipmunkMultiGrab so touches can interact with the + scene even if they didn't initially touch a shape. (Pro only) +- API: Added optional block based iterators. +- API: Added a space property to cpBody, cpShape and cpConstraint types. +- BUG: Fixed an issue with changing the floating point and vector type on OS X. +- BUG: Fixed a pixel offset in ChipmunkImageSampler that could cause minor + sampling artifacts. (Pro only) +- BUG: Fixed an issue where cpShape and cpConstraint structs could have garbage + space pointers if cpcalloc() was redefined. +- BUG: Fixed assertions in cpArbiter getters to correctly reflect a contact + count of 0 from separate() callbacks. +- BUG: Fixed a regression relating to registering post-step() callbacks from + other post-step() callbacks. +- BUG: Fixed a minor memory leak for sleeping bodies when destroying a space. +- MISC: Point queries are now deprecated in preference to point queries. +- MISC: cpSpatialIndexPointQuery() was redundant and has been removed. Use + cpSpatialIndexQuery() instead. +- MISC: cpShape\*Query() functions now accept a NULL info pointer if you don't + want detailed query info. +- MISC: The enableContactGraph property of cpSpace is deprecated and always be + true. +- MISC: Added a new demos of the convex hull functions and a self balancing + Unicycle. + +## 6.0.3 + +- API: Added a cpBBForCircle() convenience function. +- API: Added cpBBSegmentQuery() to check where a segment hits a cpBB. +- API: Added cpBodyGetVelAtWorldPoint() and cpBodyGetVelAtLocalPoint() to get + point velocities on a body. +- API: Added cpArbiterTotalKE() to calculate the energy lost due to a collision. + Great for calculating damage accurately. +- API: Added methods to get an ObjC pointer from a C chipmunk struct. +- API: Added a CHIPMUNK_ARBITER_GET_BODIES() macro for Objective-Chipmunk. +- API: The Objective-Chipmunk headers are now ARC compatible. +- API: Added a [ChipmunkSpace contains:] method to check if a ChipmunkObject has + been added to the space or not. +- API: Added a cpBBNewForCircle() function. +- API: Added a cpBBSegmentQuery() function for raycasting againsts AABBs. +- BUG: Fixed a regression with ChipmunkSpace.bodies and ChipmunkSpace.shapes + that caused crashes. +- BUG: Fixed a rare bug with postStep() callbacks and iterators. +- BUG: Fixed a border case in cpBBIntersectsSegment() that could cause missed + segment queries. +- MISC: Added some new assertions for error conditions that were previously + uncaught. +- MISC: Accelerated segment queries in cpBBTree by sorting the nodes. +- MISC: Added a new "Slice" demo that lets you cut up a polygon. +- MISC: Added NEON optimizations for Chipmunk Pro. Expect running on most ARM + platforms to be 25-35% faster for contact heavy simulations. +- MISC: All ChipmunkObject instances added to a space are now retained, even + composite ones. + +## 6.0.2 + +- API: Added cpSpaceIsLocked() to check if you are in a callback or not. +- API: Removed the long deprecated [ChipmunkSpace addShapeAHandler:] and + [ChipmunkSpace addShapeBHandler:] methods. +- API: The ChipmunkObject protocol now can return any id + object instead of just an NSSet. +- API: The largely useless [ChipmunkSpace addBaseObjects:] and [ChipmunkSpace + removeBaseObjects:] methods were removed. +- API: Added [ChipmunkSpace smartAdd:] and [ChipmunkSpace smartRemove:] methods + for a consistent API to remove objects inside and out of callbacks. +- API: Added [ChipmunkSpace addPostStepBlock:key:] to complement [ChipmunkSpace + addPostStepCallback:selector:key:]. +- API: Added [ChipmunkSpace addPostStepAddition:]. +- API: Objective-Chipmunk collision handlers no longer retain their target to + avoid reference cycles. +- API: Added callbacks to joints. +- BUG: Soft errors (only checked when debug mode is enabled) and warnings were + disabled. Whoops. +- BUG: cpShapeIsSensor() was incorrectly named in chipmunk_ffi.h. +- BUG: It should be safe to call cpActivateBody() from an space iterator + callback now. +- MISC: Very nice bouyancy demo added based on callbacks. +- MISC: Breakable Joints demo showing how to use the new joint callbacks. +- MISC: Player demo updated and greatly enhanced by Chipmunk 6 features. +- MISC: Changed adding a static body to a space from a warning to a hard error. +- MISC: cpGroup and cpCollisionType now default to uintptr_t so you can safely + use pointers instead of ints for these types. +- MISC: Updated the MSVC10 project file. +- MISC: Updated the FFI defs. + +## 6.0.1 + +- BUG: Calling cpBodySetPos() on a sleeping body was delaying the Separate() + handler callback if one existed. +- BUG: Fixed a bug where Separate() handler callbacks were not occuring when + removing shapes. +- BUG: Calling cpBodyApplyForce() or cpBodyResetForces() was not activating + sleeping bodies. +- API: Added cpSpaceEachConstraint(). +- API: Added a "CurrentTimeStep" property to cpSpace to retrieve the current (or + most recent) timestep. +- MISC: Got rid of anonymous unions so that it is C99 clean again. + +## 6.0.0 + +Chipmunk 6.x's API is not quite 100% compatible with 5.x. Make sure you read the +list of changes carefully. Keep in mind that this is a x.0.0 release and that +it's likely there are still some bugs I don't know about yet. I've spent a lot +of effort rewriting the collision detection, sleeping, and contact graph +algorithms that have required large changes and cleanup to the 5.x codebase. +I've ironed out all the bugs that I know of, and the beta test went well. So +it's finally time for 6! + +- API: Chipmunk now has hard runtime assertions that aren't disabled in release + mode for many error conditions. Most people have been using release builds of + Chipmunk during development and were missing out on very important error + checking. +- API: Access to the private API has been disabled by default now and much of + the private API has changed. I've added official APIs for all the uses of the + private API I knew of. +- API: Added accessor functions for every property on every type. As Chipmunk's + complexity has grown, it's become more difficult to ignore accessors. You are + encouraged to use them, but are not required to. +- API: Added cpSpaceEachBody() and cpSpaceEachShape() to iterate bodies/shapes + in a space. +- API: Added cpSpaceReindexShapesForBody() to reindex all the shapes attached to + a particular body. +- API: Added a 'data' pointer to spaces now too. +- API: cpSpace.staticBody is a pointer to the static body instead of a static + reference. +- API: The globals cp_bias_coef, cp_collision_slop, cp_contact_persistence have + been moved to properties of a space. (collisionBias, collisionSlop, + collisionPersistence respectively) +- API: Added cpBodyActivateStatic() to wake up bodies touching a static body + with an optional shape filter parameter. +- API: Added cpBodyEachShape() and cpBodyEachConstraint() iterators to iterate + the active shapes/constraints attached to a body. +- API: Added cpBodyEeachArbiter() to iterate the collision pairs a body is + involved in. This makes it easy to perform grounding checks or find how much + collision force is being applied to an object. +- API: The error correction applied by the collision bias and joint bias is now + timestep independent and the units have completely changed. +- FIX: Units of damping for springs are correct regardless of the number of + iterations. Previously they were only correct if you had 1 or 2 iterations. +- MISC: Numerous changes to help make Chipmunk work better with variable + timesteps. Use of constant timesteps is still highly recommended, but it is + now easier to change the time scale without introducing artifacts. +- MISC: Performance! Chipmunk 6 should be way faster than Chipmunk 5 for almost + any game. +- MISC: Chipmunk supports multiple spatial indexes and uses a bounding box tree + similar to the one found in the Bullet physics library by default. This should + provide much better performance for scenes with objects of differening size + and works without any tuning for any scale. + +## 5.3.5 + +- FIX: Fixed spelling of cpArbiterGetDepth(). Was cpArbiteGetDepth() before. + Apparently nobody ever used this function. +- FIX: Added defines for M_PI and M_E. Apparently these values were never part + of the C standard math library. Who knew!? +- FIX: Added a guard to cpBodyActivate() so that it's a noop for rogue bodies. +- FIX: Shape queries now work with (and against) sensor shapes. +- FIX: Fixed an issue where removing a collision handler while a separate() + callback was waiting to fire the next step would cause crashes. +- FIX: Fixed an issue where the default callback would not be called for sensor + shapes. +- FIX: Resetting or applying forces or impulses on a body causes it to wake up + now. +- MISC: Added a check that a space was not locked when adding or removing a + callback. +- MISC: Removed cpmalloc from the API and replaced all occurences with cpcalloc +- MISC: Added a benchmarking mode to the demo app. -trial runs it in time trial + mode and -bench makes it run some benchmarking demos. + +## 5.3.4 + +- FIX: cpBodyActivate() can now be called from collision and query callbacks. + This way you can use the setter functions to change properties without + indirectly calling cpBodyActivate() and causing an assertion. +- FIX: cpArbiterGetContactPointSet() was returning the collision points for the + normals. +- FIX: cpSpaceEachBody() now includes sleeping bodies. +- FIX: Shapes attached to static rogue bodies created with cpBodyNewStatic() are + added as static shapes. +- MISC: Applied a user patch to update the MSVC project and add a .def file. + +## 5.3.3 + +- API: Added cpArbiteGetCount() to return the number of contact points. +- API: Added helper functions for calculating areas of Chipmunk shapes as well + as calculating polygon centroids and centering polygons on their centroid. +- API: Shape queries. Query a shape to test for collisions if it were to be + inserted into a space. +- API: cpBodyInitStatic() and cpBodyNewStatic() for creating additional static + (rogue) bodies. +- API: cpBodySleepWithGroup() to allow you to create groups of sleeping objects + that are woken up together. +- API: Added overloaded \*, +, - and == operators for C++ users. +- API: Added cpSpaceActivateShapesTouchingShape() to query for and activate any + shapes touching a given shape. Useful if you ever need to move a static body. +- FIX: Fixed an extremely rare memory bug in the collision cache. +- FIX: Fixed a memory leak in Objective-Chipmunk that could cause ChipmunkSpace + objects to be leaked. +- MISC: C struct fields and function that are considered private have been + explicitly marked as such. Defining CP_ALLOW_PRIVATE_ACCESS to 0 in Chipmunk.h + will let you test which parts of the private API that you are using and give + me feedback about how to build proper APIs in Chipmunk 6 for what you are + trying to do. +- MISC: Allow CGPoints to be used as cpVect on Mac OS X as well as iOS. + +## 5.3.2 + +- FIX: Collision begin callbacks were being called continuously for sensors or + collisions rejected from the pre-solve callback. +- FIX: Plugged a nasty memory leak when adding post-step callbacks. +- FIX: Shapes were being added to the spatial hash using an uninitialized + bounding box in some cases. +- FIX: Perfectly aligned circle shapes now push each other apart. +- FIX: cpBody setter functions now call cpBodyActivate(). +- FIX: Collision handler targets are released in Objective-Chipmunk when they + are no longer needed instead of waiting for the space to be deallocated. +- API: cpSpaceSegmentQuery() no longer returns a boolean. Use + cpSpaceSegmentQueryFirst() instead as it's more efficient. +- NEW: cpSpaceRehashShape() Rehash an individual shape, active or static. +- NEW: cpBodySleep() Force a body to fall asleep immediately. +- NEW: cpConstraintGetImpulse() Return the most recent impulse applied by a + constraint. +- NEW: Added setter functions for the groove joint endpoints. +- MISC: A number of other minor optimizations and fixes. + +## 5.3.1 + +- NEW: Added a brand new tutorial for Objective-Chipmunk: + SimpleObjectiveChipmunk that can be found in the Objective-Chipmunk folder. +- NEW: Proper API docs for Objective-Chipmunk. +- NEW: Updated the included Objective-Chipmunk library. +- FIX: Fixed a rare memory crash in the sensor demo. +- FIX: Fixed some warnings that users submitted. + +## 5.3.0 + +- FIX: Fixed the source so it can compile as C, C++, Objective-C, and + Objective-C++. +- FIX: Fixed cp_contact_persistence. It was broken so that it would forget + collision solutions after 1 frame instead of respecting the value set. +- OPTIMIZATION: Several minor optimizations have been added. Though performance + should only differ by a few percent. +- OPTIMIZATION: Chipmunk now supports putting bodies to sleep when they become + inactive. +- API: Elastic iterations are now deprecated as they should no longer be + necessary. +- API: Added API elements to support body sleeping. +- API: Added a statically allocated static body to each space for attaching + static shapes to. +- API: Static shapes attached to the space's static body can simply be added to + the space using cpSpaceAddShape(). +- NEW: New MSVC projects. +- NEW: Added boolean and time stamp types for clarity. + +## 5.2.0 + +- OPTIMIZATION: Chipmunk structs used within the solver are now allocated + linearly in large blocks. This is much more CPU cache friendly. Programs have + seen up to 50% performance improvements though 15-20% should be expected. +- API: Shape references in cpArbiter structs changed to private_a and private_b + to discourage accessing the fields directly and getting them out of order. You + should be using cpArbiterGetShapes() or CP_ARBITER_GET_SHAPES() to access the + shapes in the correct order. +- API: Added assertion error messages as well as warnings and covered many new + assertion cases. +- FIX: separate() callbacks are called before shapes are removed from the space + to prevent dangling pointers. +- NEW: Added convenience functions for creating box shapes and calculating + moments. + +## 5.1.0 + +- FIX: fixed a NaN issue that was causing raycasts for horizontal or vertical + lines to end up in an infinite loop +- FIX: fixed a number of memory leaks +- FIX: fixed warnings for various compiler/OS combinations +- API: Rejecting a collision from a begin() callback permanently rejects the + collision until separation +- API: Erroneous collision type parameterns removed from + cpSpaceDefaulteCollisionHandler() +- MOVE: FFI declarations of inlined functions into their own header +- MOVE: Rearranged the project structure to separate out the header files into a + separate include/ directory. +- NEW: Added a static library target for the iPhone. +- NEW: Type changes when building on the iPhone to make it friendlier to other + iPhone APIs +- NEW: Added an AABB query to complement point and segment queries +- NEW: CP_NO_GROUP and CP_ALL_LAYERS constants + +## 5.0.0 + +- Brand new Joint/Constraint API: New constraints can be added easily and are + much more flexible than the old joint system +- Efficient Segment Queries - Like raycasting, but with line segments. +- Brand new collision callback API: Collision begin/separate events, API for + removal of objects within callbacks, more programable control over collision + handling. diff --git a/CMakeLists.txt b/CMakeLists.txt index fc86b134..39b09549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,3 +66,9 @@ add_subdirectory(src) if(BUILD_DEMOS) add_subdirectory(demo) endif() + +option(BUILD_DOCS "Build documentation" OFF) + +if(BUILD_DOCS) + add_subdirectory(docs) +endif() diff --git a/LICENSE.txt b/LICENSE.txt index 55c24c9d..952a53e8 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,5 @@ -Copyright (c) 2007-2015 Scott Lembcke and Howling Moon Software +Copyright (c) 2025 Victor Blomqvist +Copyright (c) 2007-2024 Scott Lembcke and Howling Moon Software Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 00000000..619375c6 --- /dev/null +++ b/README.md @@ -0,0 +1,139 @@ +# Munk2D + +## FORK INFO + +The main purpose of this fork is to be a companion for the Python 2D physics +library [Pymunk](https://www.pymunk.org) which is built on Chipmunk2D. Given the +slow pace of development of Chipmunk2D, and some unique requirements and +opportunities of Pymunk this is something that have grown over a long time. What +really made me consider making this fork more formal was the discussion +[here](https://github.com/slembcke/Chipmunk2D/issues/237) with Slembcke, the +creator of Chipmunk2D. + +I do not foresee that I have the time, motivation or skills to really revive +Chipmunk2D. However, I hope to incorporate minor new features, and a bunch of +fixes. Any changes are driven by what make sense from the Pymunk use case. +However, I do think many of these changes are useful also to users outside +Pymunk, and you are of course free to use the fork for other projects / +languages as well. + +At the moment I don't have any formal release of this fork, but I plan to make +some kind of rename and a release if/when enough changes are accumulated. + +/Victor 2025-01-25 + +## ABOUT + +This is a fork of the 2D physics library +[Chipmunk2D](https://github.com/slembcke/Chipmunk2D). Munk2D is a simple, +lightweight, fast and portable 2D rigid body physics library written in C. It's +licensed under the permissive MIT license. I hope you enjoy using Munk2D! + +### Expectations from Munk2D + +- Munk2D will add fixes for various issues, especially issues affecting Pymunk. +- Munk2D will add or improve features useful for Pymunk. +- Munk2D does not aim for ABI stability between versions. +- Munk2D will try to avoid API breaking changes, but ultimately be less strict + than Chipmunk2D. +- While Munk2D will not try to actively break features or targets, breakage is + more likely than with Chipmunk2D. Testing of Munk2D will mainly happen through + Pymunk, parts not useful from Pymunk (e.g ObjectiveC support), will be + untested and therefor likely to break over time. +- While Munk2D is focused on Pymunk, I will happily accept PRs to fix or improve + other parts of the code, or improvements to tests, documentation and so on. + +## FEATURES + +- Designed specifically for 2D video games. +- Circle, convex polygon, and beveled line segment collision primitives. +- Multiple collision primitives can be attached to a single rigid body. +- Fast broad phase collision detection by using a bounding box tree with great + temporal coherence or a spatial hash. +- Extremely fast impulse solving by utilizing Erin Catto's contact persistence + algorithm. +- Supports sleeping objects that have come to rest to reduce the CPU load. +- Support for collision event callbacks based on user definable object types. +- Flexible collision filtering system with layers, exclusion groups and + callbacks. \*\* Can be used to create all sorts of effects like one way + platforms or buoyancy areas. (Examples included) +- Supports nearest point, segment (raycasting), shape and bounding box queries + to the collision detection system. +- Collision impulses amounts can be retrieved for gameplay effects, sound + effects, etc. +- Large variety of joints - easily make vehicles, ragdolls, and more. +- Joint callbacks. \*\* Can be used to easily implement breakable or animated + joints. (Examples included) +- Maintains a contact graph of all colliding objects. +- Lightweight C99 implementation with no external dependencies outside the Std. + C library. +- "Many language bindings available":http://chipmunk2d.net/bindingsAndPorts.php. +- Simple, read the "documentation":https://viblo.github.io/Munk2D/ and see! +- Unrestrictive MIT license + +## BUILDING + +Mac OS X: There is an included Xcode project file for building the static +library and demo application. Alternatively you could use the CMake files or the +macstatic.command script inside the xcode/ directory to build a static lib and +package up the headers for you. + +iPhone: A native Objective-C API is included. The Xcode project can build a +static library with all the proper compiler settings. Alternatively, you can +just run iphonestatic.command in the xcode/ directory. It will build you a fat +library compiled as release for the device and debug for the simulator. After +running it, you can simply drop the Chipmunk-iOS directory into your iPhone +project! + +UNIXes: A forum user was kind enough to make a set of CMake files for Chipmunk. +This will require you to have CMake installed. To build run 'cmake .' then +'make'. This should build a dynamic library, a static library, and the demo +application. A number of people have had build errors on Ubuntu due to not +having GLUT or libxmu installed. + +Windows: Visual Studio projects are included in the msvc/ directory. While I try +to make sure the MSVC 10 project is up to date, I don't have MSVC 9 to keep that +project updated regularly. It may not work. I'd appreciate a hand fixing it if +that's the case. + +## GET UP TO DATE + +If you got the source from a point release download, you might want to consider +getting the latest source from GitHub. Bugs are fixed, and new features are +added regularly. Big changes are done in branches and tested before merging them +in it's rare for the point release downloads to be better or more bug free than +the latest code. + +Head on over to "GitHub":https://github.com/viblo/Munk2D and experience the +future TODAY! (Okay, so maybe it's not that exciting.) + +## GETTING STARTED + +The C API documentation is in the docs/ directory. + +A good starting point is to take a look at the included Demo application. The +demos all just set up a Munk2D simulation space and the demo app draws the +graphics directly out of that. This makes it easy to see how the Munk2D API +works without worrying about the graphics code. You are free to use the demo +drawing routines in your own projects, though it is certainly not the +recommended way of drawing Munk2D objects as it pokes around at the +undocumented/private APIs of Munk2D. + +## SUPPORT + +There is a forum for Chipmunk2D at http://chipmunk2d.net/forum/ Unfortunately +its very inactive nowadays, but much of the discussions are still relevant. + +The best way to get support is to visit the "Chipmunk +Forums":http://chipmunk2d.net/forum/. There are plenty of people around using +Chipmunk on the just about every platform I've ever heard of. If you are working +on a commercial project and want some more direct help, Howling Moon Software is +also available for "contracting":http://howlingmoonsoftware.com/. + +## CONTRACTING + +Howling Moon Software (company of Chipmunk2D) is available for contracting if +you want to make the physics in your game really stand out. Given their unique +experience with Chipmunk2D, they can help you use Chipmunk (and likely Munk2D) +to its fullest potential. Feel free to contact them through their webpage: +http://howlingmoonsoftware.com/ diff --git a/README.textile b/README.textile deleted file mode 100644 index a7655a01..00000000 --- a/README.textile +++ /dev/null @@ -1,85 +0,0 @@ -!http://files.slembcke.net/chipmunk/logo/logo1_med.png! - -h2. FORK INFO - START HERE - -This is a fork of the original "Chipmunk2D":https://github.com/slembcke/Chipmunk2D - -The main purpose of this fork is to be a compainion for the Python 2D physics library "Pymunk":https://www.pymunk.org which is built on Chipmunk2D. Given the slow pace of development of Chipmunk2D, and some unique requirements and oppurtunitites of Pymunk this is something that have grown over a long time. What really made me consider to make it more formal was the discussion "here":https://github.com/slembcke/Chipmunk2D/issues/237 with Slembcke, the creator of Chipmunk2D. - -I do not forsee that I have the time, motivation or skills to really revive Chipmunk2D. However, I hope to incorporate minor new features, and a bunch of fixes. Any changes are driven by what make sense from the Pymunk use case. However, I do think many of these changes are useful also to users outside of Pymunk, and you are of course free to use the fork for other projects / languages as well. - -At the moment I dont have any formal release of this fork, but I plan to make some kind of rename and a release if/when enough changes are accumulated. - -h3. Differeces: - -* This fork will have ABI breaking changes. For Pymunk it does not matter, a Pymunk verison is always compiled against a specific Chipmunk2D version. -* This fork might have API breaking changes. Since Pymunk wraps Chipmunk2D in a Python friendly API, end users of Pymunk wont be affected. -* Some additional minor features, useful from Pymunk -* Fixes to various issues, mainly those affecting Pymunk - ---- - -h2. NEW IN CHIPMUNK 7 - -Chipmunk 7 is complete and now includes the ARM NEON optimizations, the autogeometry code, and the mulithreaded solver. - -The latest "programming guide":http://chipmunk-physics.net/release/ChipmunkLatest-Docs/ is available. - -h2. ABOUT: - -Chipmunk2D is a simple, lightweight, fast and portable 2D rigid body physics library written in C. It's licensed under the unrestrictive, OSI approved MIT license. My aim is to give 2D developers access to the same quality of physics you find in newer 3D games. I hope you enjoy using Chipmunk2D! - -h2. FEATURES: - -* Designed specifically for 2D video games. -* Circle, convex polygon, and beveled line segment collision primitives. -* Multiple collision primitives can be attached to a single rigid body. -* Fast broad phase collision detection by using a bounding box tree with great temporal coherence or a spatial hash. -* Extremely fast impulse solving by utilizing Erin Catto's contact persistence algorithm. -* Supports sleeping objects that have come to rest to reduce the CPU load. -* Support for collision event callbacks based on user definable object types types. -* Flexible collision filtering system with layers, exclusion groups and callbacks. -** Can be used to create all sorts of effects like one way platforms or buoyancy areas. (Examples included) -* Supports nearest point, segment (raycasting), shape and bounding box queries to the collision detection system. -* Collision impulses amounts can be retrieved for gameplay effects, sound effects, etc. -* Large variety of joints - easily make vehicles, ragdolls, and more. -* Joint callbacks. -** Can be used to easily implement breakable or animated joints. (Examples included) -* Maintains a contact graph of all colliding objects. -* Lightweight C99 implementation with no external dependencies outside of the Std. C library. -* "Many language bindings available":http://chipmunk2d.net/bindingsAndPorts.php. -* Simple, read the "documentation":http://chipmunk2d.net/documentation.php and see! -* Unrestrictive MIT license - -h2. CONTRACTING: - -Howling Moon Software (my company) is available for contracting if you want to make the physics in your game really stand out. Given our unique experience with the library, we can help you use Chipmunk to its fullest potential. Feel free to contact us through our webpage: http://howlingmoonsoftware.com/ - -h2. BUILDING: - -Mac OS X: There is an included Xcode project file for building the static library and demo application. Alternatively you could use the CMake files or the macstatic.command script inside the xcode/ directory to build a static lib and package up the headers for you. - -iPhone: A native Objective-C API is included. The Xcode project can build a static library with all the proper compiler settings. Alternatively, you can just run iphonestatic.command in the xcode/ directory. It will build you a fat library compiled as release for the device and debug for the simulator. After running it, you can simply drop the Chipmunk-iOS directory into your iPhone project! - -UNIXes: A forum user was kind enough to make a set of CMake files for Chipmunk. This will require you to have CMake installed. To build run 'cmake .' then 'make'. This should build a dynamic library, a static library, and the demo application. A number of people have had build errors on Ubuntu due to not having GLUT or libxmu installed. - -Windows: Visual Studio projects are included in the msvc/ directory. While I try to make sure the MSVC 10 project is up to date, I don't have MSVC 9 to keep that project updated regularly. It may not work. I'd appreciate a hand fixing it if that's the case. - - -h2. GET UP TO DATE: - -If you got the source from a point release download, you might want to consider getting the latest source from GitHub. Bugs are fixed and new features are added regularly. Big changes are done in branches and tested before merging them in it's rare for the point release downloads to be better or more bug free than the latest code. - -Head on over to "GitHub":https://github.com/slembcke/Chipmunk2D and experience the future TODAY! (Okay, so maybe it's not that exciting.) - - -h2. GETTING STARTED: - -First of all, you can find the C API documentation in the doc/ directory. - -A good starting point is to take a look at the included Demo application. The demos all just set up a Chipmunk simulation space and the demo app draws the graphics directly out of that. This makes it easy to see how the Chipmunk API works without worrying about the graphics code. You are free to use the demo drawing routines in your own projects, though it is certainly not the recommended way of drawing Chipmunk objects as it pokes around at the undocumented/private APIs of Chipmunk. - - -h2. SUPPORT: - -The best way to get support is to visit the "Chipmunk Forums":http://chipmunk2d.net/forum/. There are plenty of people around using Chipmunk on the just about every platform I've ever heard of. If you are working on a commercial project and want some more direct help, Howling Moon Software is also available for "contracting":http://howlingmoonsoftware.com/. diff --git a/TODO.txt b/TODO.txt index e813c82d..5b90b3f6 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,3 +1,5 @@ +INFO: This TODO is not up to date + Priorities: Basics tutorial. Simple top down player controls. diff --git a/VERSION.txt b/VERSION.txt deleted file mode 100644 index 85f37824..00000000 --- a/VERSION.txt +++ /dev/null @@ -1,322 +0,0 @@ -What's new in NEXT: -* API: Now possible to to override cpMessage by defining CP_OVERRIDE_MESSAGE -* API: The maxForce property now have effect on DampedSpring and DampedRotarySpring -* API: Reset velocity and constraint jAcc when body type changes to DYNAMIC -* API: Add transform property to cpSpaceDebugDrawOptions -* API: Use CGFloat as the float type if CP_USE_CGTYPES is set. -* BUG: Fixed total impulse calculation of DampedRotarySpring -* BUG: Fix for compiling cpPolyline with MSVC -* BUG: Fix FFI symbols not exported on windows under mingw -* BUG: Fix a potential divide by zero in ClosestT -* BUG: Fix division by zero in cpPolyShapeSegmentQuery() function. -* BUG: Fix planetmath url (by ccgargantua) -* BUG: Optimized memory allocation of cpPolylineSet (by richardgroves) -* BUG: Fix cast between incompatible function type to reduce warnings (by aganm) -* BUG: Rename body local variable to fix shadow warning (by aganm) -* BUG: Fixes bug in cpSpaceShapeQuery to not miss collisions (by alanmillard) -* BUG: Fix for cpSpaceShapeQuery using cpSegmentShape with null body (by maniek2332) -* MISC: Fix spelling of positive (by skitt) -* MISC: Github actions that build on Windows/Linux/MacOS with MSVC/GCC/CLang -* MISC: Fix warning for INFINITY on CLang 18+ - - -What's new in 7.0.3: -* MISC: Replacing GLFW with Sokol in the demo application. No need to push GLFW binaries and has a nice x-platform renderer to build on. -* MISC: Fixed some 'const' warnings for MSCV. - -What's new in 7.0.2: -* MISC: Merging pull requests. Build fixes and the like. - -What's new in 7.0.1: -* BUG: Remove references to M_PI sinces it's not actually part of C and causes problems with MSVC. -* BUG: Build fixes for Mac/CMake and MSVC 13. -* BUG: Move to using __declspec(dllexport) for Windows builds. -* BUG: Fixed a precision issue with the EPA algorithm that would cause excessive iteration. -* BUG: cpPolyshapeNewRaw() was undefined. -* BUG: Changing gravity will wake up all objects in a space. - -What's new in 7.0.0: -* All features from Chipmunk Pro are now free and open source! (threaded and NEON solver, autogeometry) -* API: Lots of cleanup to the API naming for better consistency. -* API: Renamed nearest point queries to simply point queries. -* API: Removed many deprecated functions. -* API: Struct definitions have become fully opaque instead of mangling names with the CP_PRIVATE() macro. -* API: Replaced templated accessor functions with concrete ones. Should be simpler to deal with for FFIs. -* API: Optional automatic mass properties for shapes. Calculates the moment of inertia and center of gravity for you. -* API: Optional anchor point for bodies that is separate from the center of gravity. -* API: Added radius parameters to many functions dealing with shapes (moment calculation, initialization, etc). -* API: The convex hull and winding is automatically calculated when creating a poly shape. -* API: Added a cpShapesCollide() function to check overlap of arbitrary shapes. -* API: cpShape filter property to supersede layers and groups. -* API: Collision handlers now return a collision handler struct to make it simpler to set up callbacks. -* API: Wildcard collision types. -* API: The cpArbiterTotalImpulseWithFriction() function was renamed to cpArbiterTotalImpulse(). The old useless cpArbiterTotalImpulse() implementation was removed. -* API: Contacts now store the colliding point on the surface of both shapes. -* API: cpArbiterIsRemoval() to check if a separate callback is called due to a removal and not a true separating collision. -* API: Arbiters now only store one normal per pair of colliding shapes. -* API: cpBBNewForExtents(). -* API: Added a concrete kinematic body type to replace the confusing "rogue" body concept. -* API: Added a 2x3 affine transform type, cpTransform. -* API: Added a new debug rendering API. -* MISC: Numerous improvements to the collision detection. -* MISC: cpPolyline structs are passed by reference instead of value. (I've regretted that decision for years!) - -What's new in 6.2.2: -* Fixed some issues on arm64. -* PRO: Added a 64 bit NEON solver to use on arm64. - -What's new in 6.2.1: -* Added Android support to the CMake files. (Thanks Eric Wing!) -* Added a MSVC 2012 project file. (Thanks Leonid Usov!) -* Merged a fix for VAOs on Windows. (Thanks Leonid Usov!) -* Merged a couple of other minor fixes. -* BUG: Fixed a crash issue with the ChipmunkTileCache and ChipmunkPointCloudSampler classes. (Pro only). - -What's new in 6.2.0: -* Collision detection now primarily uses the GJK and EPA algorithms instead of SAT. Internally this was a rather huge change. o_O -* Improved collision point quality and better collision point identification. -* All shape types can now be given a rounding radius. -* Collisions are now guaranteed to have a maximum of 2 collision points. -* Poly to poly collision performance is slightly better when they have a radius. Slightly worse with none. -* Implemented smoothed segment collisions to prevent colliding with the "cracks" between segment shapes. -* API: (Officially) added cpSegmentShapeSetNeighbors() used to enable smoothed line collisions. -* API: Added cpBBCenter() to get the center of a bounding box. -* API: Added cpPolyShapeInit2() and cpPolyShapeNew2() to create poly shapes with a radius. (Horrible names yes, but it will go away in Chipmunk 7) -* API: Added cpBoxShapeInit3() and cpBoxShapeNew3() to create boxes with a radius. -* API: Added cpPolyShapeGetRadius() and cpPolyShapeSetRadius() (the latter only in chipmunk_unsafe.h). -* API: Added cpNearestPointQueryInfo.g which returns the gradient of the signed distance field for the shape. -* BUG: cpMomentForPoly() will now return a correct value for degenerate 2 vertex polygons. -* BUG: Fixed an issue where certain segment query calls would return a t value of 0 instead of 1 for a missed query. -* MISC: Passing cpvzero to cpvnormalize() will now return cpvzero. No need to worry about NaNs or cpvnormalize_safe(). -* MISC: Demo app now uses GLFW instead of GLUT, and has improved drawing and text rendering routines. - -What's new in 6.1.5: -* API: Added cpArbiter*SurfaceVelocity() to allow for custom surface velocity calculation. -* API: Added cpArbiteSetContactPointSet() to allow changing the contact geometry on the fly. -* API: Added cpSpaceConvertBodyToStatic() and cpSpaceConvertBodyToDynamic(). -* API: Added [ChipmunkBody velocityAt*Point:] methods to wrap their C equivalents. (Pro only) -* API: Added overridable [ChipmunkBody updateVelocity:...] and [ChipmunkBody updatePosition:] methods. (Pro only) -* API: Added .space properties to ChipmunkBody, ChipmunkShape and ChipmunkConstaint to wrap their C equivalents. (Pro only) -* API: Added overridable [ChipmunkConstraint preSolve:] and [ChipmunkConstraint postSolve:] methods. (Pro only) -* API: Added an ChipmunkMultiGrab.grabSort property that allows you to prioritize which shape is grabbed when there is overlap. (Pro only) -* MISC: Segment queries started inside of a shape now return t=0 and n=cpvzero instead of being undefined. -* MISC: Cleaned up a lot of common assertion messages to be more clear. -* MISC: Added a new demo called Shatter. -* MISC: Added a crushing force estimation example to the ContactGraph demo and a static/dynamic conversion example to Plink. -* MISC: Modified the Sticky demo to use the new cpArbiteSetContactPointSet() to avoid the use of unnecessary sensor shapes. -* MISC: [ChipmunkSpace addBounds:...] now returns a NSArray of the bounding segments. (Pro only) - -What's new in 6.1.4: -* MISC: Fixed a build script issue that was preventing the documentation from being generated. - -What's new in 6.1.3: -* BUG: Fixed a couple of very specific but fatal bugs that occur when sleeping is enabled and filtering collisions. -* BUG: Fixed an issue with cpvslerp() between very similar vectors. -* BUG: Fixed an issue with grab friction in ChipmunkMultiGrab. (Pro only) -* MISC: Implemented the cpConstraintGetImpulse() functionality for spring joints. -* MISC: Added more functions to chipmunk_ffi.h - -What's new in 6.1.2: -* API: Added a cpArbiter.data pointer. Now you can tag collisions with custom persistent data. -* API: Added segment to segment collisions (thanks to LegoCylon) -* API: cpSpaceAddPostStepCallback() now returns false if the callback was a duplicate. -* API: Added the ChipmunkAbstractSampler.marchThreshold property instead of hardcoding it to 0.5. -* API: Added ChipmunkGrooveJoint properties for the groove and joint anchors. -* API: ChipmunkMultiGrab now returns information about grabbed shapes. -* BUG: Fixed a minor (non-crashing, non-leaking) memory pooling issue with reindexing lots of static shapes. -* BUG: Fixed an issue with the slerp functions that would cause them to return incorrect results when given non-unit length input. -* BUG: Fixed a precision bug with the ChipmunkImage sampler classes that could cause artifacts or miss small features. -* BUG: Fixed a number of properties in Objective-Chipmunk that should have been nonatomic. -* BUG: Fixed a number of types in Objective-Chipmunk that were incorrectly id that should have been cpGroup, cpCollisionType etc. It's now possible to redefine them at compile time if you wish. -* MISC: Dropped armv6 support in favor of armv7s on iOS. (You can switch it back easily if you need.) -* MISC: Updated iOS build scripts to guess the latest SDK. -* MISC: Added the "Sticky Surfaces" demo as a cpArbiter.data example. -* MISC: Updated Objective-Chipmunk build scripts to always use the latest iOS SDK. - -What's new in 6.1.1: -* API: Renamed the new block based iterators as soon as possible to match the Apple convention ("_b" suffix). - -What's new in 6.1.0: -* API: Added a pthread based, multi-threaded solver to accelerate the game on multi-core systems. (Pro only) -* API: Added cpConvexHull() and CP_CONVEX_HULL() for generating convex hulls. -* API: Added cpPolylineConvexDecomposition_BETA() to generate an approximate concave decomposition of a polyline. (Pro only) -* API: Added [ChipmunkPolyline toConvexHull:] to generate approximate convex hulls. (Pro only). -* API: Added [ChipmunkPolylineSet toConvexHulls_BETA:]. (Pro only) -* API: Added nearest point queries. -* API: Added a push mode to ChipmunkMultiGrab so touches can interact with the scene even if they didn't initially touch a shape. (Pro only) -* API: Added optional block based iterators. -* API: Added a space property to cpBody, cpShape and cpConstraint types. -* BUG: Fixed an issue with changing the floating point and vector type on OS X. -* BUG: Fixed a pixel offset in ChipmunkImageSampler that could cause minor sampling artifacts. (Pro only) -* BUG: Fixed an issue where cpShape and cpConstraint structs could have garbage space pointers if cpcalloc() was redefined. -* BUG: Fixed assertions in cpArbiter getters to correctly reflect a contact count of 0 from separate() callbacks. -* BUG: Fixed a regression relating to registering post-step() callbacks from other post-step() callbacks. -* BUG: Fixed a minor memory leak for sleeping bodies when destroying a space. -* MISC: Point queries are now deprecated in preference to point queries. -* MISC: cpSpatialIndexPointQuery() was redundant and has been removed. Use cpSpatialIndexQuery() instead. -* MISC: cpShape*Query() functions now accept a NULL info pointer if you don't want detailed query info. -* MISC: The enableContactGraph property of cpSpace is deprecated and always be true. -* MISC: Added a new demos of the convex hull functions and a self balancing Unicycle. - -What's new in 6.0.3: -* API: Added a cpBBForCircle() convenience function. -* API: Added cpBBSegmentQuery() to check where a segment hits a cpBB. -* API: Added cpBodyGetVelAtWorldPoint() and cpBodyGetVelAtLocalPoint() to get point velocities on a body. -* API: Added cpArbiterTotalKE() to calculate the energy lost due to a collision. Great for calculating damage accurately. -* API: Added methods to get an ObjC pointer from a C chipmunk struct. -* API: Added a CHIPMUNK_ARBITER_GET_BODIES() macro for Objective-Chipmunk. -* API: The Objective-Chipmunk headers are now ARC compatible. -* API: Added a [ChipmunkSpace contains:] method to check if a ChipmunkObject has been added to the space or not. -* API: Added a cpBBNewForCircle() function. -* API: Added a cpBBSegmentQuery() function for raycasting againsts AABBs. -* BUG: Fixed a regression with ChipmunkSpace.bodies and ChipmunkSpace.shapes that caused crashes. -* BUG: Fixed a rare bug with postStep() callbacks and iterators. -* BUG: Fixed a border case in cpBBIntersectsSegment() that could cause missed segment queries. -* MISC: Added some new assertions for error conditions that were previously uncaught. -* MISC: Accelerated segment queries in cpBBTree by sorting the nodes. -* MISC: Added a new "Slice" demo that lets you cut up a polygon. -* MISC: Added NEON optimizations for Chipmunk Pro. Expect running on most ARM platforms to be 25-35% faster for contact heavy simulations. -* MISC: All ChipmunkObject instances added to a space are now retained, even composite ones. - -What's new in 6.0.2: -* API: Added cpSpaceIsLocked() to check if you are in a callback or not. -* API: Removed the long deprecated [ChipmunkSpace addShapeAHandler:] and [ChipmunkSpace addShapeBHandler:] methods. -* API: The ChipmunkObject protocol now can return any id object instead of just an NSSet. -* API: The largely useless [ChipmunkSpace addBaseObjects:] and [ChipmunkSpace removeBaseObjects:] methods were removed. -* API: Added [ChipmunkSpace smartAdd:] and [ChipmunkSpace smartRemove:] methods for a consistent API to remove objects inside and out of callbacks. -* API: Added [ChipmunkSpace addPostStepBlock:key:] to complement [ChipmunkSpace addPostStepCallback:selector:key:]. -* API: Added [ChipmunkSpace addPostStepAddition:]. -* API: Objective-Chipmunk collision handlers no longer retain their target to avoid reference cycles. -* API: Added callbacks to joints. -* BUG: Soft errors (only checked when debug mode is enabled) and warnings were disabled. Whoops. -* BUG: cpShapeIsSensor() was incorrectly named in chipmunk_ffi.h. -* BUG: It should be safe to call cpActivateBody() from an space iterator callback now. -* MISC: Very nice bouyancy demo added based on callbacks. -* MISC: Breakable Joints demo showing how to use the new joint callbacks. -* MISC: Player demo updated and greatly enhanced by Chipmunk 6 features. -* MISC: Changed adding a static body to a space from a warning to a hard error. -* MISC: cpGroup and cpCollisionType now default to uintptr_t so you can safely use pointers instead of ints for these types. -* MISC: Updated the MSVC10 project file. -* MISC: Updated the FFI defs. - -What's new in 6.0.1: -* BUG: Calling cpBodySetPos() on a sleeping body was delaying the Separate() handler callback if one existed. -* BUG: Fixed a bug where Separate() handler callbacks were not occuring when removing shapes. -* BUG: Calling cpBodyApplyForce() or cpBodyResetForces() was not activating sleeping bodies. -* API: Added cpSpaceEachConstraint(). -* API: Added a "CurrentTimeStep" property to cpSpace to retrieve the current (or most recent) timestep. -* MISC: Got rid of anonymous unions so that it is C99 clean again. - -What's new in 6.0.0: -Chipmunk 6.x's API is not quite 100% compatible with 5.x. Make sure you read the list of changes carefully. -Keep in mind that this is a x.0.0 release and that it's likely there are still some bugs I don't know about yet. I've spent a lot of effort rewritting the collision detection, sleeping, and contact graph algorithms that have required large changes and cleanup to the 5.x codebase. I've ironed out all the bugs that I know of, and the beta test went well. So it's finally time for 6! - -* API: Chipmunk now has hard runtime assertions that aren't disabled in release mode for many error conditions. Most people have been using release builds of Chipmunk during development and were missing out on very important error checking. -* API: Access to the private API has been disabled by default now and much of the private API has changed. I've added official APIs for all the uses of the private API I knew of. -* API: Added accessor functions for every property on every type. As Chipmunk's complexity has grown, it's become more difficult to ignore accessors. You are encouraged to use them, but are not required to. -* API: Added cpSpaceEachBody() and cpSpaceEachShape() to iterate bodies/shapes in a space. -* API: Added cpSpaceReindexShapesForBody() to reindex all the shapes attached to a particular body. -* API: Added a 'data' pointer to spaces now too. -* API: cpSpace.staticBody is a pointer to the static body instead of a static reference. -* API: The globals cp_bias_coef, cp_collision_slop, cp_contact_persistence have been moved to properties of a space. (collisionBias, collisionSlop, collisionPersistence respectively) -* API: Added cpBodyActivateStatic() to wake up bodies touching a static body with an optional shape filter parameter. -* API: Added cpBodyEachShape() and cpBodyEachConstraint() iterators to iterate the active shapes/constraints attached to a body. -* API: Added cpBodyEeachArbiter() to iterate the collision pairs a body is involved in. This makes it easy to perform grounding checks or find how much collision force is being applied to an object. -* API: The error correction applied by the collision bias and joint bias is now timestep independent and the units have completely changed. -* FIX: Units of damping for springs are correct regardless of the number of iterations. Previously they were only correct if you had 1 or 2 iterations. -* MISC: Numerous changes to help make Chipmunk work better with variable timesteps. Use of constant timesteps is still highly recommended, but it is now easier to change the time scale without introducing artifacts. -* MISC: Performance! Chipmunk 6 should be way faster than Chipmunk 5 for almost any game. -* MISC: Chipmunk supports multiple spatial indexes and uses a bounding box tree similar to the one found in the Bullet physics library by default. This should provide much better performance for scenes with objects of differening size and works without any tuning for any scale. - - -What's new in 5.3.5 -* FIX: Fixed spelling of cpArbiterGetDepth(). Was cpArbiteGetDepth() before. Apparently nobody ever used this function. -* FIX: Added defines for M_PI and M_E. Apparently these values were never part of the C standard math library. Who knew!? -* FIX: Added a guard to cpBodyActivate() so that it's a noop for rogue bodies. -* FIX: Shape queries now work with (and against) sensor shapes. -* FIX: Fixed an issue where removing a collision handler while a separate() callback was waiting to fire the next step would cause crashes. -* FIX: Fixed an issue where the default callback would not be called for sensor shapes. -* FIX: Resetting or applying forces or impulses on a body causes it to wake up now. -* MISC: Added a check that a space was not locked when adding or removing a callback. -* MISC: Removed cpmalloc from the API and replaced all occurences with cpcalloc -* MISC: Added a benchmarking mode to the demo app. -trial runs it in time trial mode and -bench makes it run some benchmarking demos. - -What's new in 5.3.4: -* FIX: cpBodyActivate() can now be called from collision and query callbacks. This way you can use the setter functions to change properties without indirectly calling cpBodyActivate() and causing an assertion. -* FIX: cpArbiterGetContactPointSet() was returning the collision points for the normals. -* FIX: cpSpaceEachBody() now includes sleeping bodies. -* FIX: Shapes attached to static rogue bodies created with cpBodyNewStatic() are added as static shapes. -* MISC: Applied a user patch to update the MSVC project and add a .def file. - -What's new in 5.3.3: -* API: Added cpArbiteGetCount() to return the number of contact points. -* API: Added helper functions for calculating areas of Chipmunk shapes as well as calculating polygon centroids and centering polygons on their centroid. -* API: Shape queries. Query a shape to test for collisions if it were to be inserted into a space. -* API: cpBodyInitStatic() and cpBodyNewStatic() for creating additional static (rogue) bodies. -* API: cpBodySleepWithGroup() to allow you to create groups of sleeping objects that are woken up together. -* API: Added overloaded *, +, - and == operators for C++ users. -* API: Added cpSpaceActivateShapesTouchingShape() to query for and activate any shapes touching a given shape. Useful if you ever need to move a static body. -* FIX: Fixed an extremely rare memory bug in the collision cache. -* FIX: Fixed a memory leak in Objective-Chipmunk that could cause ChipmunkSpace objects to be leaked. -* MISC: C struct fields and function that are considered private have been explicitly marked as such. Defining CP_ALLOW_PRIVATE_ACCESS to 0 in Chipmunk.h will let you test which parts of the private API that you are using and give me feedback about how to build proper APIs in Chipmunk 6 for what you are trying to do. -* MISC: Allow CGPoints to be used as cpVect on Mac OS X as well as iOS. - - -What's new in 5.3.2: -* FIX: Collision begin callbacks were being called continuously for sensors or collisions rejected from the pre-solve callback. -* FIX: Plugged a nasty memory leak when adding post-step callbacks. -* FIX: Shapes were being added to the spatial hash using an uninitialized bounding box in some cases. -* FIX: Perfectly aligned circle shapes now push each other apart. -* FIX: cpBody setter functions now call cpBodyActivate(). -* FIX: Collision handler targets are released in Objective-Chipmunk when they are no longer needed instead of waiting for the space to be deallocated. -* API: cpSpaceSegmentQuery() no longer returns a boolean. Use cpSpaceSegmentQueryFirst() instead as it's more efficient. -* NEW: cpSpaceRehashShape() Rehash an individual shape, active or static. -* NEW: cpBodySleep() Force a body to fall asleep immediately. -* NEW: cpConstraintGetImpulse() Return the most recent impulse applied by a constraint. -* NEW: Added setter functions for the groove joint endpoints. -* MISC: A number of other minor optimizations and fixes. - -What's new in 5.3.1: - * NEW: Added a brand new tutorial for Objective-Chipmunk: SimpleObjectiveChipmunk that can be found in the Objective-Chipmunk folder. - * NEW: Proper API docs for Objective-Chipmunk. - * NEW: Updated the included Objective-Chipmunk library. - * FIX: Fixed a rare memory crash in the sensor demo. - * FIX: Fixed some warnings that users submitted. - -What's new in 5.3.0: - * FIX: Fixed the source so it can compile as C, C++, Objective-C, and Objective-C++. - * FIX: Fixed cp_contact_persistence. It was broken so that it would forget collision solutions after 1 frame instead of respecting the value set. - * OPTIMIZATION: Several minor optimizations have been added. Though performance should only differ by a few percent. - * OPTIMIZATION: Chipmunk now supports putting bodies to sleep when they become inactive. - * API: Elastic iterations are now deprecated as they should no longer be necessary. - * API: Added API elements to support body sleeping. - * API: Added a statically allocated static body to each space for attaching static shapes to. - * API: Static shapes attached to the space's static body can simply be added to the space using cpSpaceAddShape(). - * NEW: New MSVC projects. - * NEW: Added boolean and time stamp types for clarity. - -What's new in 5.2.0: - * OPTIMIZATION: Chipmunk structs used within the solver are now allocated linearly in large blocks. This is much more CPU cache friendly. Programs have seen up to 50% performance improvements though 15-20% should be expected. - * API: Shape references in cpArbiter structs changed to private_a and private_b to discourage accessing the fields directly and getting them out of order. You should be using cpArbiterGetShapes() or CP_ARBITER_GET_SHAPES() to access the shapes in the correct order. - * API: Added assertion error messages as well as warnings and covered many new assertion cases. - * FIX: separate() callbacks are called before shapes are removed from the space to prevent dangling pointers. - * NEW: Added convenience functions for creating box shapes and calculating moments. - - -What's new in 5.1.0: - * FIX: fixed a NaN issue that was causing raycasts for horizontal or vertical lines to end up in an infinite loop - * FIX: fixed a number of memory leaks - * FIX: fixed warnings for various compiler/OS combinations - * API: Rejecting a collision from a begin() callback permanently rejects the collision until separation - * API: Erroneous collision type parameterns removed from cpSpaceDefaulteCollisionHandler() - * MOVE: FFI declarations of inlined functions into their own header - * MOVE: Rearranged the project structure to separate out the header files into a separate include/ directory. - * NEW: Added a static library target for the iPhone. - * NEW: Type changes when building on the iPhone to make it friendlier to other iPhone APIs - * NEW: Added an AABB query to complement point and segment queries - * NEW: CP_NO_GROUP and CP_ALL_LAYERS constants - -What's new in 5.0.0: - * Brand new Joint/Constraint API: New constraints can be added easily and are much more flexible than the old joint system - * Efficient Segment Queries - Like raycasting, but with line segments. - * Brand new collision callback API: Collision begin/separate events, API for removal of objects within callbacks, more programable control over collision handling. diff --git a/doc-src/Doxyfile b/doc-src/Doxyfile deleted file mode 100644 index 715459e7..00000000 --- a/doc-src/Doxyfile +++ /dev/null @@ -1,1633 +0,0 @@ -# Doxyfile 1.7.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "Chipmunk2D Pro API Reference" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 7.0.3 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ../doc/API-Reference - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 2 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = doxygen_main \ - ../include/chipmunk \ - ../objectivec/include/ObjectiveChipmunk - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = NO - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvances is that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = NO - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = NO - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans.ttf - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/doc-src/MakeDocs.rb b/doc-src/MakeDocs.rb deleted file mode 100644 index d46eb095..00000000 --- a/doc-src/MakeDocs.rb +++ /dev/null @@ -1,106 +0,0 @@ -require 'rubygems' -require 'redcloth' -require 'erb' -require 'uri/common' - - -class Node - attr_reader :anchor - attr_reader :children - - def initialize(title, anchor, parent) - @title = title - @anchor = (parent.anchor ? "#{parent.anchor}-#{anchor}" : anchor) - - @children = [] - parent.children << self - end - - def outline(level) - children = "" - if level == 1 - children = "
    #{@children.map{|child| child.outline(level + 1)}.join}
" - end - - ["
  • #{@title}#{children}
  • "] - end - - Root = Struct.new(:anchor, :children).new(nil, []) - def Root.outline - "
      #{self.children.map{|child| child.outline(1)}.join}
    " - end -end - -def pop_open_div(name) - return %{
    Hide/Show #{name}
    - -<%= h 1, "Munk2D 8.0.0", "Title" %> - -<%= h 2, "Fork Info - Start here", "ForkInfo" %> - -"Munk2D":https://github.com/viblo/Munk2D is a friendly fork of the original "Chipmunk2D":https://github.com/slembcke/Chipmunk2D 2D physics library. - -The main purpose of this fork is to be a compainion for the Python 2D physics library "Pymunk":https://www.pymunk.org which is built on Chipmunk2D. Given the slow pace of development of Chipmunk2D, and some unique requirements and oppurtunitites of Pymunk this is something that have grown over a long time. What really made me (Viblo/author of Pymunk) consider to make it more formal was the discussion "here":https://github.com/slembcke/Chipmunk2D/issues/237 with Slembcke, the creator of Chipmunk2D. - -I do not forsee that I have the time, motivation or skills to really revive Chipmunk2D. However, I hope to incorporate minor new features, and a bunch of fixes. Any changes are driven by what make sense from the Pymunk use case. However, I do think many of these changes are useful also to users outside of Pymunk, and you are of course free to use the fork for other projects / languages as well. - -The rest of the documentation is minimally edited from the original Chipmunk2D. - -<%= h 2, "Intro", "Intro" %> - -Chipmunk2D is a 2D rigid body physics library distributed under the MIT license. It is blazingly fast, portable, numerically stable, and easy to use. For this reason it has been used in hundreds of games across just about every system you can name. This includes top quality titles such as Night Sky for the Wii and many #1 sellers on the iPhone App Store! I've put thousands of hours of work over many years to make Chipmunk2D what it is today. If you find Chipmunk2D has saved you a lot of time, please consider "donating":https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6666552. You'll make an indie game developer very happy! - -First of all, I would like to give a Erin Catto a big thank you, as Chipmunk2D's impulse solver was directly inspired by his example code way back in 2006. (Now a full fledged physics engine all its own: "Box2D.org":http://www.box2d.org/). His contact persistence idea allows for stable stacks of objects with very few iterations of the solver. My previous solver produced mushy piles of objects or required a large amount of CPU to operate stably. - - -<%= h 2, "Why a C Library?", "WhyC" %> - -A lot of people ask me why I wrote Chipmunk2D in C instead of _pick your favorite language here_. I tend to get really excited about different programming languages. Depending on the month, take your pick of Scheme, OCaml, Ruby, Objective-C, ooc, Lua, Io... the list goes on. The one common factor between most any language is that they are usually dead simple to make bindings to C code. I also wanted Chipmunk2D to be fast, portable, easy to optimize and easy to debug. Writing Chipmunk2D in C made it simpler to achieve all of those goals. - -That said, I've never developed a whole game in C and I probably never will. There are much more interesting and fun languages than C with all sorts of nice features like garbage collection, closures and all sorts of unique object oriented runtimes. Check out the "Bindings and Ports":http://chipmunk2d.net/bindingsAndPorts.php page to see if you can use Chipmunk2D from your language of choice. Because Chipmunk2D is written in a subset of C99 it compiles cleanly as C, C++, Objective-C and Objective-C++ code, making it easy to integrate into projects in those languages. - - -<%= h 2, "Limitations of a C API:", "Limitations" %> - -Chipmunk does provide overloaded operators for @*@, @+@, and @-@ (unary and binary) if you are using C++, but falls back to using functions such as @cpvadd()@ and @cpvsub()@ for C code. This is a little harder to read, but works OK once you get used to it. Most of the interesting vector operations that are possible don't have a symbol for them anyway (at least not on a keyboard). - -Another problem for a C API is access restriction. There are many structs, fields and functions in Chipmunk that are only meant to be used internally. To work around this, I have a separate header full of Chipmunk's private API, @chipmunk_private.h@. I also use a macro, @CP_PRIVATE()@ to mangle names in public structures. While you can feel free to include this header or use the macro in your own code to access the private API, be aware that the fields and functions may be renamed or disappear without warning and I have no plans to document or support usage of the private API. - -<%= h 2, "Get it, Compile it:", "Compiling" %> - -If you haven't downloaded it yet, you can always download the newest version of Chipmunk2D "here":http://chipmunk-physics.net/release/ChipmunkLatest.tgz. Inside you'll find a command line build script that works with "CMake":http://www.cmake.org/, a XCode project and project files for Visual Studio '09 and '10. - - -<%= h 3, "Debug or Release?", "DebugRelease" %> - -Debug mode might be slightly slower, but will include a lot of error checking assertions that can help you find bugs quicker such as removing objects twice or doing things that might cause unsolvable collisions. I highly recommend you use a debug build until you are ready to ship the game and only then switch to a release build. - - -<%= h 3, "XCode (Mac/iPhone)", "XCode" %> - -The included XCode project has targets for building a static library for the Mac or iOS. Additionally, you might want to just run the @xcode/iphonestatic.command@ or @xcode/macstatic.command@ to build you a directory with the headers and debug/release static libraries that you can just drop right into your projects. Including Chipmunk in your project with all the correct compiler flags applied couldn't be simpler. The iPhone script generates a "fat" library that can be used with both the iOS simulator and devices. The device version is compiled as release, and the simulator version is compiled as debug. - - -<%= h 3, "MSVC", "MSVC" %> - -I rarely use MSVC, but others have chipped in to help me maintain Visual Studio project files. The MSVC 10 project should work, as I usually remember to test that before making a stable release. The MSVC 9 project may not as I don't have access to that version. Let me know if there are any issues. - - -<%= h 3, "Command Line", "CommandLine" %> - -The CMake build script should work on any system (Unix/Win/Mac) as long as you have CMake installed. It can even generate XCode or MSVC projects if you want (see CMake's documentation for more information). - -To compile a Chipmunk debug build on the command line, all you need to do is run: - -
    cmake -D CMAKE_BUILD_TYPE=Debug .
    -make
    - -If the @-D CMAKE_BUILD_TYPE=Debug@ option is left out, it will make a release build instead. - -Why CMake? Somebody was kind enough to create the build scripts for me originally, and it seems to handle a lot of the cross-platform issues nicely. I know some people really hate having to install some random non-make build system in order to compile things, but it has saved me a lot of time and effort. - -<%= h 2, "Hello Chipmunk (World)", "HelloChipmunk" %> - -Hello world Chipmunk style. Create a simple simulation where a ball falls onto a static line segment, then rolls off. Print out the coordinates of the ball. - -<%= pop_open_example "Hello Chipmunk" %> - - -<%= h 2, "Support:", "Support" %> - -The best way to get support is to visit the "Chipmunk Forums":http://www.slembcke.net/forums/viewforum.php?f=1. There are plenty of people around using Chipmunk on the just about every platform I've ever heard of. If you are working on a commercial project, Howling Moon Software (my company) is "available for contracting":http://howlingmoonsoftware.com/contracting.php. We can help with implementing custom Chipmunk behaviors, as well as priority bug fixes and performance tuning. - - -<%= h 2, "Contact:", "ContactUS" %> - -If you find any bugs in Chipmunk, errors or broken links in this document, or have a question or comment about Chipmunk you can contact me at slembcke(at)gmail(dot)com. (email or GTalk) - - -<%= h 2, "License:", "License" %> - -Chipmunk is licensed under the MIT license. - -
    -Copyright (c) 2007-2015 Scott Lembcke and Howling Moon Software
    -
    -Permission is hereby granted, free of charge, to any person obtaining a copy
    -of this software and associated documentation files (the "Software"), to deal
    -in the Software without restriction, including without limitation the rights
    -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    -copies of the Software, and to permit persons to whom the Software is
    -furnished to do so, subject to the following conditions:
    -
    -The above copyright notice and this permission notice shall be included in
    -all copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    -SOFTWARE.
    -
    - -This means that you do not have to buy a license or pay to use Chipmunk in commercial projects. (Though we really appreciate donations) - - -<%= h 2, "Links:", "Links" %> - -* "Chipmunk Forums":http://chipmunk2d.net/forum - The official forum Chipmunk2D forum. -* "Howling Moon Software":http://howlingmoonsoftware.com/ - The software company I co-founded. (We are available for contract work!) -* "Games":http://chipmunk2d.net/games.php - A small list of games we know that use Chipmunk. - - -<%= h 1, "Chipmunk2D Basics:", "Basics" %> - -<%= h 2, "Overview:", "Overview" %> - -There are 4 basic object types you will use in Chipmunk. - -* *Rigid Bodies:* A rigid body holds the physical properties of an object. (mass, position, rotation, velocity, etc.) It does not have a shape until you attach one or more collision shapes to it. If you’ve done physics with particles before, rigid bodies differ in that they are able to rotate. Rigid bodies generally tend to have a 1:1 correlation to sprites in a game. You should structure your game so that you use the position and rotation of the rigid body for drawing your sprite. -* *Collision Shapes:* By attaching shapes to bodies, you can define the a body’s shape. You can attach as many shapes to a single body as you need to in order to define a complex shape. Shapes contain the surface properties of an object such as how much friction or elasticity it has. -* *Constraints/Joints:* Constraints and joints describe how bodies are attached to each other. -* *Spaces:* Spaces are containers for simulating objects in Chipmunk. You add bodies, shapes and joints to a space and then update the space as a whole. They control how all the rigid bodies, shapes, and constraints interact together. - -There is often confusion between rigid bodies and their collision shapes in Chipmunk and how they relate to sprites. A sprite would be a visual representation of an object, while a collision shape is an invisible property that defines how objects should collide. Both the sprite's and the collision shape's position and rotation are controlled by the motion of a rigid body. Generally you want to create a game object type that ties these things all together. - - -<%= h 2, "Memory Management the Chipmunk way:", "Memory" %> - -For most of the structures you will use, Chipmunk uses a more or less standard and straightforward set of memory management functions. Take the "cpSpace":#cpSpace struct for example: - -* @cpSpaceNew()@ - Allocates and initializes a @cpSpace@ struct. It calls @cpSpaceAlloc()@ then @cpSpaceInit()@. -* @cpSpaceFree(cpSpace *space)@ - Destroys and frees the @cpSpace@ struct. - -You are responsible for freeing any structs that you allocate. Chipmunk does not do reference counting or garbage collection. If you call a @new@ function, you must call the matching @free@ function or you will leak memory. - -Additionally if you need more control over allocation and initialization because you are allocating temporary structs on the stack, writting a language binding, or working in a low memory environment you can also use the following functions. _Most people will never have any need to use these functions._ - -* @cpSpaceAlloc()@ - Allocates but does not initialize a @cpSpace@ struct. All allocation functions look more or less like this: @return (cpSpace *)cpcalloc(1, sizeof(cpSpace));@ You can write your own allocation functions if you want. It is not a requirement that the memory be zeroed. -* @cpSpaceInit(cpSpace *space)@ - Initializes a @cpSpace@ struct. -* @cpSpaceDestroy(cpSpace *space)@ - Frees all memory allocated by @cpSpaceInit()@, but does not free the @cpSpace@ struct itself. - -Like calls to the @new@ and @free@ functions. Any memory allocated by an @alloc@ function must be freed by @cpfree()@ or similar. Any call to an @init@ function must be matched with its @destroy@ function. - -To further ease integration with garbage collectors or other memory management constraints, Chipmunk has a number of compile time defines (@cpcalloc()@, @cprealloc()@, and @cpfree()@) that can be overriden. If you aren't using Chipmunk from a garbage collected language, I'd highly recommend using libGC. It provides nearly transparent garbage collection for C based languages. - -<%= h 2, "Basic Types:", "Types" %> - -@chipmunk_types.h@ defines a number of basic types that Chipmunk uses. These can be changed at compile time to better suit your needs: -* @cpFloat@: Floating point type. Defaults to @double@. -* @cpVect@: 2D vector type. "cpVect documentation":#cpVect -* @cpBool@: Like every good C library that wants good cross language compatibility, you end up defining your own boolean type. :-\ Defaults to @int@. -* @cpDataPointer@: Pointer type defined for callbacks and the user definable data pointer on most Chipmunk structs. Defaults to @void*@. -* @cpCollisionType@: Unique identifier for collision shape types. Defaults to @unsigned int@. Defined type must support the @==@ operator. -* @cpGroup@: Unique identifier for collision groups. Defaults to @unsigned int@. A @CP_NO_GROUP@ value is defined that can be used when you don't want to specify a group. Defined type must support the equality @==@ operator. -* @cpBitmask@: Type used for collision filter categories and masks. Defaults to @unsigned int@. Defined type must support the bitwise AND @&@ operator. -* @cpTransform@: Type used for 2x3 affine transforms in Chipmunk. - -If you are writting a game engine or language binding on top of Chipmunk, you might want to choose to use object references instead of integers for collision type and group. I often use class pointers for collision types and game object pointers for groups. It's much simpler than keeping a table of enumerations around. - -*Note:* On the iPhone, @cpFloat@ is defined as @float@ and @cpVect@ is an alias for @CGPoint@ for performance and compatibility reasons. - -<%= h 2, "Math the Chipmunk way:", "Math" %> - -First of all, Chipmunk uses double precision floating point numbers throughout its calculations by default. This is likely to be faster on most modern desktop processors, and means you don't have to worry as much about floating point accuracy. You can change the floating point type used by Chipmunk when compiling the library. Look in @chipmunk_types.h@. - -Chipmunk defines a number of aliases for common math functions so that you can choose to use floats or doubles for Chipmunk's floating point type. In your own code, there probably isn't a strong reason to use these aliases unless you expect you might want to change Chipmunk's floating point type later and a 2% performance hit from using the wrong float/double version of math functions will matter. - -However, there are a few unique functions you will probably find very useful: - -* @cpFloat cpfclamp(cpFloat f, cpFloat min, cpFloat max)@ - Clamp @f@ to be between @min@ and @max@. -* @cpFloat cpflerp(cpFloat f1, cpFloat f2, cpFloat t)@ - Linearly interpolate between @f1@ and @f2@. -* @cpFloat cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d)@ - Linearly interpolate from @f1@ towards @f2@ by no more than @d@. - -Floating point infinity is defined as @INFINITY@. This is defined by many math libraries, but is not actually part of the C standard library. - -<%= h 1, "Chipmunk Vectors: @cpVect@", "cpVect" %> - -<%= h 2, "Struct Definition, Constants and Constructors:", "Basics" %> - -
    typedef struct cpVect{
    -	cpFloat x, y;
    -} cpVect
    - -p(expl). 2D vector packed into a struct. No surprises here. - -
    static const cpVect cpvzero = {0.0f,0.0f};
    - -p(expl). Constant for the zero vector. - -
    cpVect cpv(const cpFloat x, const cpFloat y)
    - -p(expl). Convenience constructor for creating new @cpVect@ structs. - -<%= h 2, "Operations:", "Operations" %> - -* @cpBool cpveql(const cpVect v1, const cpVect v2)@ - Check if two vectors are equal. Chipmunk provides an overloaded @==@ operator when used in C++ programs. _(Be careful when comparing floating point numbers!)_ -* @cpVect cpvadd(const cpVect v1, const cpVect v2)@ - Add two vectors. Chipmunk provides an overloaded @+@ operator when used in C++ programs. -* @cpVect cpvsub(const cpVect v1, const cpVect v2)@ - Subtract two vectors. Chipmunk provides an overloaded @-@ operator when used in C++ programs. -* @cpVect cpvneg(const cpVect v)@ - Negate a vector. Chipmunk provides an overloaded unary negation operator @-@ when used in C++ programs. -* @cpVect cpvmult(const cpVect v, const cpFloat s)@ - Scalar multiplication. Chipmunk provides an overloaded @*@ operator when used in C++ programs. -* @cpFloat cpvdot(const cpVect v1, const cpVect v2)@ - Vector dot product. -* @cpFloat cpvcross(const cpVect v1, const cpVect v2)@ - 2D vector cross product analog. The cross product of 2D vectors results in a 3D vector with only a z component. This function returns the value along the z-axis. -* @cpVect cpvperp(const cpVect v)@ - Returns a perpendicular vector. (90 degree rotation) -* @cpVect cpvrperp(const cpVect v)@ - Returns a perpendicular vector. (-90 degree rotation) -* @cpVect cpvproject(const cpVect v1, const cpVect v2)@ - Returns the vector projection of @v1@ onto @v2@. -* @cpVect cpvrotate(const cpVect v1, const cpVect v2)@ - Uses complex multiplication to rotate @v1@ by @v2@. Scaling will occur if @v1@ is not a unit vector. -* @cpVect cpvunrotate(const cpVect v1, const cpVect v2)@ - Inverse of @cpvrotate()@. -* @cpFloat cpvlength(const cpVect v)@ - Returns the length of @v@. -* @cpFloat cpvlengthsq(const cpVect v)@ - Returns the squared length of @v@. Faster than @cpvlength()@ when you only need to compare lengths. -* @cpVect cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t)@ - Linearly interpolate between @v1@ and @v2@. -* @cpVect cpvlerpconst(cpVect v1, cpVect v2, cpFloat d)@ - Linearly interpolate between @v1@ towards @v2@ by distance @d@. -* @cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t)@ - Spherical linearly interpolate between @v1@ and @v2@. -* @cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a)@ - Spherical linearly interpolate between @v1@ towards @v2@ by no more than angle @a@ in radians. -* @cpVect cpvnormalize(const cpVect v)@ - Returns a normalized copy of @v@. As a special case, it returns @cpvzero@ when called on @cpvzero@. -* @cpVect cpvclamp(const cpVect v, const cpFloat len)@ - Clamp @v@ to length @len@. -* @cpFloat cpvdist(const cpVect v1, const cpVect v2)@ - Returns the distance between @v1@ and @v2@. -* @cpFloat cpvdistsq(const cpVect v1, const cpVect v2)@ - Returns the squared distance between @v1@ and @v2@. Faster than @cpvdist()@ when you only need to compare distances. -* @cpBool cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist)@ - Returns true if the distance between @v1@ and @v2@ is less than @dist@. -* @cpVect cpvforangle(const cpFloat a)@ - Returns the unit length vector for the given angle (in radians). -* @cpFloat cpvtoangle(const cpVect v)@ - Returns the angular direction @v@ is pointing in (in radians). - - -<%= h 1, "Chipmunk Axis Aligned Bounding Boxes: @cpBB@", "cpBB" %> - -<%= h 2, "Struct Definition and Constructors:", "Basics" %> - -
    typedef struct cpBB{
    -	cpFloat l, b, r ,t;
    -} cpBB
    - -p(expl). Simple bounding box struct. Stored as left, bottom, right, top values. - -
    cpBB cpBBNew(const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t)
    - -p(expl). Convenience constructor for @cpBB@ structs. Like @cpv()@ this function returns a copy and not a malloced pointer. - -
    cpBB cpBBNewForExtents(const cpVect c, const cpFloat hw, const cpFloat hh)
    - -p(expl). Convenience constructor for making a @cpBB@ fitting with a center point and half width and height. - -
    cpBB cpBBNewForCircle(const cpVect p, const cpFloat r)
    - -p(expl). Convenience constructor for making a @cpBB@ fitting a circle at position @p@ with radius @r@. - - -<%= h 2, "Operations:", "Operations" %> - -* @cpBool cpBBIntersects(const cpBB a, const cpBB b)@ - Returns true if the bounding boxes intersect. -* @cpBool cpBBContainsBB(const cpBB bb, const cpBB other)@ - Returns true if @bb@ completely contains @other@. -* @cpBool cpBBContainsVect(const cpBB bb, const cpVect v)@ - Returns true if @bb@ contains @v@. -* @cpBB cpBBMerge(const cpBB a, const cpBB b)@ - Return the minimal bounding box that contains both @a@ and @b@. -* @cpBB cpBBExpand(const cpBB bb, const cpVect v)@ - Return the minimal bounding box that contains both @bb@ and @v@. -* @cpVect cpBBCenter(const cpBB bb)@ - Return the center of @bb@. -* @cpFloat cpBBArea(cpBB bb)@ - Return the area of @bb@. -* @cpFloat cpBBMergedArea(cpBB a, cpBB b)@ - Merges @a@ and @b@ then returns the area of the merged bounding box. -* @cpFloat cpBBSegmentQuery(cpBB bb, cpVect a, cpVect b)@ - Returns the fraction along the segment query the cpBB is hit. Returns INFINITY if it doesn't hit. -* @cpBool cpBBIntersectsSegment(cpBB bb, cpVect a, cpVect b)@ - Returns true if the segment defined by endpoints @a@ and @b@ intersect @bb@. -* @cpVect cpBBClampVect(const cpBB bb, const cpVect v)@ - Returns a copy of @v@ clamped to the bounding box. -* @cpVect cpBBWrapVect(const cpBB bb, const cpVect v)@ - Returns a copy of @v@ wrapped to the bounding box. - - -<%= h 1, "Chipmunk Rigid Bodies: @cpBody@", "cpBody" %> - -<%= h 2, "Dynamic, Kinematic, and Static Bodies:", "BodyTypes" %> - -Chipmunk supports three different types of bodies with unique behavioral and performance characteristics. - -Dynamic bodies are the default body type. They react to collisions, are affected by forces and gravity, and have a finite amount of mass. These are the type of bodies that you want the physics engine to simulate for you. Dynamic bodies interact with all types of bodies and can generate collision callbacks. - -Kinematic bodies are bodies that are controlled from your code instead of inside the physics engine. They arent affected by gravity and they have an infinite amount of mass so they don't react to collisions or forces with other bodies. Kinematic bodies are controlled by setting their velocity, which will cause them to move. Good examples of kinematic bodies might include things like moving platforms. Objects that are touching or jointed to a kinematic body are never allowed to fall asleep. - -Static bodies are bodies that never (or rarely) move. Using static bodies for things like terrain offers a big performance boost over other body types- because Chipmunk doesn't need to check for collisions between static objects and it never needs to update their collision information. Additionally, because static bodies don't move, Chipmunk knows it's safe to let objects that are touching or jointed to them fall asleep. Generally all of your level geometry will be attached to a static body except for things like moving platforms or doors. Every space provide a built-in static body for your convenience. Static bodies can be moved, but there is a performance penalty as the collision information is recalculated. There is no penalty for having multiple static bodies, and it can be useful for simplifying your code by allowing different parts of your static geometry to be initialized or moved separately. - -<%= h 2, "Movement, Teleportation, and Velocity:", "Movement" %> - -A graphics engine only needs to know the position of an object for each frame that its drawn. For a physics engine, this isn't enough information to calculate a collision response. When you set the position of a body, you are effectively asking it to teleport itself. This means that it will instantly move to its new position instead of moving through space and time like a normal object. If you teleport an object so that it overlaps another one, the best the physics engine can do is to attempt to push the objects apart again since there is no information about their movement. This generally results in very mushy looking collisions. So instead of setting the position of an object, it's better to set its velocity and allow the physics engine to update the position. That way it can resolve any resulting colisions natuarally since it knows how the objects were moving. This is why kinematic bodies work the way they do. You set the velocity, and the physics updates their position so the two are never out of sync. - - -For dynamic bodies, setting the velocity explicitly every frame can cause problems. For example, a problem occurs when a light dynamic body (like a person) is pressed against a heavy dynamic body (like a car), and you set velocity of the small object so that it's pushing it into the big body. To the physics engine, the change in velocity is the same as applying a large impulse (a very short, very large force). Even if the velocity is low, the large force can allow the small body to push the big body, even when it normally wouldn't be able to. For example, a person walking into a car can overpower the car's friction and cause it to creep along the ground slowly. Additionally, when you set the velocity of an object that is already in contact, it can cause the two objects to overlap by a small amount. The easiest way to avoid both of these problems is to make smaller changes to the body's velocity, accelerating it over a fraction of a second instead of a single frame. An even better solution is to use constraints to move the object. For an example, look at how the Tank and Crane demos drive their constraints and use the maximum bias and force properties. The mouse control in the demo application works the same way. - -<%= h 2, "Memory Management Functions:", "Memory" %> - -
    cpBody *cpBodyAlloc(void)
    -cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i)
    -cpBody *cpBodyNew(cpFloat m, cpFloat i)
    -
    -cpBody *cpBodyInitKinematic(cpBody *body)
    -cpBody *cpBodyNewKinematic()
    -
    -cpBody *cpBodyInitStatic(cpBody *body)
    -cpBody *cpBodyNewStatic()
    -
    -void cpBodyDestroy(cpBody *body)
    -void cpBodyFree(cpBody *body)
    - -p(expl). Standard set of Chipmunk memory management functions. @m@ and @i@ are the mass and moment of inertia for the body. Guessing the mass for a body is usually fine, but guessing a moment of inertia can lead to a very poor simulation so it's recommended to use Chipmunk's moment calculations to estimate the moment for you. Be careful not to free a body before any shapes or constraints attached to it have been removed from a space. - -<%= h 2, "Creating Dynamic Bodies:", "DynamicBodies" %> - -There are two ways to set up a dynamic body. The easiest option is to create a body with a mass and moment of 0, and set the mass or density of each collision shape added to the body. Chipmunk will automatically calculate the mass, moment of inertia, and center of gravity for you. This is probably preferred in most cases. - -TODO example - -The other option is to set the mass of the body when it's created, and leave the mass of the shapes added to it as 0.0. This approach is more flexible, but is not as easy to use. *Don't* set the mass of both the body and the shapes. If you do so, it will recalculate and overwite your custom mass value when the shapes are added to the body. - -TODO example - - -<%= h 2, "Properties:", "Properties" %> - -Chipmunk provides getter/setter functions for a number of properties on rigid bodies. Setting most properties automatically wakes the rigid bodies up if they were sleeping. You can also set the fields directly on the cpBody struct if you wish. They are documented in the headers. - -
    cpBodyType cpBodyGetType(const cpBody *body)
    -void cpBodySetType(cpBody *body, cpBodyType)
    - -p(expl). Set the type of a body (dynamic, kinematic, static). See the section on "BodyTypes":#BodyTypes for more information. When changing an body to a dynamic body, the mass and moment of inertia are recalculated from the shapes added to the body. Custom calculated moments of inertia are not preseved when changing types. This function cannot be called directly in a collision callback. See "Post-Step Callbacks":#PostStep for more information. - -
    cpSpace *cpBodyGetSpace(const cpBody *body)
    - -p(expl). The @cpSpace@ this body is currently added to, or @NULL@ if it is not currently added to a space. - -
    cpFloat cpBodyGetMass(const cpBody *body)
    -void cpBodySetMass(cpBody *body, cpFloat m)
    - -p(expl). Mass of the body. - -
    cpFloat cpBodyGetMoment(const cpBody *body)
    -void cpBodySetMoment(cpBody *body, cpFloat i)
    - -p(expl). Moment of inertia (MoI or sometimes just moment) of the body. The moment is like the rotational mass of a body. See below for function to help calculate the moment. - -
    cpVect cpBodyGetPosition(const cpBody *body)
    -void cpBodySetPosition(cpBody *body, cpVect pos)
    - -p(expl). Position of the body. When changing the position you may also want to call @cpSpaceReindexShapesForBody()@ to update the collision detection information for the attached shapes if plan to make any queries against the space. - -
    cpVect cpBodyGetCenterOfGravity(const cpBody *body)
    -void cpBodySetCenterOfGravity(cpBody *body, cpVect cog)
    - -p(expl). Location of the center of gravity in body local coordinates. The default value is @(0, 0)@, meaning the center of gravity is the same as the position of the body. - -
    cpVect cpBodyGetVelocity(const cpBody *body)
    -void cpBodySetVelocity(cpBody *body, const cpVect value)
    - -p(expl). Linear velocity of the center of gravity of the body. - -
    cpVect cpBodyGetForce(const cpBody *body)
    -void cpBodySetForce(cpBody *body, const cpVect value)
    - -p(expl). Force applied to the center of gravity of the body. This value is reset for every time step. - -
    cpFloat cpBodyGetAngle(const cpBody *body)
    -void cpBodySetAngle(cpBody *body, cpFloat a)
    - -p(expl). Rotation of the body in radians. When changing the rotation you may also want to call @cpSpaceReindexShapesForBody()@ to update the collision detection information for the attached shapes if plan to make any queries against the space. A body rotates around its center of gravity, not its position. - -
    cpFloat cpBodyGetAngularVelocity(const cpBody *body)
    -void cpBodySetAngularVelocity(cpBody *body, const cpFloat value)
    - -p(expl). The angular velocity of the body in radians per second. - -
    cpFloat cpBodyGetTorque(const cpBody *body)
    -void cpBodySetTorque(cpBody *body, const cpFloat value)
    - -p(expl). The torque applied to the body. This value is reset for every time step. - -
    cpVect cpBodyGetRotation(const cpBody *body)
    - -p(expl). The rotation vector for the body. Can be used with @cpvrotate()@ or @cpvunrotate()@ to perform fast rotations. - -
    cpSpace* cpBodyGetSpace(const cpBody *body)
    - -p(expl). Get the @cpSpace@ that @body@ has been added to. - -
    cpDataPointer cpBodyGetUserData(const cpBody *body)
    -void cpBodySetUserData(cpBody *body, const cpDataPointer value)
    - -p(expl). User data pointer. Use this pointer to get a reference to the game object that owns this body from callbacks. - - -<%= h 2, "Moment of Inertia and Area Helper Functions:", "Helpers" %> - -Use the following functions to approximate the moment of inertia for your body, adding the results together if you want to use more than one. - -* @cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset)@ - Calculate the moment of inertia for a hollow circle, @r1@ and @r2@ are the inner and outer diameters in no particular order. _(A solid circle has an inner diameter of 0)_ -* @cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b, cpFloat radius)@ - Calculate the moment of inertia for a line segment. The endpoints @a@ and @b@ are relative to the body. -* @cpFloat cpMomentForPoly(cpFloat m, int count, const cpVect *verts, cpVect offset, cpFloat radius)@ - Calculate the moment of inertia for a solid polygon shape assuming its center of gravity is at its centroid. The offset is added to each vertex. -* @cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height)@ - Calculate the moment of inertia for a solid box centered on the body. - - - -<%= pop_open_example "Moments" %> - -Use the following functions to get the area for common Chipmunk shapes if you want to approximate masses or density or whatnot. - -* @cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2)@ - Area of a hollow circle. -* @cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r)@ - Area of a beveled segment. _(Will always be zero if radius is zero)_ -* @cpFloat cpAreaForPoly(const int count, const cpVect *verts, cpFloat radius)@ - Signed area of a polygon shape. Returns a negative number for polygons with a clockwise winding. - - -<%= h 2, "Coordinate Conversion Functions:", "CoordinateConversion" %> - -Many things are defined in coordinates local to a body meaning that the (0,0) is at the center of gravity of the body and the axis rotate along with the body. - -* @cpVect cpBodyLocalToWorld(const cpBody *body, const cpVect v)@ - Convert from body local coordinates to world space coordinates. -* @cpVect cpBodyWorldToLocal(const cpBody *body, const cpVect v)@ - Convert from world space coordinates to body local coordinates. - - -<%= h 2, "Velocity Conversion Functions:", "VelocityConversion" %> - -It's often useful to know the absolute velocity of a point on the surface of a body since the angular velocity affects everything except the center of gravity. - -* @cpVect cpBodyVelocityAtWorldPoint(const cpBody *body, const point)@ - Get the absolute velocity of the rigid body at the given world point @point@. -* @cpVect cpBodyVelocityAtLocalPoint(const cpBody *body, const point)@ - Get the absolute velocity of the rigid body at the given body local point @point@. - - -<%= h 2, "Applying Forces and Torques:", "Forces" %> - -People are sometimes confused by the difference between a force and an impulse. An impulse is a very large force applied over a very short period of time. Some examples are a ball hitting a wall or cannon firing. Chipmunk treats impulses as if they occur instantaneously by adding directly to the velocity of an object. Both impulses and forces are affected the mass of an object. Doubling the mass of the object will halve the effect. - -* @void cpBodyApplyForceAtWorldPoint(cpBody *body, const cpVect force, const cpVect point)@ - Add the force @force@ to @body@ as if applied from the world point @point@. -* @void cpBodyApplyForceAtLocalPoint(cpBody *body, const cpVect force, const cpVect point)@ - Add the local force @force@ to @body@ as if applied from the body local point @point@. -* @void cpBodyApplyImpulseAtWorldPoint(cpBody *body, const cpVect impulse, const cpVect point)@ - Add the impulse @impulse@ to @body@ as if applied from the world point @point@. -* @void cpBodyApplyImpulseAtLocalPoint(cpBody *body, const cpVect impulse, const cpVect point)@ - Add the local impulse @impulse@ to @body@ as if applied from the body local point @point@. - - -<%= h 2, "Sleeping Functions:", "Sleeping" %> - -Chipmunk supports a sleeping feature which improves performance by not simulating groups of objects that aren't moving. Read more about it in the "cpSpace section":#cpSpace-Sleeping. - -* @cpBool cpBodyIsSleeping(const cpBody *body)@ - Returns true if @body@ is sleeping. -* @void cpBodyActivate(cpBody *body)@ - Reset the idle timer on a body. If it was sleeping, wake it and any other bodies it was touching. -* @void cpBodySleep(cpBody *body)@ - Forces a body to fall asleep immediately even if it's in midair. Cannot be called from a callback. -* @void cpBodyActivateStatic(cpBody *body, cpShape *filter)@ - Similar in function to @cpBodyActivate()@. Activates all bodies touching @body@. If @filter@ is not @NULL@, then only bodies touching through @filter@ will be awoken. - -
    void cpBodySleepWithGroup(cpBody *body, cpBody *group)
    - -p(expl). When objects in Chipmunk sleep, they sleep as a group of all objects that are touching or jointed together. When an object is woken up, all of the objects in its group are woken up. @cpBodySleepWithGroup()@ allows you group sleeping objects together. It acts identically to @cpBodySleep()@ if you pass @NULL@ as @group@ by starting a new group. If you pass a sleeping body for @group@, @body@ will be awoken when @group@ is awoken. You can use this to initialize levels and start stacks of objects in a pre-sleeping state. - -<%= pop_open_example "Sleeping" %> - -<%= h 2, "Iterators", "Iterators" %> - -
    typedef void (*cpBodyShapeIteratorFunc)(cpBody *body, cpShape *shape, void *data)
    -void cpBodyEachShape(cpBody *body, cpBodyShapeIteratorFunc func, void *data)
    - -p(expl). Call @func@ once for each shape that is attached to @body@ and added to a space. @data@ is passed along as a context value. It is safe to remove shapes using these callbacks. - -
    typedef void (*cpBodyConstraintIteratorFunc)(cpBody *body, cpConstraint *constraint, void *data)
    -void cpBodyEachConstraint(cpBody *body, cpBodyConstraintIteratorFunc func, void *data)
    - -p(expl). Call @func@ once for each constraint that is attached to @body@ and added to a space. @data@ is passed along as a context value. It is safe to remove constraints using thes callbacks. - -
    typedef void (*cpBodyArbiterIteratorFunc)(cpBody *body, cpArbiter *arbiter, void *data)
    -void cpBodyEachArbiter(cpBody *body, cpBodyArbiterIteratorFunc func, void *data)
    - -p(expl). This one is more interesting. Calls @func@ once for each collision pair that @body@ is involved in. Calling @cpArbiterGet[Bodies|Shapes]()@ or @CP_ARBITER_GET_[BODIES|SHAPES]()@ will return the body or shape for @body@ as the first argument. You can use this to check all sorts of collision information for a body like if it's touching the ground, another particular object, how much collision force is being applied to an object, etc. Sensor shapes and arbiters that have been rejected by a collision handler callback or @cpArbiterIgnore()@ are not tracked by the contact graph. - -*Note:* If your compiler supports blocks (such as Clang), there are an alternate set of functions you can call. @cpBodyEachShape_b()@, etc. See @chipmunk.h@ for more information. - -<%= pop_open_example "Crushing" %> - - -<%= h 2, "Integration Callbacks:", "Integration Callbacks" %> - -This section is a stub. For now you can look at the Planet demo for an example of how to use integration callbacks to implement planetary gravity. - - - - -<%= h 1, "Chipmunk Collision Shapes: @cpShape@", "cpShape" %> - -There are currently 3 collision shape types: - -* *Circles*: Fastest and simplest collision shape. -* *Line segments*: Meant mainly as a static shape. Can be beveled in order to give them a thickness. -* *Convex polygons*: Slowest, but most flexible collision shape. - -You can add as many shapes to a body as you wish. That is why the two types are separate. Combining multiple shapes gives you the flexibility to make any object you want as well as providing different areas of the same object with different friction, elasticity or callback values. - -When creating different types of shapes, you will always be given a @cpShape*@ pointer back. This is because Chipmunk shapes are meant to be opaque types. Think of the specific collision types such as @cpCircleShape@, @cpSegmentShape@ and @cpPolyShape@ as private subclasses of @cpShape@. You can still read some properties from them using the getter functions, but you are not intended to cast @cpShape@ pointers to their specific types. - -<%= h 2, "Properties:", "Properties" %> - -Chipmunk provides getter/setter functions for a number of properties on collision shapes. Setting most properties will automatically wake the attached rigid body, if it's sleeping. You can also set some of the fields directly on the cpShape struct if you wish. They are documented in the headers. - -
    cpBody * cpShapeGetBody(const cpShape *shape)
    -void cpShapeSetBody(cpShape *shape, cpBody *body)
    - -p(expl). The rigid body the shape is attached to. Can only be set when the shape is not added to a space. - -
    cpBB cpShapeGetBB(const cpShape *shape)
    - -p(expl). The bounding box of the shape. Only guaranteed to be valid after @cpShapeCacheBB()@ or @cpSpaceStep()@ is called. Moving a body that a shape is connected to does not update its bounding box. For shapes used for queries that aren't attached to bodies, you can also use @cpShapeUpdate()@. - -
    cpBool cpShapeGetSensor(const cpShape *shape)
    -void cpShapeSetSensor(cpShape *shape, cpBool value)
    - -p(expl). A boolean value if this shape is a sensor or not. Sensors only call collision callbacks, and never generate real collisions. - -
    cpFloat cpShapeGetElasticity(const cpShape *shape)
    -void cpShapeSetElasticity(cpShape *shape, cpFloat value)
    - -p(expl). Elasticity of the shape. A value of 0.0 gives no bounce, while a value of 1.0 will give a "perfect" bounce. However due to inaccuracies in the simulation using 1.0 or greater is not recommended however. The elasticity for a collision is found by multiplying the elasticity of the individual shapes together. - -
    cpFloat cpShapeGetFriction(const cpShape *shape)
    -void cpShapeSetFriction(cpShape *shape, cpFloat value)
    - -p(expl). Friction coefficient. Chipmunk uses the Coulomb friction model, a value of 0.0 is frictionless. The friction for a collision is found by multiplying the friction of the individual shapes together. "Tables of friction coefficients":http://www.roymech.co.uk/Useful_Tables/Tribology/co_of_frict.htm. - -
    cpVect cpShapeGetSurfaceVelocity(const cpShape *shape)
    -void cpShapeSetSurfaceVelocity(cpShape *shape, cpVect value)
    - -p(expl). The surface velocity of the object. Useful for creating conveyor belts or players that move around. This value is only used when calculating friction, not resolving the collision. - -
    cpCollisionType cpShapeGetCollisionType(const cpShape *shape)
    -void cpShapeSetCollisionType(cpShape *shape, cpCollisionType value)
    - -p(expl). You can assign types to Chipmunk collision shapes that trigger callbacks when objects of certain types touch. See the "callbacks section":#Callbacks-Handlers for more information. - -
    cpShapeFilter cpShapeGetFilter(const cpShape *shape)
    -void cpShapeSetFilter(cpShape *shape, cpShapeFilter filter)
    - -p(expl). Set the collision filter for this shape. See "Filtering Collisions":#Filtering for more information. - -
    cpSpace* cpShapeGetSpace(const cpShape *shape)
    - -p(expl). Get the @cpSpace@ that @shape@ has been added to. - -
    cpDataPointer cpShapeGetUserData(const cpShape *shape)
    -void cpShapeSetUserData(cpShape *shape, cpDataPointer value)
    - -p(expl). A user definable data pointer. If you set this to point at the game object the shapes is for, then you can access your game object from Chipmunk callbacks. - - -<%= h 2, "Fast Collision Filtering using cpShapeFilter:", "Filtering" %> - -Chipmunk has two primary means of ignoring collisions: groups and category masks. - -*Groups* are used to ignore collisions between parts on a complex object. A ragdoll is a good example. When jointing an arm onto the torso, you'll want them to allow them to overlap. Groups allow you to do exactly that. Shapes that have the same group don't generate collisions. So by placing all of the shapes in a ragdoll in the same group, you'll prevent it from colliding against other parts of itself. - -*Category masks* allow you to mark which categories an object belongs to and which categories it collidies with. - -For example, a game has four collision categories: player (0), enemy (1), player bullet (2), and enemy bullet (3). Neither players nor enemies should not collide with their own bullets, and bullets should not collide with other bullets. However, players collide with enemy bullets, and enemies collide with player bullets. - -| Object | Object Category | Category Mask | -| "Player" | 1 | 4, 5 | -| "Enemy" | 2 | 2, 3, 5 | -| "Player Bullet" | 3 | 1, 5 | -| "Enemy Bullet" | 4 | 2, 5 | -| "Walls" | 5 | 1, 2, 3, 4 | - -Note that everything in this example collides with walls. Additionally, the enemies collide with eachother. - -By default, objects exist in every category and collide with every category. - -Objects can fall into multiple categories. For instance, you might have a category for a red team, and have a red player bullet. In the above example, each object only has one category. If you make use of multiple categories on an object, you may also wish to consider replacing the @cpShapeFilter@ struct and the @cpShapeFilterReject()@ function in @chipmunk_private.h@ to customize it to better suit your game's needs. - -The default type of @categories@ and @mask@ in @cpShapeFilter@ is @unsigned int@ which has a resolution of 32 bits on most systems. You can redefine @cpBitmask@ in @chipmunk_types.h@ if you need more bits to work with. - -There is one last way of filtering collisions using collision handlers. See the "section on callbacks":#Callbacks for more information. Collision handlers can be more flexible, but can be slower. Fast collision filtering rejects collisions before running the expensive collision detection code, so using groups or category masks is preferred. - -<%= h 2, "Memory Management Functions:", "Memory" %> - -
    void cpShapeDestroy(cpShape *shape)
    -void cpShapeFree(cpShape *shape)
    - -p(expl). @Destroy@ and @Free@ functions are shared by all shape types. Allocation and initialization functions are specific to each shape type. See below. - -<%= h 2, "Misc Functions:", "Misc" %> - -* @cpBB cpShapeCacheBB(cpShape *shape)@ - Synchronizes @shape@ with the body its attached to. -* @cpBB cpShapeUpdate(cpShape *shape, cpVect pos, cpVect rot)@ - Sets the position and rotation of the shape to - -<%= h 2, "Working With Circle Shapes:", "Circles" %> - -
    cpCircleShape *cpCircleShapeAlloc(void)
    -cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset)
    -cpShape *cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset)
    - -p(expl). @body@ is the body to attach the circle to, @offset@ is the offset from the body's center of gravity in body local coordinates. - -
    cpVect cpCircleShapeGetOffset(cpShape *circleShape)
    -cpFloat cpCircleShapeGetRadius(cpShape *circleShape)
    - -p(expl). Getters for circle shape properties. Passing as non-circle shape will throw an assertion. - -<%= h 2, "Working With Segment Shapes:", "Segments" %> - -
    cpSegmentShape* cpSegmentShapeAlloc(void)
    -cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius)
    -cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius)
    - -p(expl). @body@ is the body to attach the segment to, @a@ and @b@ are the endpoints, and @radius@ is the thickness of the segment. - -
    cpVect cpSegmentShapeGetA(cpShape *shape)
    -cpVect cpSegmentShapeGetB(cpShape *shape)
    -cpVect cpSegmentShapeGetNormal(cpShape *shape)
    -cpFloat cpSegmentShapeGetRadius(cpShape *shape)
    - -p(expl). Getters for segment shape properties. Passing a non-segment shape will throw an assertion. - -
    void cpSegmentShapeSetNeighbors(cpShape *shape, cpVect prev, cpVect next)
    - -p(expl). When you have a number of segment shapes that are all joined together, things can still collide with the "cracks" between the segments. By setting the neighbor segment endpoints you can tell Chipmunk to avoid colliding with the inner parts of the crack. - -<%= h 2, "Working With Polygon Shapes:", "Polys" %> - -
    cpPolyShape *cpPolyShapeAlloc(void)
    -
    -cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int count, const cpVect *verts, cpTransform transform, cpFloat radius)
    -cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpTransform transform, cpFloat radius)
    -p(expl). @body@ is the body to attach the poly to, @verts@ is an array of @cpVect@ structs, @transform@ will be applied to every vertex. A convex hull will be calculated from the vertexes automatically. -The polygon shape will be created with a @radius@, increasing the size of the shape. - - -
    cpPolyShape* cpPolyShapeInitRaw(cpPolyShape *poly, cpBody *body, int count, const cpVect *verts, cpFloat radius)
    -cpShape* cpPolyShapeNewRaw(cpBody *body, int count, const cpVect *verts, cpFloat radius)
    - -Alternate constructors for poly shapes. This version does not apply a transform nor does it create a convex hull. Vertices _must_ be provided with a counter-clockwise winding. - -
    int cpPolyShapeGetCount(cpShape *shape)
    -cpVect cpPolyShapeGetVert(cpShape *shape, int index)
    -cpFloat cpPolyShapeGetRadius()
    - -p(expl). Getters for poly shape properties. Passing a non-poly shape or an index that does not exist will throw an assertion. - -<%= h 3, "Boxes:", "Boxes" %> - -Because boxes are so common in physics games, Chipmunk provides shortcuts to create box shaped polygons. The boxes will always be centered at the center of gravity of the body you are attaching them to. Adding a small radius will bevel the corners and can significantly reduce problems where the box gets stuck on seams in your geometry. If you want to create an off-center box, you will need to use @cpPolyShapeNew()@ or @cpPolyShapeInit()@. - -
    cpPolyShape *cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height, cpFloat radius)
    -cpPolyShape *cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box, cpFloat radius)
    -
    -cpShape *cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height, cpFloat radius)
    -cpShape *cpBoxShapeNew2(cpBody *body, cpBB box, cpFloat radius)
    - -<%= h 3, "Poly Shape Helper Functions:", "PolyHelpers" %> - -* @cpVect cpCentroidForPoly(const int count, const cpVect *verts)@ - Calculate the centroid for a polygon. - -<%= h 3, "Convex Hull Helper Functions:", "ConvexHelpers" %> - -
    int cpConvexHull(int count, cpVect *verts, cpVect *result, int *first, cpFloat tol)
    - -p(expl). Calculate the convex hull of a given set of points. Returns the count of points in the hull. @result@ must be a pointer to a @cpVect@ array with at least @count@ elements. If @result@ is @NULL@, then @verts@ array wil be reduced instead. @first@ is an optional pointer to an integer to store where the first vertex in the hull came from (i.e. @verts[first] == result[0]@) @tol@ is the allowed amount to shrink the hull when simplifying it. A tolerance of 0.0 creates an exact hull. - -
    #define CP_CONVEX_HULL(inputCount, inputVerts, outputCount_varName, outputVerts_varName)
    - -p(expl). Convenience macro for using @cpConvexHull()@. Creates an array on the stack using @alloca()@ and then calls @cpConvexHull()@. Because the output array is created on the stack it doesn't need to be freed. - -<%= pop_open_example "cpConvexHull" %> - - -<%= h 2, "Modifying cpShapes:", "Modifying" %> - -The short answer is that you can't because the changes would be only picked up as a change to the position of the shape's surface, but not its velocity. The long answer is that you can using the "unsafe" API as long as you realize that doing so will result in unrealistic physical behavior. These extra functions are defined in a separate header @chipmunk_unsafe.h@. - -<%= h 2, "Notes:", "Notes" %> - -* You can attach multiple collision shapes to a rigid body. This should allow you to create almost any shape you could possibly need. -* Shapes attached to the same rigid body will never generate collisions. You don't have to worry about overlap when attaching multiple shapes to a rigid body. -* Make sure you add both the body and its collision shapes to a space. - - -<%= h 1, "Chipmunk Spaces: @cpSpace@", "cpSpace" %> - -Spaces in Chipmunk are the basic unit of simulation. You add rigid bodies, shapes, and constraints to the space and then step them all forward through time together. - -<%= h 2, "What Are Iterations, and Why Should I Care?", "Iterations" %> - -Chipmunk uses an iterative solver to figure out the forces between objects in the space. What this means is that it builds a big list of all of the collisions, joints, and other constraints between the bodies and makes several passes over the list considering each one individually. The number of passes it makes is the iteration count, and each iteration makes the solution more accurate. If you use too many iterations, the physics should look nice and solid, but may use up too much CPU time. If you use too few iterations, the simulation may seem mushy or bouncy when the objects should be solid. Setting the number of iterations lets you balance between CPU usage and the accuracy of the physics. Chipmunk's default of 10 iterations is sufficient for most simple games. - -<%= h 2, "Sleeping", "Sleeping" %> - -Spaces can disable entire groups of objects that have stopped moving to save CPU time and battery life. In order to use this feature you must do two things. You must enable sleeping explicitly by choosing a time threshold value for @cpSpace.sleepTimeThreshold@. This threshold is the amount of time something must be idle before it falls asleep. @cpSpace.idleSpeedThreshold@ defines what is considered idle. If you do not set @cpSpace.idleSpeedThreshold@ explicitly, a value will be chosen automatically based on the current amount of gravity. Be mindful that objects cannot fall asleep if they are touching or jointed to a kinematic body. - -<%= h 2, "Properties:", "Properties" %> - -
    int cpSpaceGetIterations(const cpSpace *space)
    -void cpSpaceSetIterations(cpSpace *space, int value)
    - -p(expl). Iterations allow you to control the accuracy of the solver. Defaults to 10. See "above":#cpSpace-Iterations for more information. - -
    cpVect cpSpaceGetGravity(const cpSpace *space)
    -void cpSpaceSetGravity(cpSpace *space, cpVect value)
    - -p(expl). Global gravity applied to the space. Defaults to @cpvzero@. Can be overridden on a per body basis by writing custom integration functions. Changing the gravity will activate all sleeping bodies in the space. - -
    cpFloat cpSpaceGetDamping(const cpSpace *space)
    -void cpSpaceSetDamping(cpSpace *space, cpFloat value)
    - -p(expl). Amount of simple damping to apply to the space. A value of 0.9 means that each body will lose 10% of its velocity per second. Defaults to 1. Like @gravity@, it can be overridden on a per body basis. - -
    cpFloat cpSpaceGetIdleSpeedThreshold(const cpSpace *space)
    -void cpSpaceSetIdleSpeedThreshold(cpSpace *space, cpFloat value)
    - -p(expl). Speed threshold for a body to be considered idle. The default value of 0 means the space estimates a good threshold based on gravity. - -
    cpFloat cpSpaceGetSleepTimeThreshold(const cpSpace *space)
    -void cpSpaceSetSleepTimeThreshold(cpSpace *space, cpFloat value)
    - -p(expl). Time a group of bodies must remain idle in order to fall asleep. The default value of @INFINITY@ disables the sleeping feature. - -
    cpFloat cpSpaceGetCollisionSlop(const cpSpace *space)
    -void cpSpaceSetCollisionSlop(cpSpace *space, cpFloat value)
    - -p(expl). Amount of overlap between shapes that is allowed. To improve stability, set this as high as you can without noticable overlapping. It defaults to 0.1. - -
    cpFloat cpSpaceGetCollisionBias(const cpSpace *space)
    -void cpSpaceSetCollisionBias(cpSpace *space, cpFloat value)
    - -p(expl). Chipmunk allows fast moving objects to overlap, then fixes the overlap over time. Overlapping objects are unavoidable even if swept collisions are supported, and this is an efficient and stable way to deal with overlapping objects. The bias value controls what percentage of overlap remains unfixed after a second and defaults to ~0.2%. Valid values are in the range from 0 to 1, but using 0 is not recommended for stability reasons. The default value is calculated as @cpfpow(1.0f - 0.1f, 60.0f)@ meaning that Chipmunk attempts to correct 10% of error ever 1/60th of a second. *Note:* Very very few games will need to change this value. - -
    cpTimestamp cpSpaceGetCollisionPersistence(const cpSpace *space)
    -void cpSpaceSetCollisionPersistence(cpSpace *space, cpTimestamp value)
    - -p(expl). The number of frames the space keeps collision solutions around for. Helps prevent jittering contacts from getting worse. This defaults to 3 and very very _very_ few games will need to change this value. - -
    cpFloat cpSpaceGetCurrentTimeStep(const cpSpace *space)
    - -p(expl). Retrieves the current (if you are in a callback from @cpSpaceStep()@) or most recent (outside of a @cpSpaceStep()@ call) timestep. - -
    cpFloat cpSpaceIsLocked(const cpSpace *space)
    - -p(expl). Returns true when you cannot add/remove objects from the space. In particular, spaces are locked when in a collision callback. Instead, run your code in a post-step callback instead. - -
    cpDataPointer cpSpaceGetUserData(const cpSpace *space)
    -void cpSpaceSetUserData(cpSpace *space, cpDataPointer value)
    - -p(expl). A user definable data pointer. It is often useful to point this at the gamestate object or scene management object that owns the space. - -
    cpBody * cpSpaceGetStaticBody(const cpSpace *space)
    - -p(expl). A dedicated static body for the space. You don't have to use it, but because its memory is managed automatically with the space its very convenient. You can set its user data pointer to something helpful if you want for callbacks. - - -<%= h 2, "Memory Management Functions:", "Memory" %> - -
    cpSpace* cpSpaceAlloc(void)
    -cpSpace* cpSpaceInit(cpSpace *space)
    -cpSpace* cpSpaceNew()
    -
    -void cpSpaceDestroy(cpSpace *space)
    -void cpSpaceFree(cpSpace *space)
    - -p(expl). More standard Chipmunk memory functions. - -<%= h 2, "Operations:", "Operations" %> - -
    cpShape *cpSpaceAddShape(cpSpace *space, cpShape *shape)
    -cpBody *cpSpaceAddBody(cpSpace *space, cpBody *body)
    -cpConstraint *cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint)
    -
    -void cpSpaceRemoveShape(cpSpace *space, cpShape *shape)
    -void cpSpaceRemoveBody(cpSpace *space, cpBody *body)
    -void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint)
    -
    -cpBool cpSpaceContainsShape(cpSpace *space, cpShape *shape)
    -cpBool cpSpaceContainsBody(cpSpace *space, cpBody *body)
    -cpBool cpSpaceContainsConstraint(cpSpace *space, cpConstraint *constraint)
    - -p(expl). These functions add and remove shapes, bodies and constraints from @space@. The add/remove functions cannot be called from within a callback other than a @postStep()@ callback _(which is different than a postSolve() callback!)_. Attempting to add or remove objects from the space while @cpSpaceStep()@ is still executing will throw an assertion. See the "callbacks section":#Callbacks for more information. The add functions return the thing being added so that you can create and add something in one line. Be careful not to free bodies before removing shapes and constraints attached to them or you will cause crashes.. The contains functions allow you to check if an object has been added to the space or not. - -<%= h 2, "Spatial Indexing:", "SpatialIndexing" %> - -Occasionally, you might want to update the collision detection data for a shape. If you move a static shape or a static body you *must* do this to let Chipmunk know it needs to have its collision detection data updated. You may also want to manually update the collision data for normal shapes if you move them and still want to perform queries against them before the next call to @cpSpaceStep()@. - -* @void cpSpaceReindexShape(cpSpace *space, cpShape *shape)@ - Reindex a specific shape. -* @void cpSpaceReindexShapesForBody(cpSpace *space, cpBody *body)@ - Reindex all the shapes for a certain body. -* @void cpSpaceReindexStatic(cpSpace *space)@ - Reindex all static shapes. Generally updating only the shapes that changed is faster. - -<%= h 2, "Iterators:", "Iterators" %> - -
    typedef void (*cpSpaceBodyIteratorFunc)(cpBody *body, void *data)
    -void cpSpaceEachBody(cpSpace *space, cpSpaceBodyIteratorFunc func, void *data)
    - -p(expl). Call @func@ for each body in the space also passing along your data pointer. Sleeping bodies are included, but static and kinematic bodies are not as they aren't added to the space. - -<%= pop_open_example "cpSpaceEachBody" %> - -
    typedef void (*cpSpaceShapeIteratorFunc)(cpShape *shape, void *data)
    -void cpSpaceEachShape(cpSpace *space, cpSpaceShapeIteratorFunc func, void *data)
    - -p(expl). Call @func@ for each shape in the space also passing along your data pointer. Sleeping and static shapes are included. - -
    typedef void (*cpSpaceConstraintIteratorFunc)(cpConstraint *constraint, void *data)
    -void cpSpaceEachConstraint(cpSpace *space, cpSpaceConstraintIteratorFunc func, void *data)
    - -p(expl). Call @func@ for each constraint in the space also passing along your data pointer. - -*Note:* If your compiler supports blocks (such as Clang), there are an alternate set of functions you can call. @cpSpaceEachBody_b()@, etc. See @chipmunk.h@ for more information. - -<%= h 2, "Simulating the Space:", "Simulating" %> - -
    void cpSpaceStep(cpSpace *space, cpFloat dt)
    - -p(expl). Update the space for the given time step. Using a fixed time step is _highly_ recommended. Doing so can greatly increase the quality of the simulation. The easiest way to do constant timesteps is to simple step forward by 1/60th of a second (or whatever your target framerate is) for each frame regardless of how long it took to render. This works fine for many games, but a better way to do it is to separate your physics timestep and rendering. "This":http://gafferongames.com/game-physics/fix-your-timestep/ is a good article on how to do that. - - -<%= h 2, "Enabling and Tuning the Spatial Hash:", "SpatialHash" %> - -Chipmunk officially supports two spatial indexes. The default is an axis-aligned bounding box tree inspired by the one used in the Bullet Physics library, but caching of overlapping leaves was added to give it very good temporal coherence. The tree requires no tuning, and most games will find that they get the best performance using from the tree. The other available spatial index type available is a spatial hash, which can be much faster when you have a very large number (1000s) of objects that are all the same size. For smaller numbers of objects, or objects that vary a lot in size, the spatial hash is usually much slower. It also requires tuning (usually through experimentation) to get the best possible performance. - -
    void cpSpaceUseSpatialHash(cpSpace *space, cpFloat dim, int count)
    - -p(expl). Switch the space to use a spatial hash instead of the bounding box tree. - -The spatial hash data is fairly size sensitive. @dim@ is the size of the hash cells. Setting @dim@ to the average collision shape size is likely to give the best performance. Setting @dim@ too small will cause the shape to be inserted into many cells, setting it too low will cause too many objects into the same hash slot. - -@count@ is the _suggested_ minimum number of cells in the hash table. If there are too few cells, the spatial hash will return many false positives. Too many cells will be hard on the cache and waste memory. the Setting @count@ to ~10x the number of objects in the space is probably a good starting point. Tune from there if necessary. - -Using the spatial has visualization in the demo program you can see what I mean. The grey squares represent cells in the spatial hash. The darker the cell, the more objects have been mapped into that cell. A good @dim@ size is when your objects fit nicely into the grid: - -!images/hash_just_right.png! - -Notice the light grey meaning that each cell doesn't have too many objects mapped onto it. - -When you use too small a size, Chipmunk has to insert each object into a lot of cells. This can get expensive. - -!images/hash_too_small.png! - -Notice that the grey cells are very small compared to the collision shapes. - -When you use too big of a size, a lot of shapes will fit into each cell. Each shape has to be checked against every other shape in the cell, so this makes for a lot of unnecessary collision checks. - -!images/hash_too_big.png! - -Notice the dark grey cells meaning that many objects are mapped onto them. - - -Chipmunk also has an experimental single axis sort and sweep implementation. It can be very efficient on mobile games if your world is very long and flat like a racing game. See the code for @cpSpaceUseSpatialHash()@ if you want to try enabling it. - - -<%= h 2, "Notes:", "Notes" %> - -* When removing objects from the space, make sure you remove any other objects that reference it. For instance, when you remove a body, remove the joints and shapes attached to it. -* Using more iterations or smaller time steps will increase the physics quality, but also increase the CPU usage. -* Because static shapes are only rehashed when you request it, TODO: cpSpaceHashResize - - -<%= h 1, "Chipmunk Constraints: @cpConstraint@", "cpConstraint" %> - -A constraint is something that describes how two bodies interact with each other. (how they constrain each other) Constraints can be simple joints that allow bodies to pivot around each other like the bones in your body, or they can be more abstract like the gear joint or motors. - -<%= h 2, "What constraints are and what they are not:", "WhatAreConstraints" %> - -Constraints in Chipmunk are all velocity based constraints. This means that they act primarily by synchronizing the velocity of two bodies. A pivot joint holds two anchor points on two separate bodies together by defining equations that say that the velocity of the anchor points must be the same and calculating impulses to apply to the bodies to try and keep it that way. A constraint takes a velocity as it's primary input and produces a velocity change as its output. Some constraints, (joints in particular) apply velocity changes to correct differences in positions. More about this in the next section. - -A spring connected between two bodies is not a constraint. It's very constraint-like as it creates forces that affect the velocities of the two bodies, but a spring takes distances as input and produces forces as its output. If a spring is not a constraint, then why do I have two varieties of spring constraints you ask? The reason is because they are _damped springs_. The damping associated with the spring is a true constraint that creates velocity changes based on the relative velocities of the two bodies it links. As it is convenient to put a damper and a spring together most of the time, I figured I might as well just apply the spring force as part of the constraint instead of having a damper constraint and having the user calculate and apply their own spring forces separately. - -<%= h 2, "Properties:", "Properties" %> - -
    cpBody * cpConstraintGetA(const cpConstraint *constraint)
    -cpBody * cpConstraintGetB(const cpConstraint *constraint)
    - -p(expl). Getters for the two bodies the constraint is attached to. - -
    cpFloat cpConstraintGetMaxForce(const cpConstraint *constraint)
    -void cpConstraintSetMaxForce(cpConstraint *constraint, cpFloat value)
    - -p(expl). The maximum force that the constraint can use to act on the two bodies. Defaults to INFINITY. - -
    cpFloat cpConstraintGetErrorBias(const cpConstraint *constraint)
    -void cpConstraintSetErrorBias(cpConstraint *constraint, cpFloat value)
    - -p(expl). The percentage of joint error that remains unfixed after a second. This works exactly the same as the collision bias property of a space, but applies to fixing error (stretching) of joints instead of overlapping collisions. - -
    cpFloat cpConstraintGetMaxBias(const cpConstraint *constraint)
    -void cpConstraintSetMaxBias(cpConstraint *constraint, cpFloat value)
    - -p(expl). The maximum speed at which the constraint can apply error correction. Defaults to INFINITY. - -
    cpSpace* cpConstraintGetSpace(const cpConstraint *constraint)
    - -p(expl). Get the @cpSpace@ that @constraint@ has been added to. - -
    cpBool cpConstraintGetCollideBodies(const cpConstraint *constraint)
    -void cpConstraintSetCollideBodies(cpConstraint *constraint, cpBool collideBodies)
    - -p(expl). Constraints can be used for filtering collisions too. When two bodies collide, Chipmunk ignores the collisions if this property is set to @cpFalse@ on any constraint that connects the two bodies. Defaults to @cpTrue@. This can be used to create a chain that self collides, but adjacent links in the chain do not collide. - -
    cpDataPointer cpConstraintGetUserData(const cpConstraint *constraint)
    -void cpConstraintSetUserData(cpConstraint *constraint, cpDataPointer value)
    - -p(expl). User data pointer. Use this pointer to get a reference to the game object that owns this constraint from callbacks. - -
    cpFloat cpConstraintGetImpulse(cpConstraint *constraint)
    - -p(expl). The most recent impulse that @constraint@ applied. To convert this to a force, divide by the timestep passed to @cpSpaceStep()@. You can use this to implement breakable joints to check if the force they attempted to apply exceeded a certain threshold. - -<%= pop_open_example "BreakableJoint" %> - -To access properties of specific joint types, use the getter and setter functions provided (ex: @cpPinJointGetanchorA()@). See the lists of properties for more information. - -<%= h 2, "Error correction by Feedback:", "ErrorCorrection" %> - -Joints in Chipmunk are not perfect. A pin joint can't maintain the exact correct distance between its anchor points, nor can a pivot joint hold its anchor points completely together. Instead, they are designed to deal with this by correcting themselves over time. Since Chipmunk 5, you have a fair amount of extra control over how joints correct themselves and can even use this ability to create physical effects that allow you to use joints in unique ways: - -* Servo motors - Ex: open/close doors or rotate things without going over a maximum force. -* Winches - Pull one object towards another at a constant speed without going over a maximum force. -* Mouse manipulation - Interact with objects smoothly given coarse/shaky mouse input. - -There are three properties of cpConstraint structs that control the error correction, @maxForce@, @maxBias@, and @biasCoef@. @maxForce@ is pretty self explanatory, a joint or constraint will not be able to use more than this amount of force in order to function. If it needs more force to be able to hold itself together, it will fall apart. @maxBias@ is the maximum speed at which error correction can be applied. If you change a property on a joint so that the joint will have to correct itself, it normally does so very quickly. By setting a maxSpeed you can make the joint work like a servo, correcting itself at a constant rate over a longer period of time. Lastly, @biasCoef@ is the percentage of error corrected every step before clamping to a maximum speed. You can use this to make joints correct themselves smoothly instead of at a constant speed, but is probably the least useful of the three properties by far. - - - -<%= pop_open_example "JointRecipies" %> - -<%= h 2, "Constraints and Collision Shapes:", "Shapes" %> - -Neither constraints or collision shapes have any knowledge of the other. When connecting joints to a body the anchor points don't need to be inside of any shapes attached to the body and it often makes sense that they shouldn't. Also, adding a constraint between two bodies doesn't prevent their collision shapes from colliding. In fact, this is the primary reason that the collision group property exists. - -<%= h 2, "Video Tour of Current Joint Types. (Requires connection to YouTube)", "Video" %> - - - -<%= h 2, "Shared Memory Management Functions:", "Memory" %> - -
    void cpConstraintDestroy(cpConstraint *constraint)
    -void cpConstraintFree(cpConstraint *constraint)
    - -p(expl). @Destroy@ and @Free@ functions are shared by all joint types. Allocation and initialization functions are specific to each joint type. - -<%= h 1, "Constraint Types:", "ConstraintTypes" %> - -<%= h 2, "Pin Joints:", "cpPinJoint" %> - -
    cpPinJoint *cpPinJointAlloc(void)
    -cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB)
    -cpConstraint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB)
    - -p(expl). @a@ and @b@ are the two bodies to connect, and @anchorA@ and @anchorB@ are the anchor points on those bodies. The distance between the two anchor points is measured when the joint is created. If you want to set a specific distance, use the setter function to override it. - -<%= h 3, "Properties", "Properties" %> - -* @cpVect cpPinJointGetanchorA(const cpConstraint *constraint)@ -* @void cpPinJointSetanchorA(cpConstraint *constraint, cpVect value)@ -* @cpVect cpPinJointGetanchorB(const cpConstraint *constraint)@ -* @void cpPinJointSetanchorB(cpConstraint *constraint, cpVect value)@ -* @cpFloat cpPinJointGetDist(const cpConstraint *constraint)@ -* @void cpPinJointSetDist(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Slide Joints:", "cpSlideJoint" %> - -
    cpSlideJoint *cpSlideJointAlloc(void)
    -
    -cpSlideJoint *cpSlideJointInit(
    -	cpSlideJoint *joint, cpBody *a, cpBody *b,
    -	cpVect anchorA, cpVect anchorB, cpFloat min, cpFloat max
    -)
    -
    -cpConstraint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB, cpFloat min, cpFloat max)
    - -p(expl). @a@ and @b@ are the two bodies to connect, @anchorA@ and @anchorB@ are the anchor points on those bodies, and @min@ and @max@ define the allowed distances of the anchor points. - -<%= h 3, "Properties", "Properties" %> - -* @cpVect cpSlideJointGetanchorA(const cpConstraint *constraint)@ -* @void cpSlideJointSetanchorA(cpConstraint *constraint, cpVect value)@ -* @cpVect cpSlideJointGetanchorB(const cpConstraint *constraint)@ -* @void cpSlideJointSetanchorB(cpConstraint *constraint, cpVect value)@ -* @cpFloat cpSlideJointGetMin(const cpConstraint *constraint)@ -* @void cpSlideJointSetMin(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpSlideJointGetMax(const cpConstraint *constraint)@ -* @void cpSlideJointSetMax(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Pivot Joints:", "cpPivotJoint" %> - -
    cpPivotJoint *cpPivotJointAlloc(void)
    -cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect pivot)
    -cpConstraint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot)
    -cpConstraint *cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB)
    - -p(expl). @a@ and @b@ are the two bodies to connect, and @pivot@ is the point in world coordinates of the pivot. Because the pivot location is given in world coordinates, you must have the bodies moved into the correct positions already. Alternatively you can specify the joint based on a pair of anchor points, but make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space. - -<%= h 3, "Properties", "Properties" %> - -* @cpVect cpPivotJointGetanchorA(const cpConstraint *constraint)@ -* @void cpPivotJointSetanchorA(cpConstraint *constraint, cpVect value)@ -* @cpVect cpPivotJointGetanchorB(const cpConstraint *constraint)@ -* @void cpPivotJointSetanchorB(cpConstraint *constraint, cpVect value)@ - -<%= h 2, "Groove Joint:", "cpGrooveJoint" %> - -
    cpGrooveJoint *cpGrooveJointAlloc(void)
    -
    -cpGrooveJoint *cpGrooveJointInit(
    -	cpGrooveJoint *joint, cpBody *a, cpBody *b,
    -	cpVect groove_a, cpVect groove_b, cpVect anchorB
    -)
    -
    -cpConstraint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchorB)
    - -p(expl). The groove goes from @groov_a@ to @groove_b@ on body @a@, and the pivot is attached to @anchorB@ on body @b@. All coordinates are body local. - -<%= h 3, "Properties", "Properties" %> - -* @cpVect cpGrooveJointGetGrooveA(const cpConstraint *constraint)@ -* @void cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value)@ -* @cpVect cpGrooveJointGetGrooveB(const cpConstraint *constraint)@ -* @void cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value)@ -* @cpVect cpGrooveJointGetanchorB(const cpConstraint *constraint)@ -* @void cpGrooveJointSetanchorB(cpConstraint *constraint, cpVect value)@ - -<%= h 2, "Damped Spring:", "cpDampedSpring" %> - -
    cpDampedSpring *cpDampedSpringAlloc(void)
    -
    -cpDampedSpring *cpDampedSpringInit(
    -	cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB,
    -	cpFloat restLength, cpFloat stiffness, cpFloat damping
    -)
    -
    -cpConstraint *cpDampedSpringNew(
    -	cpBody *a, cpBody *b, cpVect anchorA, cpVect anchorB,
    -	cpFloat restLength, cpFloat stiffness, cpFloat damping
    -)
    - -p(expl). Defined much like a slide joint. @restLength@ is the distance the spring wants to be, @stiffness@ is the spring constant ("Young's modulus":http://en.wikipedia.org/wiki/Young's_modulus), and @damping@ is how soft to make the damping of the spring. - -<%= h 3, "Properties", "Properties" %> - -* @cpVect cpDampedSpringGetanchorA(const cpConstraint *constraint)@ -* @void cpDampedSpringSetanchorA(cpConstraint *constraint, cpVect value)@ -* @cpVect cpDampedSpringGetanchorB(const cpConstraint *constraint)@ -* @void cpDampedSpringSetanchorB(cpConstraint *constraint, cpVect value)@ -* @cpFloat cpDampedSpringGetRestLength(const cpConstraint *constraint)@ -* @void cpDampedSpringSetRestLength(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpDampedSpringGetStiffness(const cpConstraint *constraint)@ -* @void cpDampedSpringSetStiffness(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpDampedSpringGetDamping(const cpConstraint *constraint)@ -* @void cpDampedSpringSetDamping(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Damped Rotary Spring:", "cpDampedRotarySpring" %> - -
    cpDampedRotarySpring *cpDampedRotarySpringAlloc(void)
    -
    -cpDampedRotarySpring *cpDampedRotarySpringInit(
    -	cpDampedRotarySpring *joint, cpBody *a, cpBody *b,
    -	cpFloat restAngle, cpFloat stiffness, cpFloat damping
    -)
    -
    -cpConstraint *cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping)
    - -p(expl). Like a damped spring, but works in an angular fashion. @restAngle@ is the relative angle in radians that the bodies want to have, @stiffness@ and @damping@ work basically the same as on a damped spring. - -<%= h 3, "Properties", "Properties" %> - -* @cpFloat cpDampedRotarySpringGetRestAngle(const cpConstraint *constraint)@ -* @void cpDampedRotarySpringSetRestAngle(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpDampedRotarySpringGetStiffness(const cpConstraint *constraint)@ -* @void cpDampedRotarySpringSetStiffness(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpDampedRotarySpringGetDamping(const cpConstraint *constraint)@ -* @void cpDampedRotarySpringSetDamping(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Rotary Limit Joint:", "cpRotaryLimitJoint" %> - -
    cpRotaryLimitJoint *cpRotaryLimitJointAlloc(void)
    -cpRotaryLimitJoint *cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max)
    -cpConstraint *cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max)
    - -p(expl). Constrains the relative rotations of two bodies. @min@ and @max@ are the angular limits in radians. It is implemented so that it's possible to for the range to be greater than a full revolution. - -<%= h 3, "Properties", "Properties" %> - -* @cpFloat cpRotaryLimitJointGetMin(const cpConstraint *constraint)@ -* @void cpRotaryLimitJointSetMin(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpRotaryLimitJointGetMax(const cpConstraint *constraint)@ -* @void cpRotaryLimitJointSetMax(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Ratchet Joint:", "cpRatchetJoint" %> - -
    cpRatchetJoint *cpRatchetJointAlloc(void);
    -cpRatchetJoint *cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
    -cpConstraint *cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet);
    - -p(expl). Works like a socket wrench. @ratchet@ is the distance between "clicks", @phase@ is the initial offset to use when deciding where the ratchet angles are. - -<%= h 3, "Properties", "Properties" %> - -* @cpFloat cpRatchetJointGetAngle(const cpConstraint *constraint)@ -* @void cpRatchetJointSetAngle(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpRatchetJointGetPhase(const cpConstraint *constraint)@ -* @void cpRatchetJointSetPhase(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpRatchetJointGetRatchet(const cpConstraint *constraint)@ -* @void cpRatchetJointSetRatchet(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Gear Joint:", "cpGearJoint" %> - -
    cpGearJoint *cpGearJointAlloc(void);
    -cpGearJoint *cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
    -cpConstraint *cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio);
    - -p(expl). Keeps the angular velocity ratio of a pair of bodies constant. @ratio@ is always measured in absolute terms. It is currently not possible to set the ratio in relation to a third body's angular velocity. @phase@ is the initial angular offset of the two bodies. - -<%= h 3, "Properties", "Properties" %> - -* @cpFloat cpGearJointGetPhase(const cpConstraint *constraint)@ -* @void cpGearJointSetPhase(cpConstraint *constraint, cpFloat value)@ -* @cpFloat cpGearJointGetRatio(const cpConstraint *constraint)@ -* @void cpGearJointSetRatio(cpConstraint *constraint, cpFloat value)@ - -<%= h 2, "Simple Motor:", "cpSimpleMotor" %> - -
    cpSimpleMotor *cpSimpleMotorAlloc(void);
    -cpSimpleMotor *cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate);
    -cpConstraint *cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate);
    - -p(expl). Keeps the relative angular velocity of a pair of bodies constant. @rate@ is the desired relative angular velocity. You will usually want to set an force (torque) maximum for motors as otherwise they will be able to apply a nearly infinite torque to keep the bodies moving. - -<%= h 3, "Properties", "Properties" %> - -* @cpFloat cpSimpleMotorGetRate(const cpConstraint *constraint)@ -* @void cpSimpleMotorSetRate(cpConstraint *constraint, cpFloat value)@ - - -<%= h 2, "Notes:", "Notes" %> - -* You can add multiple joints between two bodies, but make sure that they don't fight. Doing so can cause the bodies jitter or spin violently. - - -<%= h 1, "Overview of Collision Detection in Chipmunk:", "CollisionDetection" %> - -In order to make collision detection in Chipmunk as fast as possible, the process is broken down into several stages. While I've tried to keep it conceptually simple, the implementation can be a bit daunting. Fortunately as a user of the library, you don't need to understand everything about how it works. Though if you are trying to squeeze every bit of performance out of Chipmunk, understanding this section can be helpful. - -<%= h 2, "Spatial Indexing:", "SpatialIndexing" %> - -A for loop that checks every object against every other object in the scene would be _very_ slow. So the first stage of the collision detection, commonly called the broadphase, uses a high level spatial algorithm to decide which pairs of objects to check for collisions. Currently Chipmunk supports two spatial indexes, an axis-aligned bounding box tree and a spatial hash. These spatial indexes are able to quickly identify which pairs of shapes are near each other and should be checked for a collision. - -<%= h 2, "Fast Collision Filtering:", "CollisionsFastFiltering" %> - -After the spatial index figures out which pairs of shapes are likely to be near each other, it passes each pair back to the space using a callback to perform some additional filtering on the pairs. Before doing anything else, Chipmunk performs a few quick tests to check if shapes should collide. - -* *Bounding Box Test:* The shapes are not colliding if their bounding boxes are not overlapping. Objects like diagonal line segments can trigger a lot of false positives here, but it's unlikely to be something you should worry about. -* *Category Mask Test:* The categories of each shape are bitwise ANDed against the category mask of the other shape. If either result is 0, the shapes do not collide. -* *Group Test:* Shapes shouldn't collide with other shapes in the same non-zero group. - -<%= h 2, "Constraint Based Filtering:", "CollisionsConstraints" %> - -After fast collision filtering, Chipmunk checks the list of joints on one of the bodies to see if it has a constraint that attaches it to the other body. If that constraint's @collideBodies@ property is false, the collision will be ignored. This check is often very fast since most scenes don't contain a lot of constraints. - -<%= h 2, "Primitive Shape to Shape Collision Detection:", "PrimitiveTest" %> - -The most expensive test is to actually check for overlap based on their geometry. Circle to circle and circle to line collisions are very fast. Segment to segment and poly to poly collisions are handled using the GJK/EPA algorithms, and get more expensive as the number of vertexes increases. Simpler shapes make for faster collisions, and often more important, fewer collision points for the solver to run. Chipmunk uses a small dispatch table to figure out which function to use to check if the shapes overlap. - -Without going into too much detail, the GJK algorithm checks the distance between two objects, and the EPA algorithm checks how much they are overlapping. If you give you segment and poly shapes a small radius when creating them, the EPA algorithm can usually be skipped, speeding up the collision detection considerably. The radius should be at least as big as the amount of allowed collision slop. - -<%= h 2, "Collision Handler Filtering:", "HandlerFiltering" %> - -After checking if two shapes overlap Chipmunk will look to see if you have defined a collision handler for the collision types of the shapes. This is vital to process collisions events for the gameplay, but also gives you a very flexible way to filter out collisions. The return value of the @begin()@ and @preSolve()@ callbacks determines whether or not the colliding pair of shapes is discarded or not. Returning true will keep the pair, false will discard it. Rejecting a collision from a @begin()@ callback is permanent, rejecting it from the @preSolve()@ only applies to the step it occured in. If you don't define a handler for the given collision types, Chipmunk will call the space's default handler, which by default is defined to simply accept all collisions. - -Wildcard collisions can also return a value, but they are handled in a more complicated way. When you create a collision handler between two specific collision types, it's your responsibility to decide when to call the wildcard handlers and what to do with their return values. Otherwise, the default is to call the wildcard handler for the first type, then the second type, and use a logical AND of their return values as filtering value. See @DefaultBegin()@ in @cpSpace.c@ for more information. - -While using callbacks to filter collisions is the most flexible way, keep in mind that by the time your callback is called all of the most expensive collision detection has already been done. For simulations with a lot of colliding objects each frame, the time spent finding collisions is small compared to the time spent solving the physics for them so it may not be a big deal. Fast collision filtering should be preferred if possible. - - -<%= h 1, "Collision Callbacks:", "CollisionCallbacks" %> - -A physics library without any events or feedback would not be very useful for games. How would you know when the player bumped into an enemy so that you could take some health points away? How would you know how hard the car hit something so you don't play a loud crash noise when a pebble hits it? What if you need to decide if a collision should be ignored based on specific conditions, like implementing one way platforms? Chipmunk has a number of powerful callback systems that you can use to solve these problems. - -<%= h 2, "Collision Handlers:", "Handlers" %> - -A collision handler is a set of 4 function callbacks for the different collision events that Chipmunk recognizes. The event types are: -* @begin()@: Two shapes just started touching for the first time this step. Return true from the callback to process the collision normally or false to cause Chipmunk to ignore the collision entirely. If you return false, the @preSolve()@ and @postSolve()@ callbacks will never be run, but you will still recieve a separate event when the shapes stop overlapping. -* @preSolve()@: Two shapes are touching during this step. Return false from the callback to make Chipmunk ignore the collision this step or true to process it normally. Additionally, you may override collision values using @cpArbiterSetFriction()@, @cpArbiterSetElasticity()@ or @cpArbiterSetSurfaceVelocity()@ to provide custom friction, elasticity, or surface velocity values. See "cpArbiter":#cpArbiter for more info. -* @postSolve()@: Two shapes are touching and their collision response has been processed. You can retrieve the collision impulse or kinetic energy at this time if you want to use it to calculate sound volumes or damage amounts. See "cpArbiter":#cpArbiter for more info. -* @separate()@: Two shapes have just stopped touching for the first time this step. To ensure that begin()/separate() are always called in balanced pairs, it will also be called when removing a shape while its in contact with something or when deallocating the space. - -Collision callbacks are closely associated with "cpArbiter":#cpArbiter structs. You should familiarize yourself with those as well. - -*Note:* Shapes tagged as sensors (@cpShape.sensor == true@) never generate collisions that get processed, so collisions between sensors shapes and other shapes will never call the @postSolve()@ callback. They still generate @begin()@, and @separate()@ callbacks, and the @preSolve()@ callback is also called every frame even though there is no collision response. - -*Note #2:* @preSolve()@ callbacks are called before the sleeping algorithm runs. If an object falls asleep, its @postSolve()@ callback won't be called until it's reawoken. - -<%= h 2, "Collision Handler API:", "HandlerAPI" %> - -
    typedef int (*cpCollisionBeginFunc)(cpArbiter *arb, struct cpSpace *space, cpDataPointer data)
    -typedef int (*cpCollisionPreSolveFunc)(cpArbiter *arb, cpSpace *space, cpDataPointer data)
    -typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, cpSpace *space, cpDataPointer data)
    -typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, cpSpace *space, cpDataPointer data)
    - -p(expl). Collision handler function types. While all of them take an arbiter, space, and a user data pointer, only the @begin()@ and @preSolve()@ callbacks return a value. See above for more information. - -
    
    -struct cpCollisionHandler {
    -	cpCollisionType typeA, typeB;
    -	cpCollisionBeginFunc beginFunc;
    -	cpCollisionPreSolveFunc preSolveFunc;
    -	cpCollisionPostSolveFunc postSolveFunc;
    -	cpCollisionSeparateFunc separateFunc;
    -	cpDataPointer userData;
    -};
    -
    - -p(expl). This collision handler processes collisions between objects of type @typeA@ and @typeB@. Fill the desired collision callback functions- they are documented above. A user definable context pointer @userData@ is included for your convenience. This pointer is provided as an argument in each callback function. - -
    cpCollisionHandler *cpSpaceAddCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b)
    - -p(expl). Add a @cpCollisionHandler@ for specific collision type pair or return the existing handler for the type pair. Whenever shapes with collision types (@cpShape.collision_type@) @a@ and @b@ collide, this handler will be used to process the collision events. When a new collision handler is created, the callbacks will all be set to builtin callbacks that perform the default behavior (call the wildcard handlers, and accept all collisions). - -<%= pop_open_example "PlaySoundOnCollision" %> - -
    cpCollisionHandler *cpSpaceAddWildcardHandler(cpSpace *space, cpCollisionType type)
    - -p(expl). Add a wildcard collision handler for given collision type. This handler will be used any time an object with this type collides with another object, regardless of its type. A good example is a projectile that should be destroyed the first time it hits anything. There may be a specific collision handler and two wildcard handlers. It's up to the specific handler to decide if and when to call the wildcard handlers and what to do with their return values. (See @cpArbiterCallWildcard*()@ below) When a new wildcard handler is created, the callbacks will all be set to builtin callbacks that perform the default behavior. (accept all collisions in @begin()@ and @preSolve()@, or do nothing for @postSolve()@ and @separate()@. - -
    cpCollisionHandler *cpSpaceAddDefaultCollisionHandler(cpSpace *space)
    - -p(expl). Return a reference to the default collision handler or that is used to process all collisions that don't have a more specific handler. The default behavior for each of the callbacks is to call the wildcard handlers, ANDing their return values together if applicable. - -<%= h 2, "Post-Step Callbacks:", "PostStep" %> - -Post-step callbacks are the one place where you can break the rules about adding or removing objects from within a callback. In fact, their primary function is to help you safely remove objects from the space that you wanted to disable or destroy in a collision or query callback. - -Post step callbacks are registered as a function and a pointer that is used as a key. You can only register one @postStep()@ callback per key. This prevents you from accidentally removing an object more than once. For instance, say that you get a collision callback between a bullet and object A. You want to destroy both the bullet and object A, so you register a @postStep()@ callback to safely remove them from your game. Then you get a second collision callback between the bullet and object B. You register a @postStep()@ callback to remove object B, and a second @postStep()@ callback to remove the bullet. Because you can only register one callback per key, the @postStep()@ callback for the bullet will only be called once and you can't accidentally try to remove it twice. - -
    typedef void (*cpPostStepFunc)(cpSpace *space, void *obj, void *data)
    - -p(expl). Function type used for @postStep()@ callbacks. @space@ is the space the callback was registered on, @obj@ is the pointer value you supplied as the key, and @data@ is a user definable pointer you can use to pass in as a context value. - -
    cpBool cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *key, void *data);
    - -p(expl). Add @func@ to be called before @cpSpaceStep()@ returns. @key@ and @data@ will be passed to your function. Only the first callback registered for any unique value of @key@ will be recorded. It returns @cpTrue@ if the callback is scheduled and @cpfalse@ when the @key@ has already been used. The behavior of adding a @postStep()@ callback from outside of a collision handler or query callback is undefined. - -*Note:* Post-step callbacks are not run in any particular order. If you need to sequence a number of events, you'll need to put them in a single callback. - -<%= h 2, "Examples:", "Examples" %> - -See the "callback examples":examples.html#CollisionCallbacks for more information. - -<%= h 1, "Chipmunk Collision Pairs: @cpArbiter@", "cpArbiter" %> - -Chipmunk's @cpArbiter@ struct encapsulates a pair of colliding shapes and all of the data about their collision. cpArbiters are created when a collision starts, and persist until those shapes are no longer colliding. - -Why are they called arbiters? The short answer is that I kept using the word "arbitrates" to describe the way that collisions were resolved and then I saw that Box2D actually called them arbiters way back in 2006 when I was looking at its solver. An arbiter is like a judge, a person that has authority to settle disputes between two people. It was a fun, fitting name and was shorter to type than CollisionPair which I had been using. It was originally meant to be a private internal structure only, but evolved to be useful from callbacks. - -<%= h 2, "Memory Management:", "Memory" %> - -You will never need to create or free an arbiter. More importantly, because they are entirely managed by the space you should *never* store a reference to an arbiter as you don't know when they will be freed or reused. Use them within the callback where they are given to you and then forget about them or copy out the information you need. - -<%= h 2, "Properties:", "Properties" %> - -
    cpFloat cpArbiterGetElasticity(const cpArbiter *arb)
    -void cpArbiterSetElasticity(cpArbiter *arb, cpFloat value)
    - -p(expl). The calculated elasticity for this collision pair. Setting the value in a @preSolve()@ callback will override the value calculated by the space. The default calculation multiplies the elasticity of the two shapes together. - -
    cpFloat cpArbiterGetFriction(const cpArbiter *arb)
    -void cpArbiterSetFriction(cpArbiter *arb, cpFloat value)
    - -p(expl). The calculated friction for this collision pair. Setting the value in a @preSolve()@ callback will override the value calculated by the space. The default calculation multiplies the friction of the two shapes together. - -
    cpVect cpArbiterGetSurfaceVelocity(const cpArbiter *arb)
    -void cpArbiterSetSurfaceVelocity(cpArbiter *arb, cpVect value)
    - -p(expl). The calculated surface velocity for this collision pair. Setting the value in a @preSolve()@ callback will override the value calculated by the space. the default calculation subtracts the surface velocity of the second shape from the first and then projects that onto the tangent of the collision. This is so that only friction is affected by default calculation. Using a custom calculation, you can make something that responds like a pinball bumper, or where the surface velocity is dependent on the location of the contact point. - -
    cpDataPointer cpArbiterGetUserData(const cpArbiter *arb)
    -void cpArbiterSetUserData(cpArbiter *arb, cpDataPointer data)
    - -p(expl). A user definable context pointer. The value will persist until just after the @separate()@ callback is called for the pair. - -*NOTE:* If you need to clean up this pointer, you should implement the @separate()@ callback to do it. Also be careful when destroying the space as there may be active collisions still. In order to trigger the @separate()@ callbacks and clean up your data, you'll need to remove all the shapes from the space before disposing of it. This is something I'd suggest doing anyway. See ChipmunkDemo.c:ChipmunkDemoFreeSpaceChildren() for an example of how to do it easily. - - -
    int cpArbiterGetCount(const cpArbiter *arb)
    -cpVect cpArbiterGetNormal(const cpArbiter *arb, int i)
    -cpVect cpArbiterGetPoint(const cpArbiter *arb, int i)
    -cpFloat cpArbiterGetDepth(const cpArbiter *arb, int i)
    - -p(expl). Get the number of contacts tracked by this arbiter or the specific collision point, collision normal or penetration depth of a collision point. For the forseeable future, the maximum number of contacts will be two. - -
    cpBool cpArbiterIsFirstContact(const cpArbiter *arb)
    - -p(expl). Returns true if this is the first step the two shapes started touching. This can be useful for sound effects for instance. If its the first frame for a certain collision, check the energy of the collision in a @postStep()@ callbock and use that to determine the volume of a sound effect to play. - -
    cpBool cpArbiterIsRemoval(const cpArbiter *arb)
    - -p(expl). Returns @cpTrue@ during a @separate()@ callback if the callback was invoked due to an object removal. - -
    void cpArbiterGetShapes(const cpArbiter *arb, cpShape **a, cpShape **b)
    -void cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b)
    - -p(expl). Get the shapes or bodies in the order that they were defined in the collision handler associated with this arbiter. If you defined the handler as @cpSpaceAddCollisionHandler(space, 1, 2, ...)@, you you will find that @a->collision_type == 1@ and @b->collision_type == 2@. - -
    cpBool cpArbiterCallWildcardBeginA(cpArbiter *arb, cpSpace *space)
    -cpBool cpArbiterCallWildcardBeginB(cpArbiter *arb, cpSpace *space)
    -cpBool cpArbiterCallWildcardPreSolveA(cpArbiter *arb, cpSpace *space)
    -cpBool cpArbiterCallWildcardPreSolveB(cpArbiter *arb, cpSpace *space)
    -void cpArbiterCallWildcardPostSolveA(cpArbiter *arb, cpSpace *space)
    -void cpArbiterCallWildcardPostSolveB(cpArbiter *arb, cpSpace *space)
    -void cpArbiterCallWildcardSeparateA(cpArbiter *arb, cpSpace *space)
    -void cpArbiterCallWildcardSeparateB(cpArbiter *arb, cpSpace *space)
    - -p(expl). These functions invoke the wildcard handlers for a given collision. For custom collision handlers between specific types or overriding the default handler, you must decide how to invoke the wildcard handlers since it may be important to call the wildcards first, last, or possibly skip them entirely. For the @begin()@ and @preSolve()@ callbacks, you also need to decide what to do with their return values since they may not agree with each other or the specific handler they were called from. Every collision handler is defined for two types, the "A" variants of these functions call the wildcard handler for the first type, and the "B" variants call the handler for the second type. - -<%= pop_open_example "CollisionCallback" %> - -<%= h 2, "Contact Point Sets:", "HelperFunctions" %> - -Contact point sets make getting contact information simpler. - -
    cpContactPointSet cpArbiterGetContactPointSet(const cpArbiter *arb)
    - -p(expl). Get a contact point set struct from an arbiter. - -You might do something like the following to get and process a contact point set: - -
    cpContactPointSet set = cpArbiterGetContactPointSet(arbiter);
    -for(int i=0; i
    - -
    void cpArbiterSetContactPointSet(cpArbiter *arb, cpContactPointSet *set)
    - -p(expl). Replace the contact point set of an Arbiter. You cannot change the number of contacts, but can change the location, normal or penetration distance. The "Sticky" demo uses this to allow objects to overlap an extra amount. You could also use it in a Pong style game to modify the normal of the collision based on the x-position of the collision even though the paddle is a flat shape. - -<%= h 2, "Helper Functions:", "HelperFunctions" %> - -
    void cpArbiterGetShapes(cpArbiter *arb, cpShape **a, cpShape **b)
    -void cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b)
    - -p(expl). Get the shapes (or their bodies) in the order that they were defined in the collision handler associated with this arbiter. If you defined the handler as @cpSpaceAddCollisionHandler(space, 1, 2, ...)@, you you will find that @a->collision_type == 1@ and @b->collision_type == 2@. The convenience macro defines and initializes the two shape variables for you. The default collision handler doesn't use collision types so the order is undefined. - -
    #define CP_ARBITER_GET_SHAPES(arb, a, b) cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b)
    -#define CP_ARBITER_GET_BODIES(arb, a, b) cpBody *a, *b; cpArbiterGetBodies(arb, &a, &b);
    - -p(expl). Shortcut macros for defining variables for and retrieving the shapes/bodies for an arbiter. - -
    cpVect cpArbiterTotalImpulseWithFriction(cpArbiter *arb);
    -cpVect cpArbiterTotalImpulse(cpArbiter *arb);
    - -p(expl). Returns the impulse that was applied this step to resolve the collision. These functions should only be called from a @postStep()@ or @cpBodyEachArbiter()@ callback, otherwise the result is undefined. If in doubt which function to use, use @cpArbiterTotalImpulseWithFriction()@. - -
    cpFloat cpArbiterTotalKE(const cpArbiter *arb);
    - -p(expl). Calculate the amount of energy lost in a collision including static, but not dynamic friction. This function should only be called from a @postSolve()@, @postStep()@ or @cpBodyEachArbiter()@ callback. - - -<%= h 1, "Queries:", "Queries" %> - -Chipmunk spaces support four kinds of spatial queries, nearest point, segment, shape and fast bounding box queries. Any type can be performed efficiently against an entire space, and point and segment queries can be performed against individual shapes. All types of queries take a collision group and layer that are used to filter matches out using the same rules used for filtering collisions between shapes. See "cpShape":#cpShape for more information. If you don't want to filter out any matches, use @CP_ALL_LAYERS@ for the layers and @CP_NO_GROUP@ as the group. - -<%= h 2, "Nearest Point Queries:", "PointQueries" %> - -Point queries are useful for things like mouse picking and simple sensors. They allow you to check if there are shapes within a certain distance of a point, find the closest point on a shape to a given point or find the closest shape to a point. - -
    typedef struct cpPointQueryInfo {
    -	/// The nearest shape, NULL if no shape was within range.
    -	const cpShape *shape;
    -	/// The closest point on the shape's surface. (in world space coordinates)
    -	cpVect point;
    -	/// The distance to the point. The distance is negative if the point is inside the shape.
    -	cpFloat distance;
    -	/// The gradient of the signed distance function.
    -	/// The value should be similar to info.p/info.d, but accurate even for very small values of info.d.
    -	cpVect gradient;
    -} cpPointQueryInfo;
    - -p(expl). Nearest point queries return the point on the surface of the shape as well as the distance from the query point to the surface point. - -
    cpFloat cpShapeNearestPointQuery(cpShape *shape, cpVect p, cpPointQueryInfo *out)
    - -p(expl). Find the distance from @point@ to @shape@. If the point is inside of the shape, the distance will be negative and equal to the depth of the point. - -
    typedef void (*cpSpaceNearestPointQueryFunc)(cpShape *shape, cpFloat distance, cpVect point, void *data);
    -
    -void cpSpacePointQuery(
    -	cpSpace *space, cpVect point, cpFloat maxDistance,
    -	cpShapeFilter filter,
    -	cpSpaceNearestPointQueryFunc func, void *data
    -)
    - -p(expl). Query @space@ at @point@ for shapes within the given distance range. The @filter@ is applied to the query and follows the same rules as the collision detection. @func@ is called for each shape found along with the distance to the closest point on the shape's surface, the distance to that point and the @data@ argument passed to @cpSpaceNearestPointQuery()@. Sensor shapes are included. If a @maxDistance@ of @0.0@ is used, the point must lie inside a shape. Negative @maxDistance@ is also allowed meaning that the point must be a under a certain depth within a shape to be considered a match. - -
    cpShape *cpSpacePointQueryNearest(cpSpace *space, cpVect point, cpFloat maxDistance, cpShapeFilter filter, cpPointQueryInfo *out)
    - -p(expl). Query @space@ at @point@ and return the closest shape within @maxDistance@ units of distance. @out@ is an optional pointer to a @cpPointQueryInfo@ if you want additional information about the match. - -<%= h 2, "Segment Queries:", "SegmentQueries" %> - -Segment queries are like ray casting, but because not all spatial indexes allow processing infinitely long ray queries it is limited to segments. In practice this is still very fast and you don't need to worry too much about the performance as long as you aren't using extremely long segments for your queries. - -
    typedef struct cpSegmentQueryInfo {
    -	/// The shape that was hit, or NULL if no collision occured.
    -	const cpShape *shape;
    -	/// The point of impact.
    -	cpVect point;
    -	/// The normal of the surface hit.
    -	cpVect normal;
    -	/// The normalized distance along the query segment in the range [0, 1].
    -	cpFloat alpha;
    -} cpSegmentQueryInfo;
    - -p(expl). Segment queries return more information than just a simple yes or no, they also return where a shape was hit and its surface normal at the hit point. @t@ is the percentage between the query start and end points. If you need the hit point in world space or the absolute distance from start, see the segment query helper functions farther down. If a segment query starts within a shape it will have @t = 0@ and @n = cpvzero@. - -
    cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpFloat radius, cpSegmentQueryInfo *info)
    - -p(expl). Perform a segment query from @a@ to @b@ with the given @radius@ against a single shape @shape@. @info@ must be a valid pointer to a @cpSegmentQueryInfo@ structure which will be initialized with the raycast info. - -
    typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data)
    -
    -void cpSpaceSegmentQuery(
    -	cpSpace *space, cpVect start, cpVect end, cpFloat radius,
    -	cpShapeFilter filter,
    -	cpSpaceSegmentQueryFunc func, void *data
    -)
    - -p(expl). Query @space@ along the line segment from @start@ to @end@ with the given @radius@. The @filter@ is applied to the query and follows the same rules as the collision detection. @func@ is called with the normalized distance along the line and surface normal for each shape found along with the @data@ argument passed to @cpSpacePointQuery()@. Sensor shapes are included. - -
    cpShape *cpSpaceSegmentQueryFirst(
    -	cpSpace *space, cpVect start, cpVect end, cpFloat radius,
    -	cpShapeFilter filter,
    -	cpSegmentQueryInfo *info
    -)
    - -p(expl). Query @space@ along the line segment from @start@ to @end@ with the given @radius@. The @filter@ is applied to the query and follows the same rules as the collision detection. Only the first shape encountered is returned and the search is short circuited. Returns @NULL@ if no shape was found. The info struct pointed to by @info@ will be initialized with the raycast info unless @info@ is NULL. Sensor shapes are ignored. - -<%= h 2, "AABB Queries:", "AABBQueries" %> - -AABB queries give you a fast way to check roughly which shapes are in an area. - -
    typedef void (*cpSpaceBBQueryFunc)(cpShape *shape, void *data)
    -
    -void cpSpaceBBQuery(
    -	cpSpace *space, cpBB bb,
    -	cpShapeFilter filter,
    -	cpSpaceBBQueryFunc func, void *data
    -)
    - -p(expl). Query @space@ to find all shapes near @bb@. The @filter@ is applied to the query and follows the same rules as the collision detection. @func@ is called for each shape whose bounding box overlaps @bb@ along with the @data@ argument passed to @cpSpaceBBQuery()@. Sensor shapes are included. - -<%= h 2, "Shape Queries:", "ShapeQueries" %> - -Shape queries allow you to check if shapes in a space are overlapping a specific area. You can use this to check if an object already exists at a location you want to add another shape, or to use as sensor queries for AI. - -You can either create a body/shape pair before querying, or you can create a shape passing @NULL@ for the body and position the shape using @cpShapeUpdate()@ to set the position and rotation of the shape. - -
    typedef void (*cpSpaceShapeQueryFunc)(cpShape *shape, cpContactPointSet *points, void *data);
    -
    -cpBool cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data);
    - -p(expl). Query @space@ to find all shapes overlapping @shape@. @func@ is called for each overlapping shape along with a pointer to a temporary cpContactPointSet and the @data@ argument passed to @cpSpaceBBQuery()@. Sensor shapes are included. - -<%= h 2, "Blocks:", "Blocks" %> - -If your compiler supports blocks (such as Clang), there are an alternate set of functions you can call. @cpSpaceNearestPointQuery_b()@, etc. See @chipmunk.h@ for more information. - -<%= h 2, "Examples:", "Examples" %> - -See the "query examples":examples.html#Query for more information. diff --git a/doc-src/doxygen_generator.rb b/doc-src/doxygen_generator.rb deleted file mode 100644 index 321eadfa..00000000 --- a/doc-src/doxygen_generator.rb +++ /dev/null @@ -1,181 +0,0 @@ -OUTPUT_NAME = "generated_docs" -exit if File.exists?(OUTPUT_NAME) - -DOC_FILE = open(OUTPUT_NAME, "w") - -FUNCS = {} -IO.readlines("|ruby extract_protos.rb").each{|line| - func = eval(line) - FUNCS[func[:name]] = func -} - -SKIP = Object.new - -GETTER_DOCS = { - "cpArbiterGetBodies" => SKIP, - "cpArbiterGetContactPointSet" => SKIP, - "cpArbiterGetCount" => SKIP, - "cpArbiterGetDepth" => SKIP, - "cpArbiterGetElasticity" => "Get the elasticity for this cpArbiter", - "cpArbiterGetFriction" => "Get the friction for this cpArbiter", - "cpArbiterGetNormal" => SKIP, - "cpArbiterGetPoint" => SKIP, - "cpArbiterGetShapes" => SKIP, - "cpArbiterGetSurfaceVelocity" => "Get the surface velocity used by the contact calculation for this cpArbiter", - - "cpBodyGetAngVel" => "Get the angular velocity of this cpBody", - "cpBodyGetAngVelLimit" => "Get the angular velocity limit of this cpBody", - "cpBodyGetAngle" => "Get the angle of this cpBody", - "cpBodyGetForce" => "Get the force applied to this cpBody", - "cpBodyGetMass" => "Get the mass of this cpBody", - "cpBodyGetMoment" => "Get the moment of inertia of this cpBody", - "cpBodyGetPos" => "Get the position of this cpBody", - "cpBodyGetRot" => "Get the rotation vector of this cpBody", - "cpBodyGetTorque" => "Get the torque applied to this cpBody", - "cpBodyGetUserData" => "Get the userdata pointer for this cpBody", - "cpBodyGetVel" => "Get the velocity of this cpBody", - "cpBodyGetVelLimit" => "Get the velocity limit of this cpBody", - - "cpCircleShapeGetOffset" => "Get the offset of this cpCircleShape", - "cpCircleShapeGetRadius" => "Get the radius of this cpCircleShape", - - "cpConstraintGetA" => "Get the first of the two bodies this cpConstraint is connected to.", - "cpConstraintGetB" => "Get the second of the two bodies this cpConstraint is connected to.", - "cpConstraintGetErrorBias" => "Get the percentage of constraint error that remains unfixed after each second.", - "cpConstraintGetImpulse" => SKIP, - "cpConstraintGetMaxBias" => "Get the maximum rate this cpConstraint can apply to correct itself at.", - "cpConstraintGetMaxForce" => "Get the maximum force this cpConstraint can apply to correct itself.", - "cpConstraintGetPostSolveFunc" => "Get the function callback that is called each step after the solver runs.", - "cpConstraintGetPreSolveFunc" => "Get the function callback that is called each step before the solver runs.", - "cpConstraintGetUserData" => "Get the user data pointer for this cpConstraint.", - - "cpDampedRotarySpringGetDamping" => "Get the damping of this cpDampedRotarySpring.", - "cpDampedRotarySpringGetRestAngle" => "Get the restangle of this cpDampedRotarySpring.", - "cpDampedRotarySpringGetSpringTorqueFunc" => "Get the springtorquefunc of this cpDampedRotarySpring.", - "cpDampedRotarySpringGetStiffness" => "Get the stiffness of this cpDampedRotarySpring.", - - "cpDampedSpringGetAnchr1" => "Get the anchr1 of this cpDampedSpring.", - "cpDampedSpringGetAnchr2" => "Get the anchr2 of this cpDampedSpring.", - "cpDampedSpringGetDamping" => "Get the damping of this cpDampedSpring.", - "cpDampedSpringGetRestLength" => "Get the rest length of this cpDampedSpring.", - "cpDampedSpringGetSpringForceFunc" => "Get the spring force callback function of this cpDampedSpring.", - "cpDampedSpringGetStiffness" => "Get the stiffness of this cpDampedSpring.", - - "cpGearJointGetPhase" => "Get the phase of this cpGearJoint.", - "cpGearJointGetRatio" => "Get the ratio of this cpGearJoint.", - - "cpGrooveJointGetAnchr2" => "Get the anchr2 of this cpGrooveJoint.", - "cpGrooveJointGetGrooveA" => "Get the groovea of this cpGrooveJoint.", - "cpGrooveJointGetGrooveB" => "Get the grooveb of this cpGrooveJoint.", - - "cpPinJointGetAnchr1" => "Get the anchr1 of this cpPinJoint.", - "cpPinJointGetAnchr2" => "Get the anchr2 of this cpPinJoint.", - "cpPinJointGetDist" => "Get the dist between the anchor points of this cpPinJoint.", - - "cpPivotJointGetAnchr1" => "Get the anchr1 of this cpPivotJoint.", - "cpPivotJointGetAnchr2" => "Get the anchr2 of this cpPivotJoint.", - - "cpPolyShapeGetNumVerts" => SKIP, - "cpPolyShapeGetVert" => SKIP, - - "cpRatchetJointGetAngle" => "Get the angle of this cpRatchetJoint.", - "cpRatchetJointGetPhase" => "Get the phase of this cpRatchetJoint.", - "cpRatchetJointGetRatchet" => "Get the ratchet angular distance of this cpRatchetJoint.", - - "cpRotaryLimitJointGetMax" => "Get the max delta angle of this cpRotaryLimitJoint.", - "cpRotaryLimitJointGetMin" => "Get the min delta angle of this cpRotaryLimitJoint.", - - "cpSegmentShapeGetA" => "Get the first endpoint of this cpSegmentShape.", - "cpSegmentShapeGetB" => "Get the second endpoint of this cpSegmentShape.", - "cpSegmentShapeGetNormal" => "Get the normal of this cpSegmentShape.", - "cpSegmentShapeGetRadius" => "Get the radius of this cpSegmentShape.", - - "cpShapeGetBB" => "Get the bounding box of this cpShape.", - "cpShapeGetBody" => "Get the body this cpShape is attached to.", - "cpShapeGetCollisionType" => "Get the collision type of this cpShape.", - "cpShapeGetElasticity" => "Get the elasticity of this cpShape.", - "cpShapeGetFriction" => "Get the friction of this cpShape.", - "cpShapeGetGroup" => "Get the group of this cpShape.", - "cpShapeGetLayers" => "Get the layer bitmask of this cpShape.", - "cpShapeGetSensor" => "Get the sensor flag of this cpShape.", - "cpShapeGetSurfaceVelocity" => "Get the surface velocity of this cpShape.", - "cpShapeGetUserData" => "Get the user data pointer of this cpShape.", - - "cpSimpleMotorGetRate" => "Get the rate of this cpSimpleMotor.", - - "cpSlideJointGetAnchr1" => "Get the anchr1 of this cpSlideJoint.", - "cpSlideJointGetAnchr2" => "Get the anchr2 of this cpSlideJoint.", - "cpSlideJointGetMax" => "Get the max distance between the anchors of this cpSlideJoint.", - "cpSlideJointGetMin" => "Get the min distance between the anchors of this cpSlideJoint.", - - "cpSpaceGetCollisionBias" => "Get the collision bias of this cpSpace.", - "cpSpaceGetCollisionPersistence" => "Get the collision persistence of this cpSpace.", - "cpSpaceGetCollisionSlop" => "Get the collision slop of this cpSpace.", - "cpSpaceGetCurrentTimeStep" => "Get the most recent timestep used with this cpSpace.", - "cpSpaceGetDamping" => "Get the damping of this cpSpace.", - "cpSpaceGetEnableContactGraph" => "Get the enable contact graph flag of this cpSpace.", - "cpSpaceGetGravity" => "Get the gravity of this cpSpace.", - "cpSpaceGetIdleSpeedThreshold" => "Get the idle speed threshold of this cpSpace.", - "cpSpaceGetIterations" => "Get the number of solver iterations of this cpSpace.", - "cpSpaceGetSleepTimeThreshold" => "Get the sleep time threshold of this cpSpace.", - "cpSpaceGetStaticBody" => "Get the static body of this cpSpace.", - "cpSpaceGetUserData" => "Get the user data pointer of this cpSpace.", -} - -def output_getter(func) - name = func[:name] - - doc = GETTER_DOCS[name] - return if doc == SKIP - - struct, property = */(cp\w*)Get(.+)/.match(name).captures - - if doc - prototype = "#{func[:inline] ? "static inline " : ""}#{func[:return]} #{name}(#{func[:args]})" - -DOC_FILE.puts <<-EOF -/// @addtogroup #{struct} -/// @{ -/// @fn #{prototype}; -/// @brief #{doc} -#{prototype}; -/// @} - -EOF - else - puts %{\t"#{name}" => "Get the #{property.downcase} of this #{struct}.",} - end -end - - -def output_setter(func) - name = func[:name] - - doc = GETTER_DOCS[name.gsub("Set", "Get")] - return if doc == SKIP - - struct, property = */(cp\w*)Set(.+)/.match(name).captures - - if doc - prototype = "static inline void #{name}(#{func[:args]})" - -DOC_FILE.puts <<-EOF -/// @addtogroup #{struct} -/// @{ -/// @fn #{prototype}; -/// @brief #{doc.gsub("Get", "Set")} -#{prototype}; -/// @}" - -EOF - else - puts %{\t"#{name}" => "Set the #{property.downcase} of this #{struct}.",} - end -end - - -getters = FUNCS.keys.find_all{|name| /(cp\w*)Get(.+)/.match(name)}.sort -FUNCS.values_at(*getters).each{|func| output_getter(func)} - -setters = FUNCS.keys.find_all{|name| /(cp\w*)Set(.+)/.match(name)}.sort -FUNCS.values_at(*setters).each{|func| output_setter(func)} diff --git a/doc-src/doxygen_main b/doc-src/doxygen_main deleted file mode 100644 index 4535aaaf..00000000 --- a/doc-src/doxygen_main +++ /dev/null @@ -1,41 +0,0 @@ -/** @mainpage Chipmunk2D and Chipmunk2D Pro API reference. - -

    What is Chipmunk2D?

    - -First of all, Chipmunk2D is a 2D rigid body -physics library distributed under the MIT license. It is intended to be fast, -portable, numerically stable, and easy to use. For this reason it's been used in -hundreds of games across every recent system you can name. I've put thousands of -hours of work over many years to make Chipmunk2D what it is today. I hope you -enjoy working with it! Chipmunk2D Pro builds on what we've made with C -Chipmunk2D and extended it with more features, platform specific performance -tuning, and new features. Currently we offer a Objective-C binding, ARM NEON -optimizations for mobile CPUs, and a very high performance and flexible -automatic geometry library. Objective-Chipmunk for iPhone/Mac provides extended -APIs and a first rate Objective-C wrapper with support for properties, blocks -and ARC (automatic reference counting) to make Chipmunk2D coding more efficient -with your time on Apple platforms. The ARM optimizations use the NEON SIMD -coprocessor found in any smartphone using an ARM Cortex A* CPU including all iOS -hardware since the 3GS and many Android phones. The auto geometry library can -generate geometry from bitmap images or procedural data. You can use it for -generating convex hull shapes from sprites, or create an entire level's -collision shapes from a background image. It can also be easily set up to be -used for high-performance deformable terrain or infinite procedural terrain. If -you'd like to hear more about Chipmunk2D Pro or download a trial library check -out the -Chipmunk2D Pro page. - -

    Where do I start?

    - -You might want to start by looking at some -sample code. From there, -you probably want to skim over the latest -documentation. While geared towards C developers, it introduces all the important building -blocks. The Objective-C API simply takes things to the next logical step. - -

    Note:

    -These Doxygen docs cover both the C Chipmunk2D API as well as -Objective-Chipmunk. The Objective-Chipmunk classes (Chipmunk*) are not available -except with Chipmunk2D Pro. */ diff --git a/doc-src/extract_protos.rb b/doc-src/extract_protos.rb deleted file mode 100644 index e3ff34d8..00000000 --- a/doc-src/extract_protos.rb +++ /dev/null @@ -1,22 +0,0 @@ -# match 0 is the whole function proto -# match 1 is either "static inline " or nil -# match 2 is the return type -# match 3 is the function symbol name -# match 4 is the arguments -PATTERN = /.*?((static inline )?(\w*\*?)\s(cp\w*)\((.*?)\))/ - -IO.readlines("|gcc -DNDEBUG -E ../include/chipmunk/chipmunk.h").each do|line| - str = line - - while match = PATTERN.match(str) - str = match.post_match - - proto, inline, ret, name, args = match.captures.values_at(0, 1, 2, 3, 4) - next if ret == "return" || ret == "" - - inline = !!inline - - p({:inline => inline, :return => ret, :name => name, :args => args}) -# puts "#{name} - #{inline ? "static inline " : ""}#{ret} #{name}(#{args})" - end -end diff --git a/doc-src/upload_docs.sh b/doc-src/upload_docs.sh deleted file mode 100644 index d01fbfb0..00000000 --- a/doc-src/upload_docs.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -r --exclude=".*" ../ slembcke.net:files.slembcke.net/chipmunk/release/Chipmunk-5.x/Chipmunk-Docs/ diff --git a/doc/examples.html b/doc/examples.html deleted file mode 100644 index 66ef9053..00000000 --- a/doc/examples.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Chipmunk Game Dynamics Documentation - - - - -

    Example Code Snippets:

    - - - -

    Getting a Transformation from a Rigid Body:

    - -

    You can quickly and easily build a transformation matrix from a Chipmunk body. The following code is for OpenGL, but it should be trivial to modify for DirectX or affine transforms. (Note that OpenGL matrices are column-major)

    - -
    cpVect pos = body->p;
    -cpVect rot = body->rot;
    -
    -GLFloat matrix[16] = {
    -   rot.x, rot.y, 0.0f, 0.0f,
    -  -rot.y, rot.x, 0.0f, 0.0f,
    -   0.0f,   0.0f, 1.0f, 0.0f,
    -   pos.x, pos.y, 0.0f, 1.0f,
    -};
    -
    -glMultMatrixf(matrix.farr);
    -
    - - -
    -

    Collision Callbacks:

    - -

    This snippet demonstrates several Chipmunk collision callback features. It defines a collision handler that is called when collision shapes start touching and also a post-step callback to remove the collision shape and body.

    - -
    static void
    -postStepRemove(cpSpace *space, cpShape *shape, void *unused)
    -{
    -  cpSpaceRemoveBody(space, shape->body);
    -  cpSpaceRemoveShape(space, shape);
    -  
    -  cpShapeFree(shape);
    -  cpBodyFree(shape->body);
    -}
    -
    -static int
    -begin(cpArbiter *arb, cpSpace *space, void *unused)
    -{
    -  // Get the cpShapes involved in the collision
    -  // The order will be the same as you defined in the handler definition
    -  // a->collision_type will be BULLET_TYPE and b->collision_type will be MONSTER_TYPE
    -  cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
    -  
    -  // Alternatively you can use the CP_ARBITER_GET_SHAPES() macro
    -  // It defines and sets the variables for you.
    -  //CP_ARBITER_GET_SHAPES(arb, a, b);
    -  
    -  // Add a post step callback to safely remove the body and shape from the space.
    -  // Calling cpSpaceRemove*() directly from a collision handler callback can cause crashes.
    -  cpSpaceAddPostStepCallback(space, (cpPostStepFunc)postStepRemove, b, NULL);
    -  
    -  // The object is dead, don’t process the collision further
    -  return 0;
    -}
    -
    -#define BULLET_TYPE 1
    -#define MONSTER_TYPE 2
    -
    -// Define a collision handler for bullets and monsters
    -// Kill the monster by removing it’s shape and body from the space as soon as it’s hit by a bullet 
    -cpSpaceAddCollisionHandler(space, BULLET_TYPE, MONSTER_TYPE, begin, NULL, NULL, NULL, NULL);
    - -

    For more callback examples, see the One Way Platform Demo, Sensors Demo, or the Player Demo.

    - - - -

    Query Examples:

    - -

    The following example is taken directly from ChipmunkDemo.c. When the mouse is clicked, a point query is performed to see if there is a shape under the mouse. If there is, it adds a joint to the body that links it to the mouse's movement.

    - -
    static void
    -click(int button, int state, int x, int y)
    -{
    -  if(button == GLUT_LEFT_BUTTON){
    -    if(state == GLUT_DOWN){
    -      cpVect point = mouseToSpace(x, y);
    -    
    -      cpShape *shape = cpSpacePointQueryFirst(space, point, GRABABLE_MASK_BIT, 0);
    -      if(shape){
    -        cpBody *body = shape->body;
    -        mouseJoint = cpPivotJointNew2(mouseBody, body, cpvzero, cpBodyWorld2Local(body, point));
    -        mouseJoint->maxForce = 50000.0f;
    -        mouseJoint->biasCoef = 0.15f;
    -        cpSpaceAddConstraint(space, mouseJoint);
    -      }
    -    } else if(mouseJoint){
    -      cpSpaceRemoveConstraint(space, mouseJoint);
    -      cpConstraintFree(mouseJoint);
    -      mouseJoint = NULL;
    -    }
    -  }
    -}
    - -

    Perform a segment query to see if a laser beam hits a shape. We want to draw particles at both the position where the beam enters and exits the shape.

    - -
    cpVect a = cpv(...), b = cpv(...);
    -
    -cpSegmentQueryInfo info = {};
    -if(cpSpaceSegmentQueryFirst(space, a, b, -1, 0, &info)){
    -  cpSegmentQueryInfo info2;
    -  cpShapeSegmentQuery(info.shape, b, a, &info2);
    -  
    -  cpVect enterPoint = cpSegmentQueryHitPoint(a, b, info);
    -  cpVect exitPoint = cpSegmentQueryHitPoint(b, a, info2);
    -}
    - - - diff --git a/doc/examples/BreakableJoint.html b/doc/examples/BreakableJoint.html deleted file mode 100644 index a526b9a2..00000000 --- a/doc/examples/BreakableJoint.html +++ /dev/null @@ -1,22 +0,0 @@ -
    // Create the joint and set it's max force property.
    -breakableJoint = cpSpaceAddConstraint(space, cpPinJointNew(body1, body2, cpv(15,0), cpv(-15,0)));
    -cpConstraintSetMaxForce(breakableJoint, 4000);
    -
    -
    -// In your update function:
    -// Step your space normally...
    -cpFloat dt = 1.0/60.0;
    -cpSpaceStep(space, dt);
    -
    -if(breakableJoint){
    -  // Convert the impulse to a force by dividing it by the timestep.
    -  cpFloat force = cpConstraintGetImpulse(breakableJoint)/dt;
    -  cpFloat maxForce = cpConstraintGetMaxForce(breakableJoint);
    -
    -  // If the force is almost as big as the joint's max force, break it.
    -  if(force > 0.9*maxForce){
    -    cpSpaceRemoveConstraint(space, breakableJoint);
    -    breakableJoint = NULL;
    -  }
    -}
    -
    \ No newline at end of file diff --git a/doc/examples/CollisionCallback.html b/doc/examples/CollisionCallback.html deleted file mode 100644 index 26a21617..00000000 --- a/doc/examples/CollisionCallback.html +++ /dev/null @@ -1,38 +0,0 @@ -
    static void
    -postStepRemove(cpSpace *space, cpShape *shape, void *unused)
    -{
    -  cpSpaceRemoveShape(space, shape);
    -  cpSpaceRemoveBody(space, shape->body);
    -  
    -  cpShapeFree(shape);
    -  cpBodyFree(shape->body);
    -}
    -
    -static int
    -begin(cpArbiter *arb, cpSpace *space, void *data)
    -{
    -  // Get the cpShapes involved in the collision
    -
      // The order will be the same as you defined in the handler definition
    -
      // a->collision_type will be BULLET_TYPE and b->collision_type will be MONSTER_TYPE
    -
      CP_ARBITER_GET_SHAPES(arb, a, b);
    -  
    -  // The macro expands exactly as if you had typed this:
    -
      // cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
    -
      
    -  // Add a post step callback to safely remove the body and shape from the space.
    -
      // Calling cpSpaceRemove*() directly from a collision handler callback can cause crashes.
    -
      cpSpaceAddPostStepCallback(space, (cpPostStepFunc)postStepRemove, b, NULL);
    -  
    -  // The object is dead, don’t process the collision further
    -
      return 0;
    -}
    -
    -#define BULLET_TYPE 1
    -#define MONSTER_TYPE
    2
    -

    -// Define a collision handler for bullets and monsters
    -// Kill the monster by removing it’s shape and body from the space as soon as it’s hit by a bullet
    -
    cpCollisionHandler *handler = cpSpaceAddCollisionHandler(space, BULLET_TYPE, MONSTER_TYPE);
    -handler->beginFunc = begin;
    -
    -
    \ No newline at end of file diff --git a/doc/examples/Crushing.html b/doc/examples/Crushing.html deleted file mode 100644 index e16e251a..00000000 --- a/doc/examples/Crushing.html +++ /dev/null @@ -1,23 +0,0 @@ -
    struct CrushingContext {
    -  cpFloat magnitudeSum;
    -  cpVect vectorSum;
    -};
    -
    -static void
    -EstimateCrushingHelper(cpBody *body, cpArbiter *arb, struct CrushingContext *context)
    -{
    -  cpVect j = cpArbiterTotalImpulseWithFriction(arb);
    -  context->magnitudeSum += cpvlength(j);
    -  context->vectorSum = cpvadd(context->vectorSum, j);
    -}
    -
    -cpFloat
    -EstimateCrushForce(cpBody *body, cpFloat dt)
    -{
    -  struct CrushingContext crush = {0.0f, cpvzero};
    -  cpBodyEachArbiter(body, (cpBodyArbiterIteratorFunc)EstimateCrushingHelper, &crush);
    -  
    -  // Compare the vector sum magnitude and magnitude sum to see if
    -  // how much the collision forces oppose one another.
    -  cpFloat crushForce = (crush.magnitudeSum - cpvlength(crush.vectorSum))*dt;
    -}
    \ No newline at end of file diff --git a/doc/examples/DynamicStatic.html b/doc/examples/DynamicStatic.html deleted file mode 100644 index 9938298d..00000000 --- a/doc/examples/DynamicStatic.html +++ /dev/null @@ -1,18 +0,0 @@ -
    // This example is pulled from the Plink demo.
    -if(ChipmunkDemoRightDown){
    -  // Find the shape under the mouse.
    -  cpShape *nearest = cpSpaceNearestPointQueryNearest(space, ChipmunkDemoMouse, 0.0, GRABABLE_MASK_BIT, CP_NO_GROUP, NULL);
    -  if(nearest){
    -    cpBody *body = cpShapeGetBody(nearest);
    -    if(cpBodyIsStatic(body)){
    -      // If the body is static, convert it to dynamic and add it to the space.
    -      cpSpaceConvertBodyToDynamic(space, body, pentagon_mass, pentagon_moment);
    -      cpSpaceAddBody(space, body);
    -    } else {
    -      // If the body is dynamic, remove it from the space and convert it to static.
    -      cpSpaceRemoveBody(space, body);
    -      cpSpaceConvertBodyToStatic(space, body);
    -    }
    -  }
    -}
    -
    \ No newline at end of file diff --git a/doc/examples/Hello Chipmunk.html b/doc/examples/Hello Chipmunk.html deleted file mode 100644 index 8215aabb..00000000 --- a/doc/examples/Hello Chipmunk.html +++ /dev/null @@ -1,64 +0,0 @@ -
    #include <stdio.h>
    -#include
    <chipmunk.h>
    -

    -int main(void){
    -  // cpVect is a 2D vector and cpv() is a shortcut for initializing them.
    -
      cpVect gravity = cpv(0, -100);
    -  
    -  // Create an empty space.
    -
      cpSpace *space = cpSpaceNew();
    -  cpSpaceSetGravity(space, gravity);
    -  
    -  // Add a static line segment shape for the ground.
    -
      // We'll make it slightly tilted so the ball will roll off.
    -
      // We attach it to a static body to tell Chipmunk it shouldn't be movable.
    -
      cpShape *ground = cpSegmentShapeNew(cpSpaceGetStaticBody(space), cpv(-20, 5), cpv(20, -5), 0);
    -  cpShapeSetFriction(ground, 1);
    -  cpSpaceAddShape(space, ground);
    -  
    -  // Now let's make a ball that falls onto the line and rolls off.
    -
      // First we need to make a cpBody to hold the physical properties of the object.
    -
      // These include the mass, position, velocity, angle, etc. of the object.
    -
      // Then we attach collision shapes to the cpBody to give it a size and shape.
    -
      
    -  cpFloat radius = 5;
    -  cpFloat mass = 1;
    -  
    -  // The moment of inertia is like mass for rotation
    -
      // Use the cpMomentFor*() functions to help you approximate it.
    -
      cpFloat moment = cpMomentForCircle(mass, 0, radius, cpvzero);
    -  
    -  // The cpSpaceAdd*() functions return the thing that you are adding.
    -
      // It's convenient to create and add an object in one line.
    -
      cpBody *ballBody = cpSpaceAddBody(space, cpBodyNew(mass, moment));
    -  cpBodySetPosition(ballBody, cpv(0, 15));
    -  
    -  // Now we create the collision shape for the ball.
    -
      // You can create multiple collision shapes that point to the same body.
    -
      // They will all be attached to the body and move around to follow it.
    -
      cpShape *ballShape = cpSpaceAddShape(space, cpCircleShapeNew(ballBody, radius, cpvzero));
    -  cpShapeSetFriction(ballShape, 0.7);
    -  
    -  // Now that it's all set up, we simulate all the objects in the space by
    -
      // stepping forward through time in small increments called steps.
    -
      // It is *highly* recommended to use a fixed size time step.
    -
      cpFloat timeStep = 1.0/60.0;
    -  for(cpFloat time = 0; time < 2; time += timeStep){
    -    cpVect pos = cpBodyGetPosition(ballBody);
    -    cpVect vel = cpBodyGetVelocity(ballBody);
    -    printf(
    -      "Time is %5.2f. ballBody is at (%5.2f, %5.2f). It's velocity is (%5.2f, %5.2f)\n",
    -      time, pos.x, pos.y, vel.x, vel.y
    -    );
    -    
    -    cpSpaceStep(space, timeStep);
    -  }
    -  
    -  // Clean up our objects and exit!
    -
      cpShapeFree(ballShape);
    -  cpBodyFree(ballBody);
    -  cpShapeFree(ground);
    -  cpSpaceFree(space);
    -  
    -  return 0;
    -}
    \ No newline at end of file diff --git a/doc/examples/JointRecipies.html b/doc/examples/JointRecipies.html deleted file mode 100644 index 47c5cc2d..00000000 --- a/doc/examples/JointRecipies.html +++ /dev/null @@ -1,17 +0,0 @@ -
    // Faked top down friction.
    -

    -// A pivot joint configured this way will calculate friction against the ground for games with a top down perspective.
    -// Because the joint correction is disabled, the joint will not recenter itself and only apply to the velocity.
    -// The force the joint applies when changing the velocity will be clamped by the max force
    -// and this causes it to work exactly like friction!
    -
    cpConstraint *pivot = cpSpaceAddConstraint(space, cpPivotJointNew2(staticBody, body, cpvzero, cpvzero));
    -cpConstraintSetMaxBias(pivot, 0.0f); // disable joint correction
    -
    cpConstraintSetMaxForce(pivot, 1000.0f);
    -
    -// The pivot joint doesn't apply rotational forces, use a gear joint with a ratio of 1.0 for that.
    -
    cpConstraint *gear = cpSpaceAddConstraint(space, cpGearJointNew(staticBody, body, 0.0f, 1.0f));
    -cpConstraintSetMaxBias(gear, 0.0f); // disable joint correction
    -
    cpConstraintSetMaxForce(gear, 5000.0f);
    -
    -// Also, instead of connecting the joints to a static body, you can connect them to an infinite mass rogue body.
    -// You can then use the rogue body as a control body to the connected body. See the Tank demo as an example.
    \ No newline at end of file diff --git a/doc/examples/Moments.html b/doc/examples/Moments.html deleted file mode 100644 index 8d0622c3..00000000 --- a/doc/examples/Moments.html +++ /dev/null @@ -1,14 +0,0 @@ -
    // Moment for a solid circle with a mass of 2 and radius 5.
    -cpFloat circle1 = cpMomentForCircle(2, 0, 5, cpvzero);
    -
    -// Moment for a hollow circle with a mass of 1, inner radius of 2 and outer radius of 6.
    -cpFloat circle2 = cpMomentForCircle(1, 2, 6, cpvzero);
    -
    -// Moment for a solid circle with a mass of 1, radius of 3 and
    -// centered 3 units along the x axis from the center of gravity.
    -cpFloat circle3 = cpMomentForCircle(2, 0, 5, cpv(3, 0));
    -
    -// Composite object. 1x4 box centered on the center of gravity and a circle sitting on top.
    -// Just add the moments together.
    -cpFloat composite = cpMomentForBox(boxMass, 1, 4) + cpMomentForCircle(circleMass, 0, 1, cpv(0, 3));
    -
    \ No newline at end of file diff --git a/doc/examples/PlaySoundOnCollision.html b/doc/examples/PlaySoundOnCollision.html deleted file mode 100644 index a45cc042..00000000 --- a/doc/examples/PlaySoundOnCollision.html +++ /dev/null @@ -1,15 +0,0 @@ -

    -// Callback function
    -
    static cpBool PlaySoundOnImpact(cpArbiter *arb, cpSpace *space, void *data){
    -    PlayCrashSound();
    -    return cpTrue;
    -}
    -
    -// When setting up, reference your callback function:
    -
    {
    -    ...
    -    cpCollisionHandler *handler = cpSpaceAddCollisionHandler(space, PLAYER, WALL);
    -    handler->postSolveFunc = PlaySoundOnImpact;
    -    ...
    -}   
    -
    \ No newline at end of file diff --git a/doc/examples/Sleeping.html b/doc/examples/Sleeping.html deleted file mode 100644 index 32af5bd7..00000000 --- a/doc/examples/Sleeping.html +++ /dev/null @@ -1,25 +0,0 @@ -
    // Construct a pile of boxes.
    -// Force them to sleep until the first time they are touched.
    -// Group them together so that touching any box wakes all of them.
    -cpFloat size = 20;
    -cpFloat mass = 1;
    -cpFloat moment = cpMomentForBox(mass, size, size);
    -
    -cpBody *lastBody = NULL;
    -
    -for(int i=0; i<5; i++){
    -  cpBody *body = cpSpaceAddBody(space, cpBodyNew(mass, moment));
    -  cpBodySetPos(body, cpv(0, i*size));
    -  
    -  cpShape *shape = cpSpaceAddShape(space, cpBoxShapeNew(body, size, size));
    -  cpShapeSetFriction(shape, 0.7);
    -  
    -  // You can use any sleeping body as a group identifier.
    -  // Here we just keep a reference to the last body we initialized.
    -  // Passing NULL as the group starts a new sleeping group.
    -  // You MUST do this after completely initializing the object.
    -  // Attaching shapes or calling setter functions will wake the body back up.
    -  cpBodySleepWithGroup(body, lastBody);
    -  lastBody = body;
    -}
    -
    \ No newline at end of file diff --git a/doc/examples/cpConvexHull.html b/doc/examples/cpConvexHull.html deleted file mode 100644 index b58de194..00000000 --- a/doc/examples/cpConvexHull.html +++ /dev/null @@ -1,25 +0,0 @@ -
    int first = 0;
    -
    -// Create space to store the convex hull.
    -// An alloca(), or a variable length array would be a better, but not always portable choice.
    -cpVect *hullVerts = (cpVect *)calloc(vertCount, sizeof(cpVect));
    -int hullCount = cpConvexHull(vertCount, verts, hullVerts, &first, 0.0);
    -
    -// hullVerts[0] will be equal to verts[first] here.
    -// If you don't care, pass NULL instead of the 'first' pointer.
    -
    -cpBody *body = cpBodyNew(mass, cpMomentForPoly(mass, hullCount, hullVerts, cpvzero));
    -cpShape *shape = cpPolyShapeNew(body, hullCount, hullVerts, cpvzero);
    -
    -free(hullVerts);
    -
    -// *********
    -// Altenatively you can use the CP_CONVEX_HULL() macro to save yourself a little work
    -
    -// The macro will declare the hullCount and hullVerts variables.
    -// hullVerts is allocated on the stack and does not need to be freed.
    -CP_CONVEX_HULL(count, verts, hullCount, hullVerts)
    -
    -cpBody *body = cpBodyNew(mass, cpMomentForPoly(mass, hullCount, hullVerts, cpvzero));
    -cpShape *shape = cpPolyShapeNew(body, hullCount, hullVerts, cpvzero);
    -
    \ No newline at end of file diff --git a/doc/examples/cpSpaceEachBody.html b/doc/examples/cpSpaceEachBody.html deleted file mode 100644 index 5933c0e0..00000000 --- a/doc/examples/cpSpaceEachBody.html +++ /dev/null @@ -1,12 +0,0 @@ -
    // Code snippet to check if all bodies in the space are sleeping
    -
    -// This function is called once for each body in the space.
    -static void EachBody(cpBody *body, cpBool *allSleeping){
    -  if(!cpBodyIsSleeping(body)) *allSleeping = cpFalse;
    -}
    -
    -// Then in your tick method, do this:
    -cpBool allSleeping = true;
    -cpSpaceEachBody(space, (cpSpaceBodyIteratorFunc)EachBody, &allSleeping);
    -printf("All are sleeping: %s\n", allSleeping ? "true" : "false");
    -
    \ No newline at end of file diff --git a/doc/images/hash_just_right.png b/doc/images/hash_just_right.png deleted file mode 100644 index e567fd52..00000000 Binary files a/doc/images/hash_just_right.png and /dev/null differ diff --git a/doc/images/hash_too_big.png b/doc/images/hash_too_big.png deleted file mode 100644 index 434e3d7c..00000000 Binary files a/doc/images/hash_too_big.png and /dev/null differ diff --git a/doc/images/hash_too_small.png b/doc/images/hash_too_small.png deleted file mode 100644 index ca9f8e99..00000000 Binary files a/doc/images/hash_too_small.png and /dev/null differ diff --git a/doc/images/hms_logo.png b/doc/images/hms_logo.png deleted file mode 100644 index c0b338d2..00000000 Binary files a/doc/images/hms_logo.png and /dev/null differ diff --git a/doc/images/logo1_med.png b/doc/images/logo1_med.png deleted file mode 100644 index 01634a01..00000000 Binary files a/doc/images/logo1_med.png and /dev/null differ diff --git a/doc/stylesheet.css b/doc/stylesheet.css deleted file mode 100644 index b0d0b1d0..00000000 --- a/doc/stylesheet.css +++ /dev/null @@ -1,72 +0,0 @@ -h1, h2 { - padding: 0.25em; - border-radius: 0.25em; -} - -h1 { - background-color: #89b4cb; -} - -h2 { - background-color: lightGrey; -} - -p { - margin-left: 1em; -} - -p.expl { - margin-left: 2em; -} - -code { - color: #191970 -} - -.HideShow { - background-color: lightGrey; - padding: 0.5em; - border-radius: 1em; - border: 2px grey solid; -} - -.PopOpen { - border-radius: 1em; - border: 1px grey solid; -} - -pre { - border-radius: 0.75em; - background-color: #F0F0F0; - padding: 0.5em; - margin-left: 1em; -} - -/*ul { - border-radius: 0.75em; - background-color: #F0F0F0; - margin-left: 1em; -}*/ - -table { - border: 2px solid black; - border-collapse: collapse; - margin-left: 1em; -} - -table td, th { - border: 1px black solid; - padding: 0.5em; -} - -h1 a:link, h2 a:link, h3 a:link, h1 a:visited, h2 a:visited, h3 a:visited { - text-decoration:none; - color:black; - background-color:transparent -} - -h1 a:hover, h2 a:hover, h3 a:hover, h1 a:active, h2 a:active, h3 a:active { - text-decoration:underline; - color:black; - background-color:transparent -} diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 00000000..217ecd0b --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,9 @@ +find_package(Doxygen REQUIRED) + +set(DOXYFILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + +add_custom_target(docs + ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) \ No newline at end of file diff --git a/docs/Doxyfile b/docs/Doxyfile new file mode 100644 index 00000000..0490a2a3 --- /dev/null +++ b/docs/Doxyfile @@ -0,0 +1,2622 @@ +# Doxyfile 1.9.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "Munk2D Documentation" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 8.x.x + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../build + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 2 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = txt=md + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which efficively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# Possible values are: NO, YES and FAIL_ON_WARNINGS. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = manual.md \ + ../README.md \ + ../CHANGELOG.md \ + ../LICENSE.txt \ + ../include/chipmunk \ + ../objectivec/include/ObjectiveChipmunk + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, +# *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.h \ + *.md + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = README.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = NO + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: +# http://clang.llvm.org/) for more accurate parsing at the cost of reduced +# performance. This can be particularly helpful with template rich C++ code for +# which doxygen's built-in parser lacks the necessary type information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to +# YES then doxygen will add the directory of each input to the include path. +# The default value is: YES. + +CLANG_ADD_INC_PATHS = YES + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the directory containing a file called compile_commands.json. This +# file is the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the +# options used when the source files were built. This is equivalent to +# specifying the -p option to a clang tool, such as clang-check. These options +# will then be passed to the parser. Any options specified with CLANG_OPTIONS +# will be added as well. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = header.html + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = doxygen-awesome-css/2.3.4/doxygen-awesome.css \ + doxygen-awesome-css/2.3.4/doxygen-awesome-sidebar-only.css \ + doxygen-awesome-css/2.3.4/doxygen-awesome-sidebar-only-darkmode-toggle.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = doxygen-awesome-css/2.3.4/doxygen-awesome-darkmode-toggle.js + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: +# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /