public void eachShape(cpBodyShapeIteratorFunc func, object data) { for (cpShape var = this.shapeList; var != null; var = var.next) { func(var, data); } }
///// Body/shape iterator callback function type. //public delegate void cpBodyShapeIteratorFunc(cpBody body, cpShape shape, object data); public void EachShape(cpBodyShapeIteratorFunc func, object data) { var shape = this.shapeList; while (shape != null) { var next = shape.next; func(shape, data); shape = next; } }
cpBodyEachShape(cpBody body, cpBodyShapeIteratorFunc func, object data) { cpShape shape = body.shapeList; while(shape){ cpShape next = shape.next; func(body, shape, data); shape = next; } }