imesh/instmesh.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2005 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_INSTMESH_H__ 00020 #define __CS_IMESH_INSTMESH_H__ 00021 00026 #include "csutil/scf.h" 00027 00028 struct iDocumentNode; 00029 struct iMaterialWrapper; 00030 struct iRenderBuffer; 00031 struct iMeshObject; 00032 00036 class csBox3; 00037 class csColor; 00038 class csColor4; 00039 struct csTriangle; 00040 class csVector2; 00041 class csVector3; 00042 00048 struct iInstancingMeshCommonState : public virtual iBase 00049 { 00050 SCF_INTERFACE (iInstancingMeshCommonState, 1, 0, 0); 00051 00053 virtual void SetLighting (bool l) = 0; 00055 virtual bool IsLighting () const = 0; 00061 virtual void SetManualColors (bool m) = 0; 00063 virtual bool IsManualColors () const = 0; 00068 virtual void SetShadowCasting (bool m) = 0; 00070 virtual bool IsShadowCasting () const = 0; 00079 virtual void SetShadowReceiving (bool m) = 0; 00081 virtual bool IsShadowReceiving () const = 0; 00082 }; 00083 00098 struct iInstancingMeshState : public virtual iInstancingMeshCommonState 00099 { 00100 SCF_INTERFACE (iInstancingMeshState, 1, 0, 0); 00101 00110 virtual size_t AddInstance (const csReversibleTransform& trans) = 0; 00111 00115 virtual void RemoveInstance (size_t id) = 0; 00116 00120 virtual void RemoveAllInstances () = 0; 00121 00125 virtual void MoveInstance (size_t id, 00126 const csReversibleTransform& trans) = 0; 00127 00131 virtual const csReversibleTransform& GetInstanceTransform (size_t id) = 0; 00132 }; 00133 00134 class csSphere; 00135 00158 struct iInstancingFactoryState : public virtual iInstancingMeshCommonState 00159 { 00160 SCF_INTERFACE (iInstancingFactoryState, 1, 0, 0); 00161 00163 virtual void SetColor (const csColor& col) = 0; 00165 virtual const csColor& GetColor () const = 0; 00166 00170 virtual void AddVertex (const csVector3& v, 00171 const csVector2& uv, const csVector3& normal, 00172 const csColor4& color) = 0; 00173 00175 virtual size_t GetVertexCount () const = 0; 00179 virtual const csVector3* GetVertices () = 0; 00183 virtual const csVector2* GetTexels () = 0; 00187 virtual const csVector3* GetNormals () = 0; 00191 virtual const csColor4* GetColors () = 0; 00192 00196 virtual void AddTriangle (const csTriangle& tri) = 0; 00197 00199 virtual size_t GetTriangleCount () const = 0; 00203 virtual const csTriangle* GetTriangles () = 0; 00204 00210 virtual void CalculateNormals (bool compress = true) = 0; 00211 00216 virtual void Compress () = 0; 00217 00221 virtual bool IsAutoNormals () const = 0; 00222 }; 00223 00226 #endif // __CS_IMESH_INSTMESH_H__ 00227
Generated for Crystal Space 1.4.1 by doxygen 1.7.1