Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1885

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: imesh/instmesh.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>imesh/instmesh.h</h1><a href="instmesh_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment">    Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_IMESH_INSTMESH_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IMESH_INSTMESH_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">struct </span><a class="code" href="structiDocumentNode.html" title="Representation of a node in a document.">iDocumentNode</a>;
<a name="l00029"></a>00029 <span class="keyword">struct </span><a class="code" href="structiMaterialWrapper.html" title="A material wrapper is an engine-level object that wraps around an actual material...">iMaterialWrapper</a>;
<a name="l00030"></a>00030 <span class="keyword">struct </span><a class="code" href="structiRenderBuffer.html" title="This is a general buffer.">iRenderBuffer</a>;
<a name="l00031"></a>00031 <span class="keyword">struct </span><a class="code" href="structiMeshObject.html" title="This is a general mesh object that the engine can interact with.">iMeshObject</a>;
<a name="l00032"></a>00032 
<a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="classcsBox3.html" title="A bounding box in 3D space.">csBox3</a>;
<a name="l00037"></a>00037 <span class="keyword">class </span><a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>;
<a name="l00038"></a>00038 <span class="keyword">class </span><a class="code" href="classcsColor4.html" title="A class used to represent a color in RGBA space.">csColor4</a>;
<a name="l00039"></a>00039 <span class="keyword">struct </span><a class="code" href="structcsTriangle.html" title="A triangle.">csTriangle</a>;
<a name="l00040"></a>00040 <span class="keyword">class </span><a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>;
<a name="l00041"></a>00041 <span class="keyword">class </span><a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>;
<a name="l00042"></a>00042 
<a name="l00048"></a><a class="code" href="structiInstancingMeshCommonState.html">00048</a> <span class="keyword">struct </span><a class="code" href="structiInstancingMeshCommonState.html" title="The common interface between instancing meshes and factories.">iInstancingMeshCommonState</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050   SCF_INTERFACE (<a class="code" href="structiInstancingMeshCommonState.html" title="The common interface between instancing meshes and factories.">iInstancingMeshCommonState</a>, 1, 0, 0);
<a name="l00051"></a>00051   
<a name="l00053"></a>00053   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshCommonState.html#b6a40331f312bc952389223846bd94ff" title="Set lighting.">SetLighting</a> (<span class="keywordtype">bool</span> l) = 0;
<a name="l00055"></a>00055   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiInstancingMeshCommonState.html#6bd8d10689ca1cb59a9d1dead114e83e" title="Is lighting enabled.">IsLighting</a> () <span class="keyword">const</span> = 0;
<a name="l00061"></a>00061   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshCommonState.html#0b25059ad984b3806863d206509c498b" title="Set manual colors.">SetManualColors</a> (<span class="keywordtype">bool</span> m) = 0;
<a name="l00063"></a>00063   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiInstancingMeshCommonState.html#567142cb14d92f1e66658b89ae365bf4" title="Are manual colors enabled?">IsManualColors</a> () <span class="keyword">const</span> = 0;
<a name="l00068"></a>00068   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshCommonState.html#77e5f3cf85ddfeea6530100944f27653" title="Set shadowing.">SetShadowCasting</a> (<span class="keywordtype">bool</span> m) = 0;
<a name="l00070"></a>00070   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiInstancingMeshCommonState.html#a02d8ccfd03a944fc5f97291218bc8ad" title="Is shadow casting enabled?">IsShadowCasting</a> () <span class="keyword">const</span> = 0;
<a name="l00079"></a>00079   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshCommonState.html#1ec9c8ec57dce78c645180e8ababf446" title="Set shadow receiving on.">SetShadowReceiving</a> (<span class="keywordtype">bool</span> m) = 0;
<a name="l00081"></a>00081   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiInstancingMeshCommonState.html#f3e78defef5ca085c7f0a191025dfe53" title="Is shadow receiving enabled?">IsShadowReceiving</a> () <span class="keyword">const</span> = 0;
<a name="l00082"></a>00082 };
<a name="l00083"></a>00083 
<a name="l00098"></a><a class="code" href="structiInstancingMeshState.html">00098</a> <span class="keyword">struct </span><a class="code" href="structiInstancingMeshState.html" title="This interface describes the API for the instancing mesh object.">iInstancingMeshState</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiInstancingMeshCommonState.html" title="The common interface between instancing meshes and factories.">iInstancingMeshCommonState</a>
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100   SCF_INTERFACE (<a class="code" href="structiInstancingMeshState.html" title="This interface describes the API for the instancing mesh object.">iInstancingMeshState</a>, 1, 0, 0);
<a name="l00101"></a>00101   
<a name="l00105"></a>00105   <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="structiInstancingMeshState.html#0565d911c52394e164e10298cf3e5ad2" title="Add an instance.">AddInstance</a> (<span class="keyword">const</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>&amp; trans) = 0;
<a name="l00106"></a>00106 
<a name="l00110"></a>00110   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshState.html#dbd53ab85e5af4ffe20f7284acb3e183" title="Remove an instance.">RemoveInstance</a> (<span class="keywordtype">size_t</span> <span class="keywordtype">id</span>) = 0;
<a name="l00111"></a>00111 
<a name="l00115"></a>00115   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshState.html#d2417028da5733f5fe9a7ec76d9a92a0" title="Remove all instances.">RemoveAllInstances</a> () = 0;
<a name="l00116"></a>00116 
<a name="l00120"></a>00120   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingMeshState.html#432ee51fb3d8d7efa5b4a95c78925f07" title="Move an instance.">MoveInstance</a> (<span class="keywordtype">size_t</span> <span class="keywordtype">id</span>,
<a name="l00121"></a>00121       <span class="keyword">const</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>&amp; trans) = 0;
<a name="l00122"></a>00122 
<a name="l00126"></a>00126   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>&amp; <a class="code" href="structiInstancingMeshState.html#1e1171aacef77e8b38f9fdeb1435a437" title="Get instance transform.">GetInstanceTransform</a> (<span class="keywordtype">size_t</span> <span class="keywordtype">id</span>) = 0;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="keyword">class </span><a class="code" href="classcsSphere.html" title="This class represents a sphere.">csSphere</a>;
<a name="l00130"></a>00130 
<a name="l00153"></a><a class="code" href="structiInstancingFactoryState.html">00153</a> <span class="keyword">struct </span><a class="code" href="structiInstancingFactoryState.html" title="This interface describes the API for the instancing mesh factory.">iInstancingFactoryState</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiInstancingMeshCommonState.html" title="The common interface between instancing meshes and factories.">iInstancingMeshCommonState</a>
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155   SCF_INTERFACE (<a class="code" href="structiInstancingFactoryState.html" title="This interface describes the API for the instancing mesh factory.">iInstancingFactoryState</a>, 1, 0, 0);
<a name="l00156"></a>00156   
<a name="l00158"></a>00158   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#8d50e88c3833ad47a13dcb0b8856ce3f" title="Set the color to use. Will be added to the lighting values.">SetColor</a> (<span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>&amp; col) = 0;
<a name="l00160"></a>00160   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>&amp; <a class="code" href="structiInstancingFactoryState.html#bc3449ffdb52d45739186caf2109e6bd" title="Get the color.">GetColor</a> () <span class="keyword">const</span> = 0;
<a name="l00161"></a>00161 
<a name="l00165"></a>00165   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#f0bbc5c39fcc8d0b6d5b1e27e5a88092" title="Add a vertex.">AddVertex</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v,
<a name="l00166"></a>00166       <span class="keyword">const</span> <a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>&amp; uv, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; normal,
<a name="l00167"></a>00167       <span class="keyword">const</span> <a class="code" href="classcsColor4.html" title="A class used to represent a color in RGBA space.">csColor4</a>&amp; color) = 0;
<a name="l00168"></a>00168 
<a name="l00170"></a>00170   <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="structiInstancingFactoryState.html#210a4bba525eebb1c46e69a844eade3e" title="Get the number of vertices for this mesh.">GetVertexCount</a> () <span class="keyword">const</span> = 0;
<a name="l00174"></a>00174   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>* <a class="code" href="structiInstancingFactoryState.html#1444eee3ecdfa31d5935218bbdfd3fc8" title="Get the array of vertices.">GetVertices</a> () = 0;
<a name="l00178"></a>00178   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* <a class="code" href="structiInstancingFactoryState.html#608581163016367d80c804d5836b270b" title="Get the array of texels.">GetTexels</a> () = 0;
<a name="l00182"></a>00182   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>* <a class="code" href="structiInstancingFactoryState.html#fad2598d487551f967e84f94feced6a0" title="Get the array of normals.">GetNormals</a> () = 0;
<a name="l00186"></a>00186   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor4.html" title="A class used to represent a color in RGBA space.">csColor4</a>* <a class="code" href="structiInstancingFactoryState.html#18c692541aca6e22364189f39a7bfe68" title="Get the array of colors.">GetColors</a> () = 0;
<a name="l00187"></a>00187 
<a name="l00191"></a>00191   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#22ea035568a6eb9150c9ea84bce06e73" title="Add a triangle.">AddTriangle</a> (<span class="keyword">const</span> <a class="code" href="structcsTriangle.html" title="A triangle.">csTriangle</a>&amp; tri) = 0;
<a name="l00192"></a>00192 
<a name="l00194"></a>00194   <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="structiInstancingFactoryState.html#9cb094a15c93c107fbf12c483e18ca75" title="Get the number of triangles for this mesh.">GetTriangleCount</a> () <span class="keyword">const</span> = 0;
<a name="l00198"></a>00198   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="structcsTriangle.html" title="A triangle.">csTriangle</a>* <a class="code" href="structiInstancingFactoryState.html#fc464a2a3fb21902d64679967928e1a2" title="Get the array of triangles.">GetTriangles</a> () = 0;
<a name="l00199"></a>00199 
<a name="l00205"></a>00205   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#93b5c9faed12bd7a1625d3f5b79a2c0b" title="Automatically calculate normals based on the current mesh.">CalculateNormals</a> (<span class="keywordtype">bool</span> compress = <span class="keyword">true</span>) = 0;
<a name="l00206"></a>00206 
<a name="l00211"></a>00211   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#4f5bf6a15aa585948c995dd09d2f2cc1" title="Compress the vertex table.">Compress</a> () = 0;
<a name="l00212"></a>00212 
<a name="l00216"></a>00216   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#20123b1d2d7604c43b1d77c3ef9249ae" title="Automatically generate a qad.">GenerateQuad</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v2, 
<a name="l00217"></a>00217     <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v3, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v4) = 0;
<a name="l00218"></a>00218 
<a name="l00224"></a>00224   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#ed96473fa1a7740d5fbcf582dc6893bd" title="Automatically generate a box.">GenerateBox</a> (<span class="keyword">const</span> <a class="code" href="classcsBox3.html" title="A bounding box in 3D space.">csBox3</a>&amp; box) = 0;
<a name="l00225"></a>00225 
<a name="l00237"></a>00237   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiInstancingFactoryState.html#c1d94ee9ae430ff13aaa855799718fa8" title="Automatically generate a sphere.">GenerateSphere</a> (<span class="keyword">const</span> <a class="code" href="classcsEllipsoid.html" title="This class represents an ellipsoid.">csEllipsoid</a>&amp; sphere, <span class="keywordtype">int</span> rim_vertices,
<a name="l00238"></a>00238       <span class="keywordtype">bool</span> cyl_mapping = <span class="keyword">false</span>,
<a name="l00239"></a>00239       <span class="keywordtype">bool</span> toponly = <span class="keyword">false</span>,
<a name="l00240"></a>00240       <span class="keywordtype">bool</span> reversed = <span class="keyword">false</span>) = 0;
<a name="l00241"></a>00241 
<a name="l00245"></a>00245   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiInstancingFactoryState.html#ecf18d021b459dde1db086b7c91352d9" title="Returns whether normals were autogenerated or manual.">IsAutoNormals</a> () <span class="keyword">const</span> = 0;
<a name="l00246"></a>00246 };
<a name="l00247"></a>00247 
<a name="l00250"></a>00250 <span class="preprocessor">#endif // __CS_IMESH_INSTMESH_H__</span>
<a name="l00251"></a>00251 <span class="preprocessor"></span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>