Collision Math Toy
Game Physics with Bespoke Code
Loading...
Searching...
No Matches
CQuadTreeNode Class Reference

Quadtree node. More...

#include <QuadTree.h>

Inheritance diagram for CQuadTreeNode:

Public Member Functions

virtual ~CQuadTreeNode ()
 Virtual destructor.
 

Protected Attributes

Shapes::CAabb2D m_cAABB
 Axially aligned bounding box.
 
UINT m_nNumDynamicShapes = 0
 Number of dynamic shapes in descendants.
 
UINT m_nNumKinematicShapes = 0
 Number of kinematic shapes in descendants.
 
UINT m_nNumShapes = 0
 Number of shapes of all motion types in descendants.
 

Friends

class CQuadTree
 

Detailed Description

A quadtree node, which represents a small rectangle of the game world. Each node represents a quadrant of the rectangle represented by its parent.

Constructor & Destructor Documentation

◆ ~CQuadTreeNode()

CQuadTreeNode::~CQuadTreeNode ( )
virtual

A virtual destructor is necessary here because CQuadTree has a list of pointers to CQuadTreeNode, some of which point to the derived class CQuadTreeLeaf. If thie destructor is not declared virtual then the CQuadTreeLeaf destructor doesn't get run in the CQuadTree destructor.