addShape method
I'll add a shape to rigid body.
If you add a shape, please call the setupMass method to step up to the start of the next.
shape
shape to Add
Implementation
void addShape(Shape shape){
if(shape is Plane){
shape.computeNormal(orientation);
}
if(shape.parent != null){
printError("RigidBody", "It is not possible that you add a shape which already has an associated body.");
}
if(shapes != null)(shapes!.prev = shape).next = shapes;
shapes = shape;
shape.parent = this;
if(parent != null){
parent!.addShape(shape);
}
numShapes++;
}