Class TLQTNode

Unit

Declaration

type TLQTNode = class(TObject)

Description

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

Hierarchy

Overview

Fields

Public FTotalNodeItemsCount: Integer;

Methods

Protected function DoFetchItemCoords(const AItemIndex : Integer) : Boolean; virtual;
Protected function GetNodeItemsLength: Integer; virtual;
Protected procedure SetNodeItemsLength(Value : Integer); virtual;
Protected function GetNodeItems(Index : Integer) : TObject; virtual;
Protected procedure SetNodeItems(Index : Integer; Value : TObject); virtual;
Protected function GetAssignedNodeItemsCount: Integer; virtual;
Protected function GetAssignedNodeItems(Index : Integer) : TObject; virtual;
Protected function GetChildNodes(Index : TLQTNodeChildLocation) : TLQTNode; virtual;
Protected function GetChildRects(Index : TLQTNodeChildLocation) : TLQTRect; virtual;
Protected function MoveItemToParentNode(const AItemIndex : Integer; out ATargetItemIndex : Integer) : Boolean; virtual;
Protected function MoveItemToChildNode(const AItemIndex : Integer; out ATargetChildNode : TLQTNode; out ATargetItemIndex : Integer) : Boolean; virtual;
Protected function NodeItemToListEnumerationCallBack(Sender : TObject; ANode : TLQTNode; ANodeItem : TObject; ANodeItemIndex : Integer; AUserData : Pointer) : Boolean; virtual;
Protected function NodeAgglomerationToArrayEnumerationCallBack(ANode : TLQTNode; const ATreeAgglomerationRec : TLQTAgglomerationRec; AUserData : Pointer) : Boolean;
Protected procedure WriteStreamNodeHeader(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure WriteStreamNodeProperties(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure WriteStreamNodeChildren(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure WriteStreamNodeItems(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure WriteStreamNodeItem(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal; const AItemIndex : Integer); virtual;
Protected procedure ReadStreamNodeHeader(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; out ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure ReadStreamNodeProperties(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure ReadStreamNodeChildren(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure ReadStreamNodeItems(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;
Protected procedure ReadStreamNodeItem(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal; const AItemIndex : Integer); virtual;
Protected function UpdateOccupiedRectLocal: Boolean; virtual;
Protected function UpdateOccupiedRect: Boolean; virtual;
Protected function GetOccupiedRect: TLQTRect; virtual;
Public function CountNodes: Integer;
Public function CreateOrGetChildNode(const AChildLocation : TLQTNodeChildLocation) : TLQTNode;
Public procedure DeleteChildNode(const AChildLocation : TLQTNodeChildLocation);
Public function CoordIsInNodeRect(const AX, AY : Double) : Boolean; virtual;
Public function FindCoordNode(const AX, AY : Double) : TLQTNode; virtual;
Public function NodeRectOverlapTest(const ARect : TLQTRect) : TLQTRectOverlapKind; virtual;
Public function OccupiedRectOverlapTest(const ARect : TLQTRect) : TLQTRectOverlapKind; virtual;
Public function NodeRectOverlap(const ARect : TLQTRect) : Boolean; virtual;
Public function AddNodeItem(const AItem : TObject; const APointValid : Boolean = False; const ARectValid : Boolean = False; const APointX : Double = 0.0; const APointY : Double = 0.0; const ARectLeft : Double = 0.0; const ARectTop : Double = 0.0; const ARectRight : Double = 0.0; const ARectBottom : Double = 0.0 ) : Integer; virtual;
Public function ExtractNodeItem(const AItemIndex : Integer) : TObject;
Public function ExtractNodeItem(const ANodeItem : TObject) : TObject;
Public function SplitNode: Boolean; virtual;
Public function PackNode: Boolean; virtual;
Public function ExpandNode: Boolean; virtual;
Public function NodeHasZeroDataItems: Boolean; virtual;
Public function HasChildNodes: Boolean;
Public function IsDescendantOf(ANode : TLQTNode) : Boolean;
Public function NodeItemIndex(const AItem : TObject) : Integer;
Public function PackNodeItems(const APackToZero : Boolean = False) : Boolean; virtual;
Public function GetNodesParentChildLocation(var AChildLocation : TLQTNodeChildLocation) : Boolean;
Public function AgglomerateNodeAsEnumeration(const AAgglomerationDepth : Integer; const AMinimumItemNumberInAgglomeration : Integer; const AItemEnumFunc : TLQTItemEnumerationCallBack; const AItemUserData : Pointer; const AAgglomerationEnumFunc : TLQTAgglomerationEnumerationCallBack; const AAgglomerationUserData : Pointer) : Boolean; virtual;
Public procedure AgglomerateNodeAsList(const AAgglomerationDepth : Integer; const AMinimumItemNumberInAgglomeration : Integer; var AAgglomerationArray : TLQTAgglomerationArray; const AItemList : TList);
Public procedure RebuildOccupiedRect;
Public function NodeAsString: String; virtual;
Public procedure NodeAsStrings(const AStrings : TStrings); virtual;
Public procedure Clear;
Public procedure WriteNodeToStream(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal); virtual;
Public procedure ReadNodeFromStream(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal; const AStreamReadOptions : Cardinal = 0); virtual;
Public constructor Create(const AOwner : TLazQuadTree; const AParentNode : TLQTNode; const ALQTRect : TLQTRect);
Public destructor Destroy; override;

Properties

Public property Owner : TLazQuadTree read FOwner;
Public property ParentNode : TLQTNode read FParentNode;
Public property ChildNodes[Index:TLQTNodeChildLocation]: TLQTNode read GetChildNodes;
Public property ChildNodeNE : TLQTNode index nclNE read GetChildNodes;
Public property ChildNodeSE : TLQTNode index nclSE read GetChildNodes;
Public property ChildNodeSW : TLQTNode index nclSW read GetChildNodes;
Public property ChildNodeNW : TLQTNode index nclNW read GetChildNodes;
Public property ChildRects[Index:TLQTNodeChildLocation]: TLQTRect read GetChildRects;
Public property NodeLevel : Integer read FNodeLevel;
Public property NodeRect : TLQTRect read FNodeRect;
Public property Left : Double read FNodeRect.Left;
Public property Top : Double read FNodeRect.Top;
Public property Right : Double read FNodeRect.Right;
Public property Bottom : Double read FNodeRect.Bottom;
Public property OccupiedRect : TLQTRect read GetOccupiedRect;
Public property TotalNodeItemsCount : Integer read FTotalNodeItemsCount write SetTotalNodeItemsCount;
Public property NodeItemsLength : Integer read GetNodeItemsLength write SetNodeItemsLength;
Public property NodeItems[Index:Integer]: TObject read GetNodeItems write SetNodeItems;
Public property AssignedNodeItemsCount : Integer read GetAssignedNodeItemsCount;
Public property AssignedNodeItems[Index:Integer]: TObject read GetAssignedNodeItems;
Public property NodeToken : Cardinal read FNodeToken;

Description

Fields

Public FTotalNodeItemsCount: Integer;
 

Methods

Protected function DoFetchItemCoords(const AItemIndex : Integer) : Boolean; virtual;

DoFetchItemCoords performs the Notification to get the Item Coords, if not already cached The result ist true if at least on of the two coords (point or Rect) the valid

Protected function GetNodeItemsLength: Integer; virtual;
 
Protected procedure SetNodeItemsLength(Value : Integer); virtual;
 
Protected function GetNodeItems(Index : Integer) : TObject; virtual;
 
Protected procedure SetNodeItems(Index : Integer; Value : TObject); virtual;
 
Protected function GetAssignedNodeItemsCount: Integer; virtual;
 
Protected function GetAssignedNodeItems(Index : Integer) : TObject; virtual;
 
Protected function GetChildNodes(Index : TLQTNodeChildLocation) : TLQTNode; virtual;
 
Protected function GetChildRects(Index : TLQTNodeChildLocation) : TLQTRect; virtual;
 
Protected function MoveItemToParentNode(const AItemIndex : Integer; out ATargetItemIndex : Integer) : Boolean; virtual;

MoveItemToParentNode moves the specified item to the parent item The function result is true, if the item has been move, false otherwise.

Protected function MoveItemToChildNode(const AItemIndex : Integer; out ATargetChildNode : TLQTNode; out ATargetItemIndex : Integer) : Boolean; virtual;

MoveItemToChildNode moves the specified item to a fitting childnode The result is true if the movement was succesful, false if not. In the latter case the item was not moved.

Protected function NodeItemToListEnumerationCallBack(Sender : TObject; ANode : TLQTNode; ANodeItem : TObject; ANodeItemIndex : Integer; AUserData : Pointer) : Boolean; virtual;

NodeItemToListEnumerationCallBack is used by the some ListItems methods to accumlate the found items into a list. Caution: The function assumes that the parameter UserData is a pointer to a TList Descendand! The method is used only internal but is declared protected and virtual for future expansions. If the parameter ANodeItem is Nil, nothing is inserted into the list The result true if the AUserData is assigned, else false

Protected function NodeAgglomerationToArrayEnumerationCallBack(ANode : TLQTNode; const ATreeAgglomerationRec : TLQTAgglomerationRec; AUserData : Pointer) : Boolean;

NodeAgglomerationEnumerationCallBack is used by the AgglomerateNodeAsList method to store the agglomeration data in the data array Caution: The function assumes that the parameter UserData is a Pointer from the type PLQTAgglomerationArray. The method is used only internal but is declared protected and virtual for future expansions. If the parameter ANodeItem is Nil, nothing is inserted into the list The result true if the AUserData is assigned, else false

Protected procedure WriteStreamNodeHeader(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

WriteNodeHeader writes the Header to the stream, containing the StartCode and the Version Code. Could be overwritten to write a modified StreamDataVersion

Protected procedure WriteStreamNodeProperties(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

WriteNodeProperties writes the property fields to the stream

Protected procedure WriteStreamNodeChildren(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

WriteNodeChildren writes the property fields to the stream

Protected procedure WriteStreamNodeItems(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

WriteNodeItems writes the items to the stream

Protected procedure WriteStreamNodeItem(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal; const AItemIndex : Integer); virtual;

WriteNodeItem write one items to the stream

Protected procedure ReadStreamNodeHeader(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; out ANodeStreamDataVersion : Cardinal); virtual;

ReadNodeHeader reads the header and the Version. raises an exception if the Header Code is wrong or the version incompatible

Protected procedure ReadStreamNodeProperties(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

ReadNodeProperties reads the property fields from the stream

Protected procedure ReadStreamNodeChildren(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

ReadNodeProperties reads the children fields from the stream

Protected procedure ReadStreamNodeItems(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal); virtual;

ReadNodeItems reads the items from the stream

Protected procedure ReadStreamNodeItem(const AStream : TStream; const ATreeStreamDataVersion : Cardinal; const ANodeStreamDataVersion : Cardinal; const AItemIndex : Integer); virtual;

ReadNodeItems reads the items from the stream

Protected function UpdateOccupiedRectLocal: Boolean; virtual;

UpdateOccupiedRectLocal Updates the UpdateOccupiedRect, by including the UpdateOccupiedRect from the Children and Items contained by this node. It returns true, if the bounding box changed. The function will *not* recurse downwards, just working local in this node

Protected function UpdateOccupiedRect: Boolean; virtual;

UpdateOccupiedRect calls UpdateOccupiedRectLocal and if something changed, it calls the parent node to update the chain upwards It returns true, if the bounding box changed.

Protected function GetOccupiedRect: TLQTRect; virtual;

GetOccupiedRect returns the FOccupiedRect field value. The method could be overwritten to implement a different way to obtain the occupied area of the item in the tree

Public function CountNodes: Integer;

CountNodes recurses through the Childnodes and return the sum of all nodes below. The minimum result is one, since this node is assigned.

Public function CreateOrGetChildNode(const AChildLocation : TLQTNodeChildLocation) : TLQTNode;

CreateOrGetChildNode creates a childnode unless one exists in this location. The result is the new created or the existing ChildNode from this position. CAUTION: If a new childnode is created, the new node tooks all belonging items from his parent node (this node), thus the number of items in this node may be reduced down to zero. A call of AssignedNodeItemsCount might be necesarry!

Public procedure DeleteChildNode(const AChildLocation : TLQTNodeChildLocation);

DeleteChildNode deletes the childnode (if existing) and all subchildnodes. The function moves all NodeItems from the deleted ChildNodes to this Node.

Public function CoordIsInNodeRect(const AX, AY : Double) : Boolean; virtual;

CoordIsInNodeRect returns true if the Point AX, AY is located within the NodeRect.

Public function FindCoordNode(const AX, AY : Double) : TLQTNode; virtual;

FindCoordNode iterates through the part of the tree that is covered by this node. returns the deepest (leaf)node which contains the coordinate. The result is nil, if the coordinate is not located within this part of the tree.

Public function NodeRectOverlapTest(const ARect : TLQTRect) : TLQTRectOverlapKind; virtual;

NodeRectOverlapTest returns the Test result of the comparism of ARect with the NodeRect.

Public function OccupiedRectOverlapTest(const ARect : TLQTRect) : TLQTRectOverlapKind; virtual;

OccupiedRectOverlapTest returns the Test result of the comparism of ARect with the OccupiedRect.

Public function NodeRectOverlap(const ARect : TLQTRect) : Boolean; virtual;

NodeRectOverlap returns true, if ARect overlap at least partly the NodeRect.

Public function AddNodeItem(const AItem : TObject; const APointValid : Boolean = False; const ARectValid : Boolean = False; const APointX : Double = 0.0; const APointY : Double = 0.0; const ARectLeft : Double = 0.0; const ARectTop : Double = 0.0; const ARectRight : Double = 0.0; const ARectBottom : Double = 0.0 ) : Integer; virtual;

AddNodeItem insert the AItem into the node items array. The optional parameters could be used to speed up the processing, since a callback to query the data is suppressed. APointValid, ARectValid, APointX, APointY ARectLeft, ARectTop, ARectRight, ARectBottom

Public function ExtractNodeItem(const AItemIndex : Integer) : TObject;

ExtractNodeItem removes an Item identified by its ItemIndex from the internal storage, the current field in the Items-array is set to Nil Parameter: AItemIndex, contains the index of the raw data storage Internal counters are updated. the result contains the removed item, Nil if no item has been removed. The item has to be freed by the user, if the Tree Owns the Items

Public function ExtractNodeItem(const ANodeItem : TObject) : TObject;

ExtractNodeItem removes an Item identified by its Adress from the internal storage, the current field in the Items-array is set to Nil Parameter: ANodeItem, contains the (pointer of the) item which has to be removed. Internal counters are updated. the result contains the removed item, Nil if the item is not found in this node The item has to be freed by the user, if the Tree Owns the Items

Public function SplitNode: Boolean; virtual;

SplitNode split the node into child nodes if necesarry. Recurses down with splitting, if necesarry. Returns true, if at least one node is splitted.

Public function PackNode: Boolean; virtual;

PackNode tries to remove unused ChildNodes. Recurses down with packing, if useful. Return true if at least one node was combined

Public function ExpandNode: Boolean; virtual;

ExpandNode place all point items into leaf nodes, creating those ChildNodes, if necesarry. Recurses down with expanding, if needed. Area items will remain here or, if fitting into a smaller child node, moved Return true if at least one node was expanded

Public function NodeHasZeroDataItems: Boolean; virtual;

NodeHasZeroDataItems recurses through all subnodes and counts all populated DataItems. If there are none, the result is true.

Public function HasChildNodes: Boolean;

HasChildNodes returns true if at least one of the four possible ChildNodes exists

Public function IsDescendantOf(ANode : TLQTNode) : Boolean;

IsDescendantOf returns True if this node is an descendand of the passed node, else the Result is false

Public function NodeItemIndex(const AItem : TObject) : Integer;

NodeItemIndex returns the Index of the passed Item, -1 if not found

Public function PackNodeItems(const APackToZero : Boolean = False) : Boolean; virtual;

PackNodeItems removes unused and duplicate items. If APackToZero is true, the NodeItems array are set to the assigned items count

Public function GetNodesParentChildLocation(var AChildLocation : TLQTNodeChildLocation) : Boolean;

GetNodesParentChildLocation determine the ChildLocation of this node in its Parent's ChildNode array. The Value is valid if the return value of the function is true. The return value false means, that the Node is the Root node and no parent node is assignd.

Public function AgglomerateNodeAsEnumeration(const AAgglomerationDepth : Integer; const AMinimumItemNumberInAgglomeration : Integer; const AItemEnumFunc : TLQTItemEnumerationCallBack; const AItemUserData : Pointer; const AAgglomerationEnumFunc : TLQTAgglomerationEnumerationCallBack; const AAgglomerationUserData : Pointer) : Boolean; virtual;

AgglomerateNodeAsEnumeration build a summary of the Items within this node and his children. The usage is e.g. to build clickable items on a map, which represents a bunch of items below, to prevent that thousands of items will be drawn, while a "10K"-sign would do the job. Another usage would be to colorize parts of an image recording to the "density" of the Agglomerations. Parameters AAgglomerationDepth determines how many node-leves below should be taken into account. Due to the math (every level contains 4 times nodes than the parents level) a value of 1 will return up to 4 agglomeration records, 2 will return 16 and 3 = 64. If one Node cover an square of e.g. 256 pixel (as one OSM-Tile does), a level of 3 will place up to 64 ( = 16 * 16) agglomeration records on this tile. AMinimumItemNumberInAgglomeration will control the minimum ammount in one agglomeration. The value should not be less than MaxQuadNodeItemCount. A good value depends on the Data structure and the tile size. If one agglomeration contains a square of 16 x 16 pixel, the value could be 16 to place (in average) 4 x 4 items in this area. AItemEnumFunc, AAgglomerationEnumFunc both callback function must be provided to allow a sucessful operation. Each function will be called once for every item or build agglomeration. AItemUserData, AAgglomerationUserData are passed unmodified to the callback functions to allow the management of the passed data.

Public procedure AgglomerateNodeAsList(const AAgglomerationDepth : Integer; const AMinimumItemNumberInAgglomeration : Integer; var AAgglomerationArray : TLQTAgglomerationArray; const AItemList : TList);

AgglomerateNodeAsList build a summary of the Items within this node and his children. The usage is to build clickable items on a map, which represents a bunch of items below, to prevent that thousands of items will be drawn, while a "10K"-sign would do the job. Parameters AAgglomerationDepth determines how many node-leves below should be taken into account. Due to the math (every level contains 4 times nodes than the parents level) a value of 1 will return up to 4 agglomeration records, 2 will return 16 and 3 = 64. If one Node cover an square of e.g. 256 pixel (as one OSM-Tile does), a level of 3 will place up to 64 ( = 16 * 16) agglomeration records on this tile. AMinimumItemNumberInAgglomeration will control the minimum ammount in one agglomeration. The value should not be less than MaxQuadNodeItemCount. A good value depends on the Data structure and the tile size. If one agglomeration contains a square of 16 x 16 pixel, the value could be 16 to place (in average) 4 x 4 items in this area AAgglomerationArray will be populated with the agglomeration records AItemList must be created prior and freed after the call by the using code. The list will contain the items outside of the agglomerations

Public procedure RebuildOccupiedRect;

RebuildOccupiedRect iterate through all Nodes and Items and refreshes the Nodes FOccupiedRect. This method might be useful after a manually reconfiguration of the Tree.

Public function NodeAsString: String; virtual;

NodeAsString returns some information of the current node in a string

Public procedure NodeAsStrings(const AStrings : TStrings); virtual;

NodeAsStrings returns the content of the Node and its children in readable form for debugging purpose.

Public procedure Clear;

Clear recursivly delete all Childnodes. If the related Tree OwnsObjects, all containing Items are freed

Public procedure WriteNodeToStream(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal); virtual;

WriteNodeToStream writes this Node and all Children into the stream

Public procedure ReadNodeFromStream(const AStream : TStream; const AQuadTreeStreamDataVersion : Cardinal; const AStreamReadOptions : Cardinal = 0); virtual;

ReadNodeFromStream read the content of this node and create and read all Child-Nodes

Public constructor Create(const AOwner : TLazQuadTree; const AParentNode : TLQTNode; const ALQTRect : TLQTRect);

Create the Node within the owning Tree, a Parent and an covered Rect. Caution: It is not allowed that Parent- and Child-node have different Owners. Caution: It is assumed that the NodeRect contains a part of the Rect of the Parent, in a way, that the Rects of the four children covers exactly the Rect of the parent node. Saying this, Create will be used in very rare cases outside this unit.

Public destructor Destroy; override;

Destroy frees the Node. Clear is called prior inherited destroy, causing all Items are freed, if the owning tree owns the items, and all child nodes are freed.

Properties

Public property Owner : TLazQuadTree read FOwner;

Owner: The Tree this node belongs to

Public property ParentNode : TLQTNode read FParentNode;

ParentNode: The node, where this node is one of the four ChildNodes. If Nil, this node is the RootNode of the Tree

Public property ChildNodes[Index:TLQTNodeChildLocation]: TLQTNode read GetChildNodes;

ChildNodes: Indexed array of the four ChildNode. Each Node covers one quadrant of the Rect of this node

Public property ChildNodeNE : TLQTNode index nclNE read GetChildNodes;
 
Public property ChildNodeSE : TLQTNode index nclSE read GetChildNodes;
 
Public property ChildNodeSW : TLQTNode index nclSW read GetChildNodes;
 
Public property ChildNodeNW : TLQTNode index nclNW read GetChildNodes;
 
Public property ChildRects[Index:TLQTNodeChildLocation]: TLQTRect read GetChildRects;

ChildRects: Contains the definition of the for quadrants (=Rects) of the ChildNodes. The virtual getter function GetChildRects might be overwritten in derived classes to implement a different distribution to adapt to different projections.

Public property NodeLevel : Integer read FNodeLevel;

NodeLevel: The depth of this node. 0 for the RootNode

Public property NodeRect : TLQTRect read FNodeRect;

NodeRect: The Rect covered by this node. Care mus be taken, by interpreting the values of the Rect. Depending of the configuration of the WorldRect of the related tree, the value Top is greater or lesser than Bottom. The NodeRect is guaranteed never passing the Borders of the Tree's WorldRect.

Public property Left : Double read FNodeRect.Left;
 
Public property Top : Double read FNodeRect.Top;
 
Public property Right : Double read FNodeRect.Right;
 
Public property Bottom : Double read FNodeRect.Bottom;
 
Public property OccupiedRect : TLQTRect read GetOccupiedRect;

OccupiedRect comprise all items of this node and all subnodes. If TotalNodeItems = 0, the the result is an empty rectangle

Public property TotalNodeItemsCount : Integer read FTotalNodeItemsCount write SetTotalNodeItemsCount;

TotalNodeItemsCount: Contains the maintained Number of assigned Items of this Node and all Child-nodes to the bottom

Public property NodeItemsLength : Integer read GetNodeItemsLength write SetNodeItemsLength;

NodeItemsLength contains the Length of the NodeItems array. Caution: When writing a smaller value than the current length, the ItemsArePacked and if still need to be shortended, some Items are freed, if the related Tree owns the objects!

Public property NodeItems[Index:Integer]: TObject read GetNodeItems write SetNodeItems;

NodeItems gives a raw access to the NodeItems array. Caution: overwriting existing Items will not free them, this has to be done manually if needed! Caution: placing items into the wrong node is not checked!

Public property AssignedNodeItemsCount : Integer read GetAssignedNodeItemsCount;

AssignedNodeItemsCount gives the number of assigned items in this node.

Public property AssignedNodeItems[Index:Integer]: TObject read GetAssignedNodeItems;

AssignedNodeItems gives access to the assigned items in the raw NodeItems array

Public property NodeToken : Cardinal read FNodeToken;

DefaultLQTNodeToken a value that is used during the Stream read and write methods identifying the class of the QuadNode


Generated by PasDoc 0.16.0.