Shape abstract class
abstract class Shape { /** The type of shape. Either circle or polygon. */ int type; /** Shape radius. */ double radius; /** * Constructs a new shape of unknown type. */ Shape([int type = ShapeType.UNKNOWN, double radius = 0.0]) : type = type, radius = radius { } /** * Test a point for containment in this shape. This only works for convex * shapes. * transform: the shape world transform. * point: a point in world coordinates. */ bool testPoint(Transform transform, Vector2 point); /** * Computes the associated axis aligned bounding box for a child shape * given a transform. Returns through the given out paramater. */ void computeAxisAlignedBox(AxisAlignedBox box, Transform transform); /** * Computes (and returns through the given out parameter massData) the mass * properties of this shape using its dimensions and the * given density. The inertia tensor is computed about the local origin. */ void computeMass(MassData massData, num density); /** Returns a clone of this shape. */ Shape clone(); }
Subclasses
Constructors
Properties
Methods
abstract void computeAxisAlignedBox(AxisAlignedBox box, Transform transform) #
Computes the associated axis aligned bounding box for a child shape given a transform. Returns through the given out paramater.