Note: if you change the simulation scale, you will probably also wish to change the scene's default value of gravity, and stable simulation will probably require changes to the scene's bounceThreshold also.
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionconstructor sets to defaultprotectedPxTolerancesScale(long address) -
Method Summary
Modifier and TypeMethodDescriptionstatic PxTolerancesScalearrayGet(long baseAddress, int index) voiddestroy()floatThe approximate size of objects in the simulation.floatgetSpeed()The typical magnitude of velocities of objects in simulation.booleanisValid()Returns true if the descriptor is valid.voidsetLength(float value) The approximate size of objects in the simulation.voidsetSpeed(float value) The typical magnitude of velocities of objects in simulation.static PxTolerancesScalewrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxTolerancesScale
protected PxTolerancesScale(long address) -
PxTolerancesScale
public PxTolerancesScale()constructor sets to default
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getLength
public float getLength()The approximate size of objects in the simulation.For simulating roughly human-sized in metric units, 1 is a good choice. If simulation is done in centimetres, use 100 instead. This is used to estimate certain length-related tolerances.
-
setLength
public void setLength(float value) The approximate size of objects in the simulation.For simulating roughly human-sized in metric units, 1 is a good choice. If simulation is done in centimetres, use 100 instead. This is used to estimate certain length-related tolerances.
-
getSpeed
public float getSpeed()The typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep.For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second.
-
setSpeed
public void setSpeed(float value) The typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep.For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second.
-
isValid
public boolean isValid()Returns true if the descriptor is valid.- Returns:
- true if the current settings are valid (returns always true).
-