pub enum VoxelPrimitiveGeometry {
PseudoBall,
PseudoCube,
}
Expand description
The primitive shape all voxels from a Voxels
is given.
Variants§
PseudoBall
Each voxel is modeled as a pseudo-ball, i.e., in flat areas it will act like a planar surface but corners and edges will be rounded like a sphere.
This is an approximation that is particularly relevant if the voxels are small and in large number. This can significantly improve collision-detection performances (as well as solver performances by generating less contacts points). However,this can introduce visual artifacts around edges and corners where objects in contact with the voxel will appear to slightly penetrate the corners/edges due to the spherical approximation.
PseudoCube
Each voxel is modeled as a pseudo-cube, i.e., in flat areas it will act like a planar surface but corner and edges will be sharp like a cube.
This is what you would expect for the collision to match the rendered voxels. Use
VoxelPrimitiveGeometry::PseudoBall
instead if some approximation around corners are acceptable
in exchange for better performances.
Trait Implementations§
Source§impl Clone for VoxelPrimitiveGeometry
impl Clone for VoxelPrimitiveGeometry
Source§fn clone(&self) -> VoxelPrimitiveGeometry
fn clone(&self) -> VoxelPrimitiveGeometry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VoxelPrimitiveGeometry
impl Debug for VoxelPrimitiveGeometry
Source§impl Default for VoxelPrimitiveGeometry
impl Default for VoxelPrimitiveGeometry
Source§fn default() -> VoxelPrimitiveGeometry
fn default() -> VoxelPrimitiveGeometry
Source§impl PartialEq for VoxelPrimitiveGeometry
impl PartialEq for VoxelPrimitiveGeometry
impl Copy for VoxelPrimitiveGeometry
impl StructuralPartialEq for VoxelPrimitiveGeometry
Auto Trait Implementations§
impl Freeze for VoxelPrimitiveGeometry
impl RefUnwindSafe for VoxelPrimitiveGeometry
impl Send for VoxelPrimitiveGeometry
impl Sync for VoxelPrimitiveGeometry
impl Unpin for VoxelPrimitiveGeometry
impl UnwindSafe for VoxelPrimitiveGeometry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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<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>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.