Page principale   Hiérarchie des classes   Liste des composants   Liste des fichiers   Composants   Déclarations   Pages associées  

GD_Objet.h

00001 #include "common.h"
00002 
00003 #ifndef GD_OBJET_H
00004 #define GD_OBJET_H
00005 
00006 class Container;
00007 
00009 
00011 class GD_Objet{
00012  protected:
00013   /***************************************************************/
00015   Container* container;
00016 
00018   static unsigned short numGDObjets;
00020   unsigned short id;
00021 
00023   type_t type;
00024   
00026   void* userData;
00027 
00029   bool visible;
00031   bool selected;
00033   unsigned char couleur[3];
00034 
00035  private:
00040   double position[3];
00041 
00046   double rotation[12];
00047 
00052   double echelle[3];
00053 
00054  public:
00055   /***************************************************************/
00057 
00058     
00067   GD_Objet ( Container* container=0 );
00068   
00070   virtual ~GD_Objet ( void  );
00071   
00073 
00074   /***************************************************************/
00076 
00077     
00082   void setContainer(Container* _container);
00083 
00088   void getContainer(Container** _container);
00089 
00096   virtual void getTopLevelContainer(Container** _container);
00097 
00102   void setUserData(void* _userData);
00103 
00108   void* getUserData(void);
00109 
00114   void setType(type_t type);
00115 
00120   type_t getType(void);
00121 
00126   unsigned short getId(void);
00127 
00133   void getProperty (property_t* _property);
00134 
00145   bool serialise(char *chaine=0,int taille=0);
00146 
00157   static bool unSerialise(char *chaine=0,int taille=0 , map<GD_Objet *,GD_Objet *> *gdobjetMap=0);
00158     
00160 
00161   /***************************************************************/
00167     
00174   void moveOf ( double x, double y, double z );
00175   
00181   virtual void setPosition ( double* position );
00182 
00191   virtual void getPosition ( double* position );
00192   
00201   void rotateOf ( double angle, double axeX, double axeY, double axeZ );
00202 
00208   virtual void setRotation ( double* rotation );
00209 
00216   void setRotation ( double angleRadian, double *axe );
00217 
00226   void setRotation ( double angleRadian, double ax, double ay, double az );
00227 
00234   void setRotation ( int angleDegre, double *axe );
00235 
00244   void setRotation ( int angleDegre, double ax, double ay, double az );
00245 
00254   virtual void getRotation ( double* rotation );
00255   
00260   virtual void setEchelle(double* echelle) ;
00261 
00269   virtual void getEchelle(double* echelle) ;
00270   
00277   void scaleOf(double x=1,double y=1,double z=1);
00278 
00285   virtual void getAABB(double* aabb);
00286 
00294   bool isIn(frustum_t *frustum);
00295 
00297   
00298   /***************************************************************/
00303     
00308   bool isVisible ( void );
00309 
00311 
00313   void setVisible ( void );
00314 
00316 
00318   void setInvisible ( void );
00319 
00324   bool isSelected ( void );
00325 
00327 
00329   void setSelected ( void );
00330 
00332 
00334   void setNotSelected ( void );
00335 
00337 
00342   void setCouleur ( unsigned char r, unsigned char v, unsigned char b );
00343 
00345 
00348   void setCouleur ( unsigned char* couleur );
00349   
00351 
00355   void getCouleur ( unsigned char* couleur  ); //passer un unsigned char[3]
00356 
00358 };
00359 
00360 #endif
00361 
00362 #include "Container.h"

Cette documentation a été généré le 24 May 2003 par Doxygen version 1.3-rc3.
Pour tout renseignements :