Skip to content
Projects

tree_d_3d.quad

The square cells of the quadtrees.

Classes

NameDescription
QuadRepresents a quadrant in the quadtree.

Quadclass#

class Quad(x_mid: float, y_mid: float, half_size: float)

Represents a quadrant in the quadtree.

halfattributeinstance attribute#

half: float = half_size

xmidattributeinstance attribute#

xmid: float = x_mid

ymidattributeinstance attribute#

ymid: float = y_mid

containsmethod#

def contains(x: float, y: float) -> bool

Check if point is within this quadrant.

northeastmethod#

def northeast() -> Quad

Create northeast child quadrant.

northwestmethod#

def northwest() -> Quad

Create northwest child quadrant.

southeastmethod#

def southeast() -> Quad

Create southeast child quadrant.

southwestmethod#

def southwest() -> Quad

Create southwest child quadrant.