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";
201 bool from_parent =
false
203 :
Transform3D(translation_, components::TransformMat3x3(columns), from_parent) {}
284 :
Transform3D(components::TransformMat3x3(columns), from_parent) {}
307 set_rotation(rotation);
321 float uniform_scale,
bool from_parent =
false
323 :
Transform3D(translation_, rotation, components::Scale3D(uniform_scale), from_parent) {
357 bool from_parent =
false
363 set_rotation(rotation);
383 bool from_parent =
false
411 bool from_parent =
false
413 :
Transform3D(translation_, components::Scale3D(uniform_scale), from_parent) {}
427 set_rotation(rotation);
439 :
Transform3D(rotation, components::Scale3D(uniform_scale), from_parent) {}
467 set_rotation(rotation);
503 void set_rotation(
const Rotation3D& rotation) {
504 if (rotation.axis_angle.has_value()) {
506 rotation.axis_angle.value();)
508 if (rotation.quaternion.has_value()) {
509 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
quaternion = rotation.quaternion.value();)
523 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
532 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
539 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
544 scale = std::move(_scale);
546 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
551 mat3x3 = std::move(_mat3x3);
553 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
560 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
570 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
578 template <
typename T>
583 struct AsComponents<archetypes::Transform3D> {
585 static Result<std::vector<ComponentBatch>> serialize(
586 const archetypes::Transform3D& archetype
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:76
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