Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

fview.h

00001 /*
00002     Copyright (C) 2000-2001 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 __IENGINE_FVIEW_H__
00020 #define __IENGINE_FVIEW_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csgeom/plane3.h"
00024 #include "csgeom/transfrm.h"
00025 #include "csgeom/box.h"
00026 
00027 struct iFrustumView;
00028 struct iShadowBlockList;
00029 class csFrustum;
00030 class csFrustumContext;
00031 class csObject;
00032 class csOctreeNode;
00033 
00034 
00035 SCF_VERSION (iFrustumViewUserdata, 0, 0, 1);
00036 
00040 struct iFrustumViewUserdata : public iBase
00041 {
00042 };
00043 
00044 
00051 class csFrustumContext
00052 {
00053 private:
00059   iShadowBlockList* shadows;
00064   bool shared;
00065 
00067   bool first_time;
00068 
00070   bool mirror;
00071 
00076   csFrustum* light_frustum;
00077 
00078 public:
00080   csFrustumContext () :
00081         shadows (NULL),
00082         shared (false),
00083         first_time (false),
00084         mirror (false)
00085   { }
00086 
00087   csFrustumContext& operator= (csFrustumContext const& c)
00088   {
00089     shadows = c.shadows;
00090     shared = c.shared;
00091     mirror = c.mirror;
00092     first_time = c.first_time;
00093     light_frustum = c.light_frustum;
00094     return *this;
00095   }
00096 
00098   iShadowBlockList* GetShadows () { return shadows; }
00100   void SetShadows (iShadowBlockList* shad, bool sh)
00101   {
00102     shadows = shad;
00103     shared = sh;
00104   }
00106   bool IsShared () { return shared; }
00107 
00109   void SetLightFrustum (csFrustum* lf) { light_frustum = lf; }
00111   csFrustum* GetLightFrustum () { return light_frustum; }
00112 
00117   void SetMirrored (bool m) { mirror = m; }
00119   bool IsMirrored () { return mirror; }
00120 
00122   void SetFirstTime (bool ft) { first_time = ft; }
00124   bool IsFirstTime () { return first_time; }
00125 };
00126 
00127 SCF_VERSION (iFrustumView, 0, 1, 6);
00128 
00133 struct iFrustumView : public iBase
00134 {
00136   virtual csFrustumContext* GetFrustumContext () const = 0;
00144   virtual void CreateFrustumContext () = 0;
00149   virtual csFrustumContext* CopyFrustumContext () = 0;
00154   virtual void SetFrustumContext (csFrustumContext* ctxt) = 0;
00160   virtual void RestoreFrustumContext (csFrustumContext* original) = 0;
00161 
00163   virtual void CallNodeFunction (csOctreeNode* onode, bool vis) = 0;
00165   virtual void CallPolygonFunction (csObject* poly, bool vis) = 0;
00167   virtual void CallCurveFunction (csObject* curve, bool vis) = 0;
00168 
00170   virtual float GetRadius () = 0;
00172   virtual bool ThingShadowsEnabled () = 0;
00174   virtual bool CheckShadowMask (unsigned int mask) = 0;
00176   virtual bool CheckProcessMask (unsigned int mask) = 0;
00177 
00179   virtual void StartNewShadowBlock () = 0;
00180 
00182   virtual void SetUserdata (iFrustumViewUserdata* data) = 0;
00184   virtual iFrustumViewUserdata* GetUserdata () = 0;
00185 };
00186 
00187 #endif
00188 

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000