98 #define PTK_PointCloud_getPoints(pc) (PTK_Point*)((uint8_t*)pc + pc->pointOffset) 105 #define PTK_POINTCLOUD_INVALID_POINT (~0U) 285 if (id < pc->numPoints)
const PTK_Point * PTK_PointCloud_crefPoint(const PTK_PointCloud *pc, uint32_t id)
This gets an immutable pointer to a specific PTK_Point within the point cloud.
uint32_t pointOffset
Definition: pointCloud.h:138
PTK_PointCloud * PTK_PointCloud_init(uint8_t *memPtr, const PTK_PointCloudConfig *cfg)
Initialize an externally allocated piece of memory to be a valid PTK_PointCloud.
static void PTK_PointCloud_copyMetaData(PTK_PointCloud *dst, const PTK_PointCloud *src)
Copy metadata from src to dst.
Definition: pointCloud.h:390
uint32_t PTK_PointCloud_readTag(const PTK_PointCloud *pc, uint32_t id)
This reads the tag for a given point identifier in the given point cloud.
Declarations for PTK_Point and PTK_Vector struct+functions.
uint32_t maxPoints
Definition: pointCloud.h:125
static PTK_Point * PTK_PointCloud_refPoint(PTK_PointCloud *pc, uint32_t id)
This gets a direct pointer to a specific PTK_Point within the point cloud.
Definition: pointCloud.h:282
Definition: pointCloud.h:129
Definition of vector meta data.
Definition: pointCloud.h:120
uint32_t PTK_PointCloud_ransacPlane(const PTK_PointCloud *pc, const uint32_t *__restrict ids, uint32_t N, float tol, uint32_t iters, float *nd, uint32_t *__restrict foundInliers)
uint32_t PTK_PointCloud_getPointCount(const PTK_PointCloud *pc)
This returns the total number of points that have been added since PTK_PointCloud_clear() was last ca...
PTK_PointCloudConfig config
Definition: pointCloud.h:132
void PTK_PointCloud_transform(PTK_PointCloud *dst, PTK_PointCloud *src, const PTK_RigidTransform *M)
Each point in src is transformed by M and then written to the same location in dst. The tag bits are also propagated to dst, and the total number of points present in dst is updated accordingly. src and dst may point to the same PTK_PointCloud. In practice, it is most common for dst to be empty first or to have src= dst. The return value indicates the number of successfully transformed and copied points, which may be important if transforming and appending onto a non-empty cloud for detecting space limitations.
uint32_t PTK_PointCloud_getPoint(const PTK_PointCloud *pc, uint32_t id, PTK_Point *dst)
This copies a PTK_Point out of the point cloud into another (user-supplied) memory location...
Definition of a point.
Definition: point.h:136
void PTK_PointCloud_untag(PTK_PointCloud *pc, uint32_t id, uint32_t tag)
This removes tag bits for the point at the given identifier.
void PTK_PointCloud_scale(PTK_PointCloud *dst, PTK_PointCloud *src, float scale)
Each point in src is scaled by scale and then written with the same id in dst. The tag bits are also ...
void PTK_PointCloud_tag(PTK_PointCloud *pc, uint32_t id, uint32_t tag)
This sets tag bits for the point with the given identifier.
uint32_t PTK_PointCloud_copy(PTK_PointCloud *dst, const PTK_PointCloud *src)
Copy points from src to dst, appending points so long as space remains in the dst cloud...
void PTK_PointCloud_clear(PTK_PointCloud *pc)
Clear a PTK_PointCloud by setting used point count to zero..
uint32_t PTK_PointCloud_getSize(const PTK_PointCloudConfig *cfg)
Compute how much memory is required to store a complete PTK_PointCloud struct matching the given conf...
uint32_t PTK_PointCloud_addv(PTK_PointCloud *pc, const PTK_Point *xyzw, uint32_t numPoints)
Add a copy of each of the points in the array pv to the given point cloud, if there is enough space...
uint32_t PTK_PointCloud_add(PTK_PointCloud *pc, const PTK_Point *xyzw)
Add a copy of the given point to the point cloud, if there is room.
void PTK_PointCloud_getMinMax(const PTK_PointCloud *pc, const PTK_Point *basis, float *minVal, float *maxVal, uint32_t *minId, uint32_t *maxId)
Find PTK_Points with the minimum and maximum PTK Vector dot4 value computed with the given basis...
uint32_t numPoints
Definition: pointCloud.h:135
uint32_t PTK_PointCloud_isTagged(const PTK_PointCloud *pc, uint32_t id, uint32_t tag)
This checks if all of the bits set in tag are also set in the tag for the specified PTK_Point...
uint32_t PTK_PointCloud_hasSpace(const PTK_PointCloud *pc, uint32_t points)
Check if the given point cloud has enough space to accomodate the addition of points additional PTK_P...
uint32_t dummy
Definition: pointCloud.h:141