Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cr/src/lib/collision_reaction/cr_object_damage.cc @ 8029

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

cr: more collision, new interface

File size: 1.2 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#include "collision.h"
19
20#include "cr_object_damage.h"
21
22
23using namespace std;
24
25
26/**
27 *  standard constructor
28 */
29CRObjectDamage::CRObjectDamage ()
30  : CollisionReaction()
31{
32  this->setClassID(CL_CR_OBJECT_DAMAGE, "CRObjectDamage");
33
34}
35
36
37/**
38 *  standard deconstructor
39 */
40CRObjectDamage::~CRObjectDamage ()
41{
42}
43
44
45/**
46 * caluculates and applys the reaction to a specific collision
47 *  @param collision the collision
48 */
49void CRObjectDamage::reactToCollision(Collision* collision)
50{
51
52  const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
53  std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin();
54  for(; it != collisionEvents->end(); it++)
55  {
56    // go through the collisions and try to estimate the damage
57
58  }
59
60}
61
Note: See TracBrowser for help on using the repository browser.