#[repr(C)]pub struct b2Polygon {
pub vertices: [b2Vec2; 8],
pub normals: [b2Vec2; 8],
pub centroid: b2Vec2,
pub radius: f32,
pub count: c_int,
}Expand description
A solid convex polygon. It is assumed that the interior of the polygon is to the left of each edge. Polygons have a maximum number of vertices equal to B2_MAX_POLYGON_VERTICES. In most cases you should not need many vertices for a convex polygon. @warning DO NOT fill this out manually, instead use a helper function like b2MakePolygon or b2MakeBox.
Fields§
§vertices: [b2Vec2; 8]The polygon vertices
normals: [b2Vec2; 8]The outward normal vectors of the polygon sides
centroid: b2Vec2The centroid of the polygon
radius: f32The external radius for rounded polygons
count: c_intThe number of polygon vertices
Trait Implementations§
Auto Trait Implementations§
impl Freeze for b2Polygon
impl RefUnwindSafe for b2Polygon
impl Send for b2Polygon
impl Sync for b2Polygon
impl Unpin for b2Polygon
impl UnwindSafe for b2Polygon
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)