Device.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.2 $ 00022 // $Date: 2003/02/26 18:56:09 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/renderer/Device.h,v $ 00024 00025 00026 #ifndef Device_H 00027 #define Device_H 00028 00029 class Device 00030 { 00031 public: 00032 Device(); 00033 virtual ~Device(); 00034 00035 // Specify a 2D point to the hardware 00036 virtual void V2F(float x, float y) =0; 00037 00038 // Specify a color to the hardware 00039 virtual void C3F(float r, float g, float b) =0; 00040 00041 // Gets the width of the current window 00042 virtual int GetWidth() =0; 00043 00044 // Gets the height of the current window 00045 virtual int GetHeight() =0; 00046 00047 // Call when about to begin/end drawing a polygon. All V2F calls 00048 // from then on until ENDPOLYGON will be interpreted as 00049 // vertices of the polygon 00050 virtual void BGNPOLYGON() =0; 00051 virtual void ENDPOLYGON() =0; 00052 00053 // draw text 00054 virtual void drawText(float x, float y, char *text, int length) =0; 00055 00056 // Same as BGNPOLYGON but for wireframe polygons 00057 virtual void BGNCLOSEDLINE() =0; 00058 virtual void ENDCLOSEDLINE() =0; 00059 00060 // Call when about to begin drawing a set of points. All V2F 00061 // calls from then on until ENDPOINT will be interpreted as 00062 // points. 00063 virtual void BGNPOINT() =0; 00064 virtual void ENDPOINT() =0; 00065 00066 // Necessary when operating in XWINDOWS mode since the drawn 00067 // image is buffered until this call is made. 00068 virtual void STARTIMAGE() =0; 00069 virtual void ENDIMAGE() =0; 00070 00071 // to open a window 00072 virtual void WINOPEN(const char *title, int xLoc, int yLoc, int width, int height) =0; 00073 00074 // Clears the currently opened window 00075 virtual void CLEAR() =0; 00076 00077 00078 private: 00079 00080 }; 00081 00082 #endif 00083 00084 00085 00086 |