Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

View.h

Go to the documentation of this file.
00001 #ifndef HEADER_VIEW_H
00002 #define HEADER_VIEW_H
00003 
00004 class Cube;
00005 class PhaseLocker;
00006 class Decor;
00007 
00008 #include "Drawable.h"
00009 #include "ModelList.h"
00010 #include "V2.h"
00011 
00012 /**
00013  * View for model.
00014  */
00015 class View : public Drawable {
00016     public:
00017         static const int SCALE = 15;
00018     private:
00019         typedef std::vector<Decor*> t_decors;
00020         t_decors m_decors;
00021         ModelList m_models;
00022         int m_animShift;
00023         int m_shiftSize;
00024         SDL_Surface *m_screen;
00025         V2 m_screenShift;
00026     private:
00027         void computeShiftSize(int phases);
00028         void drawDecors();
00029     public:
00030         View(const ModelList &models);
00031         virtual ~View();
00032         void setScreenShift(const V2 &shift) { m_screenShift = shift; }
00033         void noteNewRound(int phases);
00034 
00035         void drawModel(Cube *model);
00036         virtual void drawOn(SDL_Surface *screen);
00037 
00038         V2 getScreenPos(const Cube *model) const;
00039         V2 getFieldPos(const V2 &cursor) const;
00040         void addDecor(Decor *new_decor) { m_decors.push_back(new_decor); }
00041         void removeDecors();
00042 };
00043 
00044 #endif

Generated on Wed Jun 1 09:54:32 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2