If possible, always use MKS, when thats not an option you can use the UnitConversion class to convert any values to MKS or from MKS. It is possible to use another measurement system, however, all the default settings in the Settings object and other classes will need to be adjusted. The default units are Meter, Kilogram, Seconds or MKS. Many of the settings contained in the Settings object are used to configure the performance to accuracy trade off. The Settings object is defaulted to the settings that worked best for all the samples in the samples project and common object sizes and use-cases. You can use this object to set physics settings at any time. Each instance of the World class has it’s own instance of Settings. The Settings object contains settings for the dynamics package like the physics pipeline. This member can be used to store anything that you want to be associated with the object. Most users will use the World class though.Įach Shape, Fixture/ BodyFixture, and Body (and some other classes, see the Javadocs for details) contain a member variable called userData which is of type Object. There are two main implementations in this package, the AbstractCollisionWorld and AbstractPhysicsWorld. Both contacts and joints fall into the category of Constrained Dynamics and the necessary machinery to solve these is contained in this package.įinally, the world package is used to bring all the packages together into a single entry point called World. It also contains the definition for Joints. The dynamics/physics package contains all the logic for handling those collisions found in the collision package. This phase would detect those missing collisions and resolve them. The last step, though not really part of the pipeline above, is to capture collisions that would be missed due to the discrete collision detection being performed is continuous. Manifold - For those collisions found in the narrowphase, generate a manifold, or contact area for the collision.Narrowphase - Of all the possible collisions, determine which are truely colliding.Broadphase - Find all the possible collisions between all bodies.The collision detection pipeline is broken up into 3 (or 4) steps: The collision detection package defines all the logic and algorithms to perform collision detection with convex shapes. Remember that dyn4j only supports convex shapes - to make non-convex shaped objects, you must combine convex shapes together in a Body. Instead, they are intended for use in your application to assist with convex shape generation. This package also includes a few complementary packages for convex decomposition, convex hull generation, and polygon simplification that are not used internally. The geometry package defines Shapes, Mass, Vector, Matrix, affine Transform, AABB, Ray, etc. The core package contains a few things that are related to all the packages. Understanding this architecture can help you understand how to use the library and find the classes you are looking for. User Data, Settings, Units, and Epsilonĭyn4j is intended to be modular in the sense that collision detection and physical simulation are complimentatry and be used separately.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |