Class RigidBodySnapshot

java.lang.Object
com.jme3.bullet.objects.infos.RigidBodySnapshot

public class RigidBodySnapshot extends Object
Copy certain properties of a PhysicsRigidBody in order to re-apply them later. Immutable.

Snapshots are used for rebuilding, so they don't include the collision shape, inertia, joints, kinematic flag, mass, motion state, or physics space.

  • Field Details

    • logger

      public static final Logger logger
      message logger for this class
  • Constructor Details

    • RigidBodySnapshot

      public RigidBodySnapshot(PhysicsRigidBody body)
      Instantiate a snapshot of the specified body.
      Parameters:
      body - the body to capture (not null)
  • Method Details

    • applyAllExceptIgnoreListTo

      public void applyAllExceptIgnoreListTo(PhysicsRigidBody body)
      Apply all properties (except the ignore list) to the specified body.
      Parameters:
      body - the target body (not null, modified)
    • applyTo

      public void applyTo(PhysicsRigidBody body)
      Apply the properties to the specified body.
      Parameters:
      body - the target body (not null, modified)