Description | Hierarchy | Fields | Methods | Properties |
type TRbwQuadTree = class(TComponent)
TRbwQuadTree
is used to quickly retrieve data by their X and Y coordinates.
Methods are provided to search at a location or within a defined region
![]() |
FMaxPoints: integer; |
![]() |
FQTreeNode: TQtreeNode; |
![]() |
function GetCount: integer; |
![]() |
function GetPoints(Index: Integer): TQuadPoint; |
![]() |
function GetXMax: double; |
![]() |
function GetXMin: double; |
![]() |
function GetYMax: double; |
![]() |
function GetYMin: double; |
![]() |
procedure SetXMax(const AValue: double); |
![]() |
procedure SetXMin(const AValue: double); |
![]() |
procedure SetYMax(const AValue: double); |
![]() |
procedure SetYMin(const AValue: double); |
![]() |
procedure SetMaxPoints(const Value: integer); |
![]() |
procedure AddPoint(X, Y: double; Data: pointer); |
![]() |
procedure Clear; |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
procedure FindClosestPointsData(var X, Y: double; var Data: TPointerArray); |
![]() |
procedure FindNearestPoints(const CenterX, CenterY: double; const Count: Integer; var Points: TQuadPointArray); |
![]() |
procedure FindPointsInBlock(const Block: T2DBlock; var Points: TQuadPointInRegionArray); |
![]() |
procedure FindPointsInCircle(const CenterX, CenterY, Radius: double; var Points: TQuadPointInRegionArray); |
![]() |
procedure FirstNearestPoint(var X, Y: double; var Data: pointer); |
![]() |
function NearestPointsFirstData(X, Y: double): pointer; |
![]() |
function RemovePoint(X, Y: double; Data: pointer): boolean; |
![]() |
property Count: integer read GetCount; |
![]() |
property Points[Index:Integer]: TQuadPoint read GetPoints; |
![]() |
property MaxPoints: integer read FMaxPoints write SetMaxPoints; |
![]() |
property XMax: double read GetXMax write SetXMax; |
![]() |
property XMin: double read GetXMin write SetXMin; |
![]() |
property YMax: double read GetYMax write SetYMax; |
![]() |
property YMin: double read GetYMin write SetYMin; |
![]() |
FMaxPoints: integer; |
|
![]() |
FQTreeNode: TQtreeNode; |
|
![]() |
function GetCount: integer; |
See Count. |
![]() |
function GetPoints(Index: Integer): TQuadPoint; |
See Points. |
![]() |
function GetXMax: double; |
See XMax. |
![]() |
function GetXMin: double; |
See XMin. |
![]() |
function GetYMax: double; |
See YMax. |
![]() |
function GetYMin: double; |
See YMin. |
![]() |
procedure SetXMax(const AValue: double); |
See XMax. |
![]() |
procedure SetXMin(const AValue: double); |
See XMin. |
![]() |
procedure SetYMax(const AValue: double); |
See YMax. |
![]() |
procedure SetYMin(const AValue: double); |
See YMin. |
![]() |
procedure SetMaxPoints(const Value: integer); |
See MaxPoints. |
![]() |
procedure AddPoint(X, Y: double; Data: pointer); |
If there is already a point at that location the number of pointers stored at that point will be increased by one and the new data will be added at the end of the list of data for the point. Count will be unaffected. If there is not already a point at that location, one will be created and the data will be associated with it, and the Count will be incremented by one. If required, XMax, XMin, YMax, or YMin will be adjusted to accomodate the new data point. The Data associated with a location is not owned by the TRbwQuadTree; users are responsible for freeing that memory when it is no longer needed. |
![]() |
procedure Clear; |
The Data associated with a location is not owned by the TRbwQuadTree; users are responsible for freeing that memory when it is no longer needed. |
![]() |
constructor Create(AOwner: TComponent); override; |
Creates an instance of TRbwQuadTree; |
![]() |
destructor Destroy; override; |
|
![]() |
procedure FindClosestPointsData(var X, Y: double; var Data: TPointerArray); |
|
![]() |
procedure FindNearestPoints(const CenterX, CenterY: double; const Count: Integer; var Points: TQuadPointArray); |
See also FirstNearestPoint, NearestPointsFirstData |
![]() |
procedure FindPointsInBlock(const Block: T2DBlock; var Points: TQuadPointInRegionArray); |
|
![]() |
procedure FindPointsInCircle(const CenterX, CenterY, Radius: double; var Points: TQuadPointInRegionArray); |
|
![]() |
procedure FirstNearestPoint(var X, Y: double; var Data: pointer); |
See also: FindNearestPoints and NearestPointsFirstData. |
![]() |
function NearestPointsFirstData(X, Y: double): pointer; |
See also: FindNearestPoints and FirstNearestPoint. |
![]() |
function RemovePoint(X, Y: double; Data: pointer): boolean; |
If the number of data pointers stored at X, Y is greater than 1, Data will be deleted from the list of data pointers and Count will be unaffected. If there is only one data pointer stored at X, Y, that location will be deleted and the Count will be decremented by one. The Data associated with a location is not owned by the TRbwQuadTree; users are responsible for freeing that memory when it is no longer needed. |
![]() |
property Count: integer read GetCount; |
|
![]() |
property Points[Index:Integer]: TQuadPoint read GetPoints; |
|
![]() |
property MaxPoints: integer read FMaxPoints write SetMaxPoints; |
MaxPoints is the maximum number of data locations in any node of a TRbwQuadTree. MaxPoints affects the performance of the TRbwQuadTree in the retrieval of data in a manner that depends on the particular application. |
![]() |
property XMax: double read GetXMax write SetXMax; |
|
![]() |
property XMin: double read GetXMin write SetXMin; |
|
![]() |
property YMax: double read GetYMax write SetYMax; |
|
![]() |
property YMin: double read GetYMin write SetYMin; |
|