A3DGE - Amateur 3D Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers Conclusion
|
Class TOctreeNode
Unit
a3dge.World3D
Declaration
type TOctreeNode = class(TObject)
Description
An octree node.
This class is for internal use and you shouldn't need to deal with it.
See also
- TOctree
- An octree.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
CONSTRUCTOR Create ( const aLeft, aRight, aBottom, aTop, aBack, aFront: GLfloat; aLevel: INTEGER; CONST aParent: TOctreeNode); |
Creates the node. Parameters are the position of each plane of the cube.
Parameters
- aLevel
- If it is not 0, it creates childs.
|
 |
DESTRUCTOR Destroy; OVERRIDE; |
Releases resources.
|
 |
FUNCTION Inside (CONST point: TVector3D): BOOLEAN; OVERLOAD; |
Retruns True if point is inside the node.
|
 |
FUNCTION Inside (CONST pos: TVector3D; CONST r: GLfloat): BOOLEAN; OVERLOAD; |
Returns True if an sphere of radius r in position pos is fully inside the node.
|
 |
FUNCTION Inside (CONST aObject: TObject3D): BOOLEAN; OVERLOAD; |
Returns True if object is fully inside the node. It uses bounding box if available or bounding sphere otherwise.
See also
- TOctreeNode.GetChild
- Find the smallest node that contains the given sphere.
|
 |
function GetChild (const aPosition: TVector3D; const aRadius: GLfloat) : TOctreeNode; |
Find the smallest node that contains the given sphere.
Parameters
- aPosition
- The sphere center position.
- aRadius
- The sphere radius.
Returns
The reference to the smallest node that fully contains the sphere or Nil if no node contains it. See also
- TOctreeNode.Inside
- Returns
True if object is fully inside the node.
|
 |
PROCEDURE Clear; |
Clear all objects from node and childs.
|
 |
FUNCTION IsNear (CONST Point: TVector3D; CONST aDistance2: GLfloat): BOOLEAN; |
Returns True if node distance to the point is less than the given distance.
Parameters
- aDistance2
- The square of the distance.
|
 |
PROCEDURE Show; |
Draws the node.
|
Properties
 |
property Children[Id:INTEGER]: TOctreeNode READ GetChildren; |
Child nodes. The order of nodes is:
<-1, -1, -1> < 1, -1, -1>
<-1, 1, -1> < 1, 1, -1>
<-1, -1, 1> < 1, -1, 1>
<-1, 1, 1> < 1, 1, 1>
|
 |
property Parent: TOctreeNode READ fParent; |
Parent node.
|
 |
property HasObjects: BOOLEAN READ fHasObjects; |
Tells if node is empty.
A node isn't empty if it has any object or one of its childs isn't empty.
|
 |
property FirstObject: TObject3D READ fFirstObject; |
Reference to the first object contained in the node.
See also
- TObject3D.NextObject
- Next object in the octree node.
|
 |
property Limits: TBox read fLimits; |
Limits of node.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|