![]() |
Perception Tool Kit (PTK) API Guide
|
The geometry component provides a common framework for representing and manipulating geometric quantities, such as points, vectors, and transformations between coordinate spaces. These are fundamental elements which are used to build most other components. For example, Points structs are necessary to represent position information in the geodesy component, and RigidTransforms are needed to represent the conversion between coordinate systems.
Mathematically, a "point" with 3 coordinates and a "vector" with 3 components are similar and we may implicitly convert between a point and a vector from the origin to a point. They are however, semantically distinct, leading to the natural requirement for distinct types. In the interest of providing ease of use and reusing implementation logic where possible, point and vector types are provided as aliases of the same type, ptk abstract vector, and the specific type name used in a function description is used to indicate the semantic usage of that function. For instance, points are not added together, but vectors are. Points may be further broken down by the coordinate system they are associated with, and this is stored within the metadata field.
The abstract vector type has a fixed layout on all platforms, shown below, chosen for effective memory alignment and compatibility with C7x, ARM, and x86 architectures. Although it is largely a transparent structure, several convenience functions are provided for interacting with its fields, and the metadata union should only be accessed through the provided API.
Note that PTK_Point and PTK Vector are aliases and thus may be supplied interchangeably to all of the functions below, but the appropriate semantic name is used in determining the function name and as the argument type.
![]() |
Data Structures | |
struct | PTK_3D_Matrix |
Definition of a 3x3 matrix. More... | |