6#include "../component_descriptor.hpp"
7#include "../datatypes/vec3d.hpp"
8#include "../result.hpp"
28 explicit PoseScale3D(
const float* xyz) : scale{xyz[0], xyz[1], xyz[2]} {}
32 :
PoseScale3D(datatypes::
Vec3D{uniform_scale, uniform_scale, uniform_scale}) {}
56 PoseScale3D(std::array<float, 3> xyz_) : scale(xyz_) {}
75 struct Loggable<components::PoseScale3D> {
76 static constexpr ComponentDescriptor Descriptor =
"rerun.components.PoseScale3D";
79 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
80 return Loggable<rerun::datatypes::Vec3D>::arrow_datatype();
84 static Result<std::shared_ptr<arrow::Array>> to_arrow(
85 const components::PoseScale3D* instances,
size_t num_instances
87 if (num_instances == 0) {
88 return Loggable<rerun::datatypes::Vec3D>::to_arrow(
nullptr, 0);
89 }
else if (instances ==
nullptr) {
91 ErrorCode::UnexpectedNullArgument,
92 "Passed array instances is null when num_elements> 0."
95 return Loggable<rerun::datatypes::Vec3D>::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: A 3D scale factor that doesn't propagate in the transform hierarchy.
Definition pose_scale3d.hpp:20
PoseScale3D(float x, float y, float z)
Construct PoseScale3D from x/y/z values.
Definition pose_scale3d.hpp:25
PoseScale3D(const float *xyz)
Construct PoseScale3D from x/y/z float pointer.
Definition pose_scale3d.hpp:28
static PoseScale3D three_d(datatypes::Vec3D scale)
Explicitly construct a PoseScale3D from a 3D scale factor.
Definition pose_scale3d.hpp:40
static PoseScale3D uniform(float uniform_scale)
Explicitly construct a PoseScale3D from a uniform scale factor.
Definition pose_scale3d.hpp:35
PoseScale3D(float uniform_scale)
Construct a PoseScale3D from a uniform scale factor.
Definition pose_scale3d.hpp:31
Datatype: A vector in 3D space.
Definition vec3d.hpp:21