6#include "../datatypes/vec3d.hpp"
7#include "../result.hpp"
27 explicit PoseScale3D(
const float* xyz) : scale{xyz[0], xyz[1], xyz[2]} {}
31 :
PoseScale3D(datatypes::
Vec3D{uniform_scale, uniform_scale, uniform_scale}) {}
55 PoseScale3D(std::array<float, 3> xyz_) : scale(xyz_) {}
74 struct Loggable<components::PoseScale3D> {
75 static constexpr const char Name[] =
"rerun.components.PoseScale3D";
78 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
79 return Loggable<rerun::datatypes::Vec3D>::arrow_datatype();
83 static Result<std::shared_ptr<arrow::Array>> to_arrow(
84 const components::PoseScale3D* instances,
size_t num_instances
86 if (num_instances == 0) {
87 return Loggable<rerun::datatypes::Vec3D>::to_arrow(
nullptr, 0);
88 }
else if (instances ==
nullptr) {
90 ErrorCode::UnexpectedNullArgument,
91 "Passed array instances is null when num_elements> 0."
94 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:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Component: A 3D scale factor that doesn't propagate in the transform hierarchy.
Definition pose_scale3d.hpp:19
PoseScale3D(float x, float y, float z)
Construct PoseScale3D from x/y/z values.
Definition pose_scale3d.hpp:24
PoseScale3D(const float *xyz)
Construct PoseScale3D from x/y/z float pointer.
Definition pose_scale3d.hpp:27
static PoseScale3D three_d(datatypes::Vec3D scale)
Explicitly construct a PoseScale3D from a 3D scale factor.
Definition pose_scale3d.hpp:39
static PoseScale3D uniform(float uniform_scale)
Explicitly construct a PoseScale3D from a uniform scale factor.
Definition pose_scale3d.hpp:34
PoseScale3D(float uniform_scale)
Construct a PoseScale3D from a uniform scale factor.
Definition pose_scale3d.hpp:30
Datatype: A vector in 3D space.
Definition vec3d.hpp:20