00001 00002 /* 00003 TEDDY - General graphics application library 00004 Copyright (C) 1999-2002 Timo Suoranta 00005 tksuoran@cc.helsinki.fi 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 00021 $Id: ViewClient.h,v 1.4 2002/01/11 14:34:59 tksuoran Exp $ 00022 */ 00023 00024 00025 #ifndef TEDDY__GRAPHICS__VIEW_CLIENT__H 00026 #define TEDDY__GRAPHICS__VIEW_CLIENT__H 00027 00028 00029 #include "Teddy/Graphics/Color.h" 00030 #include "Teddy/Maths/Vector.h" 00031 #include "Teddy/Maths/Vector2.h" 00032 00033 00034 namespace Teddy { 00035 namespace Graphics { 00036 00037 00038 class View; 00039 00040 00042 class ViewClient { 00043 public: 00044 ViewClient( View *view ):view(view){} 00045 virtual ~ViewClient(){} 00046 00047 void vertex ( const float a, const float b ) const; 00048 void vertex ( const Teddy::Maths::TVector <int> &v ) const; 00049 void vertex ( const Teddy::Maths::TVector <float> &v ) const; 00050 void vertex ( const Teddy::Maths::TVector <double> &v ) const; 00051 void vertex ( const Teddy::Maths::TVector2<int> &v ) const; 00052 void vertex ( const Teddy::Maths::TVector2<float> &v ) const; 00053 void vertex ( const Teddy::Maths::TVector2<double> &v ) const; 00054 void normal ( const Teddy::Maths::TVector <int> &n ) const; 00055 void normal ( const Teddy::Maths::TVector <float> &n ) const; 00056 void normal ( const Teddy::Maths::TVector <double> &n ) const; 00057 void normal ( const Teddy::Maths::TVector2<int> &n ) const; 00058 void normal ( const Teddy::Maths::TVector2<float> &n ) const; 00059 void normal ( const Teddy::Maths::TVector2<double> &n ) const; 00060 void texture ( const Teddy::Maths::TVector <int> &t ) const; 00061 void texture ( const Teddy::Maths::TVector <float> &t ) const; 00062 void texture ( const Teddy::Maths::TVector <double> &t ) const; 00063 void texture ( const Teddy::Maths::TVector2<int> &t ) const; 00064 void texture ( const Teddy::Maths::TVector2<float> &t ) const; 00065 void texture ( const Teddy::Maths::TVector2<double> &t ) const; 00066 void color ( const float r, const float g, const float b, const float a = 1 ); 00067 void color ( const Color &c ); 00068 00069 void beginPoints (); 00070 void beginLines (); 00071 void beginLineStrip (); 00072 void beginLineLoop (); 00073 void beginTriangles (); 00074 void beginTriangleStrip(); 00075 void beginTriangleFan (); 00076 void beginQuads (); 00077 void beginQuadStrip (); 00078 void beginPolygon (); 00079 void end (); 00080 void begin2d (); 00081 void end2d (); 00082 void setView ( View *view ); 00083 View *getView () const; 00084 00085 protected: 00086 View *view; 00087 }; 00088 00089 00090 }; // namespace Graphics 00091 }; // namespace Teddy 00092 00093 00094 #endif // TEDDY__GRAPHICS__VIEW_CLIENT__H 00095