pub enum ShapeGeometry {
Circle(Circle),
Capsule(Capsule),
Segment(Segment),
Polygon(Polygon),
ChainSegment(ChainSegment),
}Expand description
The geometry payload of a shape. The C b2Shape stores a b2ShapeType tag
plus a union of the concrete geometries; in Rust that pairing is an enum.
The internal shape module embeds this.
Variants§
Implementations§
Source§impl ShapeGeometry
impl ShapeGeometry
Sourcepub fn shape_type(&self) -> ShapeType
pub fn shape_type(&self) -> ShapeType
The shape type tag for this geometry.
Trait Implementations§
Source§impl Clone for ShapeGeometry
impl Clone for ShapeGeometry
Source§fn clone(&self) -> ShapeGeometry
fn clone(&self) -> ShapeGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShapeGeometry
Source§impl Debug for ShapeGeometry
impl Debug for ShapeGeometry
Source§impl PartialEq for ShapeGeometry
impl PartialEq for ShapeGeometry
impl StructuralPartialEq for ShapeGeometry
Auto Trait Implementations§
impl Freeze for ShapeGeometry
impl RefUnwindSafe for ShapeGeometry
impl Send for ShapeGeometry
impl Sync for ShapeGeometry
impl Unpin for ShapeGeometry
impl UnsafeUnpin for ShapeGeometry
impl UnwindSafe for ShapeGeometry
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