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