pub struct SceneFile {
pub trees: BTreeMap<String, DynamicObject>,
}Expand description
A scene file containing one or more named CSG trees.
Trees are stored as a BTreeMap keyed by label so that object names are
preserved in the serialized file and ordering is deterministic.
When loading, a bare DynamicObject is automatically promoted to a
single-tree SceneFile via SceneFile::from_single.
Fields§
§trees: BTreeMap<String, DynamicObject>Implementations§
Source§impl SceneFile
impl SceneFile
Sourcepub fn from_single(obj: DynamicObject) -> Self
pub fn from_single(obj: DynamicObject) -> Self
Wrap a single DynamicObject as a one-tree scene file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SceneFile
impl<'de> Deserialize<'de> for SceneFile
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
impl StructuralPartialEq for SceneFile
Auto Trait Implementations§
impl Freeze for SceneFile
impl RefUnwindSafe for SceneFile
impl Send for SceneFile
impl Sync for SceneFile
impl Unpin for SceneFile
impl UnsafeUnpin for SceneFile
impl UnwindSafe for SceneFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more