Class SoftPhysicsAppState

java.lang.Object
com.jme3.app.state.AbstractAppState
com.jme3.bullet.BulletAppState
com.jme3.bullet.SoftPhysicsAppState
All Implemented Interfaces:
com.jme3.app.state.AppState, PhysicsTickListener

public class SoftPhysicsAppState extends BulletAppState
An AppState to manage a single PhysicsSoftSpace.
  • Field Details

    • logger2

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

    • SoftPhysicsAppState

      public SoftPhysicsAppState()
      Instantiate an enabled app state with no filters to manage a space with the DBVT broadphase collision-detection algorithm.

      This no-arg constructor was made explicit to avoid javadoc warnings from JDK 18+.

  • Method Details

    • getPhysicsSoftSpace

      public PhysicsSoftSpace getPhysicsSoftSpace()
      Access the PhysicsSoftSpace managed by this state. Normally there is none until the state is attached.
      Returns:
      the pre-existing instance, or null if no simulation running
    • setDebugClusterFilter

      public void setDebugClusterFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which soft-body clusters are included in the debug visualization.
      Parameters:
      filter - the desired filter, or null to visualize no clusters
    • setWindVelocityFilter

      public void setWindVelocityFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which wind velocities are included in the debug visualization.
      Parameters:
      filter - the filter to use (alias created) or null to visualize no wind velocities (default=null)
    • createDebugAppState

      protected BulletDebugAppState createDebugAppState()
      Create the configured debug-visualization app state.
      Overrides:
      createDebugAppState in class BulletAppState
      Returns:
      a new instance (not null)
    • createPhysicsSpace

      protected PhysicsSpace createPhysicsSpace(com.jme3.math.Vector3f min, com.jme3.math.Vector3f max, PhysicsSpace.BroadphaseType type)
      Create the configured PhysicsSpace.
      Overrides:
      createPhysicsSpace in class BulletAppState
      Parameters:
      min - the minimum coordinate values (not null, unaffected)
      max - the maximum coordinate values (not null, unaffected)
      type - the broadphase collision-detection algorithm (not null)
      Returns:
      a new instance (not null)