pub struct ConvexPolyhedronViewMut<'a> {
pub raw: &'a mut ConvexPolyhedron,
}Expand description
Read-write access to the properties of a convex polyhedron.
Parry does not offer any in-place modification of convex polyhedra, so this view is read-only in practice.
Fields§
§raw: &'a mut ConvexPolyhedronThe raw shape from Rapier.
Implementations§
Source§impl<'a> ConvexPolyhedronViewMut<'a>
impl<'a> ConvexPolyhedronViewMut<'a>
Sourcepub fn points(&self) -> impl ExactSizeIterator<Item = Vect> + '_
pub fn points(&self) -> impl ExactSizeIterator<Item = Vect> + '_
The vertices of this convex polyhedron.
Sourcepub fn num_vertices(&self) -> usize
pub fn num_vertices(&self) -> usize
The number of vertices of this convex polyhedron.
Sourcepub fn edges(&self) -> impl Iterator<Item = u32> + '_
pub fn edges(&self) -> impl Iterator<Item = u32> + '_
The indices of the edges of this convex polyhedron.
The internal storage also contains edges between coplanar triangles merged into the same polygonal face; those are skipped here.
Sourcepub fn vertex_adjacent_faces(&self, i: usize) -> &[u32]
pub fn vertex_adjacent_faces(&self, i: usize) -> &[u32]
The indices of the faces adjacent to the i-th vertex.
Sourcepub fn edge_vertices(&self, i: usize) -> [u32; 2]
pub fn edge_vertices(&self, i: usize) -> [u32; 2]
The indices of the two endpoints of the i-th edge (indexing Self::points).
Sourcepub fn edge_faces(&self, i: usize) -> [u32; 2]
pub fn edge_faces(&self, i: usize) -> [u32; 2]
The indices of the two faces adjacent to the i-th edge.
Sourcepub fn edge_direction(&self, i: usize) -> Vect
pub fn edge_direction(&self, i: usize) -> Vect
The unit direction of the i-th edge, from its first to its second vertex.
Sourcepub fn face_normal(&self, i: usize) -> Vect
pub fn face_normal(&self, i: usize) -> Vect
The outward unit normal of the i-th face.
Sourcepub fn face_vertices(&self, i: usize) -> &[u32]
pub fn face_vertices(&self, i: usize) -> &[u32]
The indices of the vertices of the i-th face (indexing Self::points).
Sourcepub fn face_edges(&self, i: usize) -> &[u32]
pub fn face_edges(&self, i: usize) -> &[u32]
The indices of the edges of the i-th face.
Auto Trait Implementations§
impl<'a> !UnwindSafe for ConvexPolyhedronViewMut<'a>
impl<'a> Freeze for ConvexPolyhedronViewMut<'a>
impl<'a> RefUnwindSafe for ConvexPolyhedronViewMut<'a>
impl<'a> Send for ConvexPolyhedronViewMut<'a>
impl<'a> Sync for ConvexPolyhedronViewMut<'a>
impl<'a> Unpin for ConvexPolyhedronViewMut<'a>
impl<'a> UnsafeUnpin for ConvexPolyhedronViewMut<'a>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
impl<T> ConditionalSend for Twhere
T: Send,
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> MaybeSync for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Settings for T
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>
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.