/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Patrick Boenzli co-programmer: ... */ #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION #include "cd_engine.h" #include "obb_tree.h" #include "debug.h" #include "abstract_model.h" using namespace std; /** \brief standard constructor */ CDEngine::CDEngine () { this->setClassName("CDEngine"); this->setClassID(CL_CD_ENGINE, "CDEngine"); /* testing purposes only: */ this->rootTree = new OBBTree(); } /** \brief the singleton reference to this class */ CDEngine* CDEngine::singletonRef = NULL; /** \brief standard deconstructor */ CDEngine::~CDEngine () { CDEngine::singletonRef = NULL; } void CDEngine::checkCollisions() { } void CDEngine::drawBV(int depth, int drawMode) const { /* this would operate on worldList bases, for testing purposes, we only use one OBBTree */ this->rootTree->drawBV(depth, drawMode); } void CDEngine::debug() { PRINT(0)("\n=============================| CDEngine::debug() |===\n"); PRINT(0)("= CDEngine: Spawning Tree Start\n"); this->rootTree->debug(); PRINT(0)("= CDEngine: Spawning Tree: Finished\n"); PRINT(0)("=======================================================\n"); } void CDEngine::debugSpawnTree(int depth, sVec3D* vertices, int numVertices) { this->rootTree->spawnBVTree(depth, vertices, numVertices); }