Useful Classes
Useful Classes
Some very useful classes in DynamX that can be handy in your addons include:
-
DynamXContext containing the instance of the PhysicsWorld, obj loader, and many other things.
-
ClientDynamXUtils for interpolating quaternions from the lwjgl package.
- DynamXRenderUtils for drawing spheres and vehicles.
- DynamXGeometry for...geometry-related tasks.
- DynamXMath for scalar math (vector points here).
- DynamXPhysicsHelper with various handy functions for physics calculations.
- DynamXUtils for other useful functions related to Minecraft.
Optimization
You can add your own physical objects (entities, terrain, etc.) or modify existing ones through modules on entities. However, it is essential to optimize everything to avoid potential lag. Various tools like Vector3fPool
, QuaternionPool
, and GlQuaternionPool
help prevent unnecessary creation of vectors or quaternions when they are used only within a single function.