Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > by-pkgid > a16d689bc65aac5d987d5129109e6de5 > files > 671

irrlicht-doc-1.7.2-1.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>Irrlicht Engine: irr::scene::ISceneNodeFactory Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table class="irrlicht" >
  <tr valign="middle"> 
    <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> 
      | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> 
      | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> 
      | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical 
      List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> 
      Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> 
      | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> 
      Namespace&nbsp;Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class 
      members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File 
      members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td>
  </tr>
</table>
<!-- Generated by Doxygen 1.6.2 -->
  <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="namespaceirr_1_1scene.html">scene</a>::<a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html">ISceneNodeFactory</a>
  </div>
<div class="contents">
<h1>irr::scene::ISceneNodeFactory Class Reference</h1><!-- doxytag: class="irr::scene::ISceneNodeFactory" --><!-- doxytag: inherits="irr::IReferenceCounted" -->
<p>Interface for dynamic creation of scene nodes.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_scene_node_factory_8h_source.html">ISceneNodeFactory.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for irr::scene::ISceneNodeFactory:</div>
<div class="dynsection">
 <div class="center">
  <img src="classirr_1_1scene_1_1_i_scene_node_factory.png" usemap="#irr::scene::ISceneNodeFactory_map" alt=""/>
  <map id="irr::scene::ISceneNodeFactory_map" name="irr::scene::ISceneNodeFactory_map">
<area href="classirr_1_1_i_reference_counted.html" alt="irr::IReferenceCounted" shape="rect" coords="0,0,184,24"/>
</map>
 </div>
</div>

<p><a href="classirr_1_1scene_1_1_i_scene_node_factory-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a7964a7a29260d7f0d4d052b85df78ffb">addSceneNode</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *typeName, <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *parent=0)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">adds a scene node to the scene graph based on its type name  <a href="#a7964a7a29260d7f0d4d052b85df78ffb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a540de57f9f72a70ee622c536859f5997">addSceneNode</a> (<a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a> type, <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *parent=0)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">adds a scene node to the scene graph based on its type id  <a href="#a540de57f9f72a70ee622c536859f5997"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a3c1be487fb0169ee9fbb7169c451d16e">getCreatableSceneNodeTypeCount</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns amount of scene node types this factory is able to create  <a href="#a3c1be487fb0169ee9fbb7169c451d16e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#aaff4e3d3dc214ec83965ecbd8e8175a3">getCreateableSceneNodeType</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> idx) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns type of a createable scene node type  <a href="#aaff4e3d3dc214ec83965ecbd8e8175a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#addc09a5ab7a8d8b65182fbaa09c88b6f">getCreateableSceneNodeTypeName</a> (<a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a> type) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns type name of a createable scene node type  <a href="#addc09a5ab7a8d8b65182fbaa09c88b6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a259f156cc367a9a89f79159ad2b665ac">getCreateableSceneNodeTypeName</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> idx) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns type name of a createable scene node type by index  <a href="#a259f156cc367a9a89f79159ad2b665ac"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Interface for dynamic creation of scene nodes. </p>
<p>To be able to add custom scene nodes to Irrlicht and to make it possible for the scene manager to save and load those external scene nodes, simply implement this interface and register it in you scene manager via <a class="el" href="classirr_1_1scene_1_1_i_scene_manager.html#a75ac9315def74ae5e26a2d6a2f5a38e9" title="Adds a scene node factory to the scene manager.">ISceneManager::registerSceneNodeFactory</a>. Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to increase the reference counter of the scene node manager. This is not necessary because the scene node manager will <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> the factory anyway, and otherwise cyclic references will be created and the scene manager and all its nodes won't get deallocated. </p>

<p>Definition at line <a class="el" href="_i_scene_node_factory_8h_source.html#l00027">27</a> of file <a class="el" href="_i_scene_node_factory_8h_source.html">ISceneNodeFactory.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7964a7a29260d7f0d4d052b85df78ffb"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::addSceneNode" ref="a7964a7a29260d7f0d4d052b85df78ffb" args="(const c8 *typeName, ISceneNode *parent=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a>* irr::scene::ISceneNodeFactory::addSceneNode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&nbsp;</td>
          <td class="paramname"> <em>typeName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>adds a scene node to the scene graph based on its type name </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>typeName,:</em>&nbsp;</td><td>Type name of the scene node to add. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parent,:</em>&nbsp;</td><td>Parent scene node of the new node, can be null to add the scene node to the root. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns pointer to the new scene node or null if not successful. This pointer should not be dropped. See <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">IReferenceCounted::drop()</a> for more information. </dd></dl>

