Engines/FlatRedBallXNA/FlatRedBall/Math/Geometry/Polygon.cs
/// <summary>
/// Returns a Vector3 array storing all of the points belonging to this instance that are inside the argument
/// Polygon.
/// </summary>
/// <param name="polygon"></param>
/// <returns></returns>
Returns a Vector3 array storing all of the points belonging to this instance that are inside the argument
Polygon.
Returns a Vector3 array storing all of the points belonging to this instance that are inside the argument Polygon .
public Point3D[] GetPointsInside(Polygon polygon)
        {
            List<Point3D> pointsInside = new List<Point3D>();
            for (int i = 0; i < mVertices.Length; i++)
            {
                VertexPositionColor vertex = mVertices[i];
                if (polygon.IsPointInside(ref vertex.Position))
                {
                    pointsInside.Add(new Point3D(vertex.Position));
                }
            }
            Point3D[] pointsToReturn = pointsInside.ToArray();
            return pointsToReturn;
        }
public Point3D [ ] GetPointsInside ( Polygon polygon ) { List < Point3D > pointsInside = new List < Point3D > ( ) ; for ( int i = 0 ; i < mVertices . Length ; i ++ ) { VertexPositionColor vertex = mVertices [ i ] ; if ( polygon . IsPointInside ( ref vertex . Position ) ) { pointsInside . Add ( new Point3D ( vertex . Position ) ) ; } } Point3D [ ] pointsToReturn = pointsInside . ToArray ( ) ; return pointsToReturn ; }
Returns a Vector3 array storing all of the points belonging to this instance that are inside the argument
Polygon.
Returns a Vector3 array storing all of the points belonging to this instance that are inside the argument Polygon .
None
polygon
Polygon
None