Struct ModelPrimitive

Struct Documentation

struct ModelPrimitive

A primitive representing a 3D model file loaded from an external URL or embedded data.

Public Members

std::optional<Pose> pose

Origin of model relative to reference frame.

std::optional<Vector3> scale

Scale factor to apply to the model along each axis.

std::optional<Color> color

Solid color to use for the whole model if override_color is true.

bool override_color = false

Whether to use the color specified in color instead of any materials embedded in the original model.

std::string url

URL pointing to model file. One of url or data should be provided.

std::string media_type

Media type of embedded model (e.g. model/gltf-binary). Required if data is provided instead of url. Overrides the inferred media type if url is provided.

std::vector<std::byte> data

Embedded model. One of url or data should be provided. If data is provided, media_type must be set to indicate the type of the data.