</div>
</div>
<a class="anchor" id="a540de57f9f72a70ee622c536859f5997"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::addSceneNode" ref="a540de57f9f72a70ee622c536859f5997" args="(ESCENE_NODE_TYPE type, ISceneNode *parent=0)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a>* irr::scene::ISceneNodeFactory::addSceneNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classirr_1_1scene_1_1_i_scene_node.html">ISceneNode</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>adds a scene node to the scene graph based on its type id </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type,:</em>&nbsp;</td><td>Type of the scene node to add. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parent,:</em>&nbsp;</td><td>Parent scene node of the new node, can be null to add the scene node to the root. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns pointer to the new scene node or null if not successful. This pointer should not be dropped. See <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">IReferenceCounted::drop()</a> for more information. </dd></dl>

</div>
</div>
<a class="anchor" id="a3c1be487fb0169ee9fbb7169c451d16e"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::getCreatableSceneNodeTypeCount" ref="a3c1be487fb0169ee9fbb7169c451d16e" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::scene::ISceneNodeFactory::getCreatableSceneNodeTypeCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>returns amount of scene node types this factory is able to create </p>

</div>
</div>
<a class="anchor" id="aaff4e3d3dc214ec83965ecbd8e8175a3"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::getCreateableSceneNodeType" ref="aaff4e3d3dc214ec83965ecbd8e8175a3" args="(u32 idx) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a> irr::scene::ISceneNodeFactory::getCreateableSceneNodeType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&nbsp;</td>
          <td class="paramname"> <em>idx</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>returns type of a createable scene node type </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>idx,:</em>&nbsp;</td><td>Index of scene node type in this factory. Must be a value between 0 and <a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a3c1be487fb0169ee9fbb7169c451d16e" title="returns amount of scene node types this factory is able to create">getCreatableSceneNodeTypeCount()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="addc09a5ab7a8d8b65182fbaa09c88b6f"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName" ref="addc09a5ab7a8d8b65182fbaa09c88b6f" args="(ESCENE_NODE_TYPE type) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr_1_1scene.html#acad3d7ef92a9807d391ba29120f3b7bd">ESCENE_NODE_TYPE</a>&nbsp;</td>
          <td class="paramname"> <em>type</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>returns type name of a createable scene node type </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type,:</em>&nbsp;</td><td>Type of scene node. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>: Returns name of scene node type if this factory can create the type, otherwise 0. </dd></dl>

</div>
</div>
<a class="anchor" id="a259f156cc367a9a89f79159ad2b665ac"></a><!-- doxytag: member="irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName" ref="a259f156cc367a9a89f79159ad2b665ac" args="(u32 idx) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::scene::ISceneNodeFactory::getCreateableSceneNodeTypeName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&nbsp;</td>
          <td class="paramname"> <em>idx</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>returns type name of a createable scene node type by index </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>idx,:</em>&nbsp;</td><td>Index of scene node type in this factory. Must be a value between 0 and <a class="el" href="classirr_1_1scene_1_1_i_scene_node_factory.html#a3c1be487fb0169ee9fbb7169c451d16e" title="returns amount of scene node types this factory is able to create">getCreatableSceneNodeTypeCount()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_scene_node_factory_8h_source.html">ISceneNodeFactory.h</a></li>
</ul>
</div>
<hr size="1">
<address style="align: right;">
<small> </small>
</address>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr> 
    <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td>
    <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
        Engine</a> Documentation &copy; 2003-2010 by Nikolaus Gebhardt. Generated 
        on Sun Oct 24 12:42:08 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> 
        (1.6.2)</font></em></small></div></td>
  </tr>
</table>
<address style="align: right;">
</address>
</body>
</html>