00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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