Package com.github.stephengold.joltjni
Class SoftBodyContactSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SoftBodyContactSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSoftBodyContactSettings,AutoCloseable,Comparable<JoltPhysicsObject>
public class SoftBodyContactSettings
extends JoltPhysicsObject
implements ConstSoftBodyContactSettings
Properties of a contact constraint that can be overridden during certain
SoftBodyContactListener callbacks.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate the default settings for testing.SoftBodyContactSettings(long settingsVa) Instantiate settings with the specified native object assigned but not owned.Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the scale factor for the inverse inertia of body 2.floatReturn the scale factor for the inverse mass of the soft body.floatReturn the scale factor for the inverse mass of body 2.booleanTest whether the contact should be treated as a sensor (no collision response).voidsetInvInertiaScale2(float factor) Alter the scale factor for the inverse inertia of body 2.voidsetInvMassScale1(float factor) Alter the scale factor for the inverse mass of the soft body.voidsetInvMassScale2(float factor) Alter the scale factor for the inverse mass of body 2.voidsetIsSensor(boolean setting) Alter whether the contact should be treated as a sensor (no collision response).Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
SoftBodyContactSettings
public SoftBodyContactSettings()Instantiate the default settings for testing. -
SoftBodyContactSettings
Instantiate a copy of the specified settings.- Parameters:
original- the constraint to copy (notnull, unaffected)
-
SoftBodyContactSettings
public SoftBodyContactSettings(long settingsVa) Instantiate settings with the specified native object assigned but not owned.For use in custom contact listeners.
- Parameters:
settingsVa- the virtual address of the native object to assign (not zero)
-
-
Method Details
-
setInvInertiaScale2
public void setInvInertiaScale2(float factor) Alter the scale factor for the inverse inertia of body 2. (native attribute: mInvInertiaScale2)- Parameters:
factor- the factor (0 = infinite inertia, 1 = use original inertia, default=1)
-
setInvMassScale1
public void setInvMassScale1(float factor) Alter the scale factor for the inverse mass of the soft body. (native attribute: mInvMassScale1)- Parameters:
factor- the factor (0 = infinite mass, 1 = use original mass, default=1)
-
setInvMassScale2
public void setInvMassScale2(float factor) Alter the scale factor for the inverse mass of body 2. (native attribute: mInvMassScale2)- Parameters:
factor- the factor (0 = infinite mass, 1 = use original mass, default=1)
-
setIsSensor
public void setIsSensor(boolean setting) Alter whether the contact should be treated as a sensor (no collision response). (native attribute: mIsSensor)- Parameters:
setting-trueto treat as a sensor, otherwisefalse(default=false)
-
getInvInertiaScale2
public float getInvInertiaScale2()Return the scale factor for the inverse inertia of body 2. The settings are unaffected. (native attribute: mInvInertiaScale2)- Specified by:
getInvInertiaScale2in interfaceConstSoftBodyContactSettings- Returns:
- the factor (0 = infinite inertia, 1 = use original inertia)
-
getInvMassScale1
public float getInvMassScale1()Return the scale factor for the inverse mass of the soft body. The settings are unaffected. (native attribute: mInvMassScale1)- Specified by:
getInvMassScale1in interfaceConstSoftBodyContactSettings- Returns:
- the factor (0 = infinite mass, 1 = use original mass)
-
getInvMassScale2
public float getInvMassScale2()Return the scale factor for the inverse mass of body 2. The settings are unaffected. (native attribute: mInvMassScale2)- Specified by:
getInvMassScale2in interfaceConstSoftBodyContactSettings- Returns:
- the factor (0 = infinite mass, 1 = use original mass)
-
getIsSensor
public boolean getIsSensor()Test whether the contact should be treated as a sensor (no collision response). The settings are unaffected. (native attribute: mIsSensor)- Specified by:
getIsSensorin interfaceConstSoftBodyContactSettings- Returns:
trueif treated as a sensor, otherwisefalse
-