Sophie

Sophie

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

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: iengine/movable.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>iengine/movable.h</h1><a href="movable_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) 2000-2001 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_IENGINE_MOVABLE_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IENGINE_MOVABLE_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <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="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="refarr_8h.html" title="Smart Pointer array.">csutil/refarr.h</a>"</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">class </span><a class="code" href="classcsMatrix3.html" title="A 3x3 matrix.">csMatrix3</a>;
<a name="l00033"></a>00033 <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="l00034"></a>00034 <span class="keyword">class </span><a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>;
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <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="l00037"></a>00037 <span class="keyword">struct </span><a class="code" href="structiSector.html" title="The iSector interface is used to work with &amp;quot;sectors&amp;quot;.">iSector</a>;
<a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiSectorList.html" title="A list of sectors.">iSectorList</a>;
<a name="l00039"></a>00039 <span class="keyword">struct </span><a class="code" href="structiSceneNode.html" title="This interface represents a node in the scene graph.">iSceneNode</a>;
<a name="l00040"></a>00040 
<a name="l00048"></a><a class="code" href="structiMovableListener.html">00048</a> <span class="keyword">struct </span><a class="code" href="structiMovableListener.html" title="Implement this class if you&amp;#39;re interested in hearing about movable changes.">iMovableListener</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="structiMovableListener.html" title="Implement this class if you&amp;#39;re interested in hearing about movable changes.">iMovableListener</a>, 2, 0, 0);
<a name="l00051"></a>00051 
<a name="l00056"></a>00056   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovableListener.html#cde4a56b8209db1b1f021dbbff32244f" title="The movable has changed.">MovableChanged</a> (<a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>* movable) = 0;
<a name="l00058"></a>00058   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovableListener.html#0daad80cdbe26cdf6a67ca60a98819d9" title="The movable is about to be destroyed.">MovableDestroyed</a> (<a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>* movable) = 0;
<a name="l00059"></a>00059 };
<a name="l00060"></a>00060 
<a name="l00087"></a><a class="code" href="structiMovable.html">00087</a> <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> : <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="l00088"></a>00088 {
<a name="l00089"></a>00089   SCF_INTERFACE(<a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>, 2,0,0);
<a name="l00090"></a>00090 
<a name="l00094"></a>00094   <span class="keyword">virtual</span> <a class="code" href="structiSceneNode.html" title="This interface represents a node in the scene graph.">iSceneNode</a>* <a class="code" href="structiMovable.html#143c8f53fdcb9d6fa3e8ae52af4c44ac" title="Get the scene node that this movable belongs too.">GetSceneNode</a> () = 0;
<a name="l00095"></a>00095 
<a name="l00105"></a>00105   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#05bbc2bbc84e0e2ca086af0d06505601" title="Initialize the list of sectors to one sector where this object is.">SetSector</a> (<a class="code" href="structiSector.html" title="The iSector interface is used to work with &amp;quot;sectors&amp;quot;.">iSector</a>* sector) = 0;
<a name="l00106"></a>00106 
<a name="l00115"></a>00115   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#f1f7b01a9b926ac6fdfdbd69bde35209" title="Clear the list of sectors.">ClearSectors</a> () = 0;
<a name="l00116"></a>00116 
<a name="l00129"></a>00129   <span class="keyword">virtual</span> <a class="code" href="structiSectorList.html" title="A list of sectors.">iSectorList</a>* <a class="code" href="structiMovable.html#5bb2f5f74320a6d075f0b5eb4089c542" title="Get the list of sectors for this object.">GetSectors</a> () = 0;
<a name="l00130"></a>00130 
<a name="l00134"></a>00134   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiMovable.html#5b60bc0b6c33cd3c28bf88b2ae571e7d" title="Return true if we are placed in a sector (i.e.">InSector</a> () <span class="keyword">const</span> = 0;
<a name="l00135"></a>00135 
<a name="l00146"></a>00146   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#bd0daa3b5e46488ecc7704d5d270200c" title="Set the transformation vector and sector to move to some position.">SetPosition</a> (<a class="code" href="structiSector.html" title="The iSector interface is used to work with &amp;quot;sectors&amp;quot;.">iSector</a>* home, <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v) = 0;
<a name="l00147"></a>00147 
<a name="l00158"></a>00158   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#bd0daa3b5e46488ecc7704d5d270200c" title="Set the transformation vector and sector to move to some position.">SetPosition</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v) = 0;
<a name="l00159"></a>00159 
<a name="l00168"></a>00168   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; <a class="code" href="structiMovable.html#23b790289b7bcf5ba2c2ea29813af55b" title="Get the current position.">GetPosition</a> () <span class="keyword">const</span> = 0;
<a name="l00169"></a>00169 
<a name="l00175"></a>00175   <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="structiMovable.html#ff2e012ab706cf147bbc7c345c1773e8" title="Get the current position but keep track of hierarchical transformations.">GetFullPosition</a> () <span class="keyword">const</span> = 0;
<a name="l00176"></a>00176 
<a name="l00191"></a>00191   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#20419948d260275da29b87eacaab0b84" title="Set the transformation matrix for this entity.">SetTransform</a> (<span class="keyword">const</span> <a class="code" href="classcsMatrix3.html" title="A 3x3 matrix.">csMatrix3</a>&amp; matrix) = 0;
<a name="l00192"></a>00192 
<a name="l00206"></a>00206   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#20419948d260275da29b87eacaab0b84" title="Set the transformation matrix for this entity.">SetTransform</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; t) = 0;
<a name="l00207"></a>00207 
<a name="l00218"></a>00218   <span class="keyword">virtual</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="structiMovable.html#df725ce95c804fef5fefe25fbd3e6514" title="Get the world to object tranformation.">GetTransform</a> () = 0;
<a name="l00219"></a>00219 
<a name="l00224"></a>00224   <span class="keyword">virtual</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a> <a class="code" href="structiMovable.html#71031bca8f0b1f6a2b69eb16afe0bd3f" title="Construct the full world to object transformation given this transformation and possible...">GetFullTransform</a> () <span class="keyword">const</span> = 0;
<a name="l00225"></a>00225 
<a name="l00236"></a>00236   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#26d2b27c3bbb4093d0bad2dd7b9a0fad" title="Relative move.">MovePosition</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v) = 0;
<a name="l00237"></a>00237 
<a name="l00245"></a>00245   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#c7f00808f85975bbe4cae1d830b52714" title="Relative transform.">Transform</a> (<span class="keyword">const</span> <a class="code" href="classcsMatrix3.html" title="A 3x3 matrix.">csMatrix3</a>&amp; matrix) = 0;
<a name="l00246"></a>00246 
<a name="l00252"></a>00252   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#cc1f53d0610d63be900bc8e36f3318f0" title="Add a listener to this movable.">AddListener</a> (<a class="code" href="structiMovableListener.html" title="Implement this class if you&amp;#39;re interested in hearing about movable changes.">iMovableListener</a>* listener) = 0;
<a name="l00253"></a>00253 
<a name="l00257"></a>00257   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#6f9bfea3cc2015e602ddc4eb073151eb" title="Remove a listener from this movable.">RemoveListener</a> (<a class="code" href="structiMovableListener.html" title="Implement this class if you&amp;#39;re interested in hearing about movable changes.">iMovableListener</a>* listener) = 0;
<a name="l00258"></a>00258 
<a name="l00270"></a>00270   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#70cc7fd24b69c74de210677d75e97544" title="After all movement has been done you need to call UpdateMove() to make the final...">UpdateMove</a> () = 0;
<a name="l00271"></a>00271 
<a name="l00277"></a>00277   <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="structiMovable.html#07109bafd4485c1ecf5dc98f2c1c9c37" title="A number which indicates if the movable has been updated.">GetUpdateNumber</a> () <span class="keyword">const</span> = 0;
<a name="l00278"></a>00278 
<a name="l00295"></a>00295   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiMovable.html#b11f37e2563c48eaa2f91fe27e1fd13d" title="This function returns true if the movable transformation is an identity transformation...">IsTransformIdentity</a> () <span class="keyword">const</span> = 0;
<a name="l00296"></a>00296 
<a name="l00305"></a>00305   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiMovable.html#fbe4e4cc05e8bef83b5a87cbe70e925c" title="Return true if the movable transformation is an identity transformation and the (optional)...">IsFullTransformIdentity</a> () <span class="keyword">const</span> = 0;
<a name="l00306"></a>00306 
<a name="l00316"></a>00316   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiMovable.html#ad01f94380193c0bf360c1e7d86a57cd" title="Set the transform of this movable to the identity transform (i.e.">TransformIdentity</a> () = 0;
<a name="l00317"></a>00317 };
<a name="l00318"></a>00318 
<a name="l00321"></a>00321 <span class="preprocessor">#endif // __CS_IENGINE_MOVABLE_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>