![]() |
Perception Tool Kit (PTK) API Guide
|
![]() |
Data Structures | |
struct | PTK_GridInfo |
Grid information. More... | |
struct | PTK_MapConfig |
Map configuration. More... | |
struct | PTK_Map |
Map definition. More... | |
Functions | |
uint32_t | PTK_Map_getSize (const PTK_MapConfig *config) |
Compute how much memory is required to store the complete PTK_Map described by the given configuration. More... | |
PTK_Map * | PTK_Map_init (uint8_t *mem, const PTK_MapConfig *config) |
Initialize an externally allocated piece of memory to be a valid PTK_Map. This also initializes all member PTK_Grids, so no further initialization is required. More... | |
void | PTK_Map_clear (PTK_Map *map) |
This clears all PTK_Grids internal to the map. It has the same result as if PTK_Grid clear were called on each individually. More... | |
uint32_t | PTK_Map_copy (PTK_Map *__restrict dst, const PTK_Map *__restrict src) |
Copy all constituent PTK_Grids from the given source PTK_Map to the destination PTK_Map. They must have the same PTK_MapConfig or an assertion failure is generated. More... | |
uint32_t | PTK_Map_has (const PTK_Map *map, uint32_t id) |
Test if a PTK_Map contains a PTK_Grid with the specified id. More... | |
PTK_Grid * | PTK_Map_get (const PTK_Map *map, uint32_t id) |
Obtain a pointer to the PTK_Grid matching the specified id. More... | |
Macros | |
#define | PTK_MAP_OK ((uint32_t)0) |
Error codes. More... | |
#define | PTK_MAP_XCELL_COUNT_INVALID ((uint32_t)-1) |
Invalid X cell count. More... | |
#define | PTK_MAP_YCELL_COUNT_INVALID ((uint32_t)-2) |
Invalid Y cell count. More... | |
#define | PTK_MAP_ZCELL_COUNT_INVALID ((uint32_t)-3) |
Invalid Z cell count. More... | |
#define | PTK_MAP_GRID_ID_INVALID ((uint32_t)-4) |
Invalid grid ID. More... | |
#define | PTK_MAP_GRID_DATA_TYPE_INVALID ((uint32_t)-5) |
Invalid grid data type. More... | |
#define | PTK_MAP_CELL_DATA_SIZE_INVALID ((uint32_t)-6) |
Invalid grid element data size. More... | |
#define PTK_MAP_OK ((uint32_t)0) |
Error codes.
Return status OK.
#define PTK_MAP_XCELL_COUNT_INVALID ((uint32_t)-1) |
Invalid X cell count.
#define PTK_MAP_YCELL_COUNT_INVALID ((uint32_t)-2) |
Invalid Y cell count.
#define PTK_MAP_ZCELL_COUNT_INVALID ((uint32_t)-3) |
Invalid Z cell count.
#define PTK_MAP_GRID_ID_INVALID ((uint32_t)-4) |
Invalid grid ID.
#define PTK_MAP_GRID_DATA_TYPE_INVALID ((uint32_t)-5) |
Invalid grid data type.
#define PTK_MAP_CELL_DATA_SIZE_INVALID ((uint32_t)-6) |
Invalid grid element data size.
uint32_t PTK_Map_getSize | ( | const PTK_MapConfig * | config | ) |
Compute how much memory is required to store the complete PTK_Map described by the given configuration.
[in] | config | Configuration to determine memory requirements for. |
PTK_Map* PTK_Map_init | ( | uint8_t * | mem, |
const PTK_MapConfig * | config | ||
) |
Initialize an externally allocated piece of memory to be a valid PTK_Map. This also initializes all member PTK_Grids, so no further initialization is required.
[out] | mem | Externally allocated memory of at least PTK_Map_getSize() bytes. |
[in] | config | Configuration to guide initialization. |
void PTK_Map_clear | ( | PTK_Map * | map | ) |
Copy all constituent PTK_Grids from the given source PTK_Map to the destination PTK_Map. They must have the same PTK_MapConfig or an assertion failure is generated.
uint32_t PTK_Map_has | ( | const PTK_Map * | map, |
uint32_t | id | ||
) |