Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
object.h
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 #include "csgeom/box.h" 00024 #include "ivideo/graph3d.h" 00025 #include "igeom/polymesh.h" 00026 #include "csutil/flags.h" 00027 00028 struct iMeshObject; 00029 struct iMeshObjectFactory; 00030 struct iMeshObjectType; 00031 struct iRenderView; 00032 struct iMovable; 00033 struct iLight; 00034 struct iObjectModel; 00035 struct iMaterialWrapper; 00036 struct iPortal; 00037 struct csRenderMesh; 00038 class csColor; 00039 class csReversibleTransform; 00040 00048 #define CS_MESH_STATICPOS 1 00049 00055 #define CS_MESH_STATICSHAPE 2 00056 00065 #define CS_FACTORY_STATICSHAPE 2 00066 00068 SCF_VERSION (iMeshObjectDrawCallback, 0, 0, 1); 00069 00073 struct iMeshObjectDrawCallback : public iBase 00074 { 00076 virtual bool BeforeDrawing (iMeshObject* spr, iRenderView* rview) = 0; 00077 }; 00078 00079 00080 SCF_VERSION (iMeshObject, 0, 3, 0); 00081 00103 struct iMeshObject : public iBase 00104 { 00108 virtual iMeshObjectFactory* GetFactory () const = 0; 00109 00119 virtual csFlags& GetFlags () = 0; 00120 00124 virtual csPtr<iMeshObject> Clone () = 0; 00125 00132 virtual csRenderMesh** GetRenderMeshes (int& num, iRenderView* rview, 00133 iMovable* movable, uint32 frustum_mask) = 0; 00134 00142 virtual void SetVisibleCallback (iMeshObjectDrawCallback* cb) = 0; 00143 00147 virtual iMeshObjectDrawCallback* GetVisibleCallback () const = 0; 00148 00152 virtual void NextFrame (csTicks current_time,const csVector3& pos) = 0; 00153 00163 virtual void HardTransform (const csReversibleTransform& t) = 0; 00164 00168 virtual bool SupportsHardTransform () const = 0; 00169 00177 virtual bool HitBeamOutline (const csVector3& start, 00178 const csVector3& end, csVector3& isect, float* pr) = 0; 00179 00188 virtual bool HitBeamObject (const csVector3& start, const csVector3& end, 00189 csVector3& isect, float* pr, int* polygon_idx = 0) = 0; 00190 00200 virtual void SetLogicalParent (iBase* logparent) = 0; 00201 00206 virtual iBase* GetLogicalParent () const = 0; 00207 00213 virtual iObjectModel* GetObjectModel () = 0; 00214 00220 virtual bool SetColor (const csColor& color) = 0; 00221 00225 virtual bool GetColor (csColor& color) const = 0; 00226 00231 virtual bool SetMaterialWrapper (iMaterialWrapper* material) = 0; 00232 00237 virtual iMaterialWrapper* GetMaterialWrapper () const = 0; 00238 00246 virtual void InvalidateMaterialHandles () = 0; 00247 00254 virtual void PositionChild (iMeshObject* child,csTicks current_time) = 0; 00255 }; 00256 00257 SCF_VERSION (iMeshObjectFactory, 0, 0, 6); 00258 00284 struct iMeshObjectFactory : public iBase 00285 { 00294 virtual csFlags& GetFlags () = 0; 00295 00297 virtual csPtr<iMeshObject> NewInstance () = 0; 00298 00302 virtual csPtr<iMeshObjectFactory> Clone () = 0; 00303 00313 virtual void HardTransform (const csReversibleTransform& t) = 0; 00314 00318 virtual bool SupportsHardTransform () const = 0; 00319 00329 virtual void SetLogicalParent (iBase* logparent) = 0; 00330 00335 virtual iBase* GetLogicalParent () const = 0; 00336 00340 virtual iMeshObjectType* GetMeshObjectType () const = 0; 00341 00350 virtual iObjectModel* GetObjectModel () = 0; 00351 }; 00352 00353 SCF_VERSION (iMeshObjectType, 0, 0, 2); 00354 00374 struct iMeshObjectType : public iBase 00375 { 00377 virtual csPtr<iMeshObjectFactory> NewFactory () = 0; 00378 }; 00379 00380 #endif // __CS_IMESH_OBJECT_H__
Generated for Crystal Space by doxygen 1.3.9.1