pub struct Scene3D {
pub objects: BTreeMap<String, Object3D>,
pub materials: BTreeMap<String, Material3D>,
pub cameras: BTreeMap<String, Camera3D>,
pub lights: BTreeMap<String, Light3D>,
pub rigs: BTreeMap<String, Rig>,
pub animations: BTreeMap<String, AnimationClip>,
}Expand description
A 3D scene / world container.
Fields§
§objects: BTreeMap<String, Object3D>§materials: BTreeMap<String, Material3D>§cameras: BTreeMap<String, Camera3D>§lights: BTreeMap<String, Light3D>§rigs: BTreeMap<String, Rig>§animations: BTreeMap<String, AnimationClip>Implementations§
Source§impl Scene3D
impl Scene3D
Sourcepub fn add_object(&mut self, obj: Object3D)
pub fn add_object(&mut self, obj: Object3D)
Add an object to the scene.
Sourcepub fn add_material(&mut self, mat: Material3D)
pub fn add_material(&mut self, mat: Material3D)
Add a material asset.
Sourcepub fn add_camera(&mut self, cam: Camera3D)
pub fn add_camera(&mut self, cam: Camera3D)
Add a camera.
Sourcepub fn add_animation(&mut self, clip: AnimationClip)
pub fn add_animation(&mut self, clip: AnimationClip)
Add an animation clip.
Sourcepub fn object_count(&self) -> usize
pub fn object_count(&self) -> usize
Number of objects in the scene.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scene3D
impl RefUnwindSafe for Scene3D
impl Send for Scene3D
impl Sync for Scene3D
impl Unpin for Scene3D
impl UnsafeUnpin for Scene3D
impl UnwindSafe for Scene3D
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.