Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
viscull.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_VISCULL_H__ 00021 #define __CS_IENGINE_VISCULL_H__ 00022 00029 #include "csutil/scf.h" 00030 00031 struct iDocumentNode; 00032 struct iFrustumView; 00033 struct iMeshWrapper; 00034 struct iMovable; 00035 struct iObjectModel; 00036 struct iRenderView; 00037 struct iVisibilityObject; 00038 00039 class csBox3; 00040 class csFlags; 00041 class csPlane3; 00042 class csSphere; 00043 class csVector3; 00044 00045 SCF_VERSION (iVisibilityObjectIterator, 0, 1, 0); 00046 00050 struct iVisibilityObjectIterator : public iBase 00051 { 00053 virtual bool HasNext () const = 0; 00054 00056 virtual iVisibilityObject* Next () = 0; 00057 00059 virtual void Reset () = 0; 00060 }; 00061 00062 00063 SCF_VERSION (iVisibilityCullerListener, 0, 0, 1); 00064 00069 struct iVisibilityCullerListener : public iBase 00070 { 00078 virtual void ObjectVisible (iVisibilityObject *visobject, 00079 iMeshWrapper *mesh, uint32 frustum_mask) = 0; 00080 }; 00081 00082 SCF_VERSION (iVisibilityCuller, 0, 7, 0); 00083 00106 struct iVisibilityCuller : public virtual iBase 00107 { 00113 virtual void Setup (const char* name) = 0; 00121 virtual void RegisterVisObject (iVisibilityObject* visobj) = 0; 00123 virtual void UnregisterVisObject (iVisibilityObject* visobj) = 0; 00130 virtual bool VisTest (iRenderView* irview, 00131 iVisibilityCullerListener* viscallback) = 0; 00138 virtual void PrecacheCulling () = 0; 00139 00144 virtual csPtr<iVisibilityObjectIterator> VisTest (const csBox3& box) = 0; 00145 00150 virtual csPtr<iVisibilityObjectIterator> VisTest (const csSphere& sphere) = 0; 00155 virtual void VisTest (const csSphere& sphere, 00156 iVisibilityCullerListener* viscallback) = 0; 00157 00163 virtual csPtr<iVisibilityObjectIterator> VisTest (csPlane3* plane, 00164 int num_planes) = 0; 00165 00172 virtual void VisTest (csPlane3* plane, int num_planes, 00173 iVisibilityCullerListener* viscallback) = 0; 00174 00181 virtual csPtr<iVisibilityObjectIterator> IntersectSegmentSloppy ( 00182 const csVector3& start, const csVector3& end) = 0; 00183 00189 virtual csPtr<iVisibilityObjectIterator> IntersectSegment ( 00190 const csVector3& start, const csVector3& end, bool accurate = false) = 0; 00191 00201 virtual bool IntersectSegment (const csVector3& start, 00202 const csVector3& end, csVector3& isect, float* pr = 0, 00203 iMeshWrapper** p_mesh = 0, int* poly_idx = 0, 00204 bool accurate = true) = 0; 00205 00216 virtual void CastShadows (iFrustumView* fview) = 0; 00217 00222 virtual const char* ParseCullerParameters (iDocumentNode* node) = 0; 00223 }; 00224 00232 #define CS_CULLER_HINT_GOODOCCLUDER 4 00233 00238 #define CS_CULLER_HINT_BADOCCLUDER 8 00239 00242 SCF_VERSION (iVisibilityObject, 0, 2, 1); 00243 00261 struct iVisibilityObject : public iBase 00262 { 00264 virtual iMovable* GetMovable () const = 0; 00266 virtual iMeshWrapper* GetMeshWrapper () const = 0; 00267 00271 virtual iObjectModel* GetObjectModel () = 0; 00272 00281 virtual csFlags& GetCullerFlags () = 0; 00282 }; 00283 00286 #endif // __CS_IENGINE_VISCULL_H__ 00287
Generated for Crystal Space by doxygen 1.4.4