The Unit delivers the modell for a 2 dimensional point object as well as some service routines to compare and transform the object geomtrically.
Name | Description |
---|---|
DummyXYPoint |
Name | Description |
---|---|
TAffinTransform | Container for the affine transformation |
TXYVector | Synonym for TXYPoint |
Function ExXYPointEqual(Times: TDouble; P1, P2: TXYPoint): TBoolean; |
Comparision of two points with tolerance. ExXYPointEqual:=((Round(P1.X*Times)=Round(P2.X*Times)) AND(Round(P1.Y*Times)=Round(P2.Y*Times)));
Function IntersectPoints(P1,P2,Q1,Q2:TXYPoint;Var IsParalell:TBoolean):TXYPoint; |
Intersecting Segments P1P2 and Q1Q2. Result is NOT NIL if exists and if it is paralell IsPararlell is TRUE.
Function IsInside(aPoint: TXYPoint; aMin, aMax: TXYPoint): TBoolean; |
Query the location of aPoint in the rectangle defined by (aMin,aMax). IF aPoint is inside the function gives back TRUE.
Function OverlapRect(Rect1Min, Rect1Max, Rect2Min, Rect2Max: TXYPoint): TBoolean; |
Query the overlapping of the rectangels Rect1 and Rect 2 defined by Rect1Min,Rect1aMax and Rect2Min,Rect2Max. If they are not disjucnt the function gives back TRUE
Function OverlapRectCoord(Rect1MinX, Rect1MinY, Rect1MaxX, Rect1MaxY, Rect2MinX, Rect2MinY, Rect2MaxX, Rect2MaxY: TDouble): TBoolean; |
Query the overlapping of the Rectangels Rect1 and Rect 2 defined by Rect1MinX,Rect1MinY,Rect1MaxX,Rect1MaxY and Rect2MinX,Rect2MinY,Rect2MaxX,Rect2MaxY. If they are not disjucnt thefunction gives back TRUE
Function ReadPPoint(S1, S2: Char; Var S: String; P: TXYPoint): TBoolean; |
Reading routine by given separators for plain coordinates. Formatting XXXXXS1YYYYYS2. If somting is wrong the function will be false. Please call the string GetError from Unit UStringutils.
Function ReadPPointDeg(S1, S2: Char; Var S: String; P: TXYPoint): TBoolean; |
Reading routine by given separators for decdeg coordinates. Formatting XXXXXS1YYYYYS2. If somting is wrong the function will be false. Please call the string GetError from Unit UStringutils.
Function SizeRect(aMin, aMax: TXYPoint): TDouble; |
Size of the rectangle defined by aMin,aMax.
Procedure SortRect(aMin, aMax: TXYPoint); |
Sorting of the extremal points of the rectangle defined by aMin,aMax.
Procedure SwapXYPoint(P1, P2: TXYPoint); |
Coordinat swapping from P1 to P2 and also in opposit direction.
Function TriXYAngle(PBegin, PMiddle, PEnd: TXYPoint): TDouble; |
Angle between the three points in deg that means 0-360°. If the area of the inclosed triangle is zero the the functio gives back 1E38.
Function TriXYArea(PBegin, PMiddle, PEnd: TXYPoint): TDouble; |
Area of the inclosed triangle with following orientation. Positiv areal values cw orientation. Negativ areal values ccw orientation.
Function TriXYCos(PBegin, PMiddle, PEnd: TXYPoint): TDouble; |
Cosine between the three points. You can not see the orientation (hafplane). If the area of the inclosed triangle is zero the the functio gives back 1E38.
Function XYLength(A, B: TXYPoint): TDouble; |
Euclidian distance of 2 points
Function XYLengthCoord(X1, Y1, X2, Y2: TDouble): TDouble; |
Euclidian distance coordinate wise of 2 points
Function XYPointEqual(P1, P2: TXYPoint): TBoolean; |
Comparision of two points.
Procedure XYPointInitMinMax(aMin, aMax: TXYPoint); |
Initialization of the mini-/maximal extention by opposit quatities .
Procedure XYPointMinMax(aPoint: TXYPoint; aMin, aMax: TXYPoint); |
Update the mini-/maximal Extention with the values of aPoint and stor it in aMin,aMax.
Function XYSQRLength(A, B: TXYPoint): TDouble; |
Square of euclidian distance of 2 points
Name | Description |
---|---|
Class TXYPoint | Definition of the 2 dimensionsl point object with double prec. |
Alexander Weidauer alex.weidauer@huckfinn.de
February 2002
February 2002