Skip to content

TreePartition

jay19240 edited this page Dec 19, 2024 · 3 revisions

TreePartition

The root partition binary tree.

  • parent of: Gfx2TreePartition, Gfx3TreePartition

Constructors

  • new TreePartition(maxChildren: number, maxDepth: number, method: ITreePartitionMethod): TreePartition
    • maxChildren: The maximum number of children that a node in the tree can have. It determines the branching factor of the tree, i.e.
    • maxDepth: The maximum depth or level of the tree partition. It determines how deep the tree can be divided into smaller partitions.
    • method: Defines a method that is responsible for partitioning the tree nodes.

Methods

  • addChild(object: T): void
    • object: The object.
  • draw(): void
  • getMaxChildren(): number
  • getMaxDepth(): number
  • getRoot(): TreePartitionNode
  • search(target: T, results: T[])
    • target: The target object.
    • results: All matching objects.
  • translate(x: number, y: number, z: number): void
    • x: The amount of translation in the x-axis direction.
    • y: The amount of translation in the y-axis direction.
    • z: The amount of translation in the z-axis direction.
Clone this wiki locally