pub struct MeshCollection { /* private fields */ }Expand description
Collection of mesh data for returning multiple meshes
Implementations§
Source§impl MeshCollection
impl MeshCollection
Sourcepub fn get(&self, index: usize) -> Option<MeshDataJs>
pub fn get(&self, index: usize) -> Option<MeshDataJs>
Get mesh at index
Sourcepub fn total_vertices(&self) -> usize
pub fn total_vertices(&self) -> usize
Get total vertex count across all meshes
Sourcepub fn total_triangles(&self) -> usize
pub fn total_triangles(&self) -> usize
Get total triangle count across all meshes
Source§impl MeshCollection
impl MeshCollection
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create new collection with capacity hint
Sourcepub fn add(&mut self, mesh: MeshDataJs)
pub fn add(&mut self, mesh: MeshDataJs)
Add a mesh to the collection
Sourcepub fn from_vec(meshes: Vec<MeshDataJs>) -> Self
pub fn from_vec(meshes: Vec<MeshDataJs>) -> Self
Create from vec of meshes
Sourcepub fn apply_rtc_offset(&mut self, x: f64, y: f64, z: f64)
pub fn apply_rtc_offset(&mut self, x: f64, y: f64, z: f64)
Apply RTC offset to all meshes (shift coordinates)
Trait Implementations§
Source§impl Clone for MeshCollection
impl Clone for MeshCollection
Source§impl Default for MeshCollection
impl Default for MeshCollection
Source§impl From<MeshCollection> for JsValue
impl From<MeshCollection> for JsValue
Source§fn from(value: MeshCollection) -> Self
fn from(value: MeshCollection) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MeshCollection
impl FromWasmAbi for MeshCollection
Source§impl IntoWasmAbi for MeshCollection
impl IntoWasmAbi for MeshCollection
Source§impl LongRefFromWasmAbi for MeshCollection
impl LongRefFromWasmAbi for MeshCollection
Source§impl OptionFromWasmAbi for MeshCollection
impl OptionFromWasmAbi for MeshCollection
Source§impl OptionIntoWasmAbi for MeshCollection
impl OptionIntoWasmAbi for MeshCollection
Source§impl RefFromWasmAbi for MeshCollection
impl RefFromWasmAbi for MeshCollection
Source§type Anchor = RcRef<MeshCollection>
type Anchor = RcRef<MeshCollection>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MeshCollection
impl RefMutFromWasmAbi for MeshCollection
Source§impl TryFromJsValue for MeshCollection
impl TryFromJsValue for MeshCollection
Source§impl VectorFromWasmAbi for MeshCollection
impl VectorFromWasmAbi for MeshCollection
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MeshCollection]>
Source§impl VectorIntoWasmAbi for MeshCollection
impl VectorIntoWasmAbi for MeshCollection
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MeshCollection]>) -> Self::Abi
Source§impl WasmDescribeVector for MeshCollection
impl WasmDescribeVector for MeshCollection
impl SupportsConstructor for MeshCollection
impl SupportsInstanceProperty for MeshCollection
impl SupportsStaticProperty for MeshCollection
Auto Trait Implementations§
impl Freeze for MeshCollection
impl RefUnwindSafe for MeshCollection
impl Send for MeshCollection
impl Sync for MeshCollection
impl Unpin for MeshCollection
impl UnwindSafe for MeshCollection
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,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.