All Identifiers
Name | Unit | Description |
---|---|---|
DefaultLQTNodeStreamDataVersion | uLazQuadTree | DefaultLQTNodeStreamDataVersion a const that allows modification within the data of a QuadNode and the backward compatibilty of writen Streams The 4 bytes are used as follow AABBCCDD ˆ ˆ ˆ ˆ—— User Node Minor changes | | +———User Node Major changes | +———–Unit Node Minor changes +————-Unit Node Major changes The code in this unit will raise an exception on read from stream if the two Unit Bytes are not reflected in the code. The two UserBytes are user implementation dependend and ignored. |
DefaultLQTNodeToken | uLazQuadTree | DefaultLQTNodeToken indicates the trunk with a QuadNode definition the last two bytes could be used to identify different QuadNode-Class-Descendants |
DefaultMaxNodeItemCount | uLazQuadTree | DefaultMaxNodeItemCount: If a node contains more items, it will be split in subnodes. Used as initial value of the MaxQuadNodeItemCount property of the QuadTree. if the items are close together, this will be continued until MaxLazQuadTreeLevels is reached |
DefaultMaxTreeLevel | uLazQuadTree | DefaultMaxTreeLevel: Each level quaters the area of the level above. Subsequently the one Node in Level 25 contains, if used as an earth map, roughly one squaremeter (at the equator). Keep in mind that the amount of Items that *could* be stored increases very fast. The default is about 1280 TerraItems, far beyond what can be actually processed. Used as initial value of the MaxQuadTreeLevel property of the QuadTree. |
DefaultQuadTreeStreamDataVersion | uLazQuadTree | DefaultQuadTreeStreamDataVersion a const that allows modification within the data of a QuadTree and the backward compatibilty of writen Streams The 4 bytes are used as follow AABBCCDD ˆ ˆ ˆ ˆ—— User Tree Minor changes | | +———User Tree Major changes | +———–Unit Tree Minor changes +————-Unit Tree Major changes The code in this unit will raise an exception on read from stream if the two Unit Bytes are not reflected in the code. The two UserBytes are user implementation dependend and ignored. |
DefaultQuadTreeToken | uLazQuadTree | DefaultQuadTreeToken indicates the trunk with a QuadTree definition the last two bytes could be used to identify different QuadTree-Class-Descendants |
ELQTException | uLazQuadTree |
|
ELQTGException | uLazQuadTreeGeometry | Used for the smallest possible increment of an Double value |
ELQTStreamException | uLazQuadTree |
|
LineIntersection | uLazQuadTreeGeometry |
|
LineIntersection | uLazQuadTreeGeometry | function LineIntersection checks wether two lines intersects. Parameter: AP0X, AP0Y, AP1X, AP1Y, AP2X, AP2Y, AP3X, AP3Y The 4 points forming the two lines AIX, AIY the coords of the intersection (if found) Result: True if the lines intersect, otherwise False. Source: https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect |
LineRectInteraction | uLazQuadTreeGeometry |
|
LineRectInteraction | uLazQuadTreeGeometry | function LineRectIntersection will test whether a line intersects or overlap with a rectangle. The rectangle is seen as a solid block and the right and bottom coord is *not* included in rectangles area. Thus if the rectangle is (0,0,100,100) a line (100,-1,100,101) which is overlaying the right border of the rectangle will tested as false. But a line (0,-1,0,101) which is overlaying to the left side is tested as true. Parameters ALeft, ATop, ARight, ABottom: The coords of the two points forming the rectangle. AP0X, AP0Y, AP1X, AP1Y: The coords forming the two points of the line. Result: One of the TLineRectInteractio values (lriOutSide, lriInside, lriIntersecting) Remark: The used Coordinatesystem is Right bigger Than Left and Bottom bigger than Top! CAUTION: If the line is part of a polygon, the function may may give a false positive result if the right / bottom side of the polygon is touching the left / top side of the rectangle, since the function has no knowledge about the orientation of the segment. The Code is complexer/larger than the function LineRectInteractionSimple, but the performance is 50% faster. |
LineRectInteractionSimple | uLazQuadTreeGeometry | function LineRectIntersectionSimple is given for curiosity only. It will test whether a line intersects or overlap with a rectangle. Parameters ALeft, ATop, ARight, ABottom: The coords of the two points forming the rectangle. AP0X, AP0Y, AP1X, AP1Y: The coords forming the two points of the line. Result: One of the TLineRectInteractio values (lriOutSide, lriInside, lriIntersecting) Remark: The used Coordinatesystem is Right bigger Than Left and Bottom bigger than Top! CAUTION: The right and bottom border of the rectangle is treated to be part of the rectangle! REMARK: The Code is simpler/smaller than the function LineRectInteraction, but the performance is 35% slower. |
LineRectInteractionString | uLazQuadTreeGeometry |
|
LQTNodeChildLocationStrings | uLazQuadTree |
|
LQTRectEmpty | uLazQuadTreeGeometry | Definition of an empty rectangle |
LQTRectInfinite | uLazQuadTreeGeometry | LQTRectInfinite of an infinite rectangle |
LQTRectMaximum | uLazQuadTreeGeometry | LQTRectInfinite of an maximum rectangle |
LQTRectMaxValue | uLazQuadTreeGeometry | LQTRectMaxValue the absolute maximum value that could be used within this unit |
LQTRectMinValue | uLazQuadTreeGeometry | LQTRectMinValue the absolute minimum value that could be used within this unit |
lqtStreamDataVersionUnitMajorMask | uLazQuadTree | lqtStreamDataVersionXXXMasks can be used to "and" with the received Mask Value |
lqtStreamDataVersionUnitMajorShr | uLazQuadTree | lqtStreamDataVersionXXXShr can be used to shift the "anded" Value to the right |
lqtStreamDataVersionUnitMinorMask | uLazQuadTree |
|
lqtStreamDataVersionUnitMinorShr | uLazQuadTree |
|
lqtStreamDataVersionUserMajorMask | uLazQuadTree |
|
lqtStreamDataVersionUserMajorShr | uLazQuadTree |
|
lqtStreamDataVersionUserMinorMask | uLazQuadTree |
|
lqtStreamDataVersionUserMinorShr | uLazQuadTree |
|
LQTWorldModelString | uLazQuadTreeGeometry |
|
NormalizeRectangle | uLazQuadTreeGeometry | procedure NormalizeRectangle normalize the passed Rectangle and World rectangle. Parameters Input parameter ARect: The rectangle to be normalized AWorldModel: The world model, flat, cylindric or toroidial AWorldRect: The rectangle with the world borders Output parameters ANormalizedRectangles: An array containing the normalized rectangle(s) ANormalizedWorldRect: The normalized world rectangle Remarks The normalized rectangle has smaller values for top and left and bigger for right and bottom. The world rectangle defines the world, but also the sign of the X- and Y-Axis. The normalization will - ensure that the sign of the X- and Y-Axis is positive, in the meaning of Increasing values while travel to the right and to the bottom - adjust the sign of the borders in coordination with the world rectangle - if nesesarry split the rectangle to fit into the worlds border without overlapping If the world model ist flat, no splitting will occour. If the world model is cylindrical, a split into two rectangles may occour If the world model is toroidial, a split into two or four rectangles may occour |
NormatePointToWorld | uLazQuadTreeGeometry | procedure NormatePointToWorld will force the point to be valid in the given World. Parameters Inputs AInX, AInY the coordinates to be normated AWorldRect: The rectangle which describes the extensions of the world. AWorldModel : The world model (flat, cylindrical or toroidal) to be used. Outputs AOutX, AOutY the coordinates in the target world Remarks The passed world must be valid. The signs of the axes of the world are used. The right and bottom values of the rectangle equal to the correspondent of the world, are treated as valid in the meaning, that a rectangle may have the same size as the world. But if the values are bigger than this assumption is not longer used! Caution: if AWorldRect is not valid, an exception is thrown. |
PLQTAgglomerationArray | uLazQuadTree | PLQTAgglomerationArray, an pointer to an array of TLazQuadTreeAgglomerationRec |
PointInRectangle | uLazQuadTreeGeometry | function PointInRectangle tests whether a point is inside a rectangle on a curved world. It decapsulate the function ARect.ContainsPoint(....). See details there. |
PolylineRectangleInterAction | uLazQuadTreeGeometry | function PolylineRectangleInterAction will test whether the rectangle and polygon intersects or overlap The function work on regular infinite planes. The sign of X and Y-Axis could be changed Parameters ALeft, ATop, ARight, ABottom: The coords of the two points forming the rectangle. APolyline: vertex points of a polyline or a polygon with V[n]=V[0]. The Polyline is defined by pairs of Double values. The method of passing an untyped reference allows the usage of several datatype like packed records etc. A dynamic Array is passed by referencing the first item The last point of the Polygon must be identical to the first point, to close the polygon. Self-Overlapping of the polygon is *not* allowed APolylinePointCount: The Number of points in the polyline = half the number of doubles passed in APolygon. AFirstValueIsY: If True, the first double value in APolygon is the Y-Value of the coordinate. If False, the first value is the X-Value (default). AXAxisLeftPlus : If True the values of X increasing when going direction left. If False, they increase to the right (default) AYAxisUpPlus : If True the values of Y increasing when going in direction top. If false they decreases (default). AFullInsideCheck: If True the the Result lriInside is valid for the full polygon. In other words, if the Polygon is completely inside the rectangle If False, the Result lriInside might be valid only for the first linesegment and an intersecting may occour later, but is not checked. Result: One of the TLineRectInteractio values (lriOutside, lriInside, lriIntersecting) The meaning is as follows lriOutside : All parts of the polygon are outside of the rectangle lriInside : If AFullInsideCheck is False (default): At least one part of the polygon is located in the rectangle. If AFullInsideCheck is True: All Parts of the polygon are inside the rectangle. lriIntersecting : The polygon intersects with the rectangle (thus, some parts are inside, others outside the rectangle). Remark: To reduce the computation load, the function should only be called, if the bounding rectangle of the Polygon is overlapping the test rectangle. This test is not performed by the function to avoid code duplication. |
QuadTreeFileExtension | uLazQuadTree | QuadTreeFileExtension defines the default file extension of a QuadTree-File |
QuadTreeFileStartCode | uLazQuadTree | QuadTreeFileStartCode the first few bytes in the File(!) indicating a QuadTree following |
ReadDoubleFromStream | uLazQuadTree |
|
ReadIntegerFromStream | uLazQuadTree |
|
ReadStringFromStream | uLazQuadTree |
|
RectanglesOverlap | uLazQuadTreeGeometry |
|
RectanglesOverlap | uLazQuadTreeGeometry | function RectanglesOverlap checks whether two rectangles are overlapping and if so which are the common part. Caution: works only for flat (nonwrapping) rectangles parameters ALeft, ATop, ARight, ABottom : The Rectangle A BLeft, BTop, BRight, BBottom : The Rectangle B variable CLeft, CTop, CRight, CBottom : The overlapping Rectangle return value: True if the rectangles overlapping (and the CLeft ...CBottom values are valid) False if the rectangle are not overlapping. Remarks: If parts of the right side of one of the rectangle are identical to parts the left side or top side and bottom side, the rectangles are *not* overlapping! |
RectanglesOverlap | uLazQuadTreeGeometry | function RectanglesOverlap checks whether two rectangles are overlapping and if so which are the common part. Caution: works only for flat (nonwrapping) rectangles parameters ARect : The Rectangle A BRect : The Rectangle B outout CRect : The overlapping Rectangle return value: True if the rectangles overlapping (and the CRect is valid) False if the rectangle are not overlapping. Remarks: If parts of the right side of one of the rectangle are identical to parts the left side or top side and bottom side, the rectangles are *not* overlapping! |
RectanglesOverlapEx | uLazQuadTreeGeometry | function RectanglesOverlapEx checks whether two rectangles are overlapping and if so, what kind of overlapping is found and which areas are shared between the two rectangles. The function works on all world models (flat, cylindrical and toroidal) and on all axis orientations. parameters Input ARect, BRect the two rectangles which may overlapping AWorldModel the world model (flat, cylindrical and toroidal) AWorldRect the world definition used for the determination of the axis orientation Output CRectangles an array of rectangles containing the common/shared areas in the orientation of the given world. The array will has always one of the follwing length 0: No overlapping area 1: One overlapping area (all world models) 2: Two overlapping areas (cylindrical and toroidal worlds) 4: Four overlapping areas (toroidal worlds) Remark: The returned areas in the cylindrical and toroidal worlds may wrap around the worlds border. Return value is the TLQTRectOverlapKind type. |
RectOverlapKindString | uLazQuadTreeGeometry |
|
RemoveNotAreaRectanglesFromArray | uLazQuadTreeGeometry | procedure RemoveNotAreaRectanglesFromArray will remove rectangles from the passed array, if the area is zero. |
srofLazyLengthProcessing | uLazQuadTree | srofLazyLengthProcessing If the length of a Trunk is longer than read, the remainder is skipped without error |
TLazQuadTree | uLazQuadTree | TLazQuadTree A QuadTree for Lazarus. Organizes arbitrary Items who are ordered on a plane by X and Y coordinates for a fast access for a given Rect. The TLazQuadTree could be used to store tenthousands of items and access them very fast, because items that are not within the desired Rect are sorted out quickly. To allow the processing of any kind of objects or data, an event is used where the user has to provide the location or Rect of a specific item in the tree. The tree could be used for a flat world with borders on all four edges or a cylindric world, where the right and left edge are connected. Additionally the orientation of the Y-Axis could be adjusted, to cover cartesian-coordinate-systems (like Maps or mathematical function diagrams, where the Y value increases when going upwards) or computer-coordinate-system (like Bitmaps or Editors, where the Y increases when going downwards). To aggregate data on smaller magnification (e.g. showing bigger parts of the plane) a sum of TotalItems in the (Sub-)Nodes is maintained. This allowes, instead of a search of a bunch of unusefull Items, the display of a Placeholder/Sum of the items which are hidden. |
TLineRectInteraction | uLazQuadTreeGeometry | TLineRectInteraction defines the three possible interactions between a line and a rectangle. |
TLQTAgglomerationArray | uLazQuadTree | TLQTAgglomerationArray an array of TLazQuadTreeAgglomerationRec |
TLQTAgglomerationEnumerationCallBack | uLazQuadTree | TLQTAgglomerationEnumerationCallBack is used in the Agglomeration Enumeration and is called for every build agglomeration Parameters ANode contains the operated node. ATreeAgglomerationRec contains the agglomerated data for this node AUserData is passed unchanged from the function call and may be used by the callback-function to identify data, avoiding the usage of global variable. |
TLQTAgglomerationRec | uLazQuadTree | TLQTAgglomerationRec is used by the Agglomeration method Point contains the center coordinate of the agglomeration (= center of the node rectangle) Count the estimated number of items within the agglomeration. |
TLQTCreateNodeEvent | uLazQuadTree | TLQTCreateNodeEvent An Event which has to return a new created QuadNode. This event could be used to insert derived nodes into the QuadTree. Parameter AOwner the tree where the node belongs to. AParentNode the parent node (if Assigned, otherwise RootNode) ALQTRect the NodeRectangle (see ANodeToken) for an important remark. ANodeToken if the parameter is 0 then the function has to create an node by the provided information in the passed Owner and ParentNode. The function may decide to return Nil, in this case the caller will create a default Node. If the parameter is not 0 then the value is derived from DefaultLQTNodeToken = $81780000, with a different value at the lower two bytes. In this case the passed value comes from a Stream which is about to be read and the value identify the class which has to be created. In this case the function has to create a class, which is able to read the data from the stream. If this is not possible return Nil Result the creeated class. If the ANodeToken is 0 then Nil will be fine, else the stream reading process ends with an Exception. |
TLQTDynDoubleArr | uLazQuadTreeGeometry | TLQTDynDoubleArr an ordinary dynamic double array, to allow out parameters to set the length within the called function |
TLQTGetItemCaptionEvent | uLazQuadTree | TLQTGetItemCaptionEvent An event which can return a Caption (title, descriptive string) of the item. If the item has not such a Caption than the result shlould return false Return True if the Caption is valid, False if not. |
TLQTGetItemCoordEvent | uLazQuadTree | TLQTGetItemCoordEvent An event which has to return an X and a Y Coordinate for the given ItemIndex. Return True if the return values AX and AY are valid, False if not. |
TLQTGetItemRectEvent | uLazQuadTree | TLQTGetItemRectEvent An event which may return an Rect which contains the entire item. If the item has no Rect, the Event should return false. Return True if the return value AItemRect is valid, False if not. |
TLQTGetNodeChildRectEvent | uLazQuadTree | TLQTGetNodeChildRectEvent This event is called whenever a queried ChildRect Size is variable, e.g. not fixed by other childrens positions. It allows to modify the suggested ChildRect. The purpose is to shift the borders between the newly created children so that a uniform distribution of the items between the nodes are possible. If using non point items (e.g. Shapes of countries, tracks) a good selection of borders, help to avoid inefficent long list of Items at a high level. On a globe, the 0°-Longitude crosses a long list of countries, which by default all will be placed on the root node. By moving the division to -25° this could be reduced to one country. Caution: Asking the AParentNode for other ChildRects may cause a recursive call of this event! Asking the ParentNode for its NodeRect is always possible since this Rect is fixed. The parameters AChangeAllowedTop, ... , ...Left indicates, which of the field of the AChildRect could be modified. Modification of the not allowed fields are ignored. |
TLQTItemEnumerationCallBack | uLazQuadTree | TLQTItemEnumerationCallBack This event is used in the enumeration function. It will be called for each found Item. Parameters Sender is the tree to which the node belongs ANode contains the found node. ANodeItem contains the Item. ANodeItemIndex contains the index of the ANodeItem in the NodeItems-Array. AUserData is passed unchanged from the function call and may be used by the callback-function to identify data, avoiding the usage of global variable. |
TLQTNode | uLazQuadTree | TLQTNode A node in the Tree. The node is assumed to be the root node, if the ParentNode is not assigned. The node can contain data items. These data items are generic TObjects. There actual Coordinates are fetched via an Event in the Tree |
TLQTNodeChildLocation | uLazQuadTree | TLQTNodeChildLocation the Index of the four ChildNodes |
TLQTNodeEnumerationCallBack | uLazQuadTree | TLQTNodeEnumerationCallBack This event/callback is used in the enumeration functions. It will be called for each found Node. Parameters Sender is the tree to which the node belongs ANode contains the found node. AUserData is passed unchanged from the function call and may be used by the callback-function to identify data, avoiding the usage of global variable. |
TLQTNodeItemsRec | uLazQuadTree | TLQTNodeItemsRec is used by the Node to store the Items and chache there positions |
TLQTPoint | uLazQuadTreeGeometry | TLQTPoint describes the a single point in the QuadTree-World |
TLQTPointArr | uLazQuadTreeGeometry | TLQTPointArr contains 0 to some TLQTPoint records |
TLQTReadStreamItemEvent | uLazQuadTree | TLQTReadStreamItemEvent The event is used within the tree stream reading method. An event which has to read an Object from the given Stream. Depending from the Tree.OwnsObjects property the returned object has to be a real created object (True) or arbitrary data (False). The first DWord of the Stream contains a UserValue <> 0 that describes the following data. Most common is this an UserID where the User code knows what Object to create. The second DWord of the Stream contains the length of the remaining data. If this value is 0, no bytes are following. |
TLQTRect | uLazQuadTreeGeometry | TLQTRect describes an area in the QuadTree-World Details to the rectangles are described above. The TLQTRect could be used in two ways. One forming a world description, the other by forming a rectangle within the world. If defining a world, the sign of the axis are taken from the values Top vs Bottom or Left vs Right. To define a world map one would set Left = -180 and Right = 180 Top = 90 and Bottom = -90 This means that X increases while traveling from left to right and Y increases from top to bottom. This is different from the default definition (e.g. on TCanvas). A rectangle on the world could be defined by Left = -100 and Right = 100 Top = 45 and Bottom = -45 |
TLQTRectArray | uLazQuadTreeGeometry | TLQTRectArray an open array of TLQTRect |
TLQTRectOverlapKind | uLazQuadTreeGeometry | TLazQuadNodeAreaOverlap kind of overlapping between two rectangles A and B Overlapping: None Partly Inside Equal Fully +–+ +—+ +—–+ +—+ +—–+ |A | | A+–+ |A+-+ | | a | |B... | +–+ +–+ +- |B | | |B| | | B | | .a. | |B | +–+ | +-+ | +—+ | ... | +–+ +—- + +—- + |
TLQTStreamWriteHelper | uLazQuadTree | TLQTStreamWriteHelper an internal helper for the writing of the LengthField |
TLQTWorldModel | uLazQuadTreeGeometry | TLQTWorldModel This unit covers three world models: flat, cylindrical and toroidal. *On a flat world* - Rectangles could be up to infinity size. Using infinity is not recommended, due to several limitations. - Two rectangles may form only one single overlapping area. - A straight line is defined by it's two points, a Polyline is performed by a an ordered list of points, a Polygon is closed by the last point of a line having the same value as the first. *On a cylindrical world* - Rectangles could be up to infinity size. Using infinity is not recommended, due to several limitations. - Rectangles could pass the right and left border of the world, by extent on the opposite part of the world. Since (as defined) the upper-left corner is always above and left from the bottom-right corner, a rectangle (following the world map example as above) with left = +5 and right = -3 is valid. Starting with X = 5 and increasing the value to move right(!) until X = 179, we will soon pass 180 = -180 and traveling further until the right(!) border at -3. - Two rectangles may form one or two overlapping areas. Under which circumstances a secondary overlapping area exists? Example: The Y-Axis could be ignored in the explanation, assuming that the height of the two rectangles are same as the world heights. The rectangle A covers: Dublin (X: -7) to Hamburg (X: +10). The rectangle B covers: Amsterdam (X: +5) to Liverpool (X: -3). Be aware that the rectangle B is very long and reaches around the east-west-border. So there exists one overlapping area from Dublin (X: -7) to Liverpool (X: -3) and a second one from Amsterdam (X: +5) to Hamburg (X: +10). Dublin Liverp. Amstd. Hamburg -180 =========== -7 == -3 ===== +5 ==== +10 ================ 180 Rect A AAAAAAAAAAAAAAAAAAAAAAAAAA Rect B BBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB Overlap 1 11111111111 Overlap 2 22222222 - A straight line is defined by it's two points, a Polygon is performed by a an ordered list of points. WARNING: In contrast to rectangles, lines between two points can not pass the world's border! It is not possible to create straight lines (and subsequently polygons) passing the worlds border like the rectangles above. This is caused by the fact, that e.g. a line between New York and Sydney could be drawn in two ways, one across Africa, one across the Pacific Ocean. While on a single line it would be possible to define that the first point should be always left of the second point, this approach failed in polygons. To avoid any ambiguity, line points are only allowed to be within range of the world's extension. Thus polygons are also not allowed to pass the east-west-border. Forming the rectangle B in the example above by a polygon, it is necesarry to define two separate polygons. *On a toroid-World* the capabilities of the cylindrical-World are extent in the Y-axis (Top to Bottom). - Rectangles could pass the top and bottom border of the world, by extent on the opposite part of the world. - Two rectangles may form up to four overlapping rectangles Example: Diagram 1 shows Rectangle A: (Left, Top, Right, Bottom) 2,2, 7,7 Diagram 2 shows Rectangle B: (Left, Top, Right, Bottom) 6,6, 3,3 0123456789 0123456789 0123456789 0123456789 +———-+ +———-+ +———-+ +———-+ 0 | | 0 |BBB BBBB| 0 |... ....| 0 | | 1 | | 1 |BBB BBBB| 1 |... ....| 1 | | 2 | AAAAA | 2 |BBB BBBB| 2 |..1***2...| 2 | 1 2 | 3 | AAAAA | 3 | | 3 | ***** | 3 | | 4 | AAAAA | 4 | | 4 | ***** | 4 | | 5 | AAAAA | 5 | | 5 | ***** | 5 | | 6 | AAAAA | 6 |BBB BBBB| 6 |..3***4...| 6 | 3 4 | 7 | AAAAA | 7 |BBB BBBB| 7 |... ....| 7 | | 8 | | 8 |BBB BBBB| 8 |... ....| 8 | | 9 | | 9 |BBB BBBB| 9 |... ....| 9 | | +———-+ +———-+ +———-+ +———-+ Diagram 1 Diagram 2 Diagram 3 Diagram 4 Be aware that going from the upper-left corner (6,6) of the rectangle B to the lower right corner, after reaching the point 9,9 (the lower right corner of the world), the next more right an more downward(!) point is the overflow to 0,0, which is the upper left corner of the world! Diagram 3 shows all rectangles (A = '*', B = '.' and the four overlapping rectangles '1' to '4'. Diagram 4 only the overlapping rectangles '1' to '4'. - The limitations of Lines and Polygons are the same as for the cylindrical world! |
TLQTWriteStreamItemEvent | uLazQuadTree | TLQTWriteStreamItemEvent The event is used within the tree stream reading method. An event which has to write an Object to the given Stream. The data is user dependend, but has to follow the general rule of writing data into the .lqtf-File. The first DWord that is written to the Stream mus be an UserID which allows the User code to reconstruct the data on the read procedure. The second DWord will contain the dta length of the remaining data. To ease the write process this value is calculated by the caller, but the space must reserved, by writing an DWord value 0 |
TransformPoint | uLazQuadTreeGeometry | procedure TransformPoint transforms the location of a point in one world to the corresponding location in the other world. Parameters : Inputs AInX, AInY the coordinates in the source world ASourceWorld, ATargetWorld the extension of the two worlds Outputs AOutX, AOutY the coordinates in the target world Remarks : If both worlds are equal the input is copied to the output without any further processing. If not equal the following processing is performed: - If at least one two worlds is empy an exception is thrown. - If one of the worlds in infinite, while the other is not an exception is thrown. Care must be taken if points from a complex world (toroidal, cylindric) transformed into a simpler world (flat). Creating gemometric objects (Rectangles, Polygons) from those transformed points may change the layout dramaticaly. |
UnNormalizeRectangles | uLazQuadTreeGeometry | procedure UnNormalizeRectangles invertes the process of normalization of the rectangles Parameters Input ANormalizedRectangles: An array containing normalized rectangles (all rectangles must be inside or equal to the normalized word-borders). AUnNormalizedWorldModel: The world model to transformed to AUnNormalizedWorldRect: The borders of the world to be transformed in Output AUnNormalizedRectangles : An array of the transformed, unnormalized rectangles Remarks The input are assumed to be in a flat world with rectangles left, top values smaller than right, bottom values. And also all values laying within the world borders. In a flat world model the signs of the rectangles are adjusted and the result placed into the output rectangle array In a cylindrical world model the input rectangles are merged, if they share the same top and bottom values and having the same values for the left and right edges, vice versa. Additionally the left and right border of the world are treated as identical, thus rectangle who share the east-west-border are combined as well. In a toroidial world model additional to the cylidrical world the top and bottom values of the rectangles are also merged, if fit. This may collapse up to four rectangles in on single bigger rectangle. |
WriteDoubleToStream | uLazQuadTree |
|
WriteIntegerToStream | uLazQuadTree |
|
WriteStringToStream | uLazQuadTree |
|
Generated by PasDoc 0.16.0.