Página principal | Jerarquía de la clase | Lista de componentes | Lista de archivos | Miembros de las clases

GE_Object.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Luis Murciano Renedo                            *
00003  *   luis@localhost                                                        *
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 2 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, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef GEOBJECT_H
00021 #define GEOBJECT_H
00022 
00023 #include <stdio.h>
00024 #include <iostream.h>
00025 
00026 #include "GE_Types.h"
00027 static int count;
00029 
00030 class GE_Object{        
00031         protected:
00032         static int count;
00033         struct Rstatus{
00034         bool active;
00035                 }status;
00036         char size; //Es una solo una guia para saber el tamaño 0 = humanoide
00037         int mass;//Es el Peso
00038         GE_Vector pos;
00039         GE_Vector direction;
00040         
00041         public:
00042         GE_Object(){};
00043         GE_Object(int x ,int y) ;
00044         virtual ~GE_Object();
00045 
00046         inline void setActive(bool state){status.active = state;};
00047         inline int getCount(){return count;};
00048         inline void setPosition(int x,int y, int z){pos.x = x;pos.y =y;pos.z =z;}
00049         inline void setPosition(int x,int y){pos.x = x;pos.y =y;};
00050         inline void setPosition(GE_Vector vector){pos = vector;};
00051         //void setPosition(AR_Rect sdl_rect);
00052                         
00053         inline GE_Vector getPosition(){return pos;};            
00054         inline int getPositionX(){return pos.x;};       
00055         inline int getPositionY(){return pos.y;};       
00056         inline GE_Vector getDirection(){return direction;};
00057                 
00058         inline void setDirection(int x,int y, int z){direction.x =x; direction.y = y; direction.z = z;};
00059         
00060                 inline void setDirection(GE_Vector vector){direction = vector;};
00061                 
00062         inline void setDirection(int x,int y){direction.x =x; direction.y = y;};
00063                         
00064         inline void setDirectionX(int x)
00065                         {
00066                                 direction.x = x;
00067                         };
00068                         
00069         inline void setDirectionY(int y)
00070                         {
00071                                 direction.y = y;
00072                         };
00073         inline void setDirectionZ(int z)
00074                         {
00075                                 direction.z = z;
00076                         };
00077                         
00078                         
00079         inline int getDirectionX()
00080                         {
00081                                 return direction.x;
00082                         };
00083         inline int getDirectionY()
00084                         {
00085                                 return direction.y;
00086                         };
00087         inline int getDirectionZ()
00088                         {
00089                                 return direction.z;
00090                         };
00091         inline void setPositionX(int x)
00092                         {
00093                                 pos.x = x;
00094                         };
00095                         
00096         inline void setPostionY(int y)
00097                         {
00098                                 pos.y = y;
00099                         };
00100         inline void setPositionZ(int z)
00101                         {
00102                                 pos.z = z;
00103                         };
00104                         
00105         inline void addPosition(int x,int y,int z)
00106                         {
00107                                 pos.x +=x;
00108                                 pos.y +=y;
00109                                 pos.z +=z;
00110                         };
00111                         inline void addDirection(int x,int y,int z)
00112                         {
00113                                 direction.x +=x;
00114                                 direction.y +=y;
00115                                 direction.z +=z;
00116                         };
00117         inline void setMass(int m){mass = m;};
00118         inline int getMass(void){return mass;};
00119 
00120         };
00121 
00122 #endif

Generado el Mon Dec 6 10:30:28 2004 para Genma por doxygen 1.3.5