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

Archetype: 3D cylinders with flat caps. More...

#include <rerun/archetypes/cylinders3d.hpp>

Public Member Functions

 Cylinders3D (Cylinders3D &&other)=default
 
 Cylinders3D (const Cylinders3D &other)=default
 
Cylinders3Doperator= (const Cylinders3D &other)=default
 
Cylinders3Doperator= (Cylinders3D &&other)=default
 
Cylinders3D with_lengths (const Collection< rerun::components::Length > &_lengths) &&
 The total axial length of the cylinder, measured as the straight-line distance between the centers of its two endcaps.
 
Cylinders3D with_radii (const Collection< rerun::components::Radius > &_radii) &&
 Radii of the cylinders.
 
Cylinders3D with_centers (const Collection< rerun::components::PoseTranslation3D > &_centers) &&
 Optional centers of the cylinders.
 
Cylinders3D with_rotation_axis_angles (const Collection< rerun::components::PoseRotationAxisAngle > &_rotation_axis_angles) &&
 Rotations via axis + angle.
 
Cylinders3D with_quaternions (const Collection< rerun::components::PoseRotationQuat > &_quaternions) &&
 Rotations via quaternion.
 
Cylinders3D with_colors (const Collection< rerun::components::Color > &_colors) &&
 Optional colors for the cylinders.
 
Cylinders3D with_line_radii (const Collection< rerun::components::Radius > &_line_radii) &&
 Optional radii for the lines used when the cylinder is rendered as a wireframe.
 
Cylinders3D with_fill_mode (const rerun::components::FillMode &_fill_mode) &&
 Optionally choose whether the cylinders are drawn with lines or solid.
 
Cylinders3D with_many_fill_mode (const Collection< rerun::components::FillMode > &_fill_mode) &&
 This method makes it possible to pack multiple fill_mode in a single component batch.
 
Cylinders3D with_labels (const Collection< rerun::components::Text > &_labels) &&
 Optional text labels for the cylinders, which will be located at their centers.
 
Cylinders3D with_show_labels (const rerun::components::ShowLabels &_show_labels) &&
 Whether the text labels should be shown.
 
Cylinders3D with_many_show_labels (const Collection< rerun::components::ShowLabels > &_show_labels) &&
 This method makes it possible to pack multiple show_labels in a single component batch.
 
Cylinders3D with_class_ids (const Collection< rerun::components::ClassId > &_class_ids) &&
 Optional class ID for the ellipsoids.
 
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 Cylinders3D from_lengths_and_radii (const Collection< rerun::components::Length > &lengths, const Collection< rerun::components::Radius > &radii)
 Creates a new Cylinders3D with the given axis-aligned lengths and radii.
 
static Cylinders3D update_fields ()
 Update only some specific fields of a Cylinders3D.
 
static Cylinders3D clear_fields ()
 Clear all the fields of a Cylinders3D.
 

Public Attributes

std::optional< ComponentBatchlengths
 The total axial length of the cylinder, measured as the straight-line distance between the centers of its two endcaps.
 
std::optional< ComponentBatchradii
 Radii of the cylinders.
 
std::optional< ComponentBatchcenters
 Optional centers of the cylinders.
 
std::optional< ComponentBatchrotation_axis_angles
 Rotations via axis + angle.
 
std::optional< ComponentBatchquaternions
 Rotations via quaternion.
 
std::optional< ComponentBatchcolors
 Optional colors for the cylinders.
 
std::optional< ComponentBatchline_radii
 Optional radii for the lines used when the cylinder is rendered as a wireframe.
 
std::optional< ComponentBatchfill_mode
 Optionally choose whether the cylinders are drawn with lines or solid.
 
std::optional< ComponentBatchlabels
 Optional text labels for the cylinders, which will be located at their centers.
 
std::optional< ComponentBatchshow_labels
 Whether the text labels should be shown.
 
std::optional< ComponentBatchclass_ids
 Optional class ID for the ellipsoids.
 

Static Public Attributes

static constexpr const char ArchetypeName [] = "rerun.archetypes.Cylinders3D"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_lengths
 ComponentDescriptor for the lengths field.
 
static constexpr auto Descriptor_radii
 ComponentDescriptor for the radii field.
 
static constexpr auto Descriptor_centers
 ComponentDescriptor for the centers field.
 
static constexpr auto Descriptor_rotation_axis_angles
 ComponentDescriptor for the rotation_axis_angles field.
 
