Package-level declarations
Properties
The x-component of the 2D acceleration of the Positionable2D object.
The x-component of the 3D acceleration of the Positionable3D object.
The y-component of the 2D acceleration of the Positionable2D object.
The y-component of the 3D acceleration of the Positionable3D object.
The z-component of the 3D acceleration of the Positionable3D object.
The precision used for collision detection sampling. This number is the number of samples taken along each axis within a spatial grid cell.
A set of all 2D sprites that are currently colliding with this sprite. Uses spatial hashing for O(n) average case complexity.
A set of all 3D sprites that are currently colliding with this sprite. Uses spatial hashing for O(n) average case complexity.
The default friction coefficient used in physics calculations. The default value is 0.5.
The default restitution coefficient used in physics calculations.
The friction coefficient of the Positionable object. This is used in physics calculations to determine the frictional force acting on the object. The default value is defaultFrictionCoefficient.
The mass multiplier of the Positionable object. This is used in physics calculations to determine the effective mass of the object. The default value is 1.0.
The normal threshold for vector values.
The restitution coefficient of the Positionable object. This is used in physics calculations to determine how bouncy the object is after collisions. The default value is defaultRestitutionCoefficient.
The spin decay factor per frame. Higher values = slower decay.
The spin factor of the Positionable object.
The stored rotation of the 3D sprite as Euler angles (pitch, yaw, roll) in radians. This is the source of truth for rotation, separate from the transform matrix.
The target rotation steps to move toward then on the ground.
The terminal velocity of all objects in the engine.
The x-component of the 2D velocity of the Positionable2D object.
The x-component of the 3D velocity of the Positionable3D object.
The y-component of the 2D velocity of the Positionable2D object
The y-component of the 3D velocity of the Positionable3D object.
The z-component of the 3D velocity of the Positionable3D object.
Functions
Advances the physics engine by one tick, updating the positions and velocities of all non-static objects based on the applied forces such as gravity and friction.
Adds rotation to a 3D sprite that will be applied gradually over multiple frames.
Sets both the x and y components of the 2D acceleration of the Positionable2D object.
Sets the x, y, and z components of the 3D acceleration of the Positionable3D object.
Sets both the x and y components of the 2D velocity of the Positionable2D object.
Sets the x, y, and z components of the 3D velocity of the Positionable3D object.