Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
shadows.h
Go to the documentation of this file.00001 /* 00002 Crystal Space 3D engine 00003 Copyright (C) 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_IENGINE_SHADOWS_H__ 00021 #define __CS_IENGINE_SHADOWS_H__ 00022 00029 #include "csutil/scf.h" 00030 00031 struct iShadowBlock; 00032 struct iShadowBlockList; 00033 00034 class csBox3; 00035 class csFrustum; 00036 class csPlane3; 00037 class csTransform; 00038 class csVector3; 00039 00040 SCF_VERSION (iShadowIterator, 0, 0, 1); 00041 00046 struct iShadowIterator : public iBase 00047 { 00049 virtual void Reset () = 0; 00051 virtual bool HasNext () = 0; 00053 virtual csFrustum* Next () = 0; 00055 virtual void* GetUserData () = 0; 00057 virtual bool IsRelevant () = 0; 00059 virtual void MarkRelevant (bool rel) = 0; 00061 virtual void DeleteCurrent () = 0; 00063 virtual iShadowBlock* GetCurrentShadowBlock () = 0; 00065 virtual iShadowBlock* GetNextShadowBlock () = 0; 00066 }; 00067 00068 SCF_VERSION (iShadowBlock, 0, 0, 3); 00069 00074 struct iShadowBlock : public iBase 00075 { 00077 virtual iShadowIterator* GetShadowIterator (bool reverse = false) = 0; 00079 virtual void DeleteShadows () = 0; 00080 00087 virtual void AddRelevantShadows (iShadowBlock* source, 00088 csTransform* trans = 0) = 0; 00089 00095 virtual void AddRelevantShadows (iShadowBlockList* source) = 0; 00096 00102 virtual void AddAllShadows (iShadowBlockList* source) = 0; 00103 00109 virtual void AddUniqueRelevantShadows (iShadowBlockList* source) = 0; 00110 00116 virtual csFrustum* AddShadow (const csVector3& origin, void* userData, 00117 int num_verts, csPlane3& backplane) = 0; 00118 00120 virtual void UnlinkShadow (int idx) = 0; 00121 00123 virtual int GetShadowCount () = 0; 00124 00126 virtual csFrustum* GetShadow (int idx) = 0; 00127 00131 virtual void Transform (csTransform* trans) = 0; 00132 00134 virtual const csBox3& GetBoundingBox () = 0; 00135 }; 00136 00137 SCF_VERSION (iShadowBlockList, 0, 0, 5); 00138 00143 struct iShadowBlockList : public iBase 00144 { 00146 virtual iShadowIterator* GetShadowIterator (bool reverse = false) = 0; 00153 virtual iShadowIterator* GetShadowIterator ( 00154 const csBox3& bbox, bool reverse = false) = 0; 00155 00157 virtual iShadowBlock* NewShadowBlock (int num_shadows = 30) = 0; 00158 00160 virtual iShadowBlock* GetFirstShadowBlock () = 0; 00162 virtual iShadowBlock* GetLastShadowBlock () = 0; 00164 virtual iShadowBlock* GetNextShadowBlock (iShadowBlock* s) = 0; 00166 virtual iShadowBlock* GetPreviousShadowBlock (iShadowBlock* s) = 0; 00168 virtual void RemoveLastShadowBlock () = 0; 00170 virtual void DeleteAllShadows () = 0; 00171 00178 virtual uint32 MarkNewRegion () = 0; 00179 00184 virtual void RestoreRegion (uint32 prev) = 0; 00185 00190 virtual bool FromCurrentRegion (iShadowBlock* block) = 0; 00191 }; 00192 00195 #endif // __CS_IENGINE_SHADOWS_H__ 00196
Generated for Crystal Space by doxygen 1.4.4