{"id":19546451,"url":"https://github.com/tzaeschke/ode4j","last_synced_at":"2025-04-12T13:34:46.683Z","repository":{"id":9250816,"uuid":"11073707","full_name":"tzaeschke/ode4j","owner":"tzaeschke","description":"Java 3D Physics Engine \u0026 Library","archived":false,"fork":false,"pushed_at":"2025-01-19T19:04:25.000Z","size":15700,"stargazers_count":172,"open_issues_count":16,"forks_count":38,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-03T13:18:06.175Z","etag":null,"topics":["3d","3d-game-engine","java","java-ports","ode","physics","stepper","turbulenz-engine"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzaeschke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-30T16:39:45.000Z","updated_at":"2025-03-23T01:09:10.000Z","dependencies_parsed_at":"2023-09-24T05:26:22.597Z","dependency_job_id":"6c79be72-a2f9-4515-a6ff-5f9182124865","html_url":"https://github.com/tzaeschke/ode4j","commit_stats":{"total_commits":660,"total_committers":14,"mean_commits":"47.142857142857146","dds":"0.20151515151515154","last_synced_commit":"070265e1142882e877fdf4d56a0db374a523006b"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzaeschke%2Fode4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzaeschke%2Fode4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzaeschke%2Fode4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzaeschke%2Fode4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzaeschke","download_url":"https://codeload.github.com/tzaeschke/ode4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248573641,"owners_count":21126876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-game-engine","java","java-ports","ode","physics","stepper","turbulenz-engine"],"created_at":"2024-11-11T03:45:26.356Z","updated_at":"2025-04-12T13:34:46.651Z","avatar_url":"https://github.com/tzaeschke.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ode4j\n\n![Java 8](https://github.com/tzaeschke/ode4j/actions/workflows/build-java-8.yml/badge.svg)\n![Java 9+](https://github.com/tzaeschke/ode4j/actions/workflows/build-java-9-plus.yml/badge.svg)\n\node4j is a Java port of [ODE](http://www.ode.org/).\n\nODE is an open source, high performance library for simulating rigid body dynamics. It is fully featured, stable, mature\nand platform independent with an easy to use C/C++ API. It has advanced joint types and integrated collision detection\nwith friction. ODE is useful for simulating vehicles, objects in virtual reality environments and virtual creatures.\n\nThe latest released version of ode4j is 0.5.3, but the master branch may contain fixes and improvements. Release 0.5.0\ncontains all changes up to ODE 0.16.3.\n\nResources\n \n* ode4j contains numerous [custom features](#additional-features-in-ode4j) that are not present in ODE (see\nalso [Wiki](https://github.com/tzaeschke/ode4j/wiki/Functionality-beyond-ODE)).\n\n* The [ODE forum](https://groups.google.com/forum/#!forum/ode-users) is useful for questions around physics and general\nAPI usage:\n\n* There is a new [Discord channel](https://discord.gg/UFXJcXv2P8) around ode4j/Java.\n\n* The [ode4j forum](https://groups.google.com/forum/?hl=en#!forum/ode4j) is for problems and functionality specific to\node4j/Java.\n\n* There is also the [old website](https://tzaeschke.github.io/ode4j-old/), including\nsome [screenshots](https://tzaeschke.github.io/ode4j-old/ode4j-features.html).\n\nThere is also a [GWT compatible fork](https://github.com/antzGames/gdx-ode4j) of ode4j.\n\nThe following artifact contains the complete physics engine (examples etc.\nare [not included](https://github.com/tzaeschke/ode4j/wiki/Maven-HOWTO)):\n\n``` \n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.ode4j\u003c/groupId\u003e\n    \u003cartifactId\u003ecore\u003c/artifactId\u003e\n    \u003cversion\u003e0.5.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## News\n\n2024-04-28: Release 0.5.3:\n\n* Bug fix for possible INTERNAL ERROR in DLCP/FastSolver + some minor improvements\n\n2023-10-07: Release 0.5.2:\n\n* Bug fix for DVector3.cross() + some minor improvements\n\n2023-09-17: Release 0.5.1:\n\n* Bug fix for demos running on Apple Silicon/Retina\n\n2023-05-27: Release 0.5.0. Full update to ODE 0.16.3 + Java 8 as baseline:\n\n* Port of all changes up to ODE 0.16.3\n* Java 8 required\n* LWJGL 3.x for demos\n* Tested Android compatibility with API level 24 (Android 7 / Nougat)\n* CI for Java 8 + 9\n* Improved API (mostly in `math` package)\n* Cleanup (e.g. full JUnit 4 style test, fixed most lint warnings up to Java 17)\n* Bug fixes\n* **BREAKING CHANGE**: `DSpace.getGeoms()` now returns `DGeom` instead of `DxGeom`.\n\n2023-03-31: Release 0.4.1 \u0026 0.4.2. Mostly a bugfix release + some API helper methods:\n\n* Fix OSGI bundle info to require Java 1.7 instead of 7.0\n* New helper methods: `\n    * `DBody` : `addLinearVelocity()`\n    * `DVector3`: `reAdd()`, `eqToRadians()`, `eqToDegrees()` (convert angles in a DVector3, `eq` prefix means that the\n      object is set equal to the result)\n    * `DQuaternion`: `ZERO`, `IDENTITY`, `isEq()`, `length()`, `lengthSquared()`, `toEuler()`, `fromEuler()`, `toEulerDegrees()`, `fromEulerDegrees()`, `eqInverse()`, `reInverse()`.\n* 0.4.2 fixes some small regressions with 0.4.1\n\n2019-01-03: Release 0.4.0. This release contains most of the changes that happened between ODE 0.13.1 and ODE 0.16.0,\nplus some original features:\n\n* Java 9 / modularization (generated jar files are Java 7) (io7m)\n* Implemented/migrated multi-threading for the stepper (Pjotr)\n* SAP-Space optimization: Avoid collision detection for immobile bodies (Pjotr)\n* New BVH tree for [better scalability with 10'000 bodies or more](https://github.com/tzaeschke/ode4j/pull/58), ported\n  from the [Turbulenz Engine](https://github.com/turbulenz/turbulenz_engine) (Pjotr)\n* Fixed javadoc to compile without warnings\n\n2018-03-26: Snapshot release 0.4.0\n\n* Java 9 / modularization (generated jar files are Java 7) (io7m)\n\n2017-11-16: Snapshot release 0.4.0\n\n* Java 7 and updated dependencies\n* Implemented/migrated multi-threading for the stepper (Pjotr)\n* SAP-Space optimization: Avoid collision detection for immobile bodies (Pjotr)\n* New BVH tree for [better scalability with 10'000 bodies or more](https://github.com/tzaeschke/ode4j/pull/58), ported\n  from the [Turbulenz Engine](https://github.com/turbulenz/turbulenz_engine) (Pjotr)\n\n2017-10-06: Release of ode4j 0.3.1\n\n* Numerous bugfixes and improvement, see CHANGELOG\n* This is the last release built with Java 6.\n\n## Project overview\n\n* The \"core\" package contains the main library code. The public API is in:\n    * `org.ode4j.math`\n    * `org.ode4j.ode`\n    * `org.ode4j.ode.ragdoll`\n\n  All other packages are \"internal\" and should normally not be used.\n\n* The \"demo\" package contains demo application for various simulation problems.\n  The package contains the \"drawstuff\" library which is handy for visualizing simple\n  physics simulation but should not be used for real applications (it is slow and clunky). Please\n  use proper library such as [lwjgl](https://www.lwjgl.org/) for your own games or simulations.\n\n* The \"core-cpp\" and \"demo-cpp\" packages are legacy packages and should be ignored.\n\n## General recommendations\n\n* Please use `DWorld.quickStep(...)` instead of `DWorld.step()`. The latter is slower and appears to be less stable.\n* Consider disabling geometries that do not move. For an example, refer to [`DemoCrash`](https://github.com/tzaeschke/ode4j/blob/28a8338abccaccf13042e825ef615e0037aa91d3/demo/src/main/java/org/ode4j/demo/DemoCrash.java#L590).\nThe demo disables boxes that have not moved for a few steps. If a whole \"island\" of bodies is disabled, it is automatically excluded from simulation (bodies are automatically re-enabled when necessary), see also [ODE wiki](http://ode.org/wiki/index.php?title=Manual#Islands_and_Disabled_Bodies).\n* Set `OdeConfig.dDEBUG = true` for debugging and `= false` for best performance.\n* When compiling with JDK 9 or later, `mvn` will automatically use the`on-jdk-9-plus` profile and create modules.\n* In case of GC problems (e.g. on Android):\n  There may be excessive garbage collection due to frequent allocation of `DContact` objects.\n  To avoid this, these objects can be nullified and reused. See `PerfCards.nearCallback()` for an example.\n\n## ODE vs od4j\n\nWhile ode4j is a pretty literal port from ODE, there are some considerable differences\n(besides one being Java and the other being C++). Some differences concern the API, others\nare mostly internal.\n\n### ode4j supported ODE features\n\n* ode4j ist mostly similar to ODE when compiling ODE with\n  `./configure --enable-double-precision --with-trimesh=gimpact --enable-libccd`. That means:\n    * ode4j uses `double` precision throughout\n    * ode4j supports only `GIMPACT` trimeshes, `OPCODE` is not supported\n    * ode4j always uses `libccd` for collisions\n* ode4j has multithreading support (ODE's \"island\" solver), however, ode4j does not support\n  ODE's cooperative solver.\n* ode4j has no special memory management (ODE has a \"memory arena\" concept).\n\n### Additional features in ode4j\n\node4j contains some custom features that are not present in ODE (see\nalso [Wiki](https://github.com/tzaeschke/ode4j/wiki/Functionality-beyond-ODE)):\n\n* `DRagdoll` \u0026 `DConstrainedBallJoint`, \n  [see `DemoRagdoll`](demo/src/main/java/org/ode4j/demo/ragdoll/DemoRagdoll.java) and\n  [`DemoJointConstrainedBall`](demo/src/main/java/org/ode4j/demo/DemoJointConstrainedBall.java).\n* `DTrimeshHeightfield` with support for holes. \n  [See `DemoTrimeshHeightfield`](demo/src/main/java/org/ode4j/demo/DemoTrimeshHeightfield.java).\n* Improved SAP space (`SapSpace2`) implementation that allows labelling bodies as \"immobile\",\n  [see `SpacePerformanceTest`](core/src/test/java/org/ode4j/benchmarks/SpacePerformanceTest.java).\n* BVH space based on a bounding volume hierarchy index,\n  [see `SpacePerformanceTest`](core/src/test/java/org/ode4j/benchmarks/SpacePerformanceTest.java).\n* Java multi-threading support, \n  [see `DemoMultithreading`](demo/src/main/java/org/ode4j/demo/ragdoll/DemoMultithreading.java).\n\n### ode4j API vs ODE API\n\node4j's API is very similar to ODE's API, so most tutorials / demos should be easily translatable.\nHowever, there are some notable differences:\n\n* Almost all objects in ode4j are created via the `OdeHelper` class.\n* Math functions are located in `ode4j.math` and `OdeMath`. ode4j has different versions for some math objects,\n  e.g. `DVector3` and `DVector3C` where the trailing `C` indicates an immutable or **C**onst version of the object.\n* Class names in ode4j start with `D` instead of `d` in ODE. `d...ID` classes have been removed,\n  use `d...` instead, e.g. `dBodyID` becomes `DBody`.\n* ODE uses almost exclusively static methods. ode4j uses instead methods on objects where possible and\n  methods have been renamed accordingly and their signature changed. Some examples:\n    * `dGeomSetRotation(geom, ...)` becomes `geom.setRotation(...)`\n    * `dJointSetHingeAxis(hingeJoint, ...)` becomes `hingeJoint.setAxis(...)`\n\n  Many ODE methods have a `skip` parameter, this has been removed in ode4j.\n* `dCollide` becomes `OdeHelper.collide()` and takes as argument a `DContactGeomBuffer`.\n  This can be created via:\n   ```\n   DContactBuffer contacts = new DContactBuffer(MAX_CONTACTS); \n   OdeHelper.collide (o1, o2, MAX_CONTACTS, contacts.getGeomBuffer());\n   ```\n* Many classes have a \"DESTRUCTOR\" that replicates some C++ features, however this can usually\n  be ignored.\n\n### ode4j internal differences\n\n* ode4j's DLCP uses `ROWPTRS = false`\n* SAP-Space uses different merge-sort instead of radix-sort\n* ...\n\n### Version overview\n\node4j versions and corresponding ODE versions:\n\n* ode4j 0.5.0 contains all changes up to ODE 0.16.3.\n* ode4j 0.4.0 contains most changes between 0.13.1 and 0.16.0.\n* ode4j 0.3.1 is a port of ODE 0.13.1.\n* ode4j 0.2.4 up to 0.2.9 are ports of ODE 0.12.1\n\n## Legal\n\node4j:\nCopyright (c) 2009-2023 Tilmann Zäschke \u003code4j(AT)gmx.de\u003e.\nAll rights reserved.\n\nLike the original ODE, ode4j is licensed under LGPL v2.1 and BSD 3-clause. Choose whichever license suits your needs.\n\n### ode4j contains Java ports of the following software\n\n* [ODE/OpenDE](http://www.ode.org/):\n  Copyright  (c) 2001,2002 Russell L. Smith\n  All rights reserved.\n\n* GIMPACT (part of ODE/OpenDE):\n  Copyright of GIMPACT (c) 2006 Francisco Leon. C.C. 80087371.\n  email: projectileman(AT)yahoo.com\n\n* [LIBCCD](https://github.com/danfis/libccd):\n  Copyright (c) 2010 Daniel Fiser \u003cdanfis(AT)danfis.cz\u003e;\n  3-clause BSD License\n\n* [Turbulenz Engine](https://github.com/turbulenz/turbulenz_engine):\n  Copyright (c) 2009-2014 Turbulenz Limited; MIT License\n\n### ode4j uses the following libraries\n\n* [lwjgl](https://www.lwjgl.org/)maven\n\n* [JUnit 4](https://junit.org/junit4/)\n\n* [slf4j](https://www.slf4j.org/)\n\n## Contact\n\nTilmann Zaeschke\node4j (AT) gmx.de\n\n## Special thanks to contributors\n\n*Please let me know if I missed anyone!*\n\n* [valb3r](https://github.com/valb3r)\n* [io7m](https://github.com/io7m)\n* [ppiastucki(piotr)](https://github.com/ppiastucki) \u003c-- Shoutout for major contributions!\n* [fommil](https://github.com/fommil)\n* [peterkir](https://github.com/peterkir)\n* [neduard](https://github.com/neduard)\n* [Namek](https://github.com/Namek)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzaeschke%2Fode4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzaeschke%2Fode4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzaeschke%2Fode4j/lists"}