-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxMaterialarrayGet(long baseAddress, int index) floatRetrieves the DynamicFriction value.getFlags()Retrieves the flags.Retrieves the friction combine mode.floatRetrieves the coefficient of restitution.Retrieves the restitution combine mode.floatRetrieves the coefficient of static friction.voidsetDynamicFriction(float coef) Sets the coefficient of dynamic friction.voidsetFlag(PxMaterialFlagEnum flag, boolean b) Raises or clears a particular material flag.voidsetFlags(PxMaterialFlags flags) sets all the material flags.voidsetFrictionCombineMode(PxCombineModeEnum combMode) Sets the friction combine mode.voidsetRestitution(float coef) Sets the coefficient of restitutionvoidsetRestitutionCombineMode(PxCombineModeEnum combMode) Sets the restitution combine mode.voidsetStaticFriction(float coef) Sets the coefficient of static frictionvoidsetUserData(NativeObject value) static PxMaterialwrapPointer(long address) Methods inherited from class physx.physics.PxBaseMaterial
destroyMethods inherited from class physx.common.PxRefCounted
acquireReference, getReferenceCountMethods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods 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
-
PxMaterial
protected PxMaterial() -
PxMaterial
protected PxMaterial(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getUserData
- Returns:
- WebIDL type: VoidPtr
-
setUserData
- Parameters:
value- WebIDL type: VoidPtr
-
setDynamicFriction
public void setDynamicFriction(float coef) Sets the coefficient of dynamic friction.The coefficient of dynamic friction should be in [0, PX_MAX_F32). If set to greater than staticFriction, the effective value of staticFriction will be increased to match.
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
coef- Coefficient of dynamic friction. Range: [0, PX_MAX_F32)- See Also:
-
getDynamicFriction
public float getDynamicFriction()Retrieves the DynamicFriction value.- Returns:
- The coefficient of dynamic friction.
- See Also:
-
setStaticFriction
public void setStaticFriction(float coef) Sets the coefficient of static frictionThe coefficient of static friction should be in the range [0, PX_MAX_F32)
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
coef- Coefficient of static friction. Range: [0, PX_MAX_F32)- See Also:
-
getStaticFriction
public float getStaticFriction()Retrieves the coefficient of static friction.- Returns:
- The coefficient of static friction.
- See Also:
-
setRestitution
public void setRestitution(float coef) Sets the coefficient of restitutionA coefficient of 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.
This property is overloaded when PxMaterialFlag::eCOMPLIANT_CONTACT flag is enabled. This permits negative values for restitution to be provided. The negative values are converted into spring stiffness terms for an implicit spring simulated at the contact site, with the spring positional error defined by the contact separation value. Higher stiffness terms produce stiffer springs that behave more like a rigid contact.
Sleeping: Does NOT wake any actors which may be affected.
- See Also:
-
getRestitution
public float getRestitution()Retrieves the coefficient of restitution.See #setRestitution.
- Returns:
- The coefficient of restitution.
- See Also:
-
setFlag
Raises or clears a particular material flag.See the list of flags #PxMaterialFlag
Default: eIMPROVED_PATCH_FRICTION
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
flag- The PxMaterial flag to raise(set) or clear.b- New state of the flag- See Also:
-
setFlags
sets all the material flags.See the list of flags #PxMaterialFlag
Default: eIMPROVED_PATCH_FRICTION
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
flags- All PxMaterial flags- See Also:
-
getFlags
Retrieves the flags. See #PxMaterialFlag.- Returns:
- The material flags.
- See Also:
-
setFrictionCombineMode
Sets the friction combine mode.See the enum ::PxCombineMode .
Default: PxCombineMode::eAVERAGE
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
combMode- Friction combine mode to set for this material. See #PxCombineMode.- See Also:
-
getFrictionCombineMode
Retrieves the friction combine mode.See #setFrictionCombineMode.
- Returns:
- The friction combine mode for this material.
- See Also:
-
setRestitutionCombineMode
Sets the restitution combine mode.See the enum ::PxCombineMode .
Default: PxCombineMode::eAVERAGE
Sleeping: Does NOT wake any actors which may be affected.
- Parameters:
combMode- Restitution combine mode for this material. See #PxCombineMode.- See Also:
-
getRestitutionCombineMode
Retrieves the restitution combine mode.See #setRestitutionCombineMode.
- Returns:
- The coefficient of restitution combine mode for this material.
- See Also:
-