Package com.jme3.bullet.objects.infos
Class SoftBodyConfig
java.lang.Object
com.jme3.bullet.objects.infos.SoftBodyConfig
Provide access to fields of the native btSoftBody::Config struct. Soft bodies
are one-to-one with config instances.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInstantiate a config with the default properties. -
Method Summary
Modifier and TypeMethodDescriptionReturn the aerodynamics model.int
Return the number of cluster-solver iterations (native field: citerations).int
Return the collisions flags (native field: collisions).void
copyAll
(SoftBodyConfig source) Copy all parameter values from the specified config.int
Return the number of drift-solver iterations (native field: diterations).float
Return the value of the specified parameter.int
Return the number of position-solver iterations (native field: piterations).void
Alter the specified parameter.void
setAerodynamics
(Aero model) Alter the aerodynamics model.void
setClusterIterations
(int numIterations) Alter the number of cluster-solver iterations (native field: citerations).void
setCollisionFlags
(int flag, int... additionalFlags) Alter the collision flags (default=SDF_RS).void
setDriftIterations
(int numIterations) Alter the number of drift-solver iterations (native field: diterations).void
setPositionIterations
(int numIterations) Alter the number of position-solver iterations (native field: piterations).void
setVelocityIterations
(int numIterations) Alter the number of velocity-solver iterations (native field: viterations).int
Return the number of velocity-solver iterations (native field: viterations).
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
SoftBodyConfig
Instantiate a config with the default properties.- Parameters:
body
- the corresponding soft body (not null)
-
-
Method Details
-
aerodynamics
Return the aerodynamics model.- Returns:
- an enum value (not null)
-
clusterIterations
public int clusterIterations()Return the number of cluster-solver iterations (native field: citerations).- Returns:
- the iteration count (≥0)
-
collisionFlags
public int collisionFlags()Return the collisions flags (native field: collisions). Flags are defined inConfigFlag
.- Returns:
- the flags that are set, ORed together
-
copyAll
Copy all parameter values from the specified config.- Parameters:
source
- the config to copy from (not null, unaffected)
-
driftIterations
public int driftIterations()Return the number of drift-solver iterations (native field: diterations).- Returns:
- the iteration count (≥0)
-
get
Return the value of the specified parameter.- Parameters:
parameter
- which parameter to read (not null)- Returns:
- the parameter value
-
positionIterations
public int positionIterations()Return the number of position-solver iterations (native field: piterations).- Returns:
- the iteration count (≥0)
-
set
Alter the specified parameter.- Parameters:
parameter
- which parameter to set (not null)desiredValue
- the desired parameter value
-
setAerodynamics
Alter the aerodynamics model.- Parameters:
model
- the desired aerodynamics model (not null, default=V_Point)
-
setClusterIterations
public void setClusterIterations(int numIterations) Alter the number of cluster-solver iterations (native field: citerations).- Parameters:
numIterations
- the desired number of iterations (≥0, default=4)
-
setCollisionFlags
public void setCollisionFlags(int flag, int... additionalFlags) Alter the collision flags (default=SDF_RS). Flag values are defined inConfigFlag
.- Parameters:
flag
- the first flag to set, or 0x0 to clear all flagsadditionalFlags
- ... additional flags to set. Flags are ORed together.
-
setDriftIterations
public void setDriftIterations(int numIterations) Alter the number of drift-solver iterations (native field: diterations).- Parameters:
numIterations
- the desired number of iterations (≥0, default=0)
-
setPositionIterations
public void setPositionIterations(int numIterations) Alter the number of position-solver iterations (native field: piterations).- Parameters:
numIterations
- the desired number of iterations (≥0, default=1)
-
setVelocityIterations
public void setVelocityIterations(int numIterations) Alter the number of velocity-solver iterations (native field: viterations).- Parameters:
numIterations
- the desired number of iterations (≥0, default=0)
-
velocityIterations
public int velocityIterations()Return the number of velocity-solver iterations (native field: viterations).- Returns:
- the iteration count (≥0)
-