pub struct PolygonShape { /* private fields */ }
Implementations§
source§impl PolygonShape
impl PolygonShape
pub fn new() -> Self
pub fn set(&mut self, points: &[Vec2])
pub fn set_as_box(&mut self, hw: f32, hh: f32)
pub fn set_as_oriented_box( &mut self, hw: f32, hh: f32, center: &Vec2, angle: f32 )
pub fn new_with(points: &[Vec2]) -> Self
pub fn new_box(hw: f32, hh: f32) -> Self
pub fn new_oriented_box(hw: f32, hh: f32, center: &Vec2, angle: f32) -> Self
pub fn vertex_count(&self) -> i32
pub fn vertex<'a>(&'a self, index: i32) -> &'a Vec2
pub fn validate(&self) -> bool
Trait Implementations§
source§impl Drop for PolygonShape
impl Drop for PolygonShape
source§impl Shape for PolygonShape
impl Shape for PolygonShape
fn shape_type(&self) -> ShapeType
fn child_count(&self) -> i32
fn test_point(&self, xf: &Transform, p: &Vec2) -> bool
fn ray_cast( &self, input: &RayCastInput, transform: &Transform, child_index: i32 ) -> RayCastOutput
fn compute_aabb(&self, xf: &Transform, child_index: i32) -> AABB
fn compute_mass(&self, density: f32) -> MassData
Auto Trait Implementations§
impl RefUnwindSafe for PolygonShape
impl !Send for PolygonShape
impl !Sync for PolygonShape
impl Unpin for PolygonShape
impl UnwindSafe for PolygonShape
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