| 1 | /* |
|---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
|---|
| 3 | |
|---|
| 4 | Copyright (C) 2004 orx |
|---|
| 5 | |
|---|
| 6 | This program is free software; you can redistribute it and/or modify |
|---|
| 7 | it under the terms of the GNU General Public License as published by |
|---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
|---|
| 9 | any later version. |
|---|
| 10 | |
|---|
| 11 | ### File Specific: |
|---|
| 12 | main-programmer: Patrick Boenzli |
|---|
| 13 | co-programmer: ... |
|---|
| 14 | */ |
|---|
| 15 | |
|---|
| 16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COLLISION |
|---|
| 17 | |
|---|
| 18 | #include "cd_engine.h" |
|---|
| 19 | #include "obb_tree.h" |
|---|
| 20 | #include "debug.h" |
|---|
| 21 | |
|---|
| 22 | using namespace std; |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | /** |
|---|
| 26 | \brief standard constructor |
|---|
| 27 | */ |
|---|
| 28 | CDEngine::CDEngine () |
|---|
| 29 | { |
|---|
| 30 | this->setClassName("CDEngine"); |
|---|
| 31 | this->setClassID(CL_CD_ENGINE, "CDEngine"); |
|---|
| 32 | |
|---|
| 33 | /* testing purposes only: */ |
|---|
| 34 | this->rootTree = new OBBTree(); |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | /** |
|---|
| 38 | \brief the singleton reference to this class |
|---|
| 39 | */ |
|---|
| 40 | CDEngine* CDEngine::singletonRef = NULL; |
|---|
| 41 | |
|---|
| 42 | /** |
|---|
| 43 | \brief standard deconstructor |
|---|
| 44 | |
|---|
| 45 | */ |
|---|
| 46 | CDEngine::~CDEngine () |
|---|
| 47 | { |
|---|
| 48 | CDEngine::singletonRef = NULL; |
|---|
| 49 | |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | void CDEngine::drawBV(int currentDepth, const int depth) const |
|---|
| 55 | { |
|---|
| 56 | /* this would operate on worldList bases, for testing purposes, we only use one OBBTree */ |
|---|
| 57 | this->rootTree->drawBV(currentDepth, depth); |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | void CDEngine::drawBVPolygon(int currentDepth, const int depth) const |
|---|
| 62 | {} |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | void CDEngine::drawBVBlended(int currentDepth, const int depth) const |
|---|
| 66 | {} |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | void CDEngine::debug() |
|---|
| 71 | { |
|---|
| 72 | PRINT(0)("\n=============================| CDEngine::debug() |===\n"); |
|---|
| 73 | PRINT(0)("= CDEngine: Spawning Tree Start\n"); |
|---|
| 74 | this->rootTree->debug(); |
|---|
| 75 | PRINT(0)("= CDEngine: Spawning Tree: Finished\n"); |
|---|
| 76 | PRINT(0)("=======================================================\n"); |
|---|
| 77 | |
|---|
| 78 | } |
|---|