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"
162 std::optional<rerun::components::Scale3D>
scale;
165 std::optional<rerun::components::TransformMat3x3>
mat3x3;
168 std::optional<rerun::components::TransformRelation>
relation;
177 static constexpr const char IndicatorComponentName[] =
178 "rerun.components.Transform3DIndicator";
199 bool from_parent =
false
201 :
Transform3D(translation_, components::TransformMat3x3(columns), from_parent) {}
282 :
Transform3D(components::TransformMat3x3(columns), from_parent) {}
305 set_rotation(rotation);
319 float uniform_scale,
bool from_parent =
false
321 :
Transform3D(translation_, rotation, components::Scale3D(uniform_scale), from_parent) {
355 bool from_parent =
false
361 set_rotation(rotation);
381 bool from_parent =
false
409 bool from_parent =
false
411 :
Transform3D(translation_, components::Scale3D(uniform_scale), from_parent) {}
425 set_rotation(rotation);
437 :
Transform3D(rotation, components::Scale3D(uniform_scale), from_parent) {}
465 set_rotation(rotation);
501 void set_rotation(
const Rotation3D& rotation) {
502 if (rotation.axis_angle.has_value()) {
504 rotation.axis_angle.value();)
506 if (rotation.quaternion.has_value()) {
507 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
quaternion = rotation.quaternion.value();)
521 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
530 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
537 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
542 scale = std::move(_scale);
544 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
549 mat3x3 = std::move(_mat3x3);
551 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
558 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
568 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
576 template <
typename T>
581 struct AsComponents<archetypes::Transform3D> {
583 static Result<std::vector<ComponentBatch>> serialize(
584 const archetypes::Transform3D& archetype
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:72
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:22
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:14
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30
Component: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:14
Component: A 3D rotation expressed as a quaternion.
Definition rotation_quat.hpp:17
Component: A 3D scale factor.
Definition scale3d.hpp:19
Component: A translation vector in 3D space.
Definition translation3d.hpp:15
Datatype: A vector in 3D space.
Definition vec3d.hpp:20