## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# imesh/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_IMESH_OBJMODEL_H__
    00021 #define __CS_IMESH_OBJMODEL_H__
    00022
    00031 #include "csutil/scf_interface.h"
    00032 #include "csutil/ref.h"
    00033
    00034 struct iPolygonMesh;
    00035 struct iTerraFormer;
    00036 struct iObjectModel;
    00037
    00038 class csBox3;
    00039 class csVector3;
    00040
    00045 struct iObjectModelListener : public virtual iBase
    00046 {
    00047   SCF_INTERFACE(iObjectModelListener, 2, 0, 0);
    00049   virtual void ObjectModelChanged (iObjectModel* model) = 0;
    00050 };
    00051
    00065 struct iObjectModel : public virtual iBase
    00066 {
    00067   SCF_INTERFACE(iObjectModel, 2, 0, 0);
    00073   virtual long GetShapeNumber () const = 0;
    00074
    00079   virtual iPolygonMesh* GetPolygonMeshBase () = 0;
    00080
    00086   virtual iPolygonMesh* GetPolygonMeshColldet () = 0;
    00087
    00093   virtual iTerraFormer* GetTerraFormerColldet () = 0;
    00094
    00104   virtual void SetPolygonMeshColldet (iPolygonMesh* polymesh) = 0;
    00105
    00116   virtual iPolygonMesh* GetPolygonMeshViscull () = 0;
    00117
    00127   virtual void SetPolygonMeshViscull (iPolygonMesh* polymesh) = 0;
    00128
    00137   virtual iPolygonMesh* GetPolygonMeshShadows () = 0;
    00138
    00148   virtual void SetPolygonMeshShadows (iPolygonMesh* polymesh) = 0;
    00149
    00158   virtual csPtr<iPolygonMesh> CreateLowerDetailPolygonMesh (float detail) = 0;
    00159
    00164   CS_DEPRECATED_METHOD_MSG("Use GetObjectBoundingBox() (without parameters) "
    00165                            "instead.")
    00166   virtual void GetObjectBoundingBox (csBox3& bbox) = 0;
    00167
    00171   virtual const csBox3& GetObjectBoundingBox () = 0;
    00172
    00178   virtual void SetObjectBoundingBox (const csBox3& bbox) = 0;
    00179
    00183   virtual void GetRadius (float& radius, csVector3& center) = 0;
    00184
    00189   virtual void AddListener (iObjectModelListener* listener) = 0;
    00190
    00194   virtual void RemoveListener (iObjectModelListener* listener) = 0;
    00195 };
    00196
    00199 #endif // __CS_IMESH_OBJMODEL_H__
    00200