/************************************************************** * Name: Richard Sean Hsieh (rhsieh) * File: SimsGraphics.H * Asgn: 3-sims * Date: Wed Mar 12 02:04:58 EST 2003 * Desc: SimsGraphics object. this object contains the main OpenGL code to * load files, display objects. It keeps track of every graphical object and * draws them every 30th of a second (or whatever time interval we decide). It * also performs operations that the GUI requires (transforming pixel * coordinates to world coordinates, moving the camera around, etc) **************************************************************/ #ifndef SimsGraphics_Header #define SimsGraphics_Header #include "LogicController.H" class Building; class Road; class Character; typedef int terraintype; typedef int proptype; class SimsGraphics { public: SimsGraphics(); virtual ~SimsGraphics(); // Functions GUI calls // this takes in pixel coordinates and sets x,y to the world coordinates they correspond to (so the GUI can pass it on to the logic). int getWorldCoordinates(int pixelx, int pixely, float &x, float &y); // if the mouse moves (x,y) pixels up and across, this pans the camera accordingly int cameraPan(int x, int y); // if the mouse moves (x,y) pixels up and across, this zooms the camera accordingly int cameraZoom(int x, int y); // if the mouse moves (x,y) pixels up and across, this rotates the camera accordingly int cameraRotate(int x, int y); // Functions Logic calls int addTerrain(LogicPoint pt, terraintype type); int addProp(LogicPoint pt, proptype type); int addBuilding(Building* building); int addRoad(Road* road); int addCharacter(Character* character); int deleteBuilding(Building* building); int deleteRoad(Road* road); int deleteCharacter(Character* character); protected: private: }; #endif