6#include "../datatypes/vec2d.hpp"
7#include "../result.hpp"
48 Texcoord2D() =
default;
57 Texcoord2D(std::array<float, 2> xy_) : uv(xy_) {}
59 Texcoord2D& operator=(std::array<float, 2> xy_) {
76 struct Loggable<components::Texcoord2D> {
77 static constexpr const char Name[] =
"rerun.components.Texcoord2D";
80 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
81 return Loggable<rerun::datatypes::Vec2D>::arrow_datatype();
85 static Result<std::shared_ptr<arrow::Array>> to_arrow(
86 const components::Texcoord2D* instances,
size_t num_instances
88 if (num_instances == 0) {
89 return Loggable<rerun::datatypes::Vec2D>::to_arrow(
nullptr, 0);
90 }
else if (instances ==
nullptr) {
92 ErrorCode::UnexpectedNullArgument,
93 "Passed array instances is null when num_elements> 0."
96 return Loggable<rerun::datatypes::Vec2D>::to_arrow(&instances->uv, num_instances);
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Component: A 2D texture UV coordinate.
Definition texcoord2d.hpp:30
Texcoord2D(float u, float v)
Construct Texcoord2D from u/v values.
Definition texcoord2d.hpp:35
Datatype: A vector in 2D space.
Definition vec2d.hpp:20