Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ShipType.cpp

Go to the documentation of this file.
00001 
00002 /*
00003     TSGL - Teddy Space Game Library
00004     Copyright (C) 2002 Timo Suoranta
00005     tksuoran@cc.helsinki.fi
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2.1 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 
00021     $Id: ShipType.cpp,v 1.1 2002/01/08 20:47:05 tksuoran Exp $
00022 */
00023 
00024 
00025 #include "Teddy/ColDet/ColDet.h"
00026 #include "Teddy/Models/Mesh.h"
00027 #include "Teddy/SpaceGame/ShipType.h"
00028 using namespace Teddy::Models;
00029 using Teddy::ColDet::CollisionModel3D;
00030 
00031 
00032 namespace Teddy     {
00033 namespace SpaceGame {
00034 
00035 
00037 ShipType::ShipType( Mesh *mesh, float a, float ms, float pc, float rc, float mp, float mr ){
00038     this->mesh         = mesh;
00039     this->acceleration = a;
00040     this->pitch_const  = pc;
00041     this->roll_const   = rc;
00042     this->max_pitch    = mp;
00043     this->max_roll     = mr;
00044     this->max_speed    = ms;
00045 }
00046 
00047 
00049 Mesh *ShipType::getMesh(){
00050     return this->mesh;
00051 }
00052 
00053 
00055 float ShipType::getAcceleration(){
00056     return this->acceleration;
00057 }
00058 
00059 
00061 float ShipType::getPitchConst(){
00062     return this->pitch_const;
00063 }
00064 
00065 
00067 float ShipType::getRollConst(){
00068     return this->roll_const;
00069 }
00070 
00071 
00073 float ShipType::getMaxPitch(){
00074     return this->max_pitch;
00075 }
00076 
00077 
00079 float ShipType::getMaxRoll(){
00080     return this->max_roll;
00081 }
00082 
00083 
00085 float ShipType::getMaxSpeed(){
00086     return this->max_speed;
00087 }
00088 
00089 
00090 };  //  namespace SpaceGame
00091 };  //  namespace Teddy
00092