java.lang.Object
physx.NativeObject
physx.vehicle2.PxVehicleMultiWheelDriveDifferentialParams
physx.vehicle2.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.
-
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 TypeMethodDescriptionarrayGet(long baseAddress, int index) createAt(long address) static <T> PxVehicleTankDriveDifferentialParamscreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()intThe number of tracksintgetNbWheelsInTrack(int i) Return the number of wheels in the ith track.intThe number of wheels in all tracks.intgetNbWheelsPerTrack(int index) intgetThrustControllerIndex(int i) Return the index of the thrust controller that will control a specified track.intgetThrustIdPerTrack(int index) intgetTrackToWheelIds(int index) intgetWheelIdsInTrackOrder(int index) intgetWheelInTrack(int j, int i) Return the wheel id of the jth wheel in the ith track.getWheelsInTrack(int i) Return the array of all wheels in the ith track.voidsetNbTracks(int value) The number of tracksvoidsetNbWheelsInTracks(int value) The number of wheels in all tracks.voidsetNbWheelsPerTrack(int index, int value) voidsetThrustIdPerTrack(int index, int value) voidvoidsetTrackToWheelIds(int index, int value) voidsetWheelIdsInTrackOrder(int index, int value) transformAndScale(PxVehicleFrame srcFrame, PxVehicleFrame trgFrame, PxVehicleScale srcScale, PxVehicleScale trgScale) wrapPointer(long address) Methods inherited from class physx.vehicle2.PxVehicleMultiWheelDriveDifferentialParams
getAveWheelSpeedRatios, getTorqueRatios, isValid, setAveWheelSpeedRatios, setTorqueRatiosMethods 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
-
PxVehicleTankDriveDifferentialParams
protected PxVehicleTankDriveDifferentialParams(long address) -
PxVehicleTankDriveDifferentialParams
public PxVehicleTankDriveDifferentialParams()
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- 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:
destroyin classPxVehicleMultiWheelDriveDifferentialParams
-
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 indexvalue- 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 indexvalue- 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 indexvalue- 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 indexvalue- 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:
setToDefaultin classPxVehicleMultiWheelDriveDifferentialParams
-
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
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:
transformAndScalein classPxVehicleMultiWheelDriveDifferentialParams- 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]
-