Class PxVehicleFourWheelDriveDifferentialParams


public class PxVehicleFourWheelDriveDifferentialParams extends PxVehicleMultiWheelDriveDifferentialParams
PxVehicleFourWheelDriveDifferentialParams specifies the wheels that are to receive drive torque from the differential and the division of torque between the wheels that are connected to the differential. Additionally, it specifies the biases and strength of a limited slip differential that operates on two wheels specified as front wheels and two wheels specified as rear wheels.
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxVehicleFourWheelDriveDifferentialParams

      protected PxVehicleFourWheelDriveDifferentialParams(long address)
    • PxVehicleFourWheelDriveDifferentialParams

      public PxVehicleFourWheelDriveDifferentialParams()
  • Method Details

    • wrapPointer

      public static PxVehicleFourWheelDriveDifferentialParams wrapPointer(long address)
    • arrayGet

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

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

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

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

      public int getFrontWheelIds(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setFrontWheelIds

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

      public int getRearWheelIds(int index)
      Parameters:
      index - Array index
      Returns:
      WebIDL type: unsigned long
    • setRearWheelIds

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

      public float getFrontBias()
      The parameter frontBias specifies the maximum angular speed ratio of the two front wheels specified by frontWheelIds[2]. Note: If frontBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the two front wheels. Note: If frontBias has value 0.0, the torque split between the front wheels is specified by the array torqueRatios. Note: frontBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked axle). Note: If frontBias has value greater than or equal to 1.0 then the array frontWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If frontBias has value greater than or equal to 1.0 then frontTarget must also be specified. Note: A locked axle may be achieved by setting frontBias and frontTarget to 1.0. Note: A limited slip differential may be achieved by setting frontBias > 1.0 and frontBias > frontTarget > 1.0.
    • setFrontBias

      public void setFrontBias(float value)
      The parameter frontBias specifies the maximum angular speed ratio of the two front wheels specified by frontWheelIds[2]. Note: If frontBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the two front wheels. Note: If frontBias has value 0.0, the torque split between the front wheels is specified by the array torqueRatios. Note: frontBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked axle). Note: If frontBias has value greater than or equal to 1.0 then the array frontWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If frontBias has value greater than or equal to 1.0 then frontTarget must also be specified. Note: A locked axle may be achieved by setting frontBias and frontTarget to 1.0. Note: A limited slip differential may be achieved by setting frontBias > 1.0 and frontBias > frontTarget > 1.0.
    • getFrontTarget

      public float getFrontTarget()
      The parameter frontTarget specifies the target rotational speed ratio of the two front wheels in the event that the ratio exceeds frontBias and frontBias is configured for an activated limited slip or locked axle. Note: frontTarget must be less than frontBias and greater than 1.0 to implement a limited slip differential. Note: Set frontTarget and frontBias to 1.0 to implement a locked axle.
    • setFrontTarget

      public void setFrontTarget(float value)
      The parameter frontTarget specifies the target rotational speed ratio of the two front wheels in the event that the ratio exceeds frontBias and frontBias is configured for an activated limited slip or locked axle. Note: frontTarget must be less than frontBias and greater than 1.0 to implement a limited slip differential. Note: Set frontTarget and frontBias to 1.0 to implement a locked axle.
    • getRearBias

      public float getRearBias()
      The parameter rearBias specifies the maximum angular speed ratio of the two rear wheels specified by rearWheelIds[2]. Note: If rearBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the two rear wheels. Note: If rearBias has value 0.0, the torque split between the rear wheels is specified by the array torqueRatios. Note: rearBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked axle). Note: If rearBias has value greater than or equal to 1.0 then the array rearWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If rearBias has value greater than or equal to 1.0 then rearTarget must also be specified. Note: A locked axle may be achieved by setting rearBias and rearTarget to 1.0. Note: A limited slip differential may be achieved by setting rearBias > 1.0 and rearBias > rearTarget > 1.0
    • setRearBias

      public void setRearBias(float value)
      The parameter rearBias specifies the maximum angular speed ratio of the two rear wheels specified by rearWheelIds[2]. Note: If rearBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the two rear wheels. Note: If rearBias has value 0.0, the torque split between the rear wheels is specified by the array torqueRatios. Note: rearBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked axle). Note: If rearBias has value greater than or equal to 1.0 then the array rearWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If rearBias has value greater than or equal to 1.0 then rearTarget must also be specified. Note: A locked axle may be achieved by setting rearBias and rearTarget to 1.0. Note: A limited slip differential may be achieved by setting rearBias > 1.0 and rearBias > rearTarget > 1.0
    • getRearTarget

      public float getRearTarget()
      The parameter rearTarget specifies the target rotational speed ratio of the two rear wheels in the event that the ratio exceeds rearBias and rearBias is configured for an activated limited slip or locked axle. Note: rearTarget must be less than rearBias and greater than 1.0 to implement a limited slip differential. Note: Set rearTarget and rearBias to 1.0 to implement a locked axle.
    • setRearTarget

      public void setRearTarget(float value)
      The parameter rearTarget specifies the target rotational speed ratio of the two rear wheels in the event that the ratio exceeds rearBias and rearBias is configured for an activated limited slip or locked axle. Note: rearTarget must be less than rearBias and greater than 1.0 to implement a limited slip differential. Note: Set rearTarget and rearBias to 1.0 to implement a locked axle.
    • getCenterBias

      public float getCenterBias()
      The parameter centerBias specifies the maximum angular speed ratio of the sum of the two front wheels and the sum of the two rear wheels, as specified by frontWheelIds[2] and rearWheelIds[2]. Note: If centerBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the front and rear wheels. Note: If centerBias has value 0.0, the torque split between the front and rear rear wheels is specified by the array torqueRatios. Note: centerBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked). Note: If centerBias has value greater than or equal to 1.0 then the arrays frontWheelIds and rearWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If centerBias has value greater than or equal to 1.0 then centerTarget must also be specified. Note: A locked front/rear differential may be achieved by setting centerBias and centerTarget to 1.0. Note: A limited slip differential may be achieved by setting centerBias > 1.0 and centerBias > centerTarget > 1.0
    • setCenterBias

      public void setCenterBias(float value)
      The parameter centerBias specifies the maximum angular speed ratio of the sum of the two front wheels and the sum of the two rear wheels, as specified by frontWheelIds[2] and rearWheelIds[2]. Note: If centerBias has value 0.0, the differential will not try to enforce any relationship between the rotational speeds of the front and rear wheels. Note: If centerBias has value 0.0, the torque split between the front and rear rear wheels is specified by the array torqueRatios. Note: centerBias must have value 0.0 (deactivated limited slip) or be greater than 1.0 (activated limited slip) or be equal to 1.0 (locked). Note: If centerBias has value greater than or equal to 1.0 then the arrays frontWheelIds and rearWheelIds must be specified and the corresponding entries of the isConnected[] array must be set true. Note: If centerBias has value greater than or equal to 1.0 then centerTarget must also be specified. Note: A locked front/rear differential may be achieved by setting centerBias and centerTarget to 1.0. Note: A limited slip differential may be achieved by setting centerBias > 1.0 and centerBias > centerTarget > 1.0
    • getCenterTarget

      public float getCenterTarget()
      The parameter centerTarget specifies the target rotational speed ratio of the sum of the two front wheels and the sum of the two rear wheels in the event that the ratio exceeds centerBias and centerBias is configured for an activated limited slip. Note: centerTarget must be less than centerBias and greater than 1.0 to implement a limited slip differential. Note: Set centerTarget and centerBias to 1.0 to implement a locked differential.
    • setCenterTarget

      public void setCenterTarget(float value)
      The parameter centerTarget specifies the target rotational speed ratio of the sum of the two front wheels and the sum of the two rear wheels in the event that the ratio exceeds centerBias and centerBias is configured for an activated limited slip. Note: centerTarget must be less than centerBias and greater than 1.0 to implement a limited slip differential. Note: Set centerTarget and centerBias to 1.0 to implement a locked differential.
    • getRate

      public float getRate()
      The parameter rate specifies how quickly the ratio of rotational speeds approaches the target rotational speed ratio. Note: strength must be in range [0,PX_VEHICLE_FOUR_WHEEL_DIFF_MAXIMUM_STRENGTH]. Note: The ratio of rotational speeds is decremented each update by rate*dt until the ratio is equal to the target ratio. Note: A value of 0 will result in a deactivated limited slip. Note: A value of PX_VEHICLE_FOUR_WHEEL_DIFF_MAXIMUM_STRENGTH will result in instantaneous correction of the rotational speed ratios.
    • setRate

      public void setRate(float value)
      The parameter rate specifies how quickly the ratio of rotational speeds approaches the target rotational speed ratio. Note: strength must be in range [0,PX_VEHICLE_FOUR_WHEEL_DIFF_MAXIMUM_STRENGTH]. Note: The ratio of rotational speeds is decremented each update by rate*dt until the ratio is equal to the target ratio. Note: A value of 0 will result in a deactivated limited slip. Note: A value of PX_VEHICLE_FOUR_WHEEL_DIFF_MAXIMUM_STRENGTH will result in instantaneous correction of the rotational speed ratios.
    • setToDefault

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

      public PxVehicleFourWheelDriveDifferentialParams 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: PxVehicleFourWheelDriveDifferentialParams [Value]