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

Archetype: 3D ellipsoids or spheres. More...

#include <rerun/archetypes/ellipsoids3d.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

 Ellipsoids3D (Ellipsoids3D &&other)=default
 
Ellipsoids3D with_centers (Collection< rerun::components::PoseTranslation3D > _centers) &&
 Optional center positions of the ellipsoids.
 
Ellipsoids3D with_rotation_axis_angles (Collection< rerun::components::PoseRotationAxisAngle > _rotation_axis_angles) &&
 Rotations via axis + angle.
 
Ellipsoids3D with_quaternions (Collection< rerun::components::PoseRotationQuat > _quaternions) &&
 Rotations via quaternion.
 
Ellipsoids3D with_colors (Collection< rerun::components::Color > _colors) &&
 Optional colors for the ellipsoids.
 
Ellipsoids3D with_line_radii (Collection< rerun::components::Radius > _line_radii) &&
 Optional radii for the lines used when the ellipsoid is rendered as a wireframe.
 
Ellipsoids3D with_fill_mode (rerun::components::FillMode _fill_mode) &&
 Optionally choose whether the ellipsoids are drawn with lines or solid.
 
Ellipsoids3D with_labels (Collection< rerun::components::Text > _labels) &&
 Optional text labels for the ellipsoids.
 
Ellipsoids3D with_show_labels (rerun::components::ShowLabels _show_labels) &&
 Optional choice of whether the text labels should be shown by default.
 
Ellipsoids3D with_class_ids (Collection< rerun::components::ClassId > _class_ids) &&
 Optional class ID for the ellipsoids.
 

Static Public Member Functions

static Ellipsoids3D from_radii (const std::vector< float > &sizes)
 Creates new Ellipsoids3D that are spheres, with half_sizes created from radii.
 
static Ellipsoids3D from_centers_and_radii (const std::vector< datatypes::Vec3D > &centers, const std::vector< float > &radii)
 Creates new Ellipsoids3D that are spheres, with half_sizes and centers created from centers and radii.
 
static Ellipsoids3D from_half_sizes (Collection< components::HalfSize3D > half_sizes)
 Creates new Ellipsoids3D with half_sizes centered around the local origin.
 
static Ellipsoids3D from_centers_and_half_sizes (Collection< components::PoseTranslation3D > centers, Collection< components::HalfSize3D > half_sizes)
 Creates new Ellipsoids3D with centers and half_sizes.
 

Public Attributes

Collection< rerun::components::HalfSize3Dhalf_sizes
 For each ellipsoid, half of its size on its three axes.
 
std::optional< Collection< rerun::components::PoseTranslation3D > > centers
 Optional center positions of the ellipsoids.
 
std::optional< Collection< rerun::components::PoseRotationAxisAngle > > rotation_axis_angles
 Rotations via axis + angle.
 
std::optional< Collection< rerun::components::PoseRotationQuat > > quaternions
 Rotations via quaternion.
 
std::optional< Collection< rerun::components::Color > > colors
 Optional colors for the ellipsoids.
 
std::optional< Collection< rerun::components::Radius > > line_radii
 Optional radii for the lines used when the ellipsoid is rendered as a wireframe.
 
std::optional< rerun::components::FillModefill_mode
 Optionally choose whether the ellipsoids are drawn with lines or solid.
 
std::optional< Collection< rerun::components::Text > > labels
 Optional text labels for the ellipsoids.
 
std::optional< rerun::components::ShowLabelsshow_labels
 Optional choice of whether the text labels should be shown by default.
 
std::optional< Collection< rerun::components::ClassId > > class_ids
 Optional class ID for the ellipsoids.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

Detailed Description

Archetype: 3D ellipsoids or spheres.

This archetype is for ellipsoids or spheres whose size is a key part of the data (e.g. a bounding sphere). For points whose radii are for the sake of visualization, use archetypes::Points3D instead.

Note that orienting and placing the ellipsoids/spheres is handled via [archetypes.InstancePoses3D]. Some of its component are repeated here for convenience. If there's more instance poses than half sizes, the last half size will be repeated for the remaining poses.

Example

Covariance ellipsoid

image