static constexpr auto Descriptor_quaternions
 ComponentDescriptor for the quaternions field.
 
static constexpr auto Descriptor_colors
 ComponentDescriptor for the colors field.
 
static constexpr auto Descriptor_line_radii
 ComponentDescriptor for the line_radii field.
 
static constexpr auto Descriptor_fill_mode
 ComponentDescriptor for the fill_mode field.
 
static constexpr auto Descriptor_labels
 ComponentDescriptor for the labels field.
 
static constexpr auto Descriptor_show_labels
 ComponentDescriptor for the show_labels field.
 
static constexpr auto Descriptor_class_ids
 ComponentDescriptor for the class_ids field.
 

Detailed Description

Archetype: 3D cylinders with flat caps.

This archetype is for cylinder primitives defined by their axial length and radius. For points whose radii are for visualization purposes, use archetypes::Points3D instead.

Orienting and placing cylinders forms a separate transform that is applied prior to archetypes::InstancePoses3D and archetypes::Transform3D.

Example

Batch of cylinders

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_cylinders3d_batch");
rec.spawn().exit_on_failure();
rec.log(
"cylinders",
rerun::Cylinders3D::from_lengths_and_radii(
{0.0f, 2.0f, 4.0f, 6.0f, 8.0f},
{1.0f, 0.5f, 0.5f, 0.5f, 1.0f}
)
rerun::Rgba32(255, 0, 0),
rerun::Rgba32(188, 188, 0),
rerun::Rgba32(0, 255, 0),
rerun::Rgba32(0, 188, 188),
rerun::Rgba32(0, 0, 255),
})
{0.0f, 0.0f, 0.0f},
{2.0f, 0.0f, 0.0f},
{4.0f, 0.0f, 0.0f},
{6.0f, 0.0f, 0.0f},
{8.0f, 0.0f, 0.0f},
})
rerun::RotationAxisAngle({1.0f, 0.0f, 0.0f}, rerun::Angle::degrees(-22.5)),
rerun::RotationAxisAngle({1.0f, 0.0f, 0.0f}, rerun::Angle::degrees(-45.0)),
rerun::RotationAxisAngle({1.0f, 0.0f, 0.0f}, rerun::Angle::degrees(-67.5)),
rerun::RotationAxisAngle({1.0f, 0.0f, 0.0f}, rerun::Angle::degrees(-90.0)),
})
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:61
Cylinders3D with_centers(const Collection< rerun::components::PoseTranslation3D > &_centers) &&
Optional centers of the cylinders.
Definition cylinders3d.hpp:222
Cylinders3D with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the cylinders.
Definition cylinders3d.hpp:254
Cylinders3D with_rotation_axis_angles(const Collection< rerun::components::PoseRotationAxisAngle > &_rotation_axis_angles) &&
Rotations via axis + angle.
Definition cylinders3d.hpp:231
static Angle degrees(float degrees_)
New angle in degrees.
Definition angle.hpp:39
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition rgba32.hpp:27
Datatype: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:21

Member Function Documentation

◆ from_lengths_and_radii()

static Cylinders3D rerun::archetypes::Cylinders3D::from_lengths_and_radii ( const Collection< rerun::components::Length > &  lengths,
const Collection< rerun::components::Radius > &  radii 
)
inlinestatic

Creates a new Cylinders3D with the given axis-aligned lengths and radii.

For multiple cylinders, you should generally follow this with Cylinders3D::with_centers() and one of the rotation methods, in order to move them apart from each other.

◆ with_centers()

Cylinders3D rerun::archetypes::Cylinders3D::with_centers ( const Collection< rerun::components::PoseTranslation3D > &  _centers) &&
inline

Optional centers of the cylinders.

If not specified, each cylinder will be centered at (0, 0, 0).

◆ with_rotation_axis_angles()

Cylinders3D rerun::archetypes::Cylinders3D::with_rotation_axis_angles ( const Collection< rerun::components::PoseRotationAxisAngle > &  _rotation_axis_angles) &&
inline

Rotations via axis + angle.

If no rotation is specified, the cylinders align with the +Z axis of the local coordinate system.

◆ with_quaternions()

Cylinders3D rerun::archetypes::Cylinders3D::with_quaternions ( const Collection< rerun::components::PoseRotationQuat > &  _quaternions) &&
inline

