Rerun C++ SDK
|
Archetype: A prepacked 3D asset (.gltf
, .glb
, .obj
, .stl
, etc.).
More...
#include <rerun/archetypes/asset3d.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 | |
Asset3D (Asset3D &&other)=default | |
Asset3D (rerun::components::Blob _blob) | |
Asset3D | with_media_type (rerun::components::MediaType _media_type) && |
The Media Type of the asset. | |
Asset3D | with_albedo_factor (rerun::components::AlbedoFactor _albedo_factor) && |
A color multiplier applied to the whole asset. | |
Static Public Member Functions | |
static Result< Asset3D > | from_file (const std::filesystem::path &path) |
Creates a new Asset3D from the file contents at path . | |
static Asset3D | from_bytes (rerun::Collection< uint8_t > bytes, std::optional< rerun::components::MediaType > media_type={}) |
Creates a new Asset3D from the given bytes . | |
Public Attributes | |
rerun::components::Blob | blob |
The asset's bytes. | |
std::optional< rerun::components::MediaType > | media_type |
The Media Type of the asset. | |
std::optional< rerun::components::AlbedoFactor > | albedo_factor |
A color multiplier applied to the whole asset. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] = "rerun.components.Asset3DIndicator" |
Archetype: A prepacked 3D asset (.gltf
, .glb
, .obj
, .stl
, etc.).
See also archetypes::Mesh3D
.
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.
|
static |
Creates a new Asset3D
from the file contents at path
.
The MediaType
will be guessed from the file extension.
If no MediaType
can be guessed at the moment, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
|
inlinestatic |
Creates a new Asset3D
from the given bytes
.
If no MediaType
is specified, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
|
inline |
The Media Type of the asset.
Supported values:
model/gltf-binary
model/gltf+json
model/obj
(.mtl material files are not supported yet, references are silently ignored)model/stl
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
|
inline |
A color multiplier applied to the whole asset.
For mesh who already have albedo_factor
in materials, it will be overwritten by actual albedo_factor
of archetypes::Asset3D
(if specified).
std::optional<rerun::components::MediaType> rerun::archetypes::Asset3D::media_type |
The Media Type of the asset.
Supported values:
model/gltf-binary
model/gltf+json
model/obj
(.mtl material files are not supported yet, references are silently ignored)model/stl
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
std::optional<rerun::components::AlbedoFactor> rerun::archetypes::Asset3D::albedo_factor |
A color multiplier applied to the whole asset.
For mesh who already have albedo_factor
in materials, it will be overwritten by actual albedo_factor
of archetypes::Asset3D
(if specified).