Class PxVehicleTankDriveDifferentialParams


public class PxVehicleTankDriveDifferentialParams extends PxVehicleMultiWheelDriveDifferentialParams
A description of a tank differential. Note: The wheels on a tank may be connected to the differential or not connected to the differential. Note: The wheels on a tank track may be connected to a tank track or not connected to a tank track. Note: Wheels connected to the differential but not to a tank track receive the torque split specified by the corresponding elements of PxVehicleMultiWheelDriveDifferentialParams::torqueRatios[]. Note: Wheels connected to a tank track but not to the differential receive no torque from the engine. Note: Wheels connected to a tank track and to the differential receive the torque split specified by the corresponding elements of PxVehicleMultiWheelDriveDifferentialParams::torqueRatios[] multiplied by the corresponding thrust controller value. If the thrust controller has a negative value, the wheels will receive a torque that is negative with respect to the gearing ratio. Note: The wheels in each tank track have a constraint applied to them to enforce the rule that they all have the same longitudinal speed at the contact point between the wheel and the tank track.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxVehicleTankDriveDifferentialParams

      protected PxVehicleTankDriveDifferentialParams(long address)
    • PxVehicleTankDriveDifferentialParams

      public PxVehicleTankDriveDifferentialParams()
  • Method Details

    • wrapPointer

      public static PxVehicleTankDriveDifferentialParams wrapPointer(long address)
    • arrayGet

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

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

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

      public void destroy()
      Overrides:
      destroy in class PxVehicleMultiWheelDriveDifferentialParams
    • getNbTracks

      public int getNbTracks()
      The number of tracks
    • setNbTracks

      public void setNbTracks(int value)
      The number of tracks
    • getThrustIdPerTrack

      public int getThrustIdPerTrack(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setThrustIdPerTrack

      public void setThrustIdPerTrack(int index, int value)
      Parameters:
      index - Array index
      value - WebIDL type: unsigned long
    • getNbWheelsPerTrack

      public int getNbWheelsPerTrack(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setNbWheelsPerTrack

      public void setNbWheelsPerTrack(int index, int value)
      Parameters:
      index - Array index
      value - WebIDL type: unsigned long
    • getTrackToWheelIds

      public int getTrackToWheelIds(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setTrackToWheelIds

      public void setTrackToWheelIds(int index, int value)
      Parameters:
      index - Array index
      value - WebIDL type: unsigned long
    • getWheelIdsInTrackOrder

      public int getWheelIdsInTrackOrder(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setWheelIdsInTrackOrder

      public void setWheelIdsInTrackOrder(int index, int value)
      Parameters:
      index - Array index
      value - WebIDL type: unsigned long
    • getNbWheelsInTracks

      public int getNbWheelsInTracks()
      The number of wheels in all tracks.
    • setNbWheelsInTracks

      public void setNbWheelsInTracks(int value)
      The number of wheels in all tracks.
    • setToDefault

      public void setToDefault()
      Overrides:
      setToDefault in class PxVehicleMultiWheelDriveDifferentialParams
    • getNbWheelsInTrack

      public int getNbWheelsInTrack(int i)
      Return the number of wheels in the ith track.
      Parameters:
      i - specifies the track to be queried for its wheel count.
      Returns:
      The number of wheels in the specified track.
      See Also:
    • getWheelsInTrack

      public PxU32ConstPtr getWheelsInTrack(int i)
      Return the array of all wheels in the ith track.
      Parameters:
      i - specifies the track to be queried for its wheels.
      Returns:
      The array of wheels in the specified track.
    • getWheelInTrack

      public int getWheelInTrack(int j, int i)
      Return the wheel id of the jth wheel in the ith track.
      Parameters:
      j - specifies that the wheel id to be returned is the jth wheel in the list of wheels on the specified track.
      i - specifies the track to be queried.
      Returns:
      The wheel id of the jth wheel in the ith track.
      See Also:
    • getThrustControllerIndex

      public int getThrustControllerIndex(int i)
      Return the index of the thrust controller that will control a specified track.
      Parameters:
      i - specifies the track to be queried for its thrust controller index
      Returns:
      The index of the thrust controller that will control the ith track.
    • transformAndScale

      public PxVehicleTankDriveDifferentialParams transformAndScale(PxVehicleFrame srcFrame, PxVehicleFrame trgFrame, PxVehicleScale srcScale, PxVehicleScale trgScale)
      Overrides:
      transformAndScale in class PxVehicleMultiWheelDriveDifferentialParams
      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: PxVehicleTankDriveDifferentialParams [Value]