6#include "../result.hpp"
15 class FixedSizeListBuilder;
21 std::array<float, 2> xy;
27 Vec2D(
float x,
float y) : xy{x, y} {}
30 explicit Vec2D(
const float* xy_) : xy{xy_[0], xy_[1]} {}
43 Vec2D(std::array<float, 2> xy_) : xy(xy_) {}
45 Vec2D& operator=(std::array<float, 2> xy_) {
58 struct Loggable<datatypes::Vec2D> {
59 static constexpr const char Name[] =
"rerun.datatypes.Vec2D";
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
66 arrow::FixedSizeListBuilder* builder,
const datatypes::Vec2D* elements,
71 static Result<std::shared_ptr<arrow::Array>> to_arrow(
72 const datatypes::Vec2D* instances,
size_t num_instances
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:72
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Datatype: A vector in 2D space.
Definition vec2d.hpp:20
Vec2D(float x, float y)
Construct Vec2D from x/y values.
Definition vec2d.hpp:27
Vec2D(const float *xy_)
Construct Vec2D from x/y float pointer.
Definition vec2d.hpp:30