Physics.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 5 -*- */
00002 
00003 /*
00004  * Combination of a first person action and a real time strategy battle game.
00005  */
00006  
00007 /*
00008  * Physics.h
00009  * MetalWarriors
00010  * $Revision: 1.9 $
00011  *
00012  * Created by Daniel Aarno on Thu Oct 30 2003.
00013  * Copyright (c) 2003 Daniel Aarno and Erik Ytterberg - All rights reserved.
00014  *
00015  *     This program is free software; you can redistribute it and/or modify
00016  *     it under the terms of the GNU General Public License as published by
00017  *     the Free Software Foundation; either version 2 of the License, or
00018  *     (at your option) any later version.
00019  *
00020  *     This program is distributed in the hope that it will be useful,
00021  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  *     GNU General Public License for more details.
00024  *
00025  *     You should have received a copy of the GNU General Public License
00026  *     along with this program; if not, write to the Free Software
00027  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00028  */
00029 
00030 
00031 #ifndef _PHYSICS_
00032 #define _PHYSICS_
00033 
00034 #include <string.h>
00035 
00036 
00037 #define INF_MASS -1
00038 
00046 class Physics 
00047 {
00048 public:
00049      float pos[3];  
00050      float rot[3];  
00051      float vel[3];  
00052      float aVel[3]; 
00053      float mass;    
00054      
00055      float gravityMod;   
00056 
00057      static float gravity;    
00058 
00059 public:
00064      Physics() : mass(1.0), gravityMod(1.0) 
00065      {
00066           memset(pos, 0, sizeof(float)*3);
00067           memset(vel, 0, sizeof(float)*3);
00068           memset(rot, 0, sizeof(float)*3);
00069           memset(aVel, 0, sizeof(float)*3);
00070      }
00071 };
00072 
00073 #endif //_PHYSICS_

Generated on Sun Mar 11 15:33:23 2007 for MetalWarriors by  doxygen 1.4.7