pub struct SceneGraph {
pub root: SceneNode,
}Expand description
A scene graph with a single root node.
Fields§
§root: SceneNodeImplementations§
Source§impl SceneGraph
impl SceneGraph
Sourcepub fn new(root_name: impl Into<String>) -> Self
pub fn new(root_name: impl Into<String>) -> Self
Create a new scene graph whose root has the given name.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Total node count (root + all descendants).
Sourcepub fn mesh_count(&self) -> usize
pub fn mesh_count(&self) -> usize
Total mesh count across all nodes.
Auto Trait Implementations§
impl Freeze for SceneGraph
impl RefUnwindSafe for SceneGraph
impl Send for SceneGraph
impl Sync for SceneGraph
impl Unpin for SceneGraph
impl UnsafeUnpin for SceneGraph
impl UnwindSafe for SceneGraph
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> 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