6#include "../component_descriptor.hpp"
7#include "../result.hpp"
16 class FixedSizeListBuilder;
22 std::array<double, 2> xy;
26 DVec2D(
double x,
double y) : xy{x, y} {}
29 explicit DVec2D(
const double* xy_) : xy{xy_[0], xy_[1]} {}
44 DVec2D(std::array<double, 2> xy_) : xy(xy_) {}
46 DVec2D& operator=(std::array<double, 2> xy_) {
59 struct Loggable<datatypes::DVec2D> {
60 static constexpr ComponentDescriptor Descriptor =
"rerun.datatypes.DVec2D";
63 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
66 static Result<std::shared_ptr<arrow::Array>> to_arrow(
67 const datatypes::DVec2D* instances,
size_t num_instances
72 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:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: A double-precision vector in 2D space.
Definition dvec2d.hpp:21
DVec2D(const double *xy_)
Construct DVec2D from x/y double pointer.
Definition dvec2d.hpp:29
DVec2D(double x, double y)
Construct DVec2D from x/y values.
Definition dvec2d.hpp:26