Drawing3d documented Class Library

xyArray Methods

The methods of the xyArray class are listed below. For a complete list of xyArray class members, see the xyArray Members topic.

Public Static (Shared) Methods

FromString You can initialize an xyArray with a string.
For example: xyzArray A; A= fromString( "{0/0; 10/0; 10/10; 0/10}");

Public Instance Methods

Add Adds a point to the xyArray. Its faster to create an Array by A= new xyArray(10) and
A[0] = new xy(1,2);
A[9] ) new xyz(4,-2);
Create an Array of length 0 and add 10 times a point.
Before Returns the beforeindex. This means i-1 if i > 0 otherwise count-1, when the array is closed.
Closed if the first and the last point are equal, it returns true
ContainsPoint If the rectangle R contains any point of the array true will be returned
copy Creates a copy of the polygon and retrieves it.
cross Calcuates the cross product for all members, what is useful for the calculation of the orientation and the area of the array. The length of cross : 2 * area of the polygon
Direction Calculates the direction of the polygon in a point, which is described by its param
DistanceOverloaded. Calculates the distance to a Point, if this distance is smaller than MaxDist. Otherwise big will be returned.
Equals (inherited from Object) 
FromArray Initializes with a xy[] array.
getCrossListOverloaded. Get a list of cross points with an other closed xyArray. The items of CrossList are CrossItem. The items are sorted by the Param1. Every Crosslist contains an even number of cross points, one for going in and one for going out.
GetEnumerator Implements the method GetEnumerator and returns the IEnumerator of the datafield.
GetHashCode (inherited from Object) 
GetMaxrectOverloaded. Get the minimal rectangle containing transformed xyArray.
GetType (inherited from Object) 
Inside Checks the position of a point P (whether it lays inside the polygon or not).
Invert Inverts the array. The first entry will be the last and so on.
IsConvex Returns true if the array is convex.
LengthToParam Converts a given length to a parameter, which can be used as param for the Value-method.
Next Returns the next index. If the array is closed the next index of Count-1 is 0 else it is i+1.
ParamToLength Calculates the length of the array form 0 until the parameter given by Param. For a Param = Count you get the full length of the array
RemoveAt Removes the Point with a given Index from the Array
RemoveZeros Remove Points, which has a distance zero to the neighbour.
Round Rounds the coordinates of all members to the destinated number of "Decimals"/> to
SetOperation This function implements settheoretical operations for closed xyArrays. The result is a list of xyArrays (see Loxy
SliceOverloaded. By Value you can get a point A= value(from) and a point B= value(to). The part of the array, which is bounded by this points will be copied to the Slicearray. If the array is Closed and "from" exceeds "to" it copies modulo Count-1.
ToArray Returns an xy[] array
ToString Returns a string, which starts with "{" and ends with "}". The points are separated with ";".
ToxyzArray Converts a xyArray to a xyzArray by lifting each xy to a xyz with z=0;
Transform The method transforms every point in the array by the matrix m.
TransformEx The method transforms every point in the array by the matrix m and returns these points in an array.
Triangulation Calculates a Triangulation (also known as tesselation) and returns the triangles in a TriangleList
Value Calculates a point on the polygon belonging to param. For param = 0 , 1, 2, 3 ... you get the points this[0], this[1], this[2], this[3],... For values between a linear interpolation will be done.
xyzArray a = new xyzArray(4);
    a[0]= new xyz(1, 1 );
    a[1]= new xyz(1,-1);
    a[2]= new xyz(3, 4);
    a[3]= new xyz(2, 2);
    //a.Value(2.5) = (2.5, 3)

Protected Instance Methods

Finalize (inherited from Object) 
GetMaxrectOverloaded. Get the minimal rectangle, which contains the xyArray
MemberwiseClone (inherited from Object) 

See Also

xyArray Class | Drawing3d.Math Namespace | TriangleList | cross