Vista     Main Page   Class List   Function List   File List   Examples  


CMotion2DModel.h

Go to the documentation of this file.
00001 /*
 00002 
 00003   Copyright (c) 1995-2005 by INRIA.
 00004   All Rights Reserved.
 00005 
 00006   This software was developed at:
 00007   IRISA/INRIA Rennes
 00008   Campus Universitaire de Beaulieu
 00009   35042 Rennes Cedex
 00010 
 00011   http://www.irisa.fr
 00012 
 00013 */
 00014 
 00020 #ifndef CMotion2DModel_h
 00021 #define CMotion2DModel_h
 00022 
 00023 #include <stdio.h>
 00024 #include <string>
 00025 #include <Motion2D.h>
 00026 
 00027 using namespace std;
 00028 
 00029 #if defined (WIN32)
 00030 #  if defined MOTION2D_DLL_EXPORTS
 00031 #     define MOTION2D_API __declspec( dllexport )
 00032 #  elif defined MOTION2D_DLL_IMPORTS
 00033 #     define MOTION2D_API __declspec( dllimport )
 00034 #  else
 00035 #     define MOTION2D_API
 00036 #  endif
 00037 #else
 00038 #     define MOTION2D_API
 00039 #endif
 00040 
 00041 
 00042 class MOTION2D_API CMotion2DModel
 00043 {
 00044  public:
 00048  enum {
 00049    MDL_NMAX_COEF = 12  
 00050  };
 00051 
 00052  public:
 00053   CMotion2DModel();
 00054   CMotion2DModel(const CMotion2DModel & model);
 00055   ~CMotion2DModel();
 00056 
 00057   // Specify the caracteristics of the model
 00058   void setOrigin(double row, double col);
 00059   void setIdModel(EIdModel id);
 00060   void setIdModel(string id);
 00061   void setVarLight(bool state, double parameter=0.0);
 00062 
 00063   void setParameters(const double parameters[MDL_NMAX_COEF]);
 00064 
 00065   bool compose(CMotion2DModel model);
 00066   int  getNParameters();
 00067   int  getDegre();
 00068   void getParameters(double parameters[MDL_NMAX_COEF]);
 00069   void reset();
 00070   bool invert(CMotion2DModel &inv);
 00071   string idToString();
 00072   bool changeRepere(double row, double col);
 00073   bool getDisplacement(double row, double col, double &d_row, double &d_col);
 00074 
 00077   EIdModel getIdModel() { return id_model; };
 00078   bool getVarLight();
 00079   bool getVarLight(double & parameter);
 00080   CMotion2DModel getModelLevel(int delta_level);
 00089   void getOrigin(double &row, double &col) {row = li_c; col = co_c; };
 00090 
 00129   double operator[](int n) {return theta[n];}
 00130   void operator=(const CMotion2DModel &model);
 00131 
 00132  private:
 00133   double theta[MAXCOEFSMODEL];  // Paramˆtres du modele de mouvement.
 00134   double li_c, co_c;    // Point de r‰f‰rence du modˆle (peut Štre != du cdg).
 00135   bool var_light;        // booleen. 1 si on veut un modele gerant la variation d'eclairage
 00136   EIdModel id_model;    // identification du model :
 00137 };
 00138 
 00139 #endif
 

Motion2D is Copyright © 1995-2005 by Inria
This documentation was generated on 31 Jan 2005 by Fabien Spindler for Motion2D 1.3.11 using doxygen1.2.18 written by Dimitri van Heesch, © 1997-2005