pub struct GeometryId(/* private fields */);Expand description
BufferGeometry.id — three.js’ module-level let _id = 0 counter, handed
out in construction order, exactly as MaterialId
is for materials.
The renderer keys its uploaded GPU buffers on this. It has to be an
identity, and a never-reused one: the previous key was
Rc::as_ptr( &geometry ), and an address is reused the moment the geometry
behind it is dropped, so a new geometry allocated at a dead one’s address
inherited its vertex buffers — a panic when the attribute sets differed and
the wrong shape, silently, when they did not (issue #58).
As with MaterialId, clone() mints a fresh id: a cloned geometry is a
new object in three.js (new BufferGeometry().copy( this )), and one that
may be mutated away from its source before it is ever drawn, so it must not
be served the source’s upload.
Implementations§
Trait Implementations§
Source§impl Clone for GeometryId
A fresh id, never a copy — see the type’s docs.
impl Clone for GeometryId
A fresh id, never a copy — see the type’s docs.
Source§impl Debug for GeometryId
impl Debug for GeometryId
Source§impl Default for GeometryId
impl Default for GeometryId
impl Eq for GeometryId
Source§impl Hash for GeometryId
impl Hash for GeometryId
Source§impl Ord for GeometryId
impl Ord for GeometryId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for GeometryId
impl PartialEq for GeometryId
Source§impl PartialOrd for GeometryId
impl PartialOrd for GeometryId
impl StructuralPartialEq for GeometryId
Auto Trait Implementations§
impl Freeze for GeometryId
impl RefUnwindSafe for GeometryId
impl Send for GeometryId
impl Sync for GeometryId
impl Unpin for GeometryId
impl UnsafeUnpin for GeometryId
impl UnwindSafe for GeometryId
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
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.