CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

igeom/objmodel.h

Go to the documentation of this file.
00001 /*
00002     Crystal Space 3D engine
00003     Copyright (C) 2002 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_IGEOM_OBJMODEL_H__
00021 #define __CS_IGEOM_OBJMODEL_H__
00022 
00030 #include "csutil/scf.h"
00031 
00032 struct iPolygonMesh;
00033 struct iObjectModel;
00034 class csBox3;
00035 
00045 #define CS_BBOX_NORMAL 0
00046 
00051 #define CS_BBOX_ACCURATE 1
00052 
00058 #define CS_BBOX_MAX 2
00059 
00062 SCF_VERSION (iObjectModelListener, 0, 0, 1);
00063 
00068 struct iObjectModelListener : public iBase
00069 {
00071   virtual void ObjectModelChanged (iObjectModel* model) = 0;
00072 };
00073 
00074 SCF_VERSION (iObjectModel, 0, 3, 0);
00075 
00092 struct iObjectModel : public iBase
00093 {
00099   virtual long GetShapeNumber () const = 0;
00100 
00105   virtual iPolygonMesh* GetPolygonMeshBase () = 0;
00106 
00112   virtual iPolygonMesh* GetPolygonMeshColldet () = 0;
00113 
00123   virtual void SetPolygonMeshColldet (iPolygonMesh* polymesh) = 0;
00124 
00135   virtual iPolygonMesh* GetPolygonMeshViscull () = 0;
00136 
00146   virtual void SetPolygonMeshViscull (iPolygonMesh* polymesh) = 0;
00147 
00156   virtual iPolygonMesh* GetPolygonMeshShadows () = 0;
00157 
00167   virtual void SetPolygonMeshShadows (iPolygonMesh* polymesh) = 0;
00168 
00177   virtual csPtr<iPolygonMesh> CreateLowerDetailPolygonMesh (float detail) = 0;
00178 
00195   virtual void GetObjectBoundingBox (csBox3& bbox,
00196         int type = CS_BBOX_NORMAL) = 0;
00197 
00201   virtual void GetRadius (csVector3& radius, csVector3& center) = 0;
00202 
00207   virtual void AddListener (iObjectModelListener* listener) = 0;
00208 
00212   virtual void RemoveListener (iObjectModelListener* listener) = 0;
00213 };
00214 
00217 #endif // __CS_IGEOM_OBJMODEL_H__
00218 

Generated for Crystal Space by doxygen 1.2.18