ConvexHull() public static method

public static ConvexHull ( Vector3 points ) : Vector3[]
points Vector3
return Vector3[]
Exemplo n.º 1
0
 public void RecalcConvex()
 {
     if (this.convex)
     {
         this.convexPoints = Polygon.ConvexHull(this.points);
     }
     else
     {
         this.convexPoints = null;
     }
 }
 /** Recalculate convex points.
  * Will not do anything if not #convex is enabled
  */
 public void RecalcConvex()
 {
     if (convex)
     {
         convexPoints = Polygon.ConvexHull(points);
     }
     else
     {
         convexPoints = null;
     }
 }
Exemplo n.º 3
0
        private void CalculateConvexHull()
        {
            if (points == null)
            {
                _convexPoints = null; return;
            }

            _convexPoints = Polygon.ConvexHull(points);
            for (int i = 0; i < _convexPoints.Length; i++)
            {
                Debug.DrawLine(_convexPoints[i], _convexPoints[(i + 1) % _convexPoints.Length], Color.green);
            }
        }
Exemplo n.º 4
0
 private void CalculateConvexHull()
 {
     if (this.points == null)
     {
         this._convexPoints = null;
         return;
     }
     this._convexPoints = Polygon.ConvexHull(this.points);
     for (int i = 0; i < this._convexPoints.Length; i++)
     {
         Debug.DrawLine(this._convexPoints[i], this._convexPoints[(i + 1) % this._convexPoints.Length], Color.green);
     }
 }
Exemplo n.º 5
0
 /** Recalculate convex points.
  * Will not do anything if not #convex is enabled
  */
 public void RecalcConvex()
 {
     convexPoints = convex ? Polygon.ConvexHull(points) : null;
 }
Exemplo n.º 6
0
 public void RecalcConvex()
 {
     this.convexPoints = ((!this.convex) ? null : Polygon.ConvexHull(this.points));
 }