6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../compiler_utils.hpp"
9#include "../component_batch.hpp"
10#include "../component_column.hpp"
11#include "../components/rotation_axis_angle.hpp"
12#include "../components/rotation_quat.hpp"
13#include "../components/scale3d.hpp"
14#include "../components/transform_frame_id.hpp"
15#include "../components/transform_mat3x3.hpp"
16#include "../components/transform_relation.hpp"
17#include "../components/translation3d.hpp"
18#include "../rerun_sdk_export.hpp"
19#include "../result.hpp"
20#include "../rotation3d.hpp"
258 std::optional<ComponentBatch>
scale;
298 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Transform3D";
362 bool from_parent =
false
499 float uniform_scale,
bool from_parent =
false
501 :
Transform3D(translation_, rotation, components::Scale3D(uniform_scale), from_parent) {
538 bool from_parent =
false
566 bool from_parent =
false
597 bool from_parent =
false
599 :
Transform3D(translation_, components::Scale3D(uniform_scale), from_parent) {}
627 :
Transform3D(rotation, components::Scale3D(uniform_scale), from_parent) {}
701 if (rotation.axis_angle.has_value()) {
704 if (rotation.quaternion.has_value()) {
707 return std::move(*
this);
733 return std::move(*
this);
745 return std::move(*
this);
757 return std::move(*
this);
770 return std::move(*
this);
779 return std::move(*
this);
791 return std::move(*
this);
799 return std::move(*
this);
808 return std::move(*
this);
816 return std::move(*
this);
826 return std::move(*
this);
835 return std::move(*
this);
847 return std::move(*
this);
865 return std::move(*
this);
877 return std::move(*
this);
893 return std::move(*
this);
905 return std::move(*
this);
917 return detail::partition_batches(
936 return detail::partition_batches_of_unit_length({&
translation,
952 template <
typename T>
957 struct AsComponents<archetypes::Transform3D> {
959 static Result<Collection<ComponentBatch>> as_batches(
960 const archetypes::Transform3D& archetype
962 return detail::collect_batches(
963 {&archetype.translation,
964 &archetype.rotation_axis_angle,
965 &archetype.quaternion,
969 &archetype.child_frame,
970 &archetype.parent_frame}
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
TransformRelation
Component: Specifies relation a spatial transform describes.
Definition transform_relation.hpp:24
@ ChildFromParent
The transform describes how to transform into the child entity's space.
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
Utility for representing a single 3D rotation, agnostic to the underlying representation.
Definition rotation3d.hpp:14
Component: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:17
Component: A 3D rotation expressed as a quaternion.
Definition rotation_quat.hpp:18
Component: A 3D scale factor.
Definition scale3d.hpp:19
Component: A translation vector in 3D space.
Definition translation3d.hpp:15
Encoding: A vector in 3D space.
Definition vec3d.hpp:20