Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > media > contrib > by-pkgid > 06719cf03808e17ae6f0852ca1052dc2 > files > 941

libogre1-devel-0.13.0-1mdk.i586.rpm

<html>
<head>
<title>OgreOctree.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<link type="text/css" rel="stylesheet" href="style.css">
</head>

<body>
<!-- Generated by Doxygen 1.2.16 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>OgreOctree.h</h1><a href="OgreOctree_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/***************************************************************************</font>
00002 <font class="comment">octree.h  -  description</font>
00003 <font class="comment">-------------------</font>
00004 <font class="comment">begin                : Mon Sep 30 2002</font>
00005 <font class="comment">copyright            : (C) 2002 by Jon Anderson</font>
00006 <font class="comment">email                : janders@users.sf.net</font>
00007 <font class="comment">***************************************************************************/</font>
00008 
00009 <font class="comment">/***************************************************************************</font>
00010 <font class="comment">*                                                                         *</font>
00011 <font class="comment">*   This program is free software; you can redistribute it and/or modify  *</font>
00012 <font class="comment">*   it under the terms of the GNU Lesser General Public License as        *</font>
00013 <font class="comment">*   published by the Free Software Foundation; either version 2 of the    * </font>
00014 <font class="comment">*   License, or (at your option) any later version.                       *</font>
00015 <font class="comment">*                                                                         *</font>
00016 <font class="comment">***************************************************************************/</font>
00017 
00018 <font class="preprocessor">#ifndef OCTREE_H</font>
00019 <font class="preprocessor"></font><font class="preprocessor">#define OCTREE_H</font>
00020 <font class="preprocessor"></font>
00021 <font class="preprocessor">#include &lt;<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>&gt;</font>
00022 <font class="preprocessor">#include &lt;<a class="code" href="OgreWireBoundingBox_8h.html">OgreWireBoundingBox.h</a>&gt;</font>
00023 
00024 <font class="preprocessor">#include &lt;list&gt;</font>
00025 
00026 <font class="keyword">namespace </font>Ogre
00027 {
00028 
00029 <font class="keyword">class </font>OctreeNode;
00030 
<a name="l00031"></a><a class="code" href="namespaceOgre.html#a469">00031</a> <font class="keyword">typedef</font> std::list &lt; OctreeNode * &gt; <a class="code" href="namespaceOgre.html#a469">NodeList</a>;
00032 
00033 
<a name="l00042"></a><a class="code" href="classOgre_1_1Octree.html">00042</a> <font class="keyword">class </font><a class="code" href="classOgre_1_1Octree.html">Octree</a>
00043 {
00044 <font class="keyword">public</font>:
00045     <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea0">Octree</a>( <a class="code" href="classOgre_1_1Octree.html">Octree</a> * p );
00046     <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea1">~Octree</a>();
00047 
00053     <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea2">_addNode</a>( <a class="code" href="classOgre_1_1OctreeNode.html">OctreeNode</a> * );
00054 
00057     <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea3">_removeNode</a>( <a class="code" href="classOgre_1_1OctreeNode.html">OctreeNode</a> * );
00058 
<a name="l00061"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea4">00061</a>     <font class="keywordtype">int</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea4">numNodes</a>()
00062     {
00063         <font class="keywordflow">return</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen0">mNumNodes</a>;
00064     };
00065 
<a name="l00070"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem0">00070</a>     <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem0">mBox</a>;
<a name="l00071"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem1">00071</a>     <a class="code" href="classOgre_1_1WireBoundingBox.html">WireBoundingBox</a>* <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem1">mWireBoundingBox</a>;
00072     
00075     <a class="code" href="classOgre_1_1WireBoundingBox.html">WireBoundingBox</a>* <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea5">getWireBoundingBox</a>();
00076 
<a name="l00079"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem2">00079</a>     <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem2">mHalfSize</a>;
00080 
<a name="l00086"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem3">00086</a>     <a class="code" href="classOgre_1_1Octree.html">Octree</a> * <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem3">mChildren</a>[ 2 ][ 2 ][ 2 ];
00087 
00093     <font class="keywordtype">bool</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea6">_isTwiceSize</a>( <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> &amp;box );
00094 
00101     <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea7">_getChildIndexes</a>( <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> &amp;, <font class="keywordtype">int</font> *x, <font class="keywordtype">int</font> *y, <font class="keywordtype">int</font> *z );
00102 
00107     <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreea8">_getCullBounds</a>( <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> * );
00108 
00109 
<a name="l00112"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem4">00112</a>     <a class="code" href="namespaceOgre.html#a469">NodeList</a> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreem4">mNodes</a>;
00113 
00114 <font class="keyword">protected</font>:
00115 
<a name="l00118"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb0">00118</a>     <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb0">_ref</a>()
00119     {
00120         <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen0">mNumNodes</a>++;
00121 
00122         <font class="keywordflow">if</font> ( <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">mParent</a> != 0 ) <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">mParent</a> -&gt; <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb0">_ref</a>();
00123     };
00124 
<a name="l00127"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb1">00127</a>     <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb1">_unref</a>()
00128     {
00129         <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen0">mNumNodes</a>--;
00130 
00131         <font class="keywordflow">if</font> ( <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">mParent</a> != 0 ) <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">mParent</a> -&gt; <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreeb1">_unref</a>();
00132     };
00133 
<a name="l00135"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen0">00135</a>     <font class="keywordtype">int</font> <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen0">mNumNodes</a>;
00136 
<a name="l00138"></a><a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">00138</a>     <a class="code" href="classOgre_1_1Octree.html">Octree</a> * <a class="code" href="classOgre_1_1Octree.html#Ogre_1_1Octreen1">mParent</a>;
00139 
00140 };
00141 
00142 }
00143 
00144 <font class="preprocessor">#endif</font>
00145 <font class="preprocessor"></font>
00146 
</pre></div><p>
Copyright &copy; 2002-2003 by The OGRE Team<br />
Last modified Wed Jan 21 00:10:19 2004
</p>
</body>
</html>