Rotations via quaternion.

If no rotation is specified, the cylinders align with the +Z axis of the local coordinate system.

◆ with_many_fill_mode()

Cylinders3D rerun::archetypes::Cylinders3D::with_many_fill_mode ( const Collection< rerun::components::FillMode > &  _fill_mode) &&
inline

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

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

◆ with_show_labels()

Cylinders3D rerun::archetypes::Cylinders3D::with_show_labels ( const rerun::components::ShowLabels _show_labels) &&
inline

Whether the text labels should be shown.

If not set, labels will automatically appear when there is exactly one label for this entity or the number of instances on this entity is under a certain threshold.

◆ with_many_show_labels()

Cylinders3D rerun::archetypes::Cylinders3D::with_many_show_labels ( const Collection< rerun::components::ShowLabels > &  _show_labels) &&
inline

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

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

◆ with_class_ids()

Cylinders3D rerun::archetypes::Cylinders3D::with_class_ids ( const Collection< rerun::components::ClassId > &  _class_ids) &&
inline

Optional class ID for the ellipsoids.

The class ID provides colors and labels if not specified explicitly.

◆ columns() [1/2]

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

◆ centers

std::optional<ComponentBatch> rerun::archetypes::Cylinders3D::centers

Optional centers of the cylinders.

If not specified, each cylinder will be centered at (0, 0, 0).

◆ rotation_axis_angles

std::optional<ComponentBatch> rerun::archetypes::Cylinders3D::rotation_axis_angles

Rotations via axis + angle.

If no rotation is specified, the cylinders align with the +Z axis of the local coordinate system.

◆ quaternions

std::optional<ComponentBatch> rerun::archetypes::Cylinders3D::quaternions

Rotations via quaternion.

If no rotation is specified, the cylinders align with the +Z axis of the local coordinate system.

◆ show_labels

std::optional<ComponentBatch> rerun::archetypes::Cylinders3D::show_labels

Whether the text labels should be shown.

If not set, labels will automatically appear when there is exactly one label for this entity or the number of instances on this entity is under a certain threshold.

◆ class_ids

std::optional<ComponentBatch> rerun::archetypes::Cylinders3D::class_ids

Optional class ID for the ellipsoids.

The class ID provides colors and labels if not specified explicitly.

◆ Descriptor_lengths

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_lengths
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:lengths", Loggable<rerun::components::Length>::ComponentType
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition cylinders3d.hpp:123

ComponentDescriptor for the lengths field.

◆ Descriptor_radii

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_radii
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:radii", Loggable<rerun::components::Radius>::ComponentType
)

ComponentDescriptor for the radii field.

◆ Descriptor_centers

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_centers
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:centers",
Loggable<rerun::components::PoseTranslation3D>::ComponentType
)

ComponentDescriptor for the centers field.

◆ Descriptor_rotation_axis_angles

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_rotation_axis_angles
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:rotation_axis_angles",
Loggable<rerun::components::PoseRotationAxisAngle>::ComponentType
)

ComponentDescriptor for the rotation_axis_angles field.

◆ Descriptor_quaternions

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_quaternions
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:quaternions",
Loggable<rerun::components::PoseRotationQuat>::ComponentType
)

ComponentDescriptor for the quaternions field.

◆ Descriptor_colors

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_colors
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:colors", Loggable<rerun::components::Color>::ComponentType
)

ComponentDescriptor for the colors field.

◆ Descriptor_line_radii

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_line_radii
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:line_radii",
Loggable<rerun::components::Radius>::ComponentType
)

ComponentDescriptor for the line_radii field.

◆ Descriptor_fill_mode

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_fill_mode
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:fill_mode",
Loggable<rerun::components::FillMode>::ComponentType
)

ComponentDescriptor for the fill_mode field.

◆ Descriptor_labels

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_labels
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:labels", Loggable<rerun::components::Text>::ComponentType
)

ComponentDescriptor for the labels field.

◆ Descriptor_show_labels

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_show_labels
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:show_labels",
Loggable<rerun::components::ShowLabels>::ComponentType
)

ComponentDescriptor for the show_labels field.

◆ Descriptor_class_ids

constexpr auto rerun::archetypes::Cylinders3D::Descriptor_class_ids
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "Cylinders3D:class_ids",
Loggable<rerun::components::ClassId>::ComponentType
)

ComponentDescriptor for the class_ids field.


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