<!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: cstool/collider.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 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 Pages</span></a></li> </ul> </div> <h1>cstool/collider.h</h1><a href="cstool_2collider_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) 1998-2003 by Jorrit Tyberghein</span> <a name="l00003"></a>00003 <span class="comment"> Written by Alex Pfaffe.</span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00008"></a>00008 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00011"></a>00011 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00012"></a>00012 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00013"></a>00013 <span class="comment"> Library General Public License for more details.</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00016"></a>00016 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00017"></a>00017 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00018"></a>00018 <span class="comment">*/</span> <a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_COLLIDER_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_COLLIDER_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00026"></a>00026 <span class="preprocessor">#include "csextern.h"</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="box_8h.html" title="Bounding boxes for 2D and 3D space.">csgeom/box.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="csobject_8h.html" title="Implementation for iObject.">csutil/csobject.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "csutil/leakguard.h"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="csutil_2array_8h.html" title="Generic Array Template.">csutil/array.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="scf__implementation_8h.html" title="Crystal Space Shared Class Facility (SCF) - implementation creation support.">csutil/scf_implementation.h</a>"</span> <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="set_8h.html" title="Basic set for objects.">csutil/set.h</a>"</span> <a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="ivaria_2collider_8h.html" title="Mesh collider interfaces.">ivaria/collider.h</a>"</span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="keyword">struct </span><a class="code" href="structiCamera.html" title="Camera class.">iCamera</a>; <a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>; <a name="l00039"></a>00039 <span class="keyword">struct </span><a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>; <a name="l00040"></a>00040 <span class="keyword">struct </span><a class="code" href="structiEngine.html" title="This interface is the main interface to the 3D engine.">iEngine</a>; <a name="l00041"></a>00041 <span class="keyword">struct </span><a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>; <a name="l00042"></a>00042 <span class="keyword">struct </span><a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>; <a name="l00043"></a>00043 <span class="keyword">struct </span><a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>; <a name="l00044"></a>00044 <span class="keyword">struct </span><a class="code" href="structiPolygonMesh.html" title="This interface reprents a mesh of polygons.">iPolygonMesh</a>; <a name="l00045"></a>00045 <span class="keyword">struct </span><a class="code" href="structiTriangleMesh.html" title="This interface reprents a mesh of triangles.">iTriangleMesh</a>; <a name="l00046"></a>00046 <span class="keyword">struct </span><a class="code" href="structiRegion.html" title="A region.">iRegion</a>; <a name="l00047"></a>00047 <span class="keyword">struct </span><a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>; <a name="l00048"></a>00048 <span class="keyword">struct </span><a class="code" href="structiTerrainSystem.html" title="This class represents the terrain object as a set of cells.">iTerrainSystem</a>; <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keyword">struct </span><a class="code" href="structcsCollisionPair.html" title="A structure used to return collision pairs.">csCollisionPair</a>; <a name="l00051"></a>00051 <span class="keyword">class </span><a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>; <a name="l00052"></a>00052 <a name="l00053"></a>00053 <span class="keyword">struct </span><a class="code" href="structcsIntersectingTriangle.html" title="An intersection triangle for CollideRay.">csIntersectingTriangle</a>; <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="comment">// for iPolygonMesh</span> <a name="l00056"></a>00056 <span class="preprocessor">#include "<a class="code" href="msvc__deprecated__warn__off_8h.html" title="Disable MSVC deprecated warnings.">csutil/win32/msvc_deprecated_warn_off.h</a>"</span> <a name="l00057"></a>00057 <a name="l00071"></a><a class="code" href="classcsColliderWrapper.html">00071</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsColliderWrapper.html" title="This is a convenience object that you can use in your own games to attach an iCollider...">csColliderWrapper</a> : <a name="l00072"></a>00072 <span class="keyword">public</span> <a class="code" href="classscfImplementationExt1.html">scfImplementationExt1</a><csColliderWrapper, <a name="l00073"></a>00073 csObject, <a name="l00074"></a>00074 scfFakeInterface<csColliderWrapper> > <a name="l00075"></a>00075 { <a name="l00076"></a>00076 <span class="keyword">private</span>: <a name="l00077"></a>00077 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iCollideSystem></a> collide_system; <a name="l00078"></a>00078 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iCollider></a> collider; <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="keyword">public</span>: <a name="l00081"></a>00081 <a class="code" href="group__scf.html#g711056cbf220f268640935926c404ba5" title="SCF_INTERFACE can be used to define an interface&#39;s version number; you should...">SCF_INTERFACE</a>(<a class="code" href="classcsColliderWrapper.html" title="This is a convenience object that you can use in your own games to attach an iCollider...">csColliderWrapper</a>, 2,1,0); <a name="l00082"></a>00082 <a name="l00083"></a>00083 CS_LEAKGUARD_DECLARE (<a class="code" href="classcsColliderWrapper.html" title="This is a convenience object that you can use in your own games to attach an iCollider...">csColliderWrapper</a>); <a name="l00084"></a>00084 <a name="l00089"></a>00089 <span class="preprocessor">#ifndef CS_DEPRECATION_SUPPRESS_HACK</span> <a name="l00090"></a>00090 <span class="preprocessor"></span> <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"Use version with iTriangleMesh instead."</span>) <a name="l00091"></a>00091 <span class="preprocessor">#endif</span> <a name="l00092"></a>00092 <span class="preprocessor"></span> <a class="code" href="classcsColliderWrapper.html" title="This is a convenience object that you can use in your own games to attach an iCollider...">csColliderWrapper</a> (<a class="code" href="classcsObject.html" title="A generic csObject class.">csObject</a>& parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00093"></a>00093 <a class="code" href="structiPolygonMesh.html" title="This interface reprents a mesh of polygons.">iPolygonMesh</a>* mesh); <a name="l00094"></a>00094 <a name="l00099"></a>00099 <span class="preprocessor">#ifndef CS_DEPRECATION_SUPPRESS_HACK</span> <a name="l00100"></a>00100 <span class="preprocessor"></span> <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"Use version with iTriangleMesh instead."</span>) <a name="l00101"></a>00101 <span class="preprocessor">#endif</span> <a name="l00102"></a>00102 <span class="preprocessor"></span> csColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00103"></a>00103 <a class="code" href="structiPolygonMesh.html" title="This interface reprents a mesh of polygons.">iPolygonMesh</a>* mesh); <a name="l00104"></a>00104 <a name="l00108"></a>00108 csColliderWrapper (<a class="code" href="classcsObject.html" title="A generic csObject class.">csObject</a>& parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00109"></a>00109 <a class="code" href="structiTriangleMesh.html" title="This interface reprents a mesh of triangles.">iTriangleMesh</a>* mesh); <a name="l00110"></a>00110 <a name="l00114"></a>00114 csColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00115"></a>00115 <a class="code" href="structiTriangleMesh.html" title="This interface reprents a mesh of triangles.">iTriangleMesh</a>* mesh); <a name="l00116"></a>00116 <a name="l00118"></a>00118 csColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00119"></a>00119 <a class="code" href="structiTerraFormer.html" title="TerraFormer objects are used to retrieve terrain data.">iTerraFormer</a>* terrain); <a name="l00120"></a>00120 <a name="l00122"></a>00122 csColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00123"></a>00123 <a class="code" href="structiTerrainSystem.html" title="This class represents the terrain object as a set of cells.">iTerrainSystem</a>* terrain); <a name="l00124"></a>00124 <a name="l00130"></a>00130 csColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* parent, <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* collide_system, <a name="l00131"></a>00131 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>* collider); <a name="l00132"></a>00132 <a name="l00134"></a>00134 <span class="keyword">virtual</span> ~csColliderWrapper (); <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="classcsColliderWrapper.html#3c5ab442e1de730d7a5b2d6e277182d7">00137</a> <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>* GetCollider () { <span class="keywordflow">return</span> collider; } <a name="l00138"></a>00138 <a name="l00140"></a><a class="code" href="classcsColliderWrapper.html#216911e3e3cb1eb160cafb8837e785f5">00140</a> <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* GetCollideSystem () { <span class="keywordflow">return</span> collide_system; } <a name="l00141"></a>00141 <a name="l00149"></a>00149 <span class="keywordtype">bool</span> Collide (csColliderWrapper& pOtherCollider, <a name="l00150"></a>00150 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pThisTransform = 0, <a name="l00151"></a>00151 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pOtherTransform = 0); <a name="l00156"></a>00156 <span class="keywordtype">bool</span> Collide (<a class="code" href="classcsObject.html" title="A generic csObject class.">csObject</a>& otherObject, <a name="l00157"></a>00157 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pThisTransform = 0, <a name="l00158"></a>00158 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pOtherTransform = 0); <a name="l00163"></a>00163 <span class="keywordtype">bool</span> Collide (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* otherObject, <a name="l00164"></a>00164 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pThisTransform = 0, <a name="l00165"></a>00165 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* pOtherTransform = 0); <a name="l00166"></a>00166 <a name="l00171"></a>00171 <span class="keyword">static</span> csColliderWrapper* GetColliderWrapper (<a class="code" href="classcsObject.html" title="A generic csObject class.">csObject</a>& <span class="keywordtype">object</span>); <a name="l00172"></a>00172 <a name="l00177"></a>00177 <span class="keyword">static</span> csColliderWrapper* GetColliderWrapper (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <span class="keywordtype">object</span>); <a name="l00178"></a>00178 <a name="l00183"></a>00183 <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"Use version with iTriangleMesh instead."</span>) <a name="l00184"></a>00184 void UpdateCollider (<a class="code" href="structiPolygonMesh.html" title="This interface reprents a mesh of polygons.">iPolygonMesh</a>* mesh); <a name="l00185"></a>00185 <a name="l00189"></a>00189 <span class="keywordtype">void</span> UpdateCollider (<a class="code" href="structiTriangleMesh.html" title="This interface reprents a mesh of triangles.">iTriangleMesh</a>* mesh); <a name="l00190"></a>00190 <a name="l00192"></a>00192 <span class="keywordtype">void</span> UpdateCollider (<a class="code" href="structiTerraFormer.html" title="TerraFormer objects are used to retrieve terrain data.">iTerraFormer</a>* terrain); <a name="l00193"></a>00193 <a name="l00194"></a>00194 }; <a name="l00195"></a>00195 <a name="l00196"></a>00196 <span class="comment">// for iPolygonMesh</span> <a name="l00197"></a>00197 <span class="preprocessor">#include "csutil/win32/msvc_deprecated_warn_on.h"</span> <a name="l00198"></a>00198 <span class="preprocessor"></span> <a name="l00202"></a><a class="code" href="structcsTraceBeamResult.html">00202</a> <span class="keyword">struct </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="structcsTraceBeamResult.html" title="Return structure for the csColliderHelper::TraceBeam() method.">csTraceBeamResult</a> <a name="l00203"></a>00203 { <a name="l00205"></a>00205 <a name="l00209"></a><a class="code" href="structcsTraceBeamResult.html#f5e4f83424af9952a2daa7cb14b69297">00209</a> <a class="code" href="structcsIntersectingTriangle.html" title="An intersection triangle for CollideRay.">csIntersectingTriangle</a> closest_tri; <a name="l00214"></a><a class="code" href="structcsTraceBeamResult.html#c345922daba1648ec492d16f2c34de94">00214</a> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> closest_isect; <a name="l00218"></a><a class="code" href="structcsTraceBeamResult.html#66ac8566413963a17c1ddec058701840">00218</a> <a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* closest_mesh; <a name="l00223"></a><a class="code" href="structcsTraceBeamResult.html#379d9779aafd414c7a822c65f029d823">00223</a> <span class="keywordtype">float</span> sqdistance; <a name="l00227"></a><a class="code" href="structcsTraceBeamResult.html#2230e410c449422c2c8ecfe2f2733fe8">00227</a> <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* end_sector; <a name="l00228"></a>00228 }; <a name="l00229"></a>00229 <a name="l00234"></a><a class="code" href="classcsColliderHelper.html">00234</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsColliderHelper.html" title="This is a class containing a few static member functions to help work with csColliderWrapper...">csColliderHelper</a> <a name="l00235"></a>00235 { <a name="l00236"></a>00236 <span class="keyword">public</span>: <a name="l00248"></a>00248 <span class="keyword">static</span> csColliderWrapper* InitializeCollisionWrapper (<a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* colsys, <a name="l00249"></a>00249 <a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* mesh); <a name="l00250"></a>00250 <a name="l00256"></a>00256 <span class="keyword">static</span> <span class="keywordtype">void</span> InitializeCollisionWrappers (<a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* colsys, <a name="l00257"></a>00257 <a class="code" href="structiEngine.html" title="This interface is the main interface to the 3D engine.">iEngine</a>* engine, <a class="code" href="structiRegion.html" title="A region.">iRegion</a>* region = 0); <a name="l00258"></a>00258 <a name="l00276"></a>00276 <span class="keyword">static</span> <span class="keywordtype">bool</span> CollideArray ( <a name="l00277"></a>00277 <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* colsys, <a name="l00278"></a>00278 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>* collider, <a name="l00279"></a>00279 <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>* trans, <a name="l00280"></a>00280 <span class="keywordtype">int</span> num_colliders, <a name="l00281"></a>00281 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>** colliders, <a name="l00282"></a>00282 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a> **transforms); <a name="l00283"></a>00283 <a name="l00320"></a>00320 <span class="keyword">static</span> <span class="keywordtype">int</span> CollidePath ( <a name="l00321"></a>00321 <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* colsys, <a name="l00322"></a>00322 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>* collider, <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>* trans, <a name="l00323"></a>00323 <span class="keywordtype">float</span> nbrsteps, <a name="l00324"></a>00324 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& newpos, <a name="l00325"></a>00325 <span class="keywordtype">int</span> num_colliders, <a name="l00326"></a>00326 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a>** colliders, <a name="l00327"></a>00327 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>** transforms); <a name="l00328"></a>00328 <a name="l00352"></a>00352 <span class="keyword">static</span> <span class="keywordtype">float</span> TraceBeam (<a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* cdsys, <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* sector, <a name="l00353"></a>00353 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& start, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& end, <a name="l00354"></a>00354 <span class="keywordtype">bool</span> traverse_portals, <a name="l00355"></a>00355 <a class="code" href="structcsIntersectingTriangle.html" title="An intersection triangle for CollideRay.">csIntersectingTriangle</a>& closest_tri, <a name="l00356"></a>00356 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& closest_isect, <a name="l00357"></a>00357 <a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>** closest_mesh = 0, <a name="l00358"></a>00358 <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>** end_sector = 0); <a name="l00359"></a>00359 <a name="l00376"></a>00376 <span class="keyword">static</span> <a class="code" href="structcsTraceBeamResult.html" title="Return structure for the csColliderHelper::TraceBeam() method.">csTraceBeamResult</a> TraceBeam (<a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* cdsys, <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* sector, <a name="l00377"></a>00377 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& start, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& end, <a name="l00378"></a>00378 <span class="keywordtype">bool</span> traverse_portals); <a name="l00379"></a>00379 }; <a name="l00380"></a>00380 <a name="l00385"></a><a class="code" href="classcsColliderActor.html">00385</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsColliderActor.html" title="With csColliderActor you can more easily manage collision detection of a player or...">csColliderActor</a> <a name="l00386"></a>00386 { <a name="l00387"></a>00387 <span class="keyword">private</span>: <a name="l00388"></a>00388 <span class="keywordtype">bool</span> revertMove; <a name="l00389"></a>00389 <span class="keywordtype">bool</span> onground; <a name="l00390"></a>00390 <span class="keywordtype">bool</span> cd; <a name="l00391"></a>00391 <a class="code" href="classcsArray.html" title="A templated array class.">csArray<csCollisionPair></a> our_cd_contact; <a name="l00392"></a>00392 <span class="keywordtype">float</span> gravity; <a name="l00393"></a>00393 <a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* mesh; <a name="l00394"></a>00394 <a class="code" href="structiCamera.html" title="Camera class.">iCamera</a>* camera; <a name="l00395"></a>00395 <a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>* movable; <a name="l00396"></a>00396 <a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* cdsys; <a name="l00397"></a>00397 <a class="code" href="structiEngine.html" title="This interface is the main interface to the 3D engine.">iEngine</a>* engine; <a name="l00398"></a>00398 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> velWorld; <a name="l00400"></a>00400 <a class="code" href="classcsSet.html" title="This class implements a basic set for objects.">csSet<csPtrKey<iMeshWrapper></a> > hit_meshes; <a name="l00401"></a>00401 <span class="keywordtype">bool</span> do_hit_meshes; <a name="l00402"></a>00402 <a name="l00404"></a>00404 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> rotation; <a name="l00405"></a>00405 <a name="l00406"></a>00406 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iCollider></a> topCollider; <a name="l00407"></a>00407 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iCollider></a> bottomCollider; <a name="l00408"></a>00408 <a class="code" href="classcsBox3.html" title="A bounding box in 3D space.">csBox3</a> boundingBox; <a name="l00409"></a>00409 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> shift; <a name="l00410"></a>00410 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> topSize; <a name="l00411"></a>00411 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> bottomSize; <a name="l00412"></a>00412 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a> intervalSize; <a name="l00413"></a>00413 <a name="l00414"></a>00414 <span class="keywordtype">int</span> revertCount; <a name="l00415"></a>00415 <a name="l00430"></a>00430 <span class="keywordtype">int</span> CollisionDetect ( <a name="l00431"></a>00431 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a> *collider, <a name="l00432"></a>00432 <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* sector, <a name="l00433"></a>00433 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* transform, <a name="l00434"></a>00434 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* old_transform); <a name="l00435"></a>00435 <a name="l00445"></a>00445 <span class="keywordtype">int</span> CollisionDetectIterative ( <a name="l00446"></a>00446 <a class="code" href="structiCollider.html" title="A mesh collider.">iCollider</a> *collider, <a name="l00447"></a>00447 <a class="code" href="structiSector.html" title="The iSector interface is used to work with &quot;sectors&quot;.">iSector</a>* sector, <a name="l00448"></a>00448 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* transform, <a name="l00449"></a>00449 <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>* old_transform, <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& maxmove); <a name="l00450"></a>00450 <span class="keywordtype">bool</span> MoveV (<span class="keywordtype">float</span> delta, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& velBody); <a name="l00451"></a>00451 <span class="keywordtype">bool</span> RotateV (<span class="keywordtype">float</span> delta, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& angularVelocity); <a name="l00452"></a>00452 <span class="keywordtype">void</span> InitializeColliders (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& legs, <a name="l00453"></a>00453 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& body, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& shift); <a name="l00454"></a>00454 <a name="l00455"></a>00455 <span class="keyword">public</span>: <a name="l00457"></a>00457 <a class="code" href="classcsColliderActor.html" title="With csColliderActor you can more easily manage collision detection of a player or...">csColliderActor</a> (); <a name="l00458"></a>00458 <a name="l00460"></a><a class="code" href="classcsColliderActor.html#7550ff53e6cc721df1076c4938ad0257">00460</a> <span class="keywordtype">void</span> SetCollideSystem (<a class="code" href="structiCollideSystem.html" title="This is the Collide plug-in.">iCollideSystem</a>* cdsys) <a name="l00461"></a>00461 { <a name="l00462"></a>00462 csColliderActor::cdsys = cdsys; <a name="l00463"></a>00463 } <a name="l00464"></a>00464 <a name="l00466"></a><a class="code" href="classcsColliderActor.html#7d8f778de41aaf572eb53efce2c8c019">00466</a> <span class="keywordtype">void</span> SetEngine (<a class="code" href="structiEngine.html" title="This interface is the main interface to the 3D engine.">iEngine</a>* engine) <a name="l00467"></a>00467 { <a name="l00468"></a>00468 csColliderActor::engine = engine; <a name="l00469"></a>00469 } <a name="l00470"></a>00470 <a name="l00480"></a>00480 <span class="keywordtype">void</span> InitializeColliders (<a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* mesh, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& legs, <a name="l00481"></a>00481 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& body, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& shift); <a name="l00482"></a>00482 <a name="l00494"></a>00494 <span class="keywordtype">void</span> InitializeColliders (<a class="code" href="structiCamera.html" title="Camera class.">iCamera</a>* camera, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& legs, <a name="l00495"></a>00495 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& body, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& shift); <a name="l00496"></a>00496 <a name="l00503"></a>00503 <span class="keywordtype">void</span> SetCamera (<a class="code" href="structiCamera.html" title="Camera class.">iCamera</a>* camera, <span class="keywordtype">bool</span> adjustRotation = <span class="keyword">true</span>); <a name="l00504"></a>00504 <a name="l00508"></a><a class="code" href="classcsColliderActor.html#b0e4be4a3d12a5d4260490d03345e346">00508</a> <span class="keywordtype">void</span> SetGravity (<span class="keywordtype">float</span> g) <a name="l00509"></a>00509 { <a name="l00510"></a>00510 gravity = g; <a name="l00511"></a>00511 velWorld.y = 0; <a name="l00512"></a>00512 } <a name="l00513"></a>00513 <a name="l00517"></a><a class="code" href="classcsColliderActor.html#9583357057cd8abd43f9f8f4b1d32471">00517</a> <span class="keywordtype">float</span> GetGravity ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> gravity; } <a name="l00518"></a>00518 <a name="l00522"></a><a class="code" href="classcsColliderActor.html#134ff5231004996e7bb4144391937592">00522</a> <span class="keywordtype">bool</span> IsOnGround ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> onground; } <a name="l00523"></a>00523 <a name="l00527"></a><a class="code" href="classcsColliderActor.html#bb3923fe8709fdd02704e57a81b3d899">00527</a> <span class="keywordtype">void</span> SetOnGround (<span class="keywordtype">bool</span> og) { onground = og; } <a name="l00528"></a>00528 <a name="l00532"></a><a class="code" href="classcsColliderActor.html#234e57c8f766187ea682ef460592e41b">00532</a> <span class="keywordtype">bool</span> HasCD ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cd; } <a name="l00533"></a>00533 <a name="l00537"></a><a class="code" href="classcsColliderActor.html#e9356b7d49bb8c30178d06d390a24cee">00537</a> <span class="keywordtype">void</span> SetCD (<span class="keywordtype">bool</span> c) { cd = c; } <a name="l00538"></a>00538 <a name="l00542"></a><a class="code" href="classcsColliderActor.html#e592ea8ebe979c4c70ccdc9dab35013d">00542</a> <span class="keywordtype">bool</span> CheckRevertMove ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> revertMove; } <a name="l00543"></a>00543 <a name="l00550"></a><a class="code" href="classcsColliderActor.html#cdca1999a827c7528157bd71967882c9">00550</a> <span class="keywordtype">void</span> EnableHitMeshes (<span class="keywordtype">bool</span> hm) { do_hit_meshes = hm; } <a name="l00551"></a>00551 <a name="l00553"></a><a class="code" href="classcsColliderActor.html#fe9e6444d676a48da69bab40db8bd764">00553</a> <span class="keywordtype">bool</span> CheckHitMeshes ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> do_hit_meshes; } <a name="l00554"></a>00554 <a name="l00560"></a><a class="code" href="classcsColliderActor.html#26361be9d07bce4ba44f768d7e1f4984">00560</a> <span class="keyword">const</span> <a class="code" href="classcsSet.html" title="This class implements a basic set for objects.">csSet<csPtrKey<iMeshWrapper></a> >& GetHitMeshes () <a name="l00561"></a>00561 { <span class="keywordflow">return</span> hit_meshes; } <a name="l00562"></a>00562 <a name="l00575"></a>00575 <span class="keywordtype">bool</span> Move (<span class="keywordtype">float</span> delta, <span class="keywordtype">float</span> speed, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& velBody, <a name="l00576"></a>00576 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& angularVelocity); <a name="l00577"></a>00577 <a name="l00582"></a><a class="code" href="classcsColliderActor.html#77c11cb9d7be5f66843ff2a386180993">00582</a> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& GetRotation () { <span class="keywordflow">return</span> rotation; } <a name="l00583"></a>00583 <a name="l00588"></a>00588 <span class="keywordtype">void</span> SetRotation (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& rot); <a name="l00589"></a>00589 <a name="l00595"></a>00595 <span class="keywordtype">bool</span> AdjustForCollisions (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& oldpos, <a name="l00596"></a>00596 <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& newpos, <a name="l00597"></a>00597 <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>& vel, <a name="l00598"></a>00598 <span class="keywordtype">float</span> delta); <a name="l00599"></a>00599 }; <a name="l00600"></a>00600 <a name="l00601"></a>00601 <span class="preprocessor">#endif // __CS_COLLIDER_H__</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>