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
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 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 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 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.
-
inline void setData(T *data)