Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cr/src/lib/collision_reaction/cr_engine.cc @ 7940

Last change on this file since 7940 was 7940, checked in by patrick, 18 years ago

cr: init and reset phases

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_REACTION
17
18
19
20#include "collision.h"
21#include "cr_defs.h"
22
23#include "cr_engine.h"
24
25using namespace std;
26
27
28/**
29 * standard constructor
30 */
31CREngine::CREngine ()
32  : BaseObject()
33{
34   this->setClassID(CL_CR_ENGINE, "CREngine");
35   this->setName("CREngine");
36
37   this->init();
38}
39
40/**
41 *  the singleton reference to this class
42 */
43CREngine* CREngine::singletonRef = NULL;
44
45/**
46   @brief standard deconstructor
47 */
48CREngine::~CREngine ()
49{
50  CREngine::singletonRef = NULL;
51}
52
53
54void CREngine::init()
55{
56  // create a list of Collision events (precaching)
57  Collision* collisions = new Collision[CR_MAX_COLLISIONS];
58  for( int i = 0; i < CR_MAX_COLLISIONS; i++)
59    this->cachedCollisions.push_back(collisions[i]);
60}
61
62
63void CREngine::reset()
64{}
65
66
67/**
68 * subscribes a WorldEntity for a CollisionReaction
69 *  @param owner: the WE to subscribe
70 *  @param type: the type of collision reaction to perform
71 */
72CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
73{
74
75}
76
77bool CREngine::unsubscribeReaction(WorldEntity* worldEntity)
78{}
79
80
81bool CREngine::unsubscribeReaction(CollisionHandle* collisionHandle)
82{}
83
84
85void CREngine::handleCollisions()
86{}
87
88
89
90void CREngine::debug()
91{
92
93}
94
Note: See TracBrowser for help on using the repository browser.