コード例 #1
0
ファイル: Box2f.cs プロジェクト: melsov/SVGCrosshatch
 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);
 }
コード例 #2
0
 // 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]);
     }
 }