Ejemplo n.º 1
0
 public void eachConstraint(cpBodyConstraintIteratorFunc func, object data)
 {
     for (cpConstraint var = this.constraintList; var != null; var = var.Next(this))
     {
         func(var, data);
     }
 }
Ejemplo n.º 2
0
        public static cpConstraint filterConstraints(cpConstraint node, cpBody body, cpConstraint filter)
        {
            if (node == filter)
            {
                return(node.Next(body));
            }
            else if (node.a == body)
            {
                node.next_a = filterConstraints(node.next_a, body, filter);
            }
            else
            {
                node.next_b = filterConstraints(node.next_b, body, filter);
            }

            return(node);
        }