Unit CastleOctree
Description
Base octree classes (TOctreeNode and TOctree) and utilities. Used by actual octrees in units like CastleTriangleOctree and CastleShapeOctree.
Typical way to derive actual (non-abstract) octrees goes like this;
type
TMyOctree = class;
TMyOctreeNode = class(TOctreeNode)
protected
procedure PutItemIntoSubNodes(ItemIndex: integer); override;
public
function ParentTree: TMyOctree;
end;
TMyOctree = class(TOctree)
public
constructor Create(AMaxDepth, ALeafCapacity: Integer;
const ARootBox: TBox3D);
function TreeRoot: TMyOctreeNode;
end;
procedure TMyOctreeNode.PutItemIntoSubNodes(ItemIndex: integer);
begin
end;
function TMyOctreeNode.ParentTree: TMyOctree;
begin
Result := TMyOctree(InternalParentTree);
end;
constructor TMyOctree.Create(AMaxDepth, ALeafCapacity: Integer;
const ARootBox: TBox3D);
begin
inherited Create(AMaxDepth, ALeafCapacity, ARootBox, TMyOctreeNode);
end;
function TMyOctree.TreeRoot: TMyOctreeNode;
begin
Result := TMyOctreeNode(InternalTreeRoot);
end;
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
Types
TOctreeSubnodeIndex = array[0..2]of boolean; |
|
TEnumerateOctreeItemsFunc = procedure(ItemIndex: Integer; CollidesForSure: boolean) of object; |
|
Generated by PasDoc 0.13.0 on 2014-08-30 12:10:37
|