6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../components/blob.hpp"
9#include "../components/media_type.hpp"
10#include "../components/out_of_tree_transform3d.hpp"
11#include "../data_cell.hpp"
12#include "../indicator_component.hpp"
13#include "../result.hpp"
68 std::optional<rerun::components::OutOfTreeTransform3D>
transform;
71 static constexpr const char IndicatorComponentName[] =
"rerun.components.Asset3DIndicator";
79 static std::optional<rerun::components::MediaType> guess_media_type(
80 const std::filesystem::path& path
121 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
130 RERUN_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
143 template <
typename T>
148 struct AsComponents<archetypes::Asset3D> {
150 static Result<std::vector<DataCell>> serialize(
const archetypes::Asset3D& archetype);
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:47
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:66
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Archetype: A prepacked 3D asset (.gltf, .glb, .obj, etc.).
Definition asset3d.hpp:51
Asset3D with_transform(rerun::components::OutOfTreeTransform3D _transform) &&
An out-of-tree transform.
Definition asset3d.hpp:127
std::optional< rerun::components::MediaType > media_type
The Media Type of the asset.
Definition asset3d.hpp:63
static Result< Asset3D > from_file(const std::filesystem::path &path)
Creates a new Asset3D from the file contents at path.
std::optional< rerun::components::OutOfTreeTransform3D > transform
An out-of-tree transform.
Definition asset3d.hpp:68
rerun::components::Blob blob
The asset's bytes.
Definition asset3d.hpp:53
Asset3D with_media_type(rerun::components::MediaType _media_type) &&
The Media Type of the asset.
Definition asset3d.hpp:118
size_t num_instances() const
Returns the number of primary instances of this archetype.
Definition asset3d.hpp:134
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
Component: A binary blob of data.
Definition blob.hpp:21
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:23