Package com.jme3.bullet
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
An AppState to manage a single PhysicsSoftSpace.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.bullet.BulletAppState
BulletAppState.ThreadingType
-
Field Summary
Fields inherited from class com.jme3.bullet.BulletAppState
logger
Fields inherited from class com.jme3.app.state.AbstractAppState
initialized
-
Constructor Summary
ConstructorDescriptionInstantiate an enabled app state with no filters to manage a space with the DBVT broadphase collision-detection algorithm. -
Method Summary
Modifier and TypeMethodDescriptionprotected BulletDebugAppState
Create the configured debug-visualization app state.protected PhysicsSpace
createPhysicsSpace
(com.jme3.math.Vector3f min, com.jme3.math.Vector3f max, PhysicsSpace.BroadphaseType type) Create the configured PhysicsSpace.Access the PhysicsSoftSpace managed by this state.void
Alter which soft-body clusters are included in the debug visualization.void
Alter which wind velocities are included in the debug visualization.Methods inherited from class com.jme3.bullet.BulletAppState
cleanup, countSolvers, debugAxisLength, debugAxisLineWidth, getBroadphaseType, getCollisionConfiguration, getDebugAppState, getDebugCamera, getDebugConfiguration, getPhysicsSpace, getSolverType, getSpeed, getThreadingType, initialize, isDebugEnabled, isRunning, physicsTick, postRender, prePhysicsTick, render, setBroadphaseType, setCollisionConfiguration, setDebugAngularVelocityFilter, setDebugAxisLength, setDebugAxisLineWidth, setDebugBoundingBoxFilter, setDebugCamera, setDebugEnabled, setDebugFilter, setDebugGravityVectorFilter, setDebugInitListener, setDebugJointLineWidth, setDebugShadowMode, setDebugSweptSphereFilter, setDebugVelocityVectorFilter, setDebugViewPorts, setNumSolvers, setPhysicsSpace, setRunning, setSolverType, setSpeed, setThreadingType, setTransformSpatial, setWorldMax, setWorldMin, startPhysics, startPhysicsOnExecutor, stateAttached, stopPhysics, update, worldMax, worldMin
Methods inherited from class com.jme3.app.state.AbstractAppState
getId, isEnabled, isInitialized, setEnabled, setId, stateDetached
-
Field Details
-
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
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
Alter which soft-body clusters are included in the debug visualization.- Parameters:
filter
- the desired filter, or null to visualize no clusters
-
setWindVelocityFilter
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
Create the configured debug-visualization app state.- Overrides:
createDebugAppState
in classBulletAppState
- 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 classBulletAppState
- 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)
-