Class gPoints
- Namespace
- VectorDraw.Geometry
- Assembly
- VectorDraw.Geometry.dll
This is a collection of gPoint objects.
public class gPoints : BaseObject, IDisposable, IBaseObject, IVDSerialise, ICloneable, IEnumerable
- Inheritance
-
gPoints
- Implements
- Inherited Members
Constructors
- gPoints()
Initializes the collection.
- gPoints(Point[])
Create and returns a new gPoints collection from an array of Point. Z values are all set to zero (0).
- gPoints(int)
Initializes the collection with a given capacity.
- gPoints(gPoint[])
Initializes a new instance of the object and adds the passed items at the end of this collection.
Properties
- ArrayItems
Get the items of the collection in a returned array.
The length of the return collection can be bigger than Count
this is done with the aim of having better performance of memory allocation
Always access to Count items of return collection
- Count
Get the number of elements of the collection.
- this[int]
Get/Set the object at a specified index of the collection.
- MethodApplyFlag
Defines how the methods of this object will be applied. Default value is None
Methods
- Add(double, double, double)
Add a gPoint to the end of the collection.
- Add(object)
Adds an object to the end of the collection.
- Add(gPoint)
Add a gPoint to the end of the collection.
- AddRange(Box)
Adds the gPoints of the Box to the collection.
- AddRange(gPoints)
Adds the objects of one collection to the end of this collection.
- AddRangeUnique(gPoints, double)
Adds the objects of one collection to the end of this collection. Only points that are existing with same values are added.
- AddUnique(gPoint, double)
Add a gPoint to the end of the collection only if collection does not contains a point equals to the input point.
- Area()
Calculates the area that the 2d points of the collection enclose.
- Area(bool)
Calculates the area that the 2d points of the collection enclose.
- Area(bool, bool)
Calculates the area that the 2d points of the collection enclose.
- Area3D(Vector)
Calculates the area that the 3d points of the collection enclose.
- Centroid()
Find a polygon's centroid (center of mass)
- ChangeOrder(gPoint, bool)
Places an existing object of the collection to the beginning or the end of the list.
- Clone()
Create a new gPoints collection having a copy of all items of this collection.
- Clone(bool, bool)
Creates a clone of this object.
- Create(gPoint, gPoint, gPoint)
Create and returns a new gPoints collection from passing 3 points.
- Create(gPoint, gPoint, gPoint, gPoint)
Create and returns a new gPoints collection from passing 4 points.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the gPoints object when opening in vdml format.
- Divide(int)
Divides the curve into NumSegments segments.
- EnsureCapacity(int)
Changes the capacity of the collection to the given value if the existing capacity is less than this value.
- Equals(object)
Returns a 32-bit signed integer hash code for this object instance according to the CompareDecimalPrecision
- FindClosest(gPoint, bool)
Returns a reference of the closest point to the passed pt that belongs to the collection.
- FindEdge(gPoint, gPoint)
Finds if an edge exists in the collection.
- FindItem(double, double, double, double)
Find a given gPoint object in the collection.
- FindItem(gPoint, double)
Find a given gPoint object in the collection.
- FindSmallestEnclosingCircle(out gPoint, out double)
Calculates and returns the center and the redius of the smallest circle that includes all the points of the polyline.
- GetAllHorizodalLinePoints(double)
Returns all points intersect a region from this points with a horizontal line throw on dy co-ordiante.
- GetBox()
Calculate a Box object that fits all points of the collection.
- GetCompareHashCode()
Returns a 32-bit signed integer hash code for this object instance.
- GetEnumerator()
Implements the "foreach" expression for the collection.
- GetHashCode()
Returns a 32-bit signed integer hash code for this object instance.
- GetHorizodalLinePoints(gPoints, double)
Internally sorting points.
- GetNormal()
Returns the first valid normal consisted from three contiguous points or null if ot is not valid
- GetOutlineBoundary()
Returns an array of points that consist the outline boundary set (known as Convex Hull)containing all points of this collection.
- GetOutlineBoundaryaShape(double)
Calculate the outline boundaries of the points taking into consideration the aValue distance.
- GetPlane()
Calculate the plane Matrix where the points are belongs to.
- GetSmoothNormals(double)
Returns an array of Vector with size equal to this Count property. Each Vector represents the normal for each vertex used when rendering a surface of this points with thickness.
- GetTransformCopy(Matrix)
Returns a copy of this colletion with all of gPoint Items transform by input Matrix
- InsertAt(int, gPoint)
Insert an object at a specified index.
- InsertPointAtParam(double)
Adds a point to the collection at the point indicated by the param.
- IntersectWith(gPoint, gPoint, ref gPoints)
Calculate the intesection points between a polyline defined by this collection of points and a line segment
- IntersectWith(gPoint, gPoint, ref gPoints, int)
Calculate the intesection points between a polyline defined by this collection of points and a line segment
- IntersectWith(gPoints, ref gPoints)
Calculate the intesection points between two regions.
- IntersectWith(gPoints, ref gPoints, int)
Calculate the intesection points between two regions.
- Is2D(double)
Checks if all points have the same z value.
- Is2D(double, Vector)
Checks if all points are belong into the same plane parallel to the plane that is perpendicular to the passed planeNormal
- IsClockWise()
Returns true if the area of the points is > 0.0
- IsClosed()
Check if The First and last Point are equal taking into consideration the default DefaultPointEquality value.
- IsClosed(double)
Check if The First and last Point are equal taking into consideration the Equality value.
- IsPointInside(gPoint)
Check if a point is inside a region defined by this collection Note: Method assumes that gPoints are 2D points(ignore z value) and in the same coordinate system as pt
- Last()
Get the last object of the collection.
- Length()
Calculates the length of the line that the points of the collection make.
- Measure(double)
Divides the curve into segments with length equal to the passed parameter.
- PointOnPerigram(gPoint)
Returns true if the point is on the gPoints perigram.
- PointOnThis2d(gPoint)
Checks if a given point is on the line that the collection's point draw.
- PointOnThis3d(gPoint)
Checks if a given point is on the line that the collection's point draw.
- RemoveAll()
Removes all objects from the collection.
- RemoveAt(int)
Removes an object from a specified index of the collection.
- RemoveEqualPoints()
Removes Points that are the same as the next point in the collection.
- RemoveEqualPoints(double)
Removes Points that are the same as the next point in the collection.
- RemoveEqualPoints2d(double)
Removes Points that have the same x and y values as the next point in the collection.
- RemoveInLinePoints()
Removes points that are inline from this gPoints collection.Globals.DefaultLinearEquality is used for equality calculations.
- RemoveInLinePoints(double)
Removes points that are inline from this gPoints collection.
- RemoveItem(gPoint)
Removes a specified object from the list.
- RemoveLast()
Removes the last object of the collection.
- Resize(int, bool)
change the size of array.
- Reverse()
Changes the order of the collection.
- Scale(double, double, double)
Applies the passed x,y,z scale values to each point in collection.
- Serialize(Serializer)
This Function is called when saving the gPoints object to vdml format.
- SetZAtPoint2d(gPoint)
Calculates and changes the z parameter of the passed point so this point is projected to this perigram.
- Sort(IComparer<gPoint>)
Sorts the elements in a range of elements in an entire collection using the specified IComparer<T> generic interface.
- TestOffsetSide(gPoint)
Returns -1.0 if the point is on the left side accordingly to the polyline direction and 1.0 if it is on the right side.
- ToClipPolygons()
Calculate the clipping polygons of the area of these Points.
- ToString()
Gets a System.String that represents the count of the gPoints Object.
- ToTriangleStrip()
Returns a new collection with this object points in opengl triangle_strip order logic
- Translate(double, double, double)
Translates each gPoint in the collection using the dx,dy and dz passed values.
- Triangulate(Vector)
Makes triagles from the collection's points that define a boundary.
- Triangulate(Vector, Triangulation)
Makes triagles from the collection's points that define a boundary.
- TriangulateIndex(Vector)
Makes triangles from the collection's points that define a boundary.
- TrigleStripToPolygon(gPoints)
Internally used. Convert the input collection that contains points in opengl triangle_strip order logic, to polygon logic.
- Trim(double, double)
Trim the array between startparam and endparam distances
- gPointsFromTriangleStrip(gPoints)
Internally used for drawing solid polygon when is TriangleStrip in render select.
- getDistAtPoint2d(gPoint)
Get the distance from the first point of the collection to the given gPoint.Note all points must have the same elevation(z value).
- getPointAtDist2d(double)
Returns a gPoint at as given distance from the first point of the collection.All points have the same elevation(z value).
- getPointAtDist3d(double)
Returns a gPoint at as given distance from the first point of the collection
- makeClosed()
Adds a point in tail of collection equal with the first point
- shortAscendingX()
Sorts the item of the collection ascending by the x value of the points.
- shortAscendingX(double)
Sorts the item of the collection ascending by the x value of the points.
- shortAscendingY()
Sorts the item of the collection ascending by the y value of the points.
- shortAscendingY(double)
Sorts the item of the collection ascending by the y value of the points.
- shortAscendingZ()
Sorts the item of the collection ascending by the y value of the points.
- shortAscendingZ(double)
Sorts the item of the collection ascending by the y value of the points.
- shortByCircleCenter(gPoint)
Sorts the items of the collection depending the angle from a given center point.
- shortByCircleCenter(gPoint, double)
Sorts the items of the collection depending the angle from a given center point.
- shortByPointOrigin(gPoint)
Sorts the points of the collection by the distance from a given origin point.
- shortByPointOrigin2d(gPoint)
Sorts the points of the collection by the 2d distance from a given origin point.
- shortByPointOrigin2dCompareZ(gPoint)
Sorts the points of the collection by the 2d distance from a given origin point.In case of two points have the same distance their Z values are compare.
Operators
- operator +(gPoints, gPoint)
Adds the passed collection items into a new one.
- operator +(gPoints, gPoints)
Adds the passed collection items into a new one.