Class b2Shape
A collision shape, the geometry a b2Fixture carries. Shapes hold no body: a fixture clones the shape it is created from, so changing a shape object afterwards changes nothing in the world.
public abstract class b2Shape
- Inheritance
-
b2Shape
- Derived
- Inherited Members
- Extension Methods
Remarks
Box2D's shape kinds outside this port (chains) are left out because no Gymnasium environment uses them; the internal abstract members keep users from deriving their own shapes, which the contact factory could not collide.
Reference: Box2D/Collision/Shapes/b2Shape.h.
Properties
ChildCount
The number of child primitives (pybox2d's childCount; 1 for every shape here).
public int ChildCount { get; }
Property Value
Radius
The radius (pybox2d's radius): a circle's, or the polygon and edge skin, b2_polygonRadius.
public float Radius { get; set; }
Property Value
Type
The shape kind (pybox2d's type).
public b2ShapeType Type { get; }