Skip to main content

Scene3d

Struct Scene3d 

Source
pub struct Scene3d { /* private fields */ }
Expand description

Ready 3D visual state rendered with one camera and depth attachment.

Implementations§

Source§

impl Scene3d

Source

pub fn new(background: Color) -> Result<Self, Scene3dError>

Creates an empty scene with a normalized opaque clear color.

Source

pub fn try_push( &mut self, mesh: &RetainedMesh3d, transform: Transform3d, style: MeshStyle3d, ) -> Result<Object3dId, Scene3dError>

Adds a retained object and returns a stable handle for later updates.

Source

pub const fn background(&self) -> Color

Returns the finite opaque target clear color.

Source

pub fn instances(&self) -> &[Mesh3dInstance]

Returns objects in host insertion order; depth determines visibility.

Source

pub fn object_count(&self) -> usize

Returns the number of independently transformed objects.

Source

pub fn visible_object_count(&self) -> usize

Returns objects currently participating in rendering.

Source

pub fn set_transform( &mut self, object_id: Object3dId, transform: Transform3d, ) -> Result<(), Scene3dError>

Replaces one object’s model transform without touching retained topology.

Source

pub fn set_style( &mut self, object_id: Object3dId, style: MeshStyle3d, ) -> Result<(), Scene3dError>

Replaces one object’s complete extensible visual material bundle.

Source

pub fn set_visible( &mut self, object_id: Object3dId, visible: bool, ) -> Result<(), Scene3dError>

Shows or hides one object without releasing retained topology.

Source

pub fn set_wireframe( &mut self, object_id: Object3dId, wireframe: Option<WireframeStyle3d>, ) -> Result<(), Scene3dError>

Enables or disables explicit visible/hidden edges for one object.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,