Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::TransformAxes3D Struct Reference

Archetype: A visual representation of a archetypes::Transform3D. More...

#include <rerun/archetypes/transform_axes3d.hpp>

Public Member Functions

 TransformAxes3D (TransformAxes3D &&other)=default
 
 TransformAxes3D (const TransformAxes3D &other)=default
 
TransformAxes3Doperator= (const TransformAxes3D &other)=default
 
TransformAxes3Doperator= (TransformAxes3D &&other)=default
 
 TransformAxes3D (rerun::components::AxisLength _axis_length)
 
TransformAxes3D with_axis_length (const rerun::components::AxisLength &_axis_length) &&
 Visual length of the 3 axes.
 
TransformAxes3D 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.
 
TransformAxes3D with_show_frame (const rerun::components::ShowLabels &_show_frame) &&
 Whether to show a text label with the corresponding frame.
 
TransformAxes3D with_many_show_frame (const Collection< rerun::components::ShowLabels > &_show_frame) &&
 This method makes it possible to pack multiple show_frame in a single component batch.
 
Collection< ComponentColumncolumns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumncolumns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static TransformAxes3D update_fields ()
 Update only some specific fields of a TransformAxes3D.
 
static TransformAxes3D clear_fields ()
 Clear all the fields of a TransformAxes3D.
 

Public Attributes

std::optional< ComponentBatchaxis_length
 Visual length of the 3 axes.
 
std::optional< ComponentBatchshow_frame
 Whether to show a text label with the corresponding frame.
 

Static Public Attributes

static constexpr const char ArchetypeName [] = "rerun.archetypes.TransformAxes3D"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_axis_length
 ComponentDescriptor for the axis_length field.
 
static constexpr auto Descriptor_show_frame
 ComponentDescriptor for the show_frame field.
 

Detailed Description

Archetype: A visual representation of a archetypes::Transform3D.

Example

Visual representation of a transform as three arrows

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_transform3d_axes");
rec.spawn().exit_on_failure();
rec.set_time_sequence("step", 0);
rec.log("base", rerun::Transform3D(), rerun::TransformAxes3D(1.0));
for (int deg = 0; deg <360; deg++) {
rec.set_time_sequence("step", deg);
rec.log(
"base/rotated",
rerun::Transform3D().with_rotation_axis_angle(rerun::RotationAxisAngle(
{1.0f, 1.0f, 1.0f},
rerun::Angle::degrees(static_cast<float>(deg))
)),
);
rec.log(
"base/rotated/translated",
rerun::Transform3D().with_translation({2.0f, 0.0f, 0.0f}),
);
}
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:73
Archetype: A transform between two 3D spaces, i.e.
Definition transform3d.hpp:219
Transform3D with_translation(const rerun::components::Translation3D &_translation) &&
Translation vector.
Definition transform3d.hpp:708
Archetype: A visual representation of a archetypes::Transform3D.
Definition transform_axes3d.hpp:57
static Angle degrees(float degrees_)
New angle in degrees.
Definition angle.hpp:39
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21

Member Function Documentation

◆ with_axis_length()

TransformAxes3D rerun::archetypes::TransformAxes3D::with_axis_length ( const rerun::components::AxisLength _axis_length) &&
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.

◆ with_many_axis_length()

TransformAxes3D rerun::archetypes::TransformAxes3D::with_many_axis_length ( const Collection< rerun::components::AxisLength > &  _axis_length) &&
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.

◆ with_many_show_frame()

TransformAxes3D rerun::archetypes::TransformAxes3D::with_many_show_frame ( const Collection< rerun::components::ShowLabels > &  _show_frame) &&
inline

This method makes it possible to pack multiple show_frame in a single component batch.

This only makes sense when used in conjunction with columns. with_show_frame should be used when logging a single row's worth of data.

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::TransformAxes3D::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns 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.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::archetypes::TransformAxes3D::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.

Member Data Documentation

◆ axis_length

std::optional<ComponentBatch> rerun::archetypes::TransformAxes3D::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.

◆ Descriptor_axis_length

constexpr auto rerun::archetypes::TransformAxes3D::Descriptor_axis_length
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "TransformAxes3D:axis_length",
Loggable<rerun::components::AxisLength>::ComponentType
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition transform_axes3d.hpp:69

ComponentDescriptor for the axis_length field.

◆ Descriptor_show_frame

constexpr auto rerun::archetypes::TransformAxes3D::Descriptor_show_frame
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "TransformAxes3D:show_frame",
Loggable<rerun::components::ShowLabels>::ComponentType
)

ComponentDescriptor for the show_frame field.


The documentation for this struct was generated from the following file: