Rerun C++ SDK
|
Archetype: A transform between two 3D spaces, i.e. More...
#include <rerun/archetypes/transform3d.hpp>
Public Types | |
using | IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName > |
Indicator component, used to identify the archetype when converting to a list of components. | |
Public Member Functions | |
Transform3D (const components::Translation3D &translation_, const datatypes::Vec3D(&columns)[3], bool from_parent=false) | |
Creates a new 3D transform from translation and matrix provided as 3 columns. | |
Transform3D (const components::Translation3D &translation_, const components::TransformMat3x3 &mat3x3_, bool from_parent=false) | |
Creates a new 3D transform from translation/matrix. | |
Transform3D (const components::Translation3D &translation_, bool from_parent=false) | |
From translation only. | |
Transform3D (const components::TransformMat3x3 &mat3x3_, bool from_parent=false) | |
From 3x3 matrix only. | |
Transform3D (const datatypes::Vec3D(&columns)[3], bool from_parent=false) | |
From 3x3 matrix provided as 3 columns only. | |
Transform3D (const components::Translation3D &translation_, const Rotation3D &rotation, const components::Scale3D &scale_, bool from_parent=false) | |
Creates a new 3D transform from translation/rotation/scale. | |
Transform3D (const components::Translation3D &translation_, const Rotation3D &rotation, float uniform_scale, bool from_parent=false) | |
Creates a new 3D transform from translation/rotation/uniform-scale. | |
Transform3D (const components::Translation3D &translation_, const Rotation3D &rotation, bool from_parent=false) | |
Creates a new rigid transform (translation & rotation only). | |
Transform3D (const components::Translation3D &translation_, const components::Scale3D &scale_, bool from_parent=false) | |
From translation & scale only. | |
Transform3D (const components::Translation3D &translation_, float uniform_scale, bool from_parent=false) | |
From translation & uniform scale only. | |
Transform3D (const Rotation3D &rotation, const components::Scale3D &scale_, bool from_parent=false) | |
From rotation & scale. | |
Transform3D (const Rotation3D &rotation, float uniform_scale, bool from_parent=false) | |
From rotation & uniform scale. | |
Transform3D (const Rotation3D &rotation, bool from_parent=false) | |
From rotation only. | |
Transform3D (const components::Scale3D &scale_, bool from_parent=false) | |
From scale only. | |
Transform3D | with_rotation (const Rotation3D &rotation) && |
Set the rotation component of the transform using the rerun::Rotation3D utility. | |
Transform3D (Transform3D &&other)=default | |
Transform3D (const Transform3D &other)=default | |
Transform3D & | operator= (const Transform3D &other)=default |
Transform3D & | operator= (Transform3D &&other)=default |
Transform3D | with_translation (const rerun::components::Translation3D &_translation) && |
Translation vector. | |
Transform3D | with_many_translation (const Collection< rerun::components::Translation3D > &_translation) && |
This method makes it possible to pack multiple translation in a single component batch. | |
Transform3D | with_rotation_axis_angle (const rerun::components::RotationAxisAngle &_rotation_axis_angle) && |
Rotation via axis + angle. | |
Transform3D | with_many_rotation_axis_angle (const Collection< rerun::components::RotationAxisAngle > &_rotation_axis_angle) && |
This method makes it possible to pack multiple rotation_axis_angle in a single component batch. | |
Transform3D | with_quaternion (const rerun::components::RotationQuat &_quaternion) && |
Rotation via quaternion. | |
Transform3D | with_many_quaternion (const Collection< rerun::components::RotationQuat > &_quaternion) && |
This method makes it possible to pack multiple quaternion in a single component batch. | |
Transform3D | with_scale (const rerun::components::Scale3D &_scale) && |
Scaling factor. | |
Transform3D | with_many_scale (const Collection< rerun::components::Scale3D > &_scale) && |
This method makes it possible to pack multiple scale in a single component batch. | |
Transform3D | with_mat3x3 (const rerun::components::TransformMat3x3 &_mat3x3) && |
3x3 transformation matrix. | |
Transform3D | with_many_mat3x3 (const Collection< rerun::components::TransformMat3x3 > &_mat3x3) && |
This method makes it possible to pack multiple mat3x3 in a single component batch. | |
Transform3D | with_relation (const rerun::components::TransformRelation &_relation) && |
Specifies the relation this transform establishes between this entity and its parent. | |
Transform3D | with_many_relation (const Collection< rerun::components::TransformRelation > &_relation) && |
This method makes it possible to pack multiple relation in a single component batch. | |
Transform3D | with_axis_length (const rerun::components::AxisLength &_axis_length) && |
Visual length of the 3 axes. | |
Transform3D | with_many_axis_length (const Collection< rerun::components::AxisLength > &_axis_length) && |
This method makes it possible to pack multiple axis_length in a single component batch. | |
Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
Partitions the component data into multiple sub-batches. | |
Collection< ComponentColumn > | columns () |
Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
static Transform3D | from_translation_mat3x3 (const components::Translation3D &translation, const components::TransformMat3x3 &mat3x3) |
From a translation applied after a 3x3 matrix. | |
static Transform3D | from_translation_mat3x3 (const components::Translation3D &translation, const datatypes::Vec3D(&columns)[3]) |
From a translation applied after a 3x3 matrix provided as 3 columns. | |
static Transform3D | from_translation (const components::Translation3D &translation) |
From a translation. | |
static Transform3D | from_mat3x3 (const components::TransformMat3x3 &mat3x3) |
From 3x3 matrix only. | |
static Transform3D | from_mat3x3 (const datatypes::Vec3D(&columns)[3]) |
From 3x3 matrix provided as 3 columns only. | |
static Transform3D | from_translation_rotation_scale (const components::Translation3D &translation, const Rotation3D &rotation, const components::Scale3D &scale) |
From a translation, applied after a rotation & scale, known as an affine transformation. | |
static Transform3D | from_translation_rotation_scale (const components::Translation3D &translation, const Rotation3D &rotation, float uniform_scale) |
From a translation, applied after a rotation & scale, known as an affine transformation. | |
static Transform3D | from_translation_rotation (const components::Translation3D &translation, const Rotation3D &rotation) |
From a rotation & scale. | |
static Transform3D | from_translation_scale (const components::Translation3D &translation, const components::Scale3D &scale) |
From a translation applied after a scale. | |
static Transform3D | from_rotation_scale (const Rotation3D &rotation, const components::Scale3D &scale) |
From a rotation & scale. | |
static Transform3D | from_rotation_scale (const Rotation3D &rotation, float uniform_scale) |
From a rotation & uniform scale. | |
static Transform3D | from_rotation (const Rotation3D &rotation) |
From rotation only. | |
static Transform3D | from_scale (const components::Scale3D &scale) |
From scale only. | |
static Transform3D | from_scale (float uniform_scale) |
From scale only. | |
static Transform3D | update_fields () |
Update only some specific fields of a Transform3D . | |
static Transform3D | clear_fields () |
Clear all the fields of a Transform3D . | |
Public Attributes | |
std::optional< ComponentBatch > | translation |
Translation vector. | |
std::optional< ComponentBatch > | rotation_axis_angle |
Rotation via axis + angle. | |
std::optional< ComponentBatch > | quaternion |
Rotation via quaternion. | |
std::optional< ComponentBatch > | scale |
Scaling factor. | |
std::optional< ComponentBatch > | mat3x3 |
3x3 transformation matrix. | |
std::optional< ComponentBatch > | relation |
Specifies the relation this transform establishes between this entity and its parent. | |
std::optional< ComponentBatch > | axis_length |
Visual length of the 3 axes. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] |
static constexpr const char | ArchetypeName [] = "rerun.archetypes.Transform3D" |
The name of the archetype as used in ComponentDescriptor s. | |
static constexpr auto | Descriptor_translation |
ComponentDescriptor for the translation field. | |
static constexpr auto | Descriptor_rotation_axis_angle |
ComponentDescriptor for the rotation_axis_angle field. | |
static constexpr auto | Descriptor_quaternion |
ComponentDescriptor for the quaternion field. | |
static constexpr auto | Descriptor_scale |
ComponentDescriptor for the scale field. | |
static constexpr auto | Descriptor_mat3x3 |
ComponentDescriptor for the mat3x3 field. | |
static constexpr auto | Descriptor_relation |
ComponentDescriptor for the relation field. | |
static constexpr auto | Descriptor_axis_length |
ComponentDescriptor for the axis_length field. | |
static RERUN_SDK_EXPORT const Transform3D | IDENTITY |
Identity transformation. | |
static RERUN_SDK_EXPORT const Transform3D | INVALID |
Invalid transformation. | |
Archetype: A transform between two 3D spaces, i.e.
a pose.
From the point of view of the entity's coordinate system, all components are applied in the inverse order they are listed here. E.g. if both a translation and a max3x3 transform are present, the 3x3 matrix is applied first, followed by the translation.
Whenever you log this archetype, it will write all components, even if you do not explicitly set them. This means that if you first log a transform with only a translation, and then log one with only a rotation, it will be resolved to a transform with only a rotation.
For transforms that affect only a single entity and do not propagate along the entity tree refer to archetypes::InstancePoses3D
.
|
inline |
Creates a new 3D transform from translation and matrix provided as 3 columns.
Clears out all other components like Transform3D::clear_fields
.
translation_ | \çopydoc Transform3D::translation |
columns | Column vectors of 3x3 matrix. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
Implementation note: This overload is necessary, otherwise the array may be interpreted as bool and call the wrong overload.
|
inline |
Creates a new 3D transform from translation/matrix.
Clears out all other components like Transform3D::clear_fields
.
translation_ | \çopydoc Transform3D::translation |
mat3x3_ | 3x3 transformation matrix. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From translation only.
Clears out all other components like Transform3D::clear_fields
.
translation_ | \çopydoc Transform3D::translation |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From 3x3 matrix only.
Clears out all other components like Transform3D::clear_fields
.
mat3x3_ | 3x3 transformation matrix. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From 3x3 matrix provided as 3 columns only.
Clears out all other components like Transform3D::clear_fields
.
columns | Column vectors of 3x3 matrix. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
Creates a new 3D transform from translation/rotation/scale.
Clears out all other components like Transform3D::clear_fields
.
translation_ | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
scale_ | Scaling factor. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
Creates a new 3D transform from translation/rotation/uniform-scale.
Clears out all other components like Transform3D::clear_fields
.
translation_ | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
uniform_scale | Uniform scale factor that is applied to all axis equally. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
Implementation note: This explicit overload prevents interpretation of the float as bool, leading to a call to the wrong overload.
|
inline |
Creates a new rigid transform (translation & rotation only).
Clears out all other components like Transform3D::clear_fields
.
translation_ | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From translation & scale only.
Clears out all other components like Transform3D::clear_fields
.
translation_ | Translation vector. |
scale_ | Transform3D::scale |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From translation & uniform scale only.
Clears out all other components like Transform3D::clear_fields
.
translation_ | Translation vector. |
uniform_scale | Uniform scale factor that is applied to all axis equally. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
Implementation note: This explicit overload prevents interpretation of the float as bool, leading to a call to the wrong overload.
|
inline |
From rotation & scale.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
scale_ | Transform3D::scale |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From rotation & uniform scale.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
uniform_scale | Uniform scale factor that is applied to all axis equally. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
Implementation note: This explicit overload prevents interpretation of the float as bool, leading to a call to the wrong overload.
|
inline |
From rotation only.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
from_parent | If true, the transform relation to TransformRelation::ChildFromParent . |
|
inline |
From scale only.
Clears out all other components like Transform3D::clear_fields
.
scale_ | If true, the transform relation to TransformRelation::ChildFromParent . |
from_parent | Scaling factor. |
|
inlinestatic |
From a translation applied after a 3x3 matrix.
Clears out all other components like Transform3D::clear_fields
.
translation | \çopydoc Transform3D::translation |
mat3x3 | 3x3 transformation matrix. |
|
inlinestatic |
From a translation applied after a 3x3 matrix provided as 3 columns.
Clears out all other components like Transform3D::clear_fields
.
translation | \çopydoc Transform3D::translation |
columns | Column vectors of 3x3 matrix. |
|
inlinestatic |
From a translation.
Clears out all other components like Transform3D::clear_fields
.
translation | \çopydoc Transform3D::translation |
|
inlinestatic |
From 3x3 matrix only.
Clears out all other components like Transform3D::clear_fields
.
mat3x3 | 3x3 transformation matrix. |
|
inlinestatic |
From 3x3 matrix provided as 3 columns only.
Clears out all other components like Transform3D::clear_fields
.
columns | Column vectors of 3x3 matrix. |
|
inlinestatic |
From a translation, applied after a rotation & scale, known as an affine transformation.
Clears out all other components like Transform3D::clear_fields
.
translation | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
scale | Scaling factor. |
|
inlinestatic |
From a translation, applied after a rotation & scale, known as an affine transformation.
Clears out all other components like Transform3D::clear_fields
.
translation | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
uniform_scale | Uniform scale factor that is applied to all axis equally. |
|
inlinestatic |
From a rotation & scale.
Clears out all other components like Transform3D::clear_fields
.
translation | Translation vector. |
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
|
inlinestatic |
From a translation applied after a scale.
Clears out all other components like Transform3D::clear_fields
.
translation | Translation vector. |
scale | Transform3D::scale |
|
inlinestatic |
From a rotation & scale.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
scale | Transform3D::scale |
|
inlinestatic |
From a rotation & uniform scale.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
uniform_scale | Uniform scale factor that is applied to all axis equally. |
|
inlinestatic |
From rotation only.
Clears out all other components like Transform3D::clear_fields
.
rotation | Rotation represented either as a quaternion or axis + angle rotation. |
|
inlinestatic |
From scale only.
Clears out all other components like Transform3D::clear_fields
.
scale | Transform3D::scale |
|
inlinestatic |
From scale only.
Clears out all other components like Transform3D::clear_fields
.
uniform_scale | Uniform scale factor that is applied to all axis equally. |
|
inline |
This method makes it possible to pack multiple translation
in a single component batch.
This only makes sense when used in conjunction with columns
. with_translation
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple rotation_axis_angle
in a single component batch.
This only makes sense when used in conjunction with columns
. with_rotation_axis_angle
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple quaternion
in a single component batch.
This only makes sense when used in conjunction with columns
. with_quaternion
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple scale
in a single component batch.
This only makes sense when used in conjunction with columns
. with_scale
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple mat3x3
in a single component batch.
This only makes sense when used in conjunction with columns
. with_mat3x3
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple relation
in a single component batch.
This only makes sense when used in conjunction with columns
. with_relation
should be used when logging a single row's worth of data.
|
inline |
Visual length of the 3 axes.
The length is interpreted in the local coordinate system of the transform. If the transform is scaled, the axes will be scaled accordingly.
|
inline |
This method makes it possible to pack multiple axis_length
in a single component batch.
This only makes sense when used in conjunction with columns
. with_axis_length
should be used when logging a single row's worth of data.
Collection< ComponentColumn > rerun::archetypes::Transform3D::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch
data into ComponentColumn
s instead, via ComponentBatch::partitioned
.
This makes it possible to use RecordingStream::send_columns
to send columnar data directly into Rerun.
The specified lengths
must sum to the total length of the component batch.
Collection< ComponentColumn > rerun::archetypes::Transform3D::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns
with std::vector<uint32_t>(n, 1)
, where n
is automatically guessed.
std::optional<ComponentBatch> rerun::archetypes::Transform3D::axis_length |
Visual length of the 3 axes.
The length is interpreted in the local coordinate system of the transform. If the transform is scaled, the axes will be scaled accordingly.
|
staticconstexpr |
|
staticconstexpr |
ComponentDescriptor
for the translation
field.
|
staticconstexpr |
ComponentDescriptor
for the rotation_axis_angle
field.
|
staticconstexpr |
ComponentDescriptor
for the quaternion
field.
|
staticconstexpr |
ComponentDescriptor
for the scale
field.
|
staticconstexpr |
ComponentDescriptor
for the mat3x3
field.
|
staticconstexpr |
ComponentDescriptor
for the relation
field.
|
staticconstexpr |
ComponentDescriptor
for the axis_length
field.
|
static |
Identity transformation.
Applying this transform does not alter an entity's transformation.
|
static |
Invalid transformation.
Applying this transform will cause this entity and the entire subtree not to be visualized.