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

Quadtree leaf. More...

#include <QuadTree.h>

Inheritance diagram for CQuadTreeLeaf:
Collaboration diagram for CQuadTreeLeaf:

Public Member Functions

virtual ~CQuadTreeLeaf ()
 Virtual destructor.
 
- Public Member Functions inherited from CQuadTreeNode
virtual ~CQuadTreeNode ()
 Virtual destructor.
 

Private Attributes

std::vector< Shapes::CShape * > m_stdShapes [(UINT) Shapes::eMotion::Size]
 Shape lists.
 

Friends

class CQuadTree
 
class CObjectManager
 

Additional Inherited Members

- Protected Attributes inherited from CQuadTreeNode
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.
 

Detailed Description

A quadtree leaf, which is a quadtree node that also stores a list of objects in the leaf's area.

Constructor & Destructor Documentation

◆ ~CQuadTreeLeaf()

CQuadTreeLeaf::~CQuadTreeLeaf ( )
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.