pub struct CollisionShape { /* private fields */ }Expand description
Collision volume for physics
Collision shapes define simplified geometry for collision detection.
Implementations§
Source§impl CollisionShape
impl CollisionShape
Sourcepub fn node(&self) -> Ref<'_, Node>
pub fn node(&self) -> Ref<'_, Node>
Base node data Borrows the field in place — no copy, no allocation.
pub fn node_mut(&mut self) -> RefMut<'_, Node>
Sourcepub fn type_(&self) -> CollisionShapeShapeType
pub fn type_(&self) -> CollisionShapeShapeType
Shape type
pub fn set_type_(&mut self, value: CollisionShapeShapeType)
Sourcepub fn vertices(&self) -> &[Vector3f]
pub fn vertices(&self) -> &[Vector3f]
Shape vertices (box only)
Zero-copy view of the underlying std::vector.
Sourcepub fn vertices_mut(&mut self) -> &mut [Vector3f]
pub fn vertices_mut(&mut self) -> &mut [Vector3f]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_vertices(&mut self, values: &[Vector3f])
pub fn resize_vertices(&mut self, count: usize)
pub fn set_radius(&mut self, value: f32)
Trait Implementations§
Source§impl Debug for CollisionShape
impl Debug for CollisionShape
Source§impl Default for CollisionShape
impl Default for CollisionShape
Source§impl Drop for CollisionShape
impl Drop for CollisionShape
impl Send for CollisionShape
Auto Trait Implementations§
impl !Sync for CollisionShape
impl Freeze for CollisionShape
impl RefUnwindSafe for CollisionShape
impl Unpin for CollisionShape
impl UnsafeUnpin for CollisionShape
impl UnwindSafe for CollisionShape
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