6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/albedo_factor.hpp"
10#include "../components/blob.hpp"
11#include "../components/media_type.hpp"
12#include "../indicator_component.hpp"
13#include "../result.hpp"
77 static constexpr const char IndicatorComponentName[] =
"rerun.components.Asset3DIndicator";
97 std::optional<rerun::components::MediaType>
media_type = {}
126 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
136 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
144 template <
typename T>
149 struct AsComponents<archetypes::Asset3D> {
151 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:76
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:54
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:95
std::optional< rerun::components::MediaType > media_type
The Media Type of the asset.
Definition asset3d.hpp:68
static Result< Asset3D > from_file(const std::filesystem::path &path)
Creates a new Asset3D from the file contents at path.
std::optional< rerun::components::AlbedoFactor > albedo_factor
A color multiplier applied to the whole asset.
Definition asset3d.hpp:74
rerun::components::Blob blob
The asset's bytes.
Definition asset3d.hpp:56
Asset3D with_media_type(rerun::components::MediaType _media_type) &&
The Media Type of the asset.
Definition asset3d.hpp:123
Asset3D with_albedo_factor(rerun::components::AlbedoFactor _albedo_factor) &&
A color multiplier applied to the whole asset.
Definition asset3d.hpp:133
Component: A color multiplier, usually applied to a whole entity, e.g. a mesh.
Definition albedo_factor.hpp:14
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