Exemple #1
0
 public static void GizmosDraw(Box2f b)
 {
     Gizmos.DrawLine(b.min, b.lowerRight);
     Gizmos.DrawLine(b.lowerRight, b.max);
     Gizmos.DrawLine(b.max, b.upperLeft);
     Gizmos.DrawLine(b.upperLeft, b.min);
 }
 // I think this can be more efficient...no? At least could combine
 // all the axis-interval updates before updating Center...
 public void Contain(Box2f o)
 {
     Vector2f[] v = o.ComputeVertices();
     for (int k = 0; k < 4; ++k)
     {
         Contain(v[k]);
     }
 }