6#include "../component_descriptor.hpp"
7#include "../datatypes/uvec3d.hpp"
8#include "../result.hpp"
25 : indices{indices_[0], indices_[1], indices_[2]} {}
39 TriangleIndices(std::array<uint32_t, 3> xyz_) : indices(xyz_) {}
58 struct Loggable<components::TriangleIndices> {
59 static constexpr ComponentDescriptor Descriptor =
"rerun.components.TriangleIndices";
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
63 return Loggable<rerun::datatypes::UVec3D>::arrow_datatype();
67 static Result<std::shared_ptr<arrow::Array>> to_arrow(
68 const components::TriangleIndices* instances,
size_t num_instances
70 if (num_instances == 0) {
71 return Loggable<rerun::datatypes::UVec3D>::to_arrow(
nullptr, 0);
72 }
else if (instances ==
nullptr) {
74 ErrorCode::UnexpectedNullArgument,
75 "Passed array instances is null when num_elements> 0."
78 return Loggable<rerun::datatypes::UVec3D>::to_arrow(
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:80
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Component: The three indices of a triangle in a triangle mesh.
Definition triangle_indices.hpp:16
TriangleIndices(const uint32_t *indices_)
Construct UVec3D from v0/v1/v2 uint32_t pointer.
Definition triangle_indices.hpp:24
TriangleIndices(uint32_t v0, uint32_t v1, uint32_t v2)
Construct TriangleIndices from v0/v1/v2 values.
Definition triangle_indices.hpp:21
Datatype: A uint32 vector in 3D space.
Definition uvec3d.hpp:21