pub struct Scene {
Show 18 fields pub format: String, pub creator: Option<String>, pub status: Status, pub representations: Option<Vec<Representation>>, pub configuration_id: Option<String>, pub configuration_link: Option<String>, pub catalog: Option<Vec<CatalogEntry>>, pub base_path: Option<String>, pub hashes: HashMap<String, String>, pub redirections: Option<HashMap<String, String>>, pub scripts: Option<Vec<Script>>, pub geometries: Option<HashMap<String, Geometry>>, pub geometry_indexes: Option<HashMap<String, String>>, pub materials: Option<HashMap<String, Material>>, pub material_indexes: Option<HashMap<String, String>>, pub camera: Option<Camera>, pub products: Vec<Product>, pub com_products: Option<Vec<Commercial>>,
}
Expand description

The Scene is the central part of an OC data set. Each OC data set contains exactly one.

A Scene may contain initial product representations and/or updates.

A Scene may contain products that should be inserted instantly, as well as add-ons to be inserted later on and shown as placeholders before.

Fields

format: String

The mandatory attribute format must be structured as follows:

“OpenConfiguration_. [PRE]”

Legal combinations of . are: 1.0, 1.1 and 1.2

The optional postfix “ PRE“ marks a preliminary format.

creator: Option<String>

This optional attribute contains informal information about the creator of this OC data set.

status: Status

This attribute contains general status information about the Scene contents.

representations: Option<Vec<Representation>>

The representations of the scene. Legal values are:

“Standard” - Real-time mesh data.

“CAD_BIM” - CAD/BIM volume bodies.

“Photo” - High-resolution mesh data.

This just lists possible usages and can be used for fast filtering, it does not influence the actual data. A “Photo” renderer would still use meshes attached as geometry.mesh

configuration_id: Option<String>

This optional attribute may contain the id of a server-side session.

configuration_link: Option<String>

This optional attribute may contain the link of the original configuration.

catalog: Option<Vec<CatalogEntry>>

Optional, embedded catalog.

base_path: Option<String>

The optional attribute provides a partial URI to be added to all relative asset uris. A valid base path should normally start with https:// or file://, and end with either a slash or the path separator character of the operating system. “Relative” basePath is always relative to the scene.json path, not to an application/deployment specific one! example.configurator.com/assets/oc/scene.json containing “tex.jpg” basepathes “gfx”, “./gfx”, “/gfx” are all resolved to the same example.configurator.com/assets/oc/gfx/tex.jpg

hashes: HashMap<String, String>

The mandatory attribute provides unique content hashes for assets that are directly referenced in the OC data set. The specific hash algorithm is unspecified. It may be an MD5 hash of the binary content for instance. But low-res assets may use the same hash as the originals, they are derived from. So, the only operation that is legal for hash, is to compare them with an optionally existing one.

All assets should have an entry here as downloaders may iterate through this record rather than exploring the other data entities.

redirections: Option<HashMap<String, String>>

Redirections maybe needed to convert absolute asset urls into file names, especially when compiling a self-contained OC zip. The attribute is optional.

Version: OC 1.3

scripts: Option<Vec<Script>>

The optional attribute contains all client-side JavaScript packages.

geometries: Option<HashMap<String, Geometry>>

The optional attribute provides an embedded geometry index.

IGXC Compatibility: now it’s embedded, self-contained geometries rather than just geometry names. Thus, separate assignments of geometry normal maps, deformations, etc. are removed. Also, the embedded geometry definition is optional. There can be external geometry definitions, too.

geometry_indexes: Option<HashMap<String, String>>

The optional attribute provides links to external geometry indices. The key should be a two-level technical namespace to speedup the geometry lookup. The value must be an absolute or relative URI. The content of the value, must be de-serialized as GeometryIndex.

IGXC Compatibility: In IGXC, this concept did not exist.

materials: Option<HashMap<String, Material>>

The optional attribute provides an embedded geometry index.

IGXC Compatibility: The embedded material definition is optional. There can be external material definitions, too.

material_indexes: Option<HashMap<String, String>>

The optional attribute provides links to external geometry indices. The key should be a two-level technical namespace to speedup the geometry lookup. The value must be an absolute or relative URI. The content of the value, must be de-serialized as MaterialIndex.

IGXC Compatibility: In IGXC, this concept did not exist.

camera: Option<Camera>

An optional camera setup to restore the camera in another viewer.

products: Vec<Product>

The mandatory attribute contains the products to be inserted into/ updated in the client world.

IGXC Compatibility: in IGXC, there is only one product.

com_products: Option<Vec<Commercial>>

Commercial products without an own visual representation.

Version: OC 1.3

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.