Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
rview.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_IENGINE_RVIEW_H__ 00020 #define __CS_IENGINE_RVIEW_H__ 00021 00028 #include "csutil/scf.h" 00029 #include "csgeom/plane3.h" 00030 #include "csgeom/transfrm.h" 00031 #include "csgeom/box.h" 00032 #include "iengine/engine.h" 00033 00034 #include "ivideo/graph3d.h" 00035 00036 struct csFog; 00037 struct iEngine; 00038 struct iClipper2D; 00039 struct iGraphics2D; 00040 struct iGraphics3D; 00041 struct iCamera; 00042 struct iSector; 00043 struct iPortal; 00044 class csRenderView; 00045 class csReversibleTransform; 00046 class csVector3; 00047 class csSphere; 00048 00056 class csFogInfo 00057 { 00058 public: 00060 csFogInfo* next; 00061 00063 csPlane3 incoming_plane; 00065 csPlane3 outgoing_plane; 00070 bool has_incoming_plane; 00071 00077 bool has_outgoing_plane; 00078 00080 csFog* fog; 00081 }; 00082 00089 class csRenderContext 00090 { 00091 friend class csRenderView; 00092 00093 public: 00095 iCamera* icamera; 00097 iClipper2D* iview; 00099 csPlane3 frustum[5]; 00100 00102 csPlane3 clip_planes[7]; 00104 uint32 clip_planes_mask; 00105 00107 iPortal* last_portal; 00109 iSector* previous_sector; 00111 iSector* this_sector; 00112 00117 csPlane3 clip_plane; 00118 00129 bool do_clip_plane; 00130 00139 bool do_clip_frustum; 00140 00145 csFogInfo* fog_info; 00146 00151 bool added_fog_info; 00152 00158 int draw_rec_level; 00159 00165 uint32 context_id; 00166 }; 00167 00168 SCF_VERSION (iRenderView, 0, 5, 1); 00169 00174 struct iRenderView : public iBase 00175 { 00177 virtual csRenderContext* GetRenderContext () = 0; 00178 00180 virtual iEngine* GetEngine () = 0; 00182 virtual iGraphics2D* GetGraphics2D () = 0; 00184 virtual iGraphics3D* GetGraphics3D () = 0; 00186 virtual void GetFrustum (float& lx, float& rx, float& ty, float& by) = 0; 00187 00188 //----------------------------------------------------------------- 00189 // The following functions operate on the current render context. 00190 //----------------------------------------------------------------- 00191 00193 virtual iClipper2D* GetClipper () = 0; 00194 00198 virtual iCamera* GetCamera () = 0; 00199 00203 virtual void CalculateClipSettings (uint32 frustum_mask, 00204 int &clip_portal, int &clip_plane, int &clip_z_plane) = 0; 00205 00211 virtual bool TestBSphere (const csReversibleTransform& w2c, 00212 const csSphere& sphere) = 0; 00213 00225 virtual bool ClipBBox (csPlane3* planes, uint32& frustum_mask, 00226 const csBox3& obox, 00227 int& clip_portal, int& clip_plane, int& clip_z_plane) = 0; 00228 00234 virtual void SetupClipPlanes (const csReversibleTransform& tr_o2c, 00235 csPlane3* planes, uint32& frustum_mask) = 0; 00236 00240 virtual iSector* GetThisSector () = 0; 00241 00245 virtual iSector* GetPreviousSector () = 0; 00246 00250 virtual iPortal* GetLastPortal () = 0; 00251 00256 virtual iCamera* GetOriginalCamera () const = 0; 00257 00261 virtual uint GetCurrentFrameNumber () const = 0; 00262 }; 00263 00266 #endif // __CS_IENGINE_RVIEW_H__ 00267
Generated for Crystal Space by doxygen 1.3.9.1