6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/rotation_axis_angle.hpp"
11#include "../components/rotation_quat.hpp"
12#include "../components/scale3d.hpp"
13#include "../components/transform_mat3x3.hpp"
14#include "../components/translation3d.hpp"
15#include "../result.hpp"
109 static constexpr const char ArchetypeName[] =
"rerun.archetypes.InstancePoses3D";
158 return std::move(*
this);
166 _rotation_axis_angles,
170 return std::move(*
this);
179 return std::move(*
this);
185 return std::move(*
this);
192 return std::move(*
this);
204 return detail::partition_batches(
216 return detail::partition_batches_of_unit_length(
227 template <
typename T>
232 struct AsComponents<archetypes::InstancePoses3D> {
234 static Result<Collection<ComponentBatch>> as_batches(
235 const archetypes::InstancePoses3D& archetype
237 return detail::collect_batches(
238 {&archetype.translations,
239 &archetype.rotation_axis_angles,
240 &archetype.quaternions,
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:90
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: One or more transforms applied on the current entity's transform frame.
Definition instance_poses3d.hpp:91
static constexpr auto Descriptor_scales
ComponentDescriptor for the scales field.
Definition instance_poses3d.hpp:127
std::optional< ComponentBatch > quaternions
Rotations via quaternion.
Definition instance_poses3d.hpp:99
std::optional< ComponentBatch > scales
Scaling factors.
Definition instance_poses3d.hpp:102
static InstancePoses3D update_fields()
Update only some specific fields of a InstancePoses3D.
Definition instance_poses3d.hpp:145
std::optional< ComponentBatch > translations
Translation vectors.
Definition instance_poses3d.hpp:93
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition instance_poses3d.hpp:203
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition instance_poses3d.hpp:109
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition instance_poses3d.hpp:215
InstancePoses3D with_quaternions(const Collection< rerun::components::RotationQuat > &_quaternions) &&
Rotations via quaternion.
Definition instance_poses3d.hpp:174
InstancePoses3D with_translations(const Collection< rerun::components::Translation3D > &_translations) &&
Translation vectors.
Definition instance_poses3d.hpp:153
static constexpr auto Descriptor_mat3x3
ComponentDescriptor for the mat3x3 field.
Definition instance_poses3d.hpp:132
static InstancePoses3D clear_fields()
Clear all the fields of a InstancePoses3D.
InstancePoses3D with_scales(const Collection< rerun::components::Scale3D > &_scales) &&
Scaling factors.
Definition instance_poses3d.hpp:183
InstancePoses3D with_mat3x3(const Collection< rerun::components::TransformMat3x3 > &_mat3x3) &&
3x3 transformation matrices.
Definition instance_poses3d.hpp:189
std::optional< ComponentBatch > mat3x3
3x3 transformation matrices.
Definition instance_poses3d.hpp:105
std::optional< ComponentBatch > rotation_axis_angles
Rotations via axis + angle.
Definition instance_poses3d.hpp:96
static constexpr auto Descriptor_translations
ComponentDescriptor for the translations field.
Definition instance_poses3d.hpp:112
static constexpr auto Descriptor_quaternions
ComponentDescriptor for the quaternions field.
Definition instance_poses3d.hpp:122
InstancePoses3D with_rotation_axis_angles(const Collection< rerun::components::RotationAxisAngle > &_rotation_axis_angles) &&
Rotations via axis + angle.
Definition instance_poses3d.hpp:162
static constexpr auto Descriptor_rotation_axis_angles
ComponentDescriptor for the rotation_axis_angles field.
Definition instance_poses3d.hpp:117