java.lang.Object
physx.NativeObject
physx.vehicle2.PxVehicleCommandState
A description of the state of commands that are applied to the vehicle
Note: brakes[0] and brakes[1] may be used to distinguish brake and handbrake controls.
-
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 PxVehicleCommandStatearrayGet(long baseAddress, int index) voiddestroy()floatgetBrakes(int index) intfloatgetSteer()The instantaneous state of the steer controller in range [-1,1].floatThe instantaneous state of the throttle controller in range [0,1] with 1 denoting fully pressed and 0 fully depressed.voidsetBrakes(int index, float value) voidsetNbBrakes(int value) voidsetSteer(float value) The instantaneous state of the steer controller in range [-1,1].voidsetThrottle(float value) The instantaneous state of the throttle controller in range [0,1] with 1 denoting fully pressed and 0 fully depressed.voidstatic PxVehicleCommandStatewrapPointer(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
-
PxVehicleCommandState
protected PxVehicleCommandState(long address) -
PxVehicleCommandState
public PxVehicleCommandState()
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getBrakes
public float getBrakes(int index) - Parameters:
index- Array index- Returns:
- WebIDL type: float
-
setBrakes
public void setBrakes(int index, float value) - Parameters:
index- Array indexvalue- WebIDL type: float
-
getNbBrakes
public int getNbBrakes() -
setNbBrakes
public void setNbBrakes(int value) -
getThrottle
public float getThrottle()The instantaneous state of the throttle controller in range [0,1] with 1 denoting fully pressed and 0 fully depressed. -
setThrottle
public void setThrottle(float value) The instantaneous state of the throttle controller in range [0,1] with 1 denoting fully pressed and 0 fully depressed. -
getSteer
public float getSteer()The instantaneous state of the steer controller in range [-1,1]. -
setSteer
public void setSteer(float value) The instantaneous state of the steer controller in range [-1,1]. -
setToDefault
public void setToDefault()
-