Rerun C++ SDK
|
Archetype: A prepacked 3D asset (.gltf
, .glb
, .obj
, etc.).
More...
#include <rerun/archetypes/asset3d.hpp>
Public Types | |
using | IndicatorComponent = 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_transform (rerun::components::OutOfTreeTransform3D _transform) && |
An out-of-tree transform. | |
size_t | num_instances () const |
Returns the number of primary instances of this archetype. | |
Static Public Member Functions | |
static std::optional< rerun::components::MediaType > | guess_media_type (const std::filesystem::path &path) |
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::OutOfTreeTransform3D > | transform |
An out-of-tree transform. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] = "rerun.components.Asset3DIndicator" |
Archetype: A prepacked 3D asset (.gltf
, .glb
, .obj
, etc.).
|
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/obj
(.mtl material files are not supported yet, references are silently ignored)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 |
An out-of-tree transform.
Applies a transformation to the asset itself without impacting its children.
std::optional<rerun::components::MediaType> rerun::archetypes::Asset3D::media_type |
The Media Type of the asset.
Supported values:
model/gltf-binary
model/obj
(.mtl material files are not supported yet, references are silently ignored)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::OutOfTreeTransform3D> rerun::archetypes::Asset3D::transform |
An out-of-tree transform.
Applies a transformation to the asset itself without impacting its children.