imesh/objmodel.h Source File (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- 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 #include "iutil/strset.h"
    00034
    00035 struct iTriangleMesh;
    00036 struct iTerraFormer;
    00037 struct iTerrainSystem;
    00038 struct iObjectModel;
    00039
    00040 class csBox3;
    00041 class csVector3;
    00042
    00047 struct iObjectModelListener : public virtual iBase
    00048 {
    00049   SCF_INTERFACE(iObjectModelListener, 2, 0, 0);
    00051   virtual void ObjectModelChanged (iObjectModel* model) = 0;
    00052 };
    00053
    00060 struct iTriangleMeshIterator : public virtual iBase
    00061 {
    00062   SCF_INTERFACE(iTriangleMeshIterator, 0, 0, 1);
    00063
    00065   virtual bool HasNext () = 0;
    00066
    00073   virtual iTriangleMesh* Next (csStringID& id) = 0;
    00074 };
    00075
    00089 struct iObjectModel : public virtual iBase
    00090 {
    00091   SCF_INTERFACE(iObjectModel, 2, 1, 2);
    00097   virtual long GetShapeNumber () const = 0;
    00098
    00118   virtual iTriangleMesh* GetTriangleData (csStringID id) = 0;
    00119
    00124   virtual csPtr<iTriangleMeshIterator> GetTriangleDataIterator () = 0;
    00125
    00142   virtual void SetTriangleData (csStringID id, iTriangleMesh* trimesh) = 0;
    00143
    00150   virtual bool IsTriangleDataSet (csStringID id) = 0;
    00151
    00156   virtual void ResetTriangleData (csStringID id) = 0;
    00157
    00163   virtual iTerraFormer* GetTerraFormerColldet () = 0;
    00164
    00170   virtual iTerrainSystem* GetTerrainColldet () = 0;
    00171
    00175   virtual const csBox3& GetObjectBoundingBox () = 0;
    00176
    00182   virtual void SetObjectBoundingBox (const csBox3& bbox) = 0;
    00183
    00187   virtual void GetRadius (float& radius, csVector3& center) = 0;
    00188
    00193   virtual void AddListener (iObjectModelListener* listener) = 0;
    00194
    00198   virtual void RemoveListener (iObjectModelListener* listener) = 0;
    00199 };
    00200
    00203 #endif // __CS_IMESH_OBJMODEL_H__
    00204