Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/collision_detection/cd_engine.cc @ 4675

Last change on this file since 4675 was 4675, checked in by patrick, 19 years ago

orxonox/trunk: now used the player model to do an obb on it - works greatly and it realy makes sense! im so excited…

File size: 1.6 KB
Line 
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#include "abstract_model.h"
22
23using namespace std;
24
25
26/**
27   \brief standard constructor
28*/
29CDEngine::CDEngine ()
30{
31   this->setClassName("CDEngine");
32   this->setClassID(CL_CD_ENGINE, "CDEngine");
33
34   /* testing purposes only: */
35   this->rootTree = new OBBTree();
36}
37
38/**
39   \brief the singleton reference to this class
40*/
41CDEngine* CDEngine::singletonRef = NULL;
42
43/**
44   \brief standard deconstructor
45
46*/
47CDEngine::~CDEngine ()
48{
49  CDEngine::singletonRef = NULL;
50
51}
52
53
54void CDEngine::checkCollisions()
55{
56
57}
58
59
60
61void CDEngine::drawBV(int depth, int drawMode) const
62{
63  /* this would operate on  worldList bases, for testing purposes, we only use one OBBTree */
64  this->rootTree->drawBV(depth, drawMode);
65}
66
67
68
69
70
71void CDEngine::debug()
72{
73  PRINT(0)("\n=============================| CDEngine::debug() |===\n");
74  PRINT(0)("=  CDEngine: Spawning Tree Start\n");
75  this->rootTree->debug();
76  PRINT(0)("=  CDEngine: Spawning Tree: Finished\n");
77  PRINT(0)("=======================================================\n");
78
79}
80
81void CDEngine::debugSpawnTree(int depth, sVec3D* vertices, int numVertices)
82{
83  this->rootTree->spawnBVTree(depth, vertices, numVertices);
84}
Note: See TracBrowser for help on using the repository browser.