6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/blob.hpp"
10#include "../components/media_type.hpp"
11#include "../indicator_component.hpp"
12#include "../result.hpp"
72 static constexpr const char IndicatorComponentName[] =
"rerun.components.Asset3DIndicator";
92 std::optional<rerun::components::MediaType>
media_type = {}
100 static std::optional<rerun::components::MediaType> guess_media_type(
101 const std::filesystem::path& path
125 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
133 template <
typename T>
138 struct AsComponents<archetypes::Asset3D> {
140 static Result<std::vector<ComponentBatch>> serialize(
const archetypes::Asset3D& archetype);
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:72
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: A prepacked 3D asset (.gltf, .glb, .obj, .stl, etc.).
Definition asset3d.hpp:55
static Asset3D from_bytes(rerun::Collection< uint8_t > bytes, std::optional< rerun::components::MediaType > media_type={})
Creates a new Asset3D from the given bytes.
Definition asset3d.hpp:90
std::optional< rerun::components::MediaType > media_type
The Media Type of the asset.
Definition asset3d.hpp:69
static Result< Asset3D > from_file(const std::filesystem::path &path)
Creates a new Asset3D from the file contents at path.
rerun::components::Blob blob
The asset's bytes.
Definition asset3d.hpp:57
Asset3D with_media_type(rerun::components::MediaType _media_type) &&
The Media Type of the asset.
Definition asset3d.hpp:122
Component: A binary blob of data.
Definition blob.hpp:16
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30