java.lang.Object
physx.NativeObject
physx.vehicle2.PxVehicleGearboxParams
-
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 TypeMethodDescriptionstatic PxVehicleGearboxParamsarrayGet(long baseAddress, int index) static PxVehicleGearboxParamscreateAt(long address) static <T> PxVehicleGearboxParamscreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()floatGear ratio applied is #ratios[currentGear]*#finalRatiointNumber of gears (including reverse and neutral).intThe gear that denotes neutral gearfloatgetRatios(int index) floatTime it takes to switch gear.booleanisValid()voidsetFinalRatio(float value) Gear ratio applied is #ratios[currentGear]*#finalRatiovoidsetNbRatios(int value) Number of gears (including reverse and neutral).voidsetNeutralGear(int value) The gear that denotes neutral gearvoidsetRatios(int index, float value) voidsetSwitchTime(float value) Time it takes to switch gear.transformAndScale(PxVehicleFrame srcFrame, PxVehicleFrame trgFrame, PxVehicleScale srcScale, PxVehicleScale trgScale) static PxVehicleGearboxParamswrapPointer(long address) Methods 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
-
PxVehicleGearboxParams
protected PxVehicleGearboxParams(long address) -
PxVehicleGearboxParams
public PxVehicleGearboxParams()
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxVehicleGearboxParams
-
createAt
- 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 PxVehicleGearboxParams
-
destroy
public void destroy() -
getNeutralGear
public int getNeutralGear()The gear that denotes neutral gear -
setNeutralGear
public void setNeutralGear(int value) The gear that denotes neutral gear -
getRatios
public float getRatios(int index) - Parameters:
index- Array index- Returns:
- WebIDL type: float
-
setRatios
public void setRatios(int index, float value) - Parameters:
index- Array indexvalue- WebIDL type: float
-
getFinalRatio
public float getFinalRatio()Gear ratio applied is #ratios[currentGear]*#finalRatioRange: (0, inf)
-
setFinalRatio
public void setFinalRatio(float value) Gear ratio applied is #ratios[currentGear]*#finalRatioRange: (0, inf)
-
getNbRatios
public int getNbRatios()Number of gears (including reverse and neutral).Range: [1, eMAX_NB_GEARS]
-
setNbRatios
public void setNbRatios(int value) Number of gears (including reverse and neutral).Range: [1, eMAX_NB_GEARS]
-
getSwitchTime
public float getSwitchTime()Time it takes to switch gear.Range: [0, inf)
Unit: time -
setSwitchTime
public void setSwitchTime(float value) Time it takes to switch gear.Range: [0, inf)
Unit: time -
transformAndScale
public PxVehicleGearboxParams 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:
PxVehicleGearboxParams[Value]
-
isValid
public boolean isValid()- Returns:
- WebIDL type: boolean
-