pub struct SceneBundle {
pub format: String,
pub version: u16,
pub document: SceneDocument,
pub meshes: BTreeMap<EntityId, Mesh>,
}Expand description
An independently editable scene snapshot with all local meshes embedded.
Fields§
§format: StringWire-format name, konjure.scene-bundle.
version: u16Wire-format version, currently one.
document: SceneDocumentLocal transforms, hierarchy, and materials in SDK conventions.
meshes: BTreeMap<EntityId, Mesh>Local meshes keyed by entity ID. Groups have no mesh entry.
Implementations§
Source§impl SceneBundle
impl SceneBundle
Sourcepub fn new(
document: SceneDocument,
meshes: BTreeMap<EntityId, Mesh>,
) -> Result<Self, Diagnostic>
pub fn new( document: SceneDocument, meshes: BTreeMap<EntityId, Mesh>, ) -> Result<Self, Diagnostic>
Constructs and validates an owned scene snapshot.
§Errors
Rejects invalid scenes, missing meshes, malformed buffers and exceeded budgets.
Trait Implementations§
Source§impl Clone for SceneBundle
impl Clone for SceneBundle
Source§fn clone(&self) -> SceneBundle
fn clone(&self) -> SceneBundle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneBundle
impl Debug for SceneBundle
Source§impl<'de> Deserialize<'de> for SceneBundle
impl<'de> Deserialize<'de> for SceneBundle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SceneBundle
impl PartialEq for SceneBundle
Source§fn eq(&self, other: &SceneBundle) -> bool
fn eq(&self, other: &SceneBundle) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SceneBundle
impl Serialize for SceneBundle
impl StructuralPartialEq for SceneBundle
Auto Trait Implementations§
impl Freeze for SceneBundle
impl RefUnwindSafe for SceneBundle
impl Send for SceneBundle
impl Sync for SceneBundle
impl Unpin for SceneBundle
impl UnsafeUnpin for SceneBundle
impl UnwindSafe for SceneBundle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more