Shape class

Base class for shapes

Implementers

Constructors

Shape({ShapeType type = ShapeType.sphere, bool collisionResponse = true, int collisionFilterGroup = -1, int collisionFilterMask = -1, double boundingSphereRadius = 0, Material? material, Body? body})

Properties

body Body?
The body to which the shape is added to.
getter/setter pair
boundingSphereRadius double
The local bounding sphere radius of this shape.
getter/setter pair
collisionFilterGroup int
getter/setter pair
collisionFilterMask int
getter/setter pair
collisionResponse bool
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
Identifier of the Shape.
getter/setter pair
material Material?
Optional material of the shape that regulates contact properties.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ShapeType
The type of this shape. Must be set to an int > 0 by subclasses.
getter/setter pair

Methods

calculateLocalInertia(double mass, Vec3 target) Vec3
Calculates the inertia in the local frame for this shape. @see http://en.wikipedia.org/wiki/List_of_moments_of_inertia
calculateWorldAABB(Vec3 pos, Quaternion quat, Vec3 min, Vec3 max) → void
@todo use abstract for these kind of methods
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateBoundingSphereRadius() → void
Computes the bounding sphere radius. The result is stored in the property .boundingSphereRadius
volume() double
Get the volume of this shape

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

idCounter int
getter/setter pair