#include <rerun.hpp>
#include <algorithm>
#include <random>
#include <vector>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_ellipsoid_simple");
rec.spawn().exit_on_failure();
const float sigmas[3] = {5.0f, 3.0f, 1.0f};
std::default_random_engine gen;
std::normal_distribution<float> dist(0.0, 1.0f);
std::vector<rerun::Position3D> points3d(50000);
std::generate(points3d.begin(), points3d.end(), [&] {
return rerun::Position3D(
sigmas[0] * dist(gen),
sigmas[1] * dist(gen),
sigmas[2] * dist(gen)
);
});
rec.log(
"points",
rerun::Points3D(points3d).with_radii(0.02f).with_colors(rerun::Rgba32(188, 77, 185))
);
rec.log(
"ellipsoid",
rerun::Ellipsoids3D::from_centers_and_half_sizes(
{
{0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f},
},
{
{sigmas[0], sigmas[1], sigmas[2]},
{3.0f * sigmas[0], 3.0f * sigmas[1], 3.0f * sigmas[2]},
}
)
rerun::Rgba32(255, 255, 0),
rerun::Rgba32(64, 64, 0),
})
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
Ellipsoids3D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the ellipsoids.
Definition ellipsoids3d.hpp:215
Archetype: A 3D point cloud with positions and optional colors, radii, labels, etc.
Definition points3d.hpp:156
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition rgba32.hpp:28

Member Function Documentation

◆ with_centers()

Ellipsoids3D rerun::archetypes::Ellipsoids3D::with_centers ( Collection< rerun::components::PoseTranslation3D _centers) &&
inline

Optional center positions of the ellipsoids.

If not specified, the centers will be at (0, 0, 0). Note that this uses a components::PoseTranslation3D which is also used by archetypes::InstancePoses3D.

◆ with_rotation_axis_angles()

Ellipsoids3D rerun::archetypes::Ellipsoids3D::with_rotation_axis_angles ( Collection< rerun::components::PoseRotationAxisAngle _rotation_axis_angles) &&
inline

Rotations via axis + angle.

If no rotation is specified, the axes of the ellipsoid align with the axes of the local coordinate system. Note that this uses a components::PoseRotationAxisAngle which is also used by archetypes::InstancePoses3D.

◆ with_quaternions()

Ellipsoids3D rerun::archetypes::Ellipsoids3D::with_quaternions ( Collection< rerun::components::PoseRotationQuat _quaternions) &&
inline

Rotations via quaternion.

If no rotation is specified, the axes of the ellipsoid align with the axes of the local coordinate system. Note that this uses a components::PoseRotationQuat which is also used by archetypes::InstancePoses3D.

◆ with_class_ids()

Ellipsoids3D rerun::archetypes::Ellipsoids3D::with_class_ids ( Collection< rerun::components::ClassId _class_ids) &&
inline

Optional class ID for the ellipsoids.

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

Member Data Documentation

◆ half_sizes

Collection<rerun::components::HalfSize3D> rerun::archetypes::Ellipsoids3D::half_sizes

For each ellipsoid, half of its size on its three axes.

If all components are equal, then it is a sphere with that radius.

◆ centers

std::optional<Collection<rerun::components::PoseTranslation3D> > rerun::archetypes::Ellipsoids3D::centers

Optional center positions of the ellipsoids.

If not specified, the centers will be at (0, 0, 0). Note that this uses a components::PoseTranslation3D which is also used by archetypes::InstancePoses3D.

◆ rotation_axis_angles

std::optional<Collection<rerun::components::PoseRotationAxisAngle> > rerun::archetypes::Ellipsoids3D::rotation_axis_angles

Rotations via axis + angle.

If no rotation is specified, the axes of the ellipsoid align with the axes of the local coordinate system. Note that this uses a components::PoseRotationAxisAngle which is also used by archetypes::InstancePoses3D.

◆ quaternions

std::optional<Collection<rerun::components::PoseRotationQuat> > rerun::archetypes::Ellipsoids3D::quaternions

Rotations via quaternion.

If no rotation is specified, the axes of the ellipsoid align with the axes of the local coordinate system. Note that this uses a components::PoseRotationQuat which is also used by archetypes::InstancePoses3D.

◆ class_ids

std::optional<Collection<rerun::components::ClassId> > rerun::archetypes::Ellipsoids3D::class_ids

Optional class ID for the ellipsoids.

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

◆ IndicatorComponentName

constexpr const char rerun::archetypes::Ellipsoids3D::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.components.Ellipsoids3DIndicator"

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