6#include "../component_descriptor.hpp"
7#include "../result.hpp"
16 class FixedSizeListBuilder;
22 std::array<float, 4> xyzw;
26 Vec4D(
float x,
float y,
float z,
float w) : xyzw{x, y, z, w} {}
29 explicit Vec4D(
const float* xyzw_) : xyzw{xyzw_[0], xyzw_[1], xyzw_[2], xyzw_[3]} {}
52 Vec4D(std::array<float, 4> xyzw_) : xyzw(xyzw_) {}
54 Vec4D& operator=(std::array<float, 4> xyzw_) {
67 struct Loggable<datatypes::Vec4D> {
68 static constexpr ComponentDescriptor Descriptor =
"rerun.datatypes.Vec4D";
71 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
74 static Result<std::shared_ptr<arrow::Array>> to_arrow(
75 const datatypes::Vec4D* instances,
size_t num_instances
80 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:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: A vector in 4D space.
Definition vec4d.hpp:21
Vec4D(const float *xyzw_)
Construct Vec4D from x/y/z/w float pointer.
Definition vec4d.hpp:29
Vec4D(float x, float y, float z, float w)
Construct Vec4D from x/y/z/w values.
Definition vec4d.hpp:26