Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
object.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2000-2003 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 __CS_IMESH_OBJECT_H__ 00020 #define __CS_IMESH_OBJECT_H__ 00021 00022 #include "csutil/scf.h" 00023 00032 struct iLight; 00033 struct iMaterialWrapper; 00034 struct iMeshObject; 00035 struct iMeshObjectFactory; 00036 struct iMeshObjectType; 00037 struct iMovable; 00038 struct iObjectModel; 00039 struct iPortal; 00040 struct iRenderView; 00041 00042 struct csRenderMesh; 00043 00044 class csColor; 00045 class csFlags; 00046 class csReversibleTransform; 00047 class csVector3; 00048 00056 #define CS_MESH_STATICPOS 1 00057 00063 #define CS_MESH_STATICSHAPE 2 00064 00073 #define CS_FACTORY_STATICSHAPE 2 00074 00076 SCF_VERSION (iMeshObjectDrawCallback, 0, 0, 1); 00077 00081 struct iMeshObjectDrawCallback : public iBase 00082 { 00084 virtual bool BeforeDrawing (iMeshObject* spr, iRenderView* rview) = 0; 00085 }; 00086 00087 00088 SCF_VERSION (iMeshObject, 0, 3, 0); 00089 00111 struct iMeshObject : public iBase 00112 { 00116 virtual iMeshObjectFactory* GetFactory () const = 0; 00117 00127 virtual csFlags& GetFlags () = 0; 00128 00132 virtual csPtr<iMeshObject> Clone () = 0; 00133 00140 virtual csRenderMesh** GetRenderMeshes (int& num, iRenderView* rview, 00141 iMovable* movable, uint32 frustum_mask) = 0; 00142 00150 virtual void SetVisibleCallback (iMeshObjectDrawCallback* cb) = 0; 00151 00155 virtual iMeshObjectDrawCallback* GetVisibleCallback () const = 0; 00156 00160 virtual void NextFrame (csTicks current_time,const csVector3& pos) = 0; 00161 00171 virtual void HardTransform (const csReversibleTransform& t) = 0; 00172 00176 virtual bool SupportsHardTransform () const = 0; 00177 00185 virtual bool HitBeamOutline (const csVector3& start, 00186 const csVector3& end, csVector3& isect, float* pr) = 0; 00187 00196 virtual bool HitBeamObject (const csVector3& start, const csVector3& end, 00197 csVector3& isect, float* pr, int* polygon_idx = 0) = 0; 00198 00208 virtual void SetLogicalParent (iBase* logparent) = 0; 00209 00214 virtual iBase* GetLogicalParent () const = 0; 00215 00221 virtual iObjectModel* GetObjectModel () = 0; 00222 00228 virtual bool SetColor (const csColor& color) = 0; 00229 00233 virtual bool GetColor (csColor& color) const = 0; 00234 00239 virtual bool SetMaterialWrapper (iMaterialWrapper* material) = 0; 00240 00245 virtual iMaterialWrapper* GetMaterialWrapper () const = 0; 00246 00254 virtual void InvalidateMaterialHandles () = 0; 00255 00262 virtual void PositionChild (iMeshObject* child,csTicks current_time) = 0; 00263 }; 00264 00265 SCF_VERSION (iMeshObjectFactory, 0, 0, 6); 00266 00292 struct iMeshObjectFactory : public iBase 00293 { 00302 virtual csFlags& GetFlags () = 0; 00303 00305 virtual csPtr<iMeshObject> NewInstance () = 0; 00306 00310 virtual csPtr<iMeshObjectFactory> Clone () = 0; 00311 00321 virtual void HardTransform (const csReversibleTransform& t) = 0; 00322 00326 virtual bool SupportsHardTransform () const = 0; 00327 00337 virtual void SetLogicalParent (iBase* logparent) = 0; 00338 00343 virtual iBase* GetLogicalParent () const = 0; 00344 00348 virtual iMeshObjectType* GetMeshObjectType () const = 0; 00349 00358 virtual iObjectModel* GetObjectModel () = 0; 00359 }; 00360 00361 SCF_VERSION (iMeshObjectType, 0, 0, 2); 00362 00382 struct iMeshObjectType : public iBase 00383 { 00385 virtual csPtr<iMeshObjectFactory> NewFactory () = 0; 00386 }; 00387 00390 #endif // __CS_IMESH_OBJECT_H__
Generated for Crystal Space by doxygen 1.4.4