Class PxVehicleTireAxisStickyParams

java.lang.Object
physx.NativeObject
physx.vehicle2.PxVehicleTireAxisStickyParams

public class PxVehicleTireAxisStickyParams extends NativeObject
The low speed regime often presents numerical difficulties for the tire model due to the potential for divide-by-zero errors. This particularly affects scenarios where the vehicle is slowing down due to damping and drag. In scenarios where there is no significant brake or drive torque, numerical error begins to dominate and it can be difficult to bring the vehicle to rest. A solution to this problem is to recognise that the vehicle is close to rest and to replace the tire forces with velocity constraints that will bring the vehicle to rest. This regime is known as the "sticky tire" regime. PxVehicleTireAxisStickyParams describes velocity and time thresholds that categorise the "sticky tire" regime. It also describes the rate at which the velocity constraints approach zero speed.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxVehicleTireAxisStickyParams

      protected PxVehicleTireAxisStickyParams(long address)
    • PxVehicleTireAxisStickyParams

      public PxVehicleTireAxisStickyParams()
  • Method Details

    • wrapPointer

      public static PxVehicleTireAxisStickyParams wrapPointer(long address)
    • arrayGet

      public static PxVehicleTireAxisStickyParams arrayGet(long baseAddress, int index)
    • createAt

      public static PxVehicleTireAxisStickyParams createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxVehicleTireAxisStickyParams
    • createAt

      public static <T> PxVehicleTireAxisStickyParams createAt(T allocator, NativeObject.Allocator<T> allocate)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      Returns:
      Stack allocated object of PxVehicleTireAxisStickyParams
    • destroy

      public void destroy()
    • getThresholdSpeed

      public float getThresholdSpeed()
      A tire enters the "sticky tire" regime when it has been below a speed specified by #thresholdSpeed for a continuous time specified by #thresholdTime.

      Range: [0, inf)
      Unit: velocity = length / time

    • setThresholdSpeed

      public void setThresholdSpeed(float value)
      A tire enters the "sticky tire" regime when it has been below a speed specified by #thresholdSpeed for a continuous time specified by #thresholdTime.

      Range: [0, inf)
      Unit: velocity = length / time

    • getThresholdTime

      public float getThresholdTime()
      A tire enters the "sticky tire" regime when it has been below a speed specified by #thresholdSpeed for a continuous time specified by #thresholdTime.

      Range: [0, inf)
      Unit: time

    • setThresholdTime

      public void setThresholdTime(float value)
      A tire enters the "sticky tire" regime when it has been below a speed specified by #thresholdSpeed for a continuous time specified by #thresholdTime.

      Range: [0, inf)
      Unit: time

    • getDamping

      public float getDamping()
      The rate at which the velocity constraint approaches zero is controlled by the damping parameter. Note: Larger values of damping lead to faster approaches to zero. Since the damping behaves like a stiffness with respect to the velocity, too large a value can lead to instabilities.

      Range: [0, inf)
      Unit: 1 / time (acceleration instead of force based damping, thus not mass/time)

    • setDamping

      public void setDamping(float value)
      The rate at which the velocity constraint approaches zero is controlled by the damping parameter. Note: Larger values of damping lead to faster approaches to zero. Since the damping behaves like a stiffness with respect to the velocity, too large a value can lead to instabilities.

      Range: [0, inf)
      Unit: 1 / time (acceleration instead of force based damping, thus not mass/time)

    • transformAndScale

      public PxVehicleTireAxisStickyParams transformAndScale(PxVehicleFrame srcFrame, PxVehicleFrame trgFrame, PxVehicleScale srcScale, PxVehicleScale trgScale)
      Parameters:
      srcFrame - WebIDL type: PxVehicleFrame [Const, Ref]
      trgFrame - WebIDL type: PxVehicleFrame [Const, Ref]
      srcScale - WebIDL type: PxVehicleScale [Const, Ref]
      trgScale - WebIDL type: PxVehicleScale [Const, Ref]
      Returns:
      WebIDL type: PxVehicleTireAxisStickyParams [Value]
    • isValid

      public boolean isValid()
      Returns:
      WebIDL type: boolean