Voyant API 1.0.0
Loading...
Searching...
No Matches
voyant_frame.hpp File Reference
#include <carbon_client_ffi.hpp>
#include <cstdint>
#include <iomanip>
#include <optional>
#include <ostream>
#include <sensor_state_display.hpp>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <voyant_types_ffi.hpp>

Go to the source code of this file.

Classes

class  VoyantFrame
 A point-cloud frame: points plus the sensor/host state snapshots and frame metadata recorded with them. More...
struct  VoyantFrame::SyntheticFrameDesc
 Identity and timeline of a synthetic() frame; zeros are valid. More...
struct  VoyantFrame::StatelessFrameDesc

Typedefs

using PointData = PointDataV1

Functions

bool isValidPoint (const PointData &point)
 Whether a point is a valid return.
bool setPointsXyz (std::vector< PointData > &points, const std::vector< VoyantVec3 > &positions)
std::ostream & operator<< (std::ostream &os, const VoyantFrame &frame)
 One-line frame summary, printed for every frame in typical receive loops.

Typedef Documentation

◆ PointData

Current-version alias, mirroring Rust's pub type PointData = PointDataV1. Write code against PointData to pick up future point versions on rebuild; name PointDataV1 to pin the frozen v1.0.0 layout.

Function Documentation

◆ isValidPoint()

bool isValidPoint ( const PointData & point)
inline

Whether a point is a valid return.

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const VoyantFrame & frame )
inline

One-line frame summary, printed for every frame in typical receive loops.

◆ setPointsXyz()

bool setPointsXyz ( std::vector< PointData > & points,
const std::vector< VoyantVec3 > & positions )
inline

Write cartesian positions into points' stored spherical geometry — the inverse of VoyantFrame::xyz(), for points that arrive as x/y/z (a ROS cloud, a CSV). Only range/azimuth/elevation are touched, so fill the rest of each point first. A non-finite or zero-length position leaves its point at range 0, the state xyz() reads a dropped point out as. Returns false unless the two are the same length.

Rebuilding the angles by hand instead duplicates a projection this library owns.