Class PxVehicleClutchParams

java.lang.Object
physx.NativeObject
physx.vehicle2.PxVehicleClutchParams

public class PxVehicleClutchParams extends NativeObject
The clutch connects two plates together. One plate rotates with the speed of the engine. The second plate rotates with a weighted average of all wheels connected to the differential after accounting for the gear ratio. The difference in rotation speeds generates a restoring torque applied to engine and wheels that aims to reduce the difference in rotational speed. The restoring torque is proportional to the clutch strength and the clutch pedal position.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxVehicleClutchParams

      protected PxVehicleClutchParams(long address)
    • PxVehicleClutchParams

      public PxVehicleClutchParams()
  • Method Details

    • wrapPointer

      public static PxVehicleClutchParams wrapPointer(long address)
    • arrayGet

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

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

      public static <T> PxVehicleClutchParams 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 PxVehicleClutchParams
    • destroy

      public void destroy()
    • getAccuracyMode

      public PxVehicleClutchAccuracyModeEnum getAccuracyMode()
      The engine and wheel rotation speeds that are coupled through the clutch can be updated by choosing one of two modes: eESTIMATE and eBEST_POSSIBLE.

      Note: If eESTIMATE is chosen the vehicle sdk will update the wheel and engine rotation speeds with estimated values to the implemented clutch model.

      Note: If eBEST_POSSIBLE is chosen the vehicle sdk will compute the best possible solution (within floating point tolerance) to the implemented clutch model. This is the recommended mode.

      Note: The clutch model remains the same if either eESTIMATE or eBEST_POSSIBLE is chosen but the accuracy and computational cost of the solution to the model can be tuned as required.

    • setAccuracyMode

      public void setAccuracyMode(PxVehicleClutchAccuracyModeEnum value)
      The engine and wheel rotation speeds that are coupled through the clutch can be updated by choosing one of two modes: eESTIMATE and eBEST_POSSIBLE.

      Note: If eESTIMATE is chosen the vehicle sdk will update the wheel and engine rotation speeds with estimated values to the implemented clutch model.

      Note: If eBEST_POSSIBLE is chosen the vehicle sdk will compute the best possible solution (within floating point tolerance) to the implemented clutch model. This is the recommended mode.

      Note: The clutch model remains the same if either eESTIMATE or eBEST_POSSIBLE is chosen but the accuracy and computational cost of the solution to the model can be tuned as required.

    • getEstimateIterations

      public int getEstimateIterations()
      Tune the mathematical accuracy and computational cost of the computed estimate to the wheel and engine rotation speeds if eESTIMATE is chosen.

      Note: As estimateIterations increases the computational cost of the clutch also increases and the solution approaches the solution that would be computed if eBEST_POSSIBLE was chosen instead.

      Note: This has no effect if eBEST_POSSIBLE is chosen as the accuracy mode.

      Note: A value of zero is not allowed if eESTIMATE is chosen as the accuracy mode.

    • setEstimateIterations

      public void setEstimateIterations(int value)
      Tune the mathematical accuracy and computational cost of the computed estimate to the wheel and engine rotation speeds if eESTIMATE is chosen.

      Note: As estimateIterations increases the computational cost of the clutch also increases and the solution approaches the solution that would be computed if eBEST_POSSIBLE was chosen instead.

      Note: This has no effect if eBEST_POSSIBLE is chosen as the accuracy mode.

      Note: A value of zero is not allowed if eESTIMATE is chosen as the accuracy mode.

    • transformAndScale

      public PxVehicleClutchParams 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: PxVehicleClutchParams [Value]
    • isValid

      public boolean isValid()
      Returns:
      WebIDL type: boolean