6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/axis_length.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/transform_relation.hpp"
15#include "../components/translation3d.hpp"
16#include "../indicator_component.hpp"
17#include "../rerun_sdk_export.hpp"
18#include "../result.hpp"
19#include "../rotation3d.hpp"
164 std::optional<rerun::components::Scale3D>
scale;
167 std::optional<rerun::components::TransformMat3x3>
mat3x3;
170 std::optional<rerun::components::TransformRelation>
relation;
179 static constexpr const char IndicatorComponentName[] =
180 "rerun.components.Transform3DIndicator";
206 bool from_parent =
false
208 :
Transform3D(translation_, components::TransformMat3x3(columns), from_parent) {}
289 :
Transform3D(components::TransformMat3x3(columns), from_parent) {}
312 set_rotation(rotation);
326 float uniform_scale,
bool from_parent =
false
328 :
Transform3D(translation_, rotation, components::Scale3D(uniform_scale), from_parent) {
362 bool from_parent =
false
368 set_rotation(rotation);
388 bool from_parent =
false
416 bool from_parent =
false
418 :
Transform3D(translation_, components::Scale3D(uniform_scale), from_parent) {}
432 set_rotation(rotation);
444 :
Transform3D(rotation, components::Scale3D(uniform_scale), from_parent) {}
472 set_rotation(rotation);
508 void set_rotation(
const Rotation3D& rotation) {
509 if (rotation.axis_angle.has_value()) {
511 rotation.axis_angle.value();)
513 if (rotation.quaternion.has_value()) {
514 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
quaternion = rotation.quaternion.value();)
528 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
537 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
544 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
549 scale = std::move(_scale);
551 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
556 mat3x3 = std::move(_mat3x3);
558 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
565 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
575 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
583 template <
typename T>
588 struct AsComponents<archetypes::Transform3D> {
590 static Result<std::vector<ComponentBatch>> serialize(
591 const archetypes::Transform3D& archetype
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
TransformRelation
Component: Specifies relation a spatial transform describes.
Definition transform_relation.hpp:25
@ 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:23
Utility for representing a single 3D rotation, agnostic to the underlying representation.
Definition rotation3d.hpp:14
Component: The length of an axis in local units of the space.
Definition axis_length.hpp:15
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
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:19
Component: A 3D scale factor.
Definition scale3d.hpp:20
Component: A translation vector in 3D space.
Definition translation3d.hpp:16
Datatype: A vector in 3D space.
Definition vec3d.hpp:21