6#include "../result.hpp"
15 class FixedSizeListBuilder;
21 std::array<float, 4> xyzw;
25 Vec4D(
float x,
float y,
float z,
float w) : xyzw{x, y, z, w} {}
28 explicit Vec4D(
const float* xyzw_) : xyzw{xyzw_[0], xyzw_[1], xyzw_[2], xyzw_[3]} {}
51 Vec4D(std::array<float, 4> xyzw_) : xyzw(xyzw_) {}
53 Vec4D& operator=(std::array<float, 4> xyzw_) {
66 struct Loggable<datatypes::Vec4D> {
67 static constexpr const char Name[] =
"rerun.datatypes.Vec4D";
70 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
73 static Result<std::shared_ptr<arrow::Array>> to_arrow(
74 const datatypes::Vec4D* instances,
size_t num_instances
79 arrow::FixedSizeListBuilder* builder,
const datatypes::Vec4D* 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 vector in 4D space.
Definition vec4d.hpp:20
Vec4D(const float *xyzw_)
Construct Vec4D from x/y/z/w float pointer.
Definition vec4d.hpp:28
Vec4D(float x, float y, float z, float w)
Construct Vec4D from x/y/z/w values.
Definition vec4d.hpp:25