Class TOctree
Unit
a3dge.World3D
Declaration
type TOctree = class(TObject)
Description
An octree.
You can read about octrees on the Wikipedia.
See also
- TWorld3D.Octree
- Access to octree.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
DESTRUCTOR Destroy; OVERRIDE; |
Release the resources.
|
 |
procedure Initialize (const aSize: GLfloat; const aDepth: Integer); |
Init the octree.
This method will clear the octree and rebuild it.
The root node will be centered at <0, 0, 0>, so it will span <-aSize, -aSize, -aSize> to <aSize, aSize, aSize> . It is not a physical limit and objects would be outside the boudings; in such case the object will be in the root node.
Note that octree will grow exponentially. For example, a level 4 octree will use 585 nodes while a level 5 one will use 5681. So don't create octrees too deep.
Parameters
- aSize
- Root node size.
- aDepth
- Otree depth.
See also
- TOctree.Clear
- Removes all objects from the octree.
|
 |
FUNCTION InsertObject (CONST aObject: TObject3D): TOctreeNode; |
Inserts the object in the octree and returns the node.
|
 |
PROCEDURE RemoveObject (CONST aObject: TObject3D); INLINE; |
Removes the object from the octree.
|
 |
PROCEDURE Clear; |
Removes all objects from the octree.
|
 |
PROCEDURE Show; INLINE; |
Draws the octree.
|
Properties
 |
property Root: TOctreeNode READ fRoot; |
Reference to the root node.
|
 |
property Depth: INTEGER READ fDepth; |
Tree depth.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|