cstool/csview.h
Go to the documentation of this file.
00001 /* 00002 CrystalSpace 3D renderer view 00003 Copyright (C) 1998-2001 by Jorrit Tyberghein 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_CSVIEW_H__ 00021 #define __CS_CSVIEW_H__ 00022 00027 #include "csextern.h" 00028 00029 #include "csutil/ref.h" 00030 #include "csutil/scf_implementation.h" 00031 #include "igeom/clip2d.h" 00032 #include "ivaria/view.h" 00033 00034 class csBox2; 00035 class csPoly2D; 00036 00041 class CS_CRYSTALSPACE_EXPORT csView : 00042 public scfImplementation1<csView, iView> 00043 { 00044 private: 00046 csRef<iEngine> Engine; 00048 csRef<iGraphics3D> G3D; 00050 int OldWidth, OldHeight; 00051 00053 csRef<iCamera> Camera; 00054 00056 csBox2* RectView; 00058 csPoly2D* PolyView; 00060 csRef<iClipper2D> Clipper; 00061 00063 void UpdateView (); 00064 00066 bool AutoResize; 00067 00068 public: 00070 csView (iEngine *iEngine, iGraphics3D* ig3d); 00072 virtual ~csView (); 00073 00075 virtual iEngine* GetEngine (); 00077 virtual void SetEngine (iEngine* e); 00078 00080 virtual iCamera* GetCamera (); 00082 virtual void SetCamera (iCamera* c); 00083 00085 virtual iGraphics3D* GetContext (); 00087 virtual void SetContext (iGraphics3D *ig3d); 00088 00090 virtual void SetRectangle (int x, int y, int w, int h); 00092 virtual void ClearView (); 00094 virtual void AddViewVertex (int x, int y); 00096 virtual void RestrictClipperToScreen (); 00097 00099 virtual void SetAutoResize (bool state) { AutoResize = state; } 00100 00102 virtual void UpdateClipper(); 00104 virtual iClipper2D* GetClipper (); 00106 virtual void Draw (iMeshWrapper* mesh = 0); 00107 }; 00108 00109 #endif // __CS_CSVIEW_H__
Generated for Crystal Space 1.4.1 by doxygen 1.7.1