Rerun C++ SDK
|
Archetype: A 3D triangle mesh as specified by its per-mesh and per-vertex properties. More...
#include <rerun/archetypes/mesh3d.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 | |
Mesh3D (Mesh3D &&other)=default | |
Mesh3D (const Mesh3D &other)=default | |
Mesh3D & | operator= (const Mesh3D &other)=default |
Mesh3D & | operator= (Mesh3D &&other)=default |
Mesh3D (Collection< rerun::components::Position3D > _vertex_positions) | |
Mesh3D | with_vertex_positions (const Collection< rerun::components::Position3D > &_vertex_positions) && |
The positions of each vertex. | |
Mesh3D | with_triangle_indices (const Collection< rerun::components::TriangleIndices > &_triangle_indices) && |
Optional indices for the triangles that make up the mesh. | |
Mesh3D | with_vertex_normals (const Collection< rerun::components::Vector3D > &_vertex_normals) && |
An optional normal for each vertex. | |
Mesh3D | with_vertex_colors (const Collection< rerun::components::Color > &_vertex_colors) && |
An optional color for each vertex. | |
Mesh3D | with_vertex_texcoords (const Collection< rerun::components::Texcoord2D > &_vertex_texcoords) && |
An optional uv texture coordinate for each vertex. | |
Mesh3D | with_albedo_factor (const rerun::components::AlbedoFactor &_albedo_factor) && |
A color multiplier applied to the whole mesh. | |
Mesh3D | with_many_albedo_factor (const Collection< rerun::components::AlbedoFactor > &_albedo_factor) && |
This method makes it possible to pack multiple albedo_factor in a single component batch. | |
Mesh3D | with_albedo_texture_buffer (const rerun::components::ImageBuffer &_albedo_texture_buffer) && |
Optional albedo texture. | |
Mesh3D | with_many_albedo_texture_buffer (const Collection< rerun::components::ImageBuffer > &_albedo_texture_buffer) && |
This method makes it possible to pack multiple albedo_texture_buffer in a single component batch. | |
Mesh3D | with_albedo_texture_format (const rerun::components::ImageFormat &_albedo_texture_format) && |
The format of the albedo_texture_buffer , if any. | |
Mesh3D | with_many_albedo_texture_format (const Collection< rerun::components::ImageFormat > &_albedo_texture_format) && |
This method makes it possible to pack multiple albedo_texture_format in a single component batch. | |
Mesh3D | with_class_ids (const Collection< rerun::components::ClassId > &_class_ids) && |
Optional class Ids for the vertices. | |
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 Mesh3D | update_fields () |
Update only some specific fields of a Mesh3D . | |
static Mesh3D | clear_fields () |
Clear all the fields of a Mesh3D . | |
Public Attributes | |
std::optional< ComponentBatch > | vertex_positions |
The positions of each vertex. | |
std::optional< ComponentBatch > | triangle_indices |
Optional indices for the triangles that make up the mesh. | |
std::optional< ComponentBatch > | vertex_normals |
An optional normal for each vertex. | |
std::optional< ComponentBatch > | vertex_colors |
An optional color for each vertex. | |
std::optional< ComponentBatch > | vertex_texcoords |
An optional uv texture coordinate for each vertex. | |
std::optional< ComponentBatch > | albedo_factor |
A color multiplier applied to the whole mesh. | |
std::optional< ComponentBatch > | albedo_texture_buffer |
Optional albedo texture. | |
std::optional< ComponentBatch > | albedo_texture_format |
The format of the albedo_texture_buffer , if any. | |
std::optional< ComponentBatch > | class_ids |
Optional class Ids for the vertices. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] = "rerun.components.Mesh3DIndicator" |
static constexpr const char | ArchetypeName [] = "rerun.archetypes.Mesh3D" |
The name of the archetype as used in ComponentDescriptor s. | |
static constexpr auto | Descriptor_vertex_positions |
ComponentDescriptor for the vertex_positions field. | |
static constexpr auto | Descriptor_triangle_indices |
ComponentDescriptor for the triangle_indices field. | |
static constexpr auto | Descriptor_vertex_normals |
ComponentDescriptor for the vertex_normals field. | |
static constexpr auto | Descriptor_vertex_colors |
ComponentDescriptor for the vertex_colors field. | |
static constexpr auto | Descriptor_vertex_texcoords |
ComponentDescriptor for the vertex_texcoords field. | |
static constexpr auto | Descriptor_albedo_factor |
ComponentDescriptor for the albedo_factor field. | |
static constexpr auto | Descriptor_albedo_texture_buffer |
ComponentDescriptor for the albedo_texture_buffer field. | |
static constexpr auto | Descriptor_albedo_texture_format |
ComponentDescriptor for the albedo_texture_format field. | |
static constexpr auto | Descriptor_class_ids |
ComponentDescriptor for the class_ids field. | |
Archetype: A 3D triangle mesh as specified by its per-mesh and per-vertex properties.
See also archetypes::Asset3D
.
If there are multiple archetypes::InstancePoses3D
instances logged to the same entity as a mesh, an instance of the mesh will be drawn for each transform.
|
inline |
The positions of each vertex.
If no triangle_indices
are specified, then each triplet of positions is interpreted as a triangle.
|
inline |
This method makes it possible to pack multiple albedo_factor
in a single component batch.
This only makes sense when used in conjunction with columns
. with_albedo_factor
should be used when logging a single row's worth of data.
|
inline |
Optional albedo texture.
Used with the components::Texcoord2D
of the mesh.
Currently supports only sRGB(A) textures, ignoring alpha. (meaning that the tensor must have 3 or 4 channels and use the u8
format)
|
inline |
This method makes it possible to pack multiple albedo_texture_buffer
in a single component batch.
This only makes sense when used in conjunction with columns
. with_albedo_texture_buffer
should be used when logging a single row's worth of data.
|
inline |
This method makes it possible to pack multiple albedo_texture_format
in a single component batch.
This only makes sense when used in conjunction with columns
. with_albedo_texture_format
should be used when logging a single row's worth of data.
|
inline |
Optional class Ids for the vertices.
The components::ClassId
provides colors and labels if not specified explicitly.
Collection< ComponentColumn > rerun::archetypes::Mesh3D::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::Mesh3D::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::Mesh3D::vertex_positions |
The positions of each vertex.
If no triangle_indices
are specified, then each triplet of positions is interpreted as a triangle.
std::optional<ComponentBatch> rerun::archetypes::Mesh3D::albedo_texture_buffer |
Optional albedo texture.
Used with the components::Texcoord2D
of the mesh.
Currently supports only sRGB(A) textures, ignoring alpha. (meaning that the tensor must have 3 or 4 channels and use the u8
format)
std::optional<ComponentBatch> rerun::archetypes::Mesh3D::class_ids |
Optional class Ids for the vertices.
The components::ClassId
provides colors and labels if not specified explicitly.
|
staticconstexpr |
ComponentDescriptor
for the vertex_positions
field.
|
staticconstexpr |
ComponentDescriptor
for the triangle_indices
field.
|
staticconstexpr |
ComponentDescriptor
for the vertex_normals
field.
|
staticconstexpr |
ComponentDescriptor
for the vertex_colors
field.
|
staticconstexpr |
ComponentDescriptor
for the vertex_texcoords
field.
|
staticconstexpr |
ComponentDescriptor
for the albedo_factor
field.
|
staticconstexpr |
ComponentDescriptor
for the albedo_texture_buffer
field.
|
staticconstexpr |
ComponentDescriptor
for the albedo_texture_format
field.
|
staticconstexpr |
ComponentDescriptor
for the class_ids
field.