PxVehicleArrayData#

Defined in include/vehicle2/PxVehicleParams.h

template<typename T>
struct PxVehicleArrayData#

Helper struct to pass array type data to vehice components and functions.

The Vehicle SDK tries to give the user a certain freedom in how the parameters and states are stored. This helper struct presents a way to either use array of structs or array of pointers to structs to pass data into the provided vehicle components and functions.

Subclassed by PxVehicleSizedArrayData< T >

Public Types

enum DataFormat#

Values:

enumerator eARRAY_OF_STRUCTS#

The data is provided as an array of structs and stored in arrayOfStructs.

enumerator eARRAY_OF_POINTERS#

The data is provided as an array of pointers and stored in arrayOfPointers.

Public Functions

inline void setData(T *data)#

Set the data as an array of structs.

Parameters:

data[in] The data as an array of structs.

inline void setData(T *const *data)#

Set the data as an array of pointers.

Parameters:

data[in] The data as an array of pointers.

inline PxVehicleArrayData()#
inline explicit PxVehicleArrayData(T *data)#
inline explicit PxVehicleArrayData(T *const *data)#
inline T &getData(PxU32 index)#

Get the data entry at a given index.

Parameters:

index[in] The index to retrieve the data entry for.

Returns:

Reference to the requested data entry.

inline T &operator[](PxU32 index)#
inline const T &getData(PxU32 index) const#

Get the data entry at a given index.

Parameters:

index[in] The index to retrieve the data entry for.

Returns:

Reference to the requested data entry.

inline const T &operator[](PxU32 index) const#
inline void setEmpty()#

Set as empty.

inline bool isEmpty() const#

Check if declared as empty.

Returns:

True if empty, else false.

inline const PxVehicleArrayData<const T> &getConst() const#

Get a reference to the array but read only.

Returns:

Read only version of the data.

Public Members

T *arrayOfStructs#

The data stored as an array of structs.

T *const *arrayOfPointers#

The data stored as an array of pointers.

union PxVehicleArrayData::[anonymous] [anonymous]#
PxU8 dataFormat#