source: OGRE/trunk/ogrenew/Docs/api/html/OgrePatchSurface_8h-source.html @ 657

Revision 657, 14.1 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgrePatchSurface.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>OgrePatchSurface.h</h1><a href="OgrePatchSurface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>
1100002 <span class="comment">-----------------------------------------------------------------------------</span>
1200003 <span class="comment">This source file is part of OGRE</span>
1300004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
2000011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
2100012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
2200013 <span class="comment">version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
2500016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
2600017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
2700018 <span class="comment"></span>
2800019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
2900020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
3000021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
3100022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
3200023 <span class="comment">-----------------------------------------------------------------------------</span>
3300024 <span class="comment">*/</span>
3400025 <span class="preprocessor">#ifndef __PatchSurface_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __PatchSurface_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3800029
3900030 <span class="preprocessor">#include "<a class="code" href="OgreVector3_8h.html">OgreVector3.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreString_8h.html">OgreString.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreRenderOperation_8h.html">OgreRenderOperation.h</a>"</span>
4200033 <span class="preprocessor">#include "<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>"</span>
4300034
4400035 <span class="keyword">namespace </span>Ogre {
4500036
46<a name="l00043"></a><a class="code" href="classOgre_1_1PatchSurface.html">00043</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> PatchSurface
4700044     {
4800045     <span class="keyword">public</span>:
4900046         PatchSurface();
5000047         ~PatchSurface();
5100048
52<a name="l00049"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacew5">00049</a>         <span class="keyword">enum</span> PatchSurfaceType
5300050         {
5400052             PST_BEZIER
5500053         };
5600054
5700056         <span class="keyword">enum</span>
5800057         {
5900058             AUTO_LEVEL = -1
6000059         };
6100060
62<a name="l00061"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacew7">00061</a>         <span class="keyword">enum</span> VisibleSide {
6300063             VS_FRONT,
6400065             VS_BACK,
6500067             VS_BOTH
6600068         };
6700096         <span class="keywordtype">void</span> defineSurface(<span class="keywordtype">void</span>* controlPointBuffer,
6800097             <a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a> *declaration, size_t width, size_t height,
6900098             PatchSurfaceType pType = PST_BEZIER,
7000099             size_t uMaxSubdivisionLevel = AUTO_LEVEL, size_t vMaxSubdivisionLevel = AUTO_LEVEL,
7100100             VisibleSide visibleSide = VS_FRONT);
7200101
7300107         size_t getRequiredVertexCount(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
7400113         size_t getRequiredIndexCount(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
7500114
7600116         size_t getCurrentIndexCount(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
77<a name="l00118"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacea6">00118</a>         size_t getIndexOffset(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mIndexOffset; }
78<a name="l00120"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacea7">00120</a>         size_t getVertexOffset(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mVertexOffset; }
7900121
8000122
8100124         <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>&amp; getBounds(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
8200127         <a class="code" href="namespaceOgre.html#a420">Real</a> getBoundingSphereRadius(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
8300143         <span class="keywordtype">void</span> build(<a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html">HardwareVertexBufferSharedPtr</a> destVertexBuffer, size_t vertexStart,
8400144             <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a> destIndexBuffer, size_t indexStart);
8500145
8600154         <span class="keywordtype">void</span> setSubdivisionFactor(<a class="code" href="namespaceOgre.html#a420">Real</a> factor);
8700155
8800157         <a class="code" href="namespaceOgre.html#a420">Real</a> getSubdivisionFactor(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
8900158
90<a name="l00159"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacea13">00159</a>         <span class="keywordtype">void</span>* getControlPointBuffer(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
9100160 <span class="keyword">        </span>{
9200161             <span class="keywordflow">return</span> mControlPointBuffer;
9300162         }
94<a name="l00165"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacea14">00165</a>         <span class="keywordtype">void</span> notifyControlPointBufferDeallocated(<span class="keywordtype">void</span>) {
9500166             mControlPointBuffer = 0;
9600167         }
9700168     <span class="keyword">protected</span>:
98<a name="l00170"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep0">00170</a>         <a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a>* mDeclaration;
99<a name="l00172"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep1">00172</a>         <span class="keywordtype">void</span>* mControlPointBuffer;
100<a name="l00174"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep2">00174</a>         PatchSurfaceType mType;
101<a name="l00176"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep3">00176</a>         size_t mCtlWidth;
102<a name="l00178"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep4">00178</a>         size_t mCtlHeight;
103<a name="l00180"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep5">00180</a>         size_t mCtlCount;
104<a name="l00182"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep6">00182</a>         size_t mULevel;
105<a name="l00184"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep7">00184</a>         size_t mVLevel;
106<a name="l00186"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep8">00186</a>         size_t mMaxULevel;
107<a name="l00187"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep9">00187</a>         size_t mMaxVLevel;
108<a name="l00189"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep10">00189</a>         size_t mMeshWidth;
109<a name="l00191"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep11">00191</a>         size_t mMeshHeight;
110<a name="l00193"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep12">00193</a>         VisibleSide mVSide;
11100194
112<a name="l00195"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep13">00195</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mSubdivisionFactor;
11300196
114<a name="l00197"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep14">00197</a>         std::vector&lt;Vector3&gt; mVecCtlPoints;
11500198
11600201         size_t findLevel( <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; a, <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; b, <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; c);
11700202
11800203         <span class="keywordtype">void</span> distributeControlPoints(<span class="keywordtype">void</span>* lockedBuffer);
11900204         <span class="keywordtype">void</span> subdivideCurve(<span class="keywordtype">void</span>* lockedBuffer, size_t startIdx, size_t stepSize, size_t numSteps, size_t iterations);
12000205         <span class="keywordtype">void</span> interpolateVertexData(<span class="keywordtype">void</span>* lockedBuffer, size_t leftIndex, size_t rightIndex, size_t destIndex);
12100206         <span class="keywordtype">void</span> makeTriangles(<span class="keywordtype">void</span>);
12200207
12300208         size_t getAutoULevel(<span class="keywordtype">bool</span> forMax = <span class="keyword">false</span>);
12400209         size_t getAutoVLevel(<span class="keywordtype">bool</span> forMax = <span class="keyword">false</span>);
12500210
126<a name="l00211"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep15">00211</a>         <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html">HardwareVertexBufferSharedPtr</a> mVertexBuffer;
127<a name="l00212"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep16">00212</a>         <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a> mIndexBuffer;
128<a name="l00213"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep17">00213</a>         size_t mVertexOffset;
129<a name="l00214"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep18">00214</a>         size_t mIndexOffset;
130<a name="l00215"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep19">00215</a>         size_t mRequiredVertexCount;
131<a name="l00216"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep20">00216</a>         size_t mRequiredIndexCount;
132<a name="l00217"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep21">00217</a>         size_t mCurrIndexCount;
13300218
134<a name="l00219"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep22">00219</a>         <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> mAABB;
135<a name="l00220"></a><a class="code" href="classOgre_1_1PatchSurface.html#Ogre_1_1PatchSurfacep23">00220</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mBoundingSphere;
13600221
13700222
13800223
13900224     };
14000225
14100226
14200227 } <span class="comment">// namespace</span>
14300228
14400229 <span class="preprocessor">#endif</span>
145</pre></div><hr>
146<p>
147Copyright &copy; 2000-2005 by The OGRE Team<br />
148<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
149This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
150                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
151                <Work rdf:about="">
152                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
153        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
154                </Work>
155                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
156
157Last modified Sun Feb 12 12:59:49 2006
158</p>
159</body>
160</html>
Note: See TracBrowser for help on using the repository browser.