22 #ifndef SCUMM_HE_BASKETBALL_COLLISION_BBALL_COLLISION_TREE_H 23 #define SCUMM_HE_BASKETBALL_COLLISION_BBALL_COLLISION_TREE_H 27 #include "scumm/he/basketball/collision/bball_collision_object.h" 28 #include "scumm/he/basketball/collision/bball_collision_stack.h" 29 #include "scumm/he/basketball/collision/bball_collision_node.h" 33 #define INIT_MAX_HEIGHT 10 34 #define INIT_MAX_OBJECTS 5 36 class CCollisionObjectTree {
38 CCollisionObjectTree() : _maxHeight(INIT_MAX_HEIGHT),
39 _maxObjectsInNode(INIT_MAX_OBJECTS),
43 CCollisionObjectTree(
const CCollisionObjectVector &inputObjects);
44 ~CCollisionObjectTree();
46 void initialize(
const CCollisionObjectVector &inputObjects);
47 void selectObjectsInBound(
const U32BoundingBox &bound, CCollisionObjectVector *targetVector);
52 CCollisionNode *buildSelectionStructure(
const CCollisionObjectVector &inputObjects,
int currentLevel,
const U32BoundingBox &nodeRange);
55 size_t _maxObjectsInNode;
56 CCollisionNode *_root;
64 #endif // SCUMM_HE_BASKETBALL_COLLISION_BBALL_COLLISION_TREE_H