|
shadows.h00001 /* 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 __I_SHADOWS_H__ 00021 #define __I_SHADOWS_H__ 00022 00023 #include "csutil/scf.h" 00024 00025 struct iShadowBlock; 00026 struct iShadowBlockList; 00027 struct iSector; 00028 class csFrustum; 00029 class csTransform; 00030 class csPlane3; 00031 class csVector3; 00032 00033 SCF_VERSION (iShadowIterator, 0, 0, 1); 00034 00040 struct iShadowIterator : public iBase 00041 { 00043 virtual void Reset () = 0; 00045 virtual bool HasNext () = 0; 00047 virtual csFrustum* Next () = 0; 00049 virtual void* GetUserData () = 0; 00051 virtual bool IsRelevant () = 0; 00053 virtual void MarkRelevant (bool rel) = 0; 00055 virtual void DeleteCurrent () = 0; 00057 virtual iShadowBlock* GetCurrentShadowBlock () = 0; 00059 virtual iShadowBlock* GetNextShadowBlock () = 0; 00060 }; 00061 00062 SCF_VERSION (iShadowBlock, 0, 0, 2); 00063 00068 struct iShadowBlock : public iBase 00069 { 00071 virtual iShadowIterator* GetShadowIterator (bool reverse = false) = 0; 00073 virtual iSector* GetSector () = 0; 00075 virtual int GetRecLevel () = 0; 00077 virtual void DeleteShadows () = 0; 00078 00085 virtual void AddRelevantShadows (iShadowBlock* source, 00086 csTransform* trans = NULL) = 0; 00087 00093 virtual void AddRelevantShadows (iShadowBlockList* source) = 0; 00094 00100 virtual void AddAllShadows (iShadowBlockList* source) = 0; 00101 00107 virtual void AddUniqueRelevantShadows (iShadowBlockList* source) = 0; 00108 00114 virtual csFrustum* AddShadow (const csVector3& origin, void* userData, 00115 int num_verts, csPlane3& backplane) = 0; 00116 00118 virtual void UnlinkShadow (int idx) = 0; 00119 00121 virtual int GetShadowCount () = 0; 00122 00124 virtual csFrustum* GetShadow (int idx) = 0; 00125 00129 virtual void Transform (csTransform* trans) = 0; 00130 }; 00131 00132 SCF_VERSION (iShadowBlockList, 0, 0, 2); 00133 00138 struct iShadowBlockList : public iBase 00139 { 00141 virtual iShadowIterator* GetShadowIterator (bool reverse = false) = 0; 00142 00144 virtual iShadowBlock* NewShadowBlock (iSector* sector, int draw_busy, 00145 int num_shadows = 30) = 0; 00147 virtual iShadowBlock* NewShadowBlock () = 0; 00148 00150 virtual iShadowBlock* GetFirstShadowBlock () = 0; 00152 virtual iShadowBlock* GetLastShadowBlock () = 0; 00154 virtual iShadowBlock* GetNextShadowBlock (iShadowBlock* s) = 0; 00156 virtual iShadowBlock* GetPreviousShadowBlock (iShadowBlock* s) = 0; 00158 virtual void RemoveLastShadowBlock () = 0; 00160 virtual void DeleteAllShadows () = 0; 00161 }; 00162 00163 #endif // __I_SHADOWS_H__ 00164 Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |