00001 /* This Spaceshooter is an small space adventure game 00002 * Copyright (C) 2006,2007 Steffen Nörtershäuser 00003 * Copyright (C) 2008 Christoph Egger 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00020 //CollisionSystem.h - Deklaration der Klasse CCollisionSystem 00021 //CCollisionSystem wird für das erkennen von Kollisionen benötigt 00022 //Steffen Nörtershäuser 00024 00025 00027 //Schutz vor Mehrfach Deklaration 00028 #ifndef COLLISIONSYSTEM_H 00029 #define COLLISIONSYSTEM_H 00030 00031 #include "BoundingCircle.hpp" 00032 00033 #include <vector> 00034 #include <string> 00035 00037 00041 class CCollisionSystem 00042 { 00043 public: 00045 CCollisionSystem(); 00046 ~CCollisionSystem(); 00047 00049 void Init(std::string FileName); 00050 00052 void SetPosition(float X, float Y); 00053 00055 bool CheckCollision(const CCollisionSystem* CounterPart) const; 00056 00058 std::size_t GetCircleCount() const { return m_Circles.size(); } 00059 00060 //Diese Funktion gibt einen Pointer auf den BoundingCirlce am angeben Index zurück 00061 const CBoundingCircle* GetCircle(int Index) const { return m_Circles[Index]; } 00062 00063 //Diese Funktion gibt die Breite des KollisionSystems zurück 00064 float GetWidth() const; 00065 00066 00067 void Draw() 00068 {} 00069 00070 private: 00071 std::vector<CBoundingCircle*> m_Circles; //Die BoundingCircles 00072 }; 00073 00074 #endif