\hypertarget{class_ogre_1_1_patch_surface}{}\section{Ogre\+:\+:Patch\+Surface Class Reference}
\label{class_ogre_1_1_patch_surface}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}


A surface which is defined by curves of some kind to form a patch, e.\+g.  




{\ttfamily \#include $<$Ogre\+Patch\+Surface.\+h$>$}



Inheritance diagram for Ogre\+:\+:Patch\+Surface\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=189pt]{class_ogre_1_1_patch_surface__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \{ \hyperlink{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL} = -\/1
 \}\begin{DoxyCompactList}\small\item\em Constant for indicating automatic determination of subdivision level for patches. \end{DoxyCompactList}
\item 
enum \hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}{Patch\+Surface\+Type} \{ \hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278a3018de74c08da01f0eeea0f1445f1c8e}{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER}
 \}
\item 
enum \hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}{Visible\+Side} \{ \hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeabe7d46958e7b6cf27e83c3e5600dafb2}{V\+S\+\_\+\+F\+R\+O\+NT}, 
\hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeea644ea2565457231655d0dea56da799ec}{V\+S\+\_\+\+B\+A\+CK}, 
\hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeaa4aa50d12e90df02c8d549e85d365eaa}{V\+S\+\_\+\+B\+O\+TH}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_patch_surface_ad5d1bb1850a1b30a1bc786b20a135ea6}{Patch\+Surface} ()
\item 
\hyperlink{class_ogre_1_1_patch_surface_a374e4bdaaa553a7d3317da1fb36eca87}{$\sim$\+Patch\+Surface} ()
\item 
void \hyperlink{class_ogre_1_1_patch_surface_a720b670d73970bb3970dc6d4e190ba2e}{build} (\hyperlink{namespace_ogre_a05ef9b65d4ed446b994636e371bf5aab}{Hardware\+Vertex\+Buffer\+Shared\+Ptr} dest\+Vertex\+Buffer, size\+\_\+t vertex\+Start, \hyperlink{namespace_ogre_ae906cf8e579ba8ade19879ec05b1a456}{Hardware\+Index\+Buffer\+Shared\+Ptr} dest\+Index\+Buffer, size\+\_\+t index\+Start)
\begin{DoxyCompactList}\small\item\em Tells the system to build the mesh relating to the surface into externally created buffers. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_patch_surface_abe4bf8a170882c83e44a90a2850ace92}{define\+Surface} (void $\ast$control\+Point\+Buffer, \hyperlink{class_ogre_1_1_vertex_declaration}{Vertex\+Declaration} $\ast$declaration, size\+\_\+t width, size\+\_\+t height, \hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}{Patch\+Surface\+Type} p\+Type=\hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278a3018de74c08da01f0eeea0f1445f1c8e}{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER}, size\+\_\+t u\+Max\+Subdivision\+Level=\hyperlink{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}, size\+\_\+t v\+Max\+Subdivision\+Level=\hyperlink{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}, \hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}{Visible\+Side} visible\+Side=\hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeabe7d46958e7b6cf27e83c3e5600dafb2}{V\+S\+\_\+\+F\+R\+O\+NT})
\begin{DoxyCompactList}\small\item\em Sets up the surface by defining it\textquotesingle{}s control points, type and initial subdivision level. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_patch_surface_a9667fc8ad5a48843eb458bf1b97a80a6}{get\+Bounding\+Sphere\+Radius} (void) const
\begin{DoxyCompactList}\small\item\em Gets the radius of the bounding sphere for this patch, only valid after define\+Surface has been called. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_axis_aligned_box}{Axis\+Aligned\+Box} \& \hyperlink{class_ogre_1_1_patch_surface_a73c4aff695975673aad8b27a4808bfb3}{get\+Bounds} (void) const
\begin{DoxyCompactList}\small\item\em Gets the bounds of this patch, only valid after calling define\+Surface. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{class_ogre_1_1_patch_surface_a76286ef911fe5260481f4fcf29fd3416}{get\+Control\+Point\+Buffer} (void) const
\item 
size\+\_\+t \hyperlink{class_ogre_1_1_patch_surface_a8379384ea97a4c101325fc4d9ca24ce7}{get\+Current\+Index\+Count} (void) const
\begin{DoxyCompactList}\small\item\em Gets the current index count based on the current subdivision level. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_patch_surface_abd8321844ff5ef766ea06b855bec92df}{get\+Index\+Offset} (void) const
\begin{DoxyCompactList}\small\item\em Returns the index offset used by this buffer to write data into the buffer. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_patch_surface_ac568ac04718baa7ba8c0e5fd5bb1ee2e}{get\+Required\+Index\+Count} (void) const
\begin{DoxyCompactList}\small\item\em Based on a previous call to define\+Surface, establishes the number of indexes required to hold this patch at the maximum detail level. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_patch_surface_a2d554ef02989d0981436dc46b6ae7c46}{get\+Required\+Vertex\+Count} (void) const
\begin{DoxyCompactList}\small\item\em Based on a previous call to define\+Surface, establishes the number of vertices required to hold this patch at the maximum detail level. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_patch_surface_a7cb0618e0052b7d5efbd074c2387c1a3}{get\+Subdivision\+Factor} (void) const
\begin{DoxyCompactList}\small\item\em Gets the current level of subdivision. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{class_ogre_1_1_patch_surface_ae619debb866daab08e4250405bbbac66}{get\+Vertex\+Offset} (void) const
\begin{DoxyCompactList}\small\item\em Returns the vertex offset used by this buffer to write data into the buffer. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_patch_surface_a41fb9a71633f5658bac6c83403f46a43}{notify\+Control\+Point\+Buffer\+Deallocated} (void)
\begin{DoxyCompactList}\small\item\em Convenience method for telling the patch that the control points have been deleted, since once the patch has been built they are not required. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_patch_surface_a3322b21075ac2e34395e35da3e9025bd}{set\+Subdivision\+Factor} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} factor)
\begin{DoxyCompactList}\small\item\em Alters the level of subdivision for this surface. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A surface which is defined by curves of some kind to form a patch, e.\+g. 

a Bezier patch. \begin{DoxyRemark}{Remarks}
This object will take a list of control points with various assorted data, and will subdivide it into a patch mesh. Currently only Bezier curves are supported for defining the surface, but other techniques such as N\+U\+R\+BS would follow the same basic approach. 
\end{DoxyRemark}


\subsection{Member Enumeration Documentation}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}\label{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!Patch\+Surface\+Type@{Patch\+Surface\+Type}}
\index{Patch\+Surface\+Type@{Patch\+Surface\+Type}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{Patch\+Surface\+Type}{PatchSurfaceType}}
{\footnotesize\ttfamily enum \hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}{Ogre\+::\+Patch\+Surface\+::\+Patch\+Surface\+Type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER@{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER@{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER}}}\mbox{\Hypertarget{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278a3018de74c08da01f0eeea0f1445f1c8e}\label{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278a3018de74c08da01f0eeea0f1445f1c8e}} 
P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER&A patch defined by a set of bezier curves. \\
\hline

\end{DoxyEnumFields}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279}\label{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279}} 
\subsubsection{\texorpdfstring{anonymous enum}{anonymous enum}}
{\footnotesize\ttfamily anonymous enum}



Constant for indicating automatic determination of subdivision level for patches. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL@{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!A\+U\+T\+O\+\_\+\+L\+E\+V\+EL@{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}}}\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}\label{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}} 
A\+U\+T\+O\+\_\+\+L\+E\+V\+EL&\\
\hline

\end{DoxyEnumFields}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}\label{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!Visible\+Side@{Visible\+Side}}
\index{Visible\+Side@{Visible\+Side}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{Visible\+Side}{VisibleSide}}
{\footnotesize\ttfamily enum \hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}{Ogre\+::\+Patch\+Surface\+::\+Visible\+Side}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{V\+S\+\_\+\+F\+R\+O\+NT@{V\+S\+\_\+\+F\+R\+O\+NT}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!V\+S\+\_\+\+F\+R\+O\+NT@{V\+S\+\_\+\+F\+R\+O\+NT}}}\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeabe7d46958e7b6cf27e83c3e5600dafb2}\label{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeabe7d46958e7b6cf27e83c3e5600dafb2}} 
V\+S\+\_\+\+F\+R\+O\+NT&The side from which u goes right and v goes up (as in texture coords) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{V\+S\+\_\+\+B\+A\+CK@{V\+S\+\_\+\+B\+A\+CK}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!V\+S\+\_\+\+B\+A\+CK@{V\+S\+\_\+\+B\+A\+CK}}}\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeea644ea2565457231655d0dea56da799ec}\label{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeea644ea2565457231655d0dea56da799ec}} 
V\+S\+\_\+\+B\+A\+CK&The side from which u goes right and v goes down (reverse of texture coords) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{V\+S\+\_\+\+B\+O\+TH@{V\+S\+\_\+\+B\+O\+TH}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!V\+S\+\_\+\+B\+O\+TH@{V\+S\+\_\+\+B\+O\+TH}}}\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeaa4aa50d12e90df02c8d549e85d365eaa}\label{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeaa4aa50d12e90df02c8d549e85d365eaa}} 
V\+S\+\_\+\+B\+O\+TH&Both sides are visible -\/ warning this creates 2x the number of triangles and adds extra overhead for calculating normals. \\
\hline

\end{DoxyEnumFields}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_ad5d1bb1850a1b30a1bc786b20a135ea6}\label{class_ogre_1_1_patch_surface_ad5d1bb1850a1b30a1bc786b20a135ea6}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!Patch\+Surface@{Patch\+Surface}}
\index{Patch\+Surface@{Patch\+Surface}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{Patch\+Surface()}{PatchSurface()}}
{\footnotesize\ttfamily Ogre\+::\+Patch\+Surface\+::\+Patch\+Surface (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a374e4bdaaa553a7d3317da1fb36eca87}\label{class_ogre_1_1_patch_surface_a374e4bdaaa553a7d3317da1fb36eca87}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!````~Patch\+Surface@{$\sim$\+Patch\+Surface}}
\index{````~Patch\+Surface@{$\sim$\+Patch\+Surface}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{$\sim$\+Patch\+Surface()}{~PatchSurface()}}
{\footnotesize\ttfamily Ogre\+::\+Patch\+Surface\+::$\sim$\+Patch\+Surface (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_abe4bf8a170882c83e44a90a2850ace92}\label{class_ogre_1_1_patch_surface_abe4bf8a170882c83e44a90a2850ace92}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!define\+Surface@{define\+Surface}}
\index{define\+Surface@{define\+Surface}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{define\+Surface()}{defineSurface()}}
{\footnotesize\ttfamily void Ogre\+::\+Patch\+Surface\+::define\+Surface (\begin{DoxyParamCaption}\item[{void $\ast$}]{control\+Point\+Buffer,  }\item[{\hyperlink{class_ogre_1_1_vertex_declaration}{Vertex\+Declaration} $\ast$}]{declaration,  }\item[{size\+\_\+t}]{width,  }\item[{size\+\_\+t}]{height,  }\item[{\hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278}{Patch\+Surface\+Type}}]{p\+Type = {\ttfamily \hyperlink{class_ogre_1_1_patch_surface_abedf8abe8fa9fb9b1b7cff118cd2e278a3018de74c08da01f0eeea0f1445f1c8e}{P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER}},  }\item[{size\+\_\+t}]{u\+Max\+Subdivision\+Level = {\ttfamily \hyperlink{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}},  }\item[{size\+\_\+t}]{v\+Max\+Subdivision\+Level = {\ttfamily \hyperlink{class_ogre_1_1_patch_surface_a6a87103873472b047d81ccc2c83de279a575b3489dac0ce9bffbad3d630b76830}{A\+U\+T\+O\+\_\+\+L\+E\+V\+EL}},  }\item[{\hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eee}{Visible\+Side}}]{visible\+Side = {\ttfamily \hyperlink{class_ogre_1_1_patch_surface_a3786509c9aac2a5ea44848e3f49c5eeeabe7d46958e7b6cf27e83c3e5600dafb2}{V\+S\+\_\+\+F\+R\+O\+NT}} }\end{DoxyParamCaption})}



Sets up the surface by defining it\textquotesingle{}s control points, type and initial subdivision level. 

\begin{DoxyRemark}{Remarks}
This method initialises the surface by passing it a set of control points. The type of curves to be used are also defined here, although the only supported option currently is a bezier patch. You can also specify a global subdivision level here if you like, although it is recommended that the parameter is left as A\+U\+T\+O\+\_\+\+L\+E\+V\+EL, which means the system decides how much subdivision is required (based on the curvature of the surface) 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em control\+Point\+Buffer} & A pointer to a buffer containing the vertex data which defines control points of the curves rather than actual vertices. Note that you are expected to provide not just position information, but potentially normals and texture coordinates too. The format of the buffer is defined in the \hyperlink{class_ogre_1_1_vertex_declaration}{Vertex\+Declaration} parameter \\
\hline
{\em declaration} & \hyperlink{class_ogre_1_1_vertex_declaration}{Vertex\+Declaration} describing the contents of the buffer. Note this declaration must {\itshape only} draw on buffer source 0! \\
\hline
{\em width} & Specifies the width of the patch in control points. \\
\hline
{\em height} & Specifies the height of the patch in control points. \\
\hline
{\em p\+Type} & The type of surface -\/ currently only P\+S\+T\+\_\+\+B\+E\+Z\+I\+ER is supported \\
\hline
{\em u\+Max\+Subdivision\+Level,v\+Max\+Subdivision\+Level} & If you want to manually set the top level of subdivision, do it here, otherwise let the system decide. \\
\hline
{\em visible\+Side} & Determines which side of the patch (or both) triangles are generated for. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a2d554ef02989d0981436dc46b6ae7c46}\label{class_ogre_1_1_patch_surface_a2d554ef02989d0981436dc46b6ae7c46}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Required\+Vertex\+Count@{get\+Required\+Vertex\+Count}}
\index{get\+Required\+Vertex\+Count@{get\+Required\+Vertex\+Count}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Required\+Vertex\+Count()}{getRequiredVertexCount()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Patch\+Surface\+::get\+Required\+Vertex\+Count (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Based on a previous call to define\+Surface, establishes the number of vertices required to hold this patch at the maximum detail level. 

\begin{DoxyRemark}{Remarks}
This is useful when you wish to build the patch into external vertex / index buffers. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_ac568ac04718baa7ba8c0e5fd5bb1ee2e}\label{class_ogre_1_1_patch_surface_ac568ac04718baa7ba8c0e5fd5bb1ee2e}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Required\+Index\+Count@{get\+Required\+Index\+Count}}
\index{get\+Required\+Index\+Count@{get\+Required\+Index\+Count}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Required\+Index\+Count()}{getRequiredIndexCount()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Patch\+Surface\+::get\+Required\+Index\+Count (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Based on a previous call to define\+Surface, establishes the number of indexes required to hold this patch at the maximum detail level. 

\begin{DoxyRemark}{Remarks}
This is useful when you wish to build the patch into external vertex / index buffers. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a8379384ea97a4c101325fc4d9ca24ce7}\label{class_ogre_1_1_patch_surface_a8379384ea97a4c101325fc4d9ca24ce7}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Current\+Index\+Count@{get\+Current\+Index\+Count}}
\index{get\+Current\+Index\+Count@{get\+Current\+Index\+Count}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Current\+Index\+Count()}{getCurrentIndexCount()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Patch\+Surface\+::get\+Current\+Index\+Count (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the current index count based on the current subdivision level. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_abd8321844ff5ef766ea06b855bec92df}\label{class_ogre_1_1_patch_surface_abd8321844ff5ef766ea06b855bec92df}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Index\+Offset@{get\+Index\+Offset}}
\index{get\+Index\+Offset@{get\+Index\+Offset}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Index\+Offset()}{getIndexOffset()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Patch\+Surface\+::get\+Index\+Offset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the index offset used by this buffer to write data into the buffer. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_ae619debb866daab08e4250405bbbac66}\label{class_ogre_1_1_patch_surface_ae619debb866daab08e4250405bbbac66}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Vertex\+Offset@{get\+Vertex\+Offset}}
\index{get\+Vertex\+Offset@{get\+Vertex\+Offset}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Vertex\+Offset()}{getVertexOffset()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Patch\+Surface\+::get\+Vertex\+Offset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the vertex offset used by this buffer to write data into the buffer. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a73c4aff695975673aad8b27a4808bfb3}\label{class_ogre_1_1_patch_surface_a73c4aff695975673aad8b27a4808bfb3}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Bounds@{get\+Bounds}}
\index{get\+Bounds@{get\+Bounds}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Bounds()}{getBounds()}}
{\footnotesize\ttfamily const \hyperlink{class_ogre_1_1_axis_aligned_box}{Axis\+Aligned\+Box}\& Ogre\+::\+Patch\+Surface\+::get\+Bounds (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the bounds of this patch, only valid after calling define\+Surface. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a9667fc8ad5a48843eb458bf1b97a80a6}\label{class_ogre_1_1_patch_surface_a9667fc8ad5a48843eb458bf1b97a80a6}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Bounding\+Sphere\+Radius@{get\+Bounding\+Sphere\+Radius}}
\index{get\+Bounding\+Sphere\+Radius@{get\+Bounding\+Sphere\+Radius}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Bounding\+Sphere\+Radius()}{getBoundingSphereRadius()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Patch\+Surface\+::get\+Bounding\+Sphere\+Radius (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the radius of the bounding sphere for this patch, only valid after define\+Surface has been called. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a720b670d73970bb3970dc6d4e190ba2e}\label{class_ogre_1_1_patch_surface_a720b670d73970bb3970dc6d4e190ba2e}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!build@{build}}
\index{build@{build}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{build()}{build()}}
{\footnotesize\ttfamily void Ogre\+::\+Patch\+Surface\+::build (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_a05ef9b65d4ed446b994636e371bf5aab}{Hardware\+Vertex\+Buffer\+Shared\+Ptr}}]{dest\+Vertex\+Buffer,  }\item[{size\+\_\+t}]{vertex\+Start,  }\item[{\hyperlink{namespace_ogre_ae906cf8e579ba8ade19879ec05b1a456}{Hardware\+Index\+Buffer\+Shared\+Ptr}}]{dest\+Index\+Buffer,  }\item[{size\+\_\+t}]{index\+Start }\end{DoxyParamCaption})}



Tells the system to build the mesh relating to the surface into externally created buffers. 

\begin{DoxyRemark}{Remarks}
The \hyperlink{class_ogre_1_1_vertex_declaration}{Vertex\+Declaration} of the vertex buffer must be identical to the one passed into define\+Surface. In addition, there must be enough space in the buffer to accommodate the patch at full detail level; you should call get\+Required\+Vertex\+Count and get\+Required\+Index\+Count to determine this. This method does not create an internal mesh for this patch and so get\+Mesh will return null if you call it after building the patch this way. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em dest\+Vertex\+Buffer} & The destination vertex buffer in which to build the patch. \\
\hline
{\em vertex\+Start} & The offset at which to start writing vertices for this patch \\
\hline
{\em dest\+Index\+Buffer} & The destination index buffer in which to build the patch. \\
\hline
{\em index\+Start} & The offset at which to start writing indexes for this patch \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a3322b21075ac2e34395e35da3e9025bd}\label{class_ogre_1_1_patch_surface_a3322b21075ac2e34395e35da3e9025bd}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!set\+Subdivision\+Factor@{set\+Subdivision\+Factor}}
\index{set\+Subdivision\+Factor@{set\+Subdivision\+Factor}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{set\+Subdivision\+Factor()}{setSubdivisionFactor()}}
{\footnotesize\ttfamily void Ogre\+::\+Patch\+Surface\+::set\+Subdivision\+Factor (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{factor }\end{DoxyParamCaption})}



Alters the level of subdivision for this surface. 

\begin{DoxyRemark}{Remarks}
This method changes the proportionate detail level of the patch; since the U and V directions can have different subdivision levels, this method takes a single Real value where 0 is the minimum detail (the control points) and 1 is the maximum detail level as supplied to the original call to define\+Surface. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a7cb0618e0052b7d5efbd074c2387c1a3}\label{class_ogre_1_1_patch_surface_a7cb0618e0052b7d5efbd074c2387c1a3}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Subdivision\+Factor@{get\+Subdivision\+Factor}}
\index{get\+Subdivision\+Factor@{get\+Subdivision\+Factor}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Subdivision\+Factor()}{getSubdivisionFactor()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Patch\+Surface\+::get\+Subdivision\+Factor (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the current level of subdivision. 

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a76286ef911fe5260481f4fcf29fd3416}\label{class_ogre_1_1_patch_surface_a76286ef911fe5260481f4fcf29fd3416}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!get\+Control\+Point\+Buffer@{get\+Control\+Point\+Buffer}}
\index{get\+Control\+Point\+Buffer@{get\+Control\+Point\+Buffer}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{get\+Control\+Point\+Buffer()}{getControlPointBuffer()}}
{\footnotesize\ttfamily void$\ast$ Ogre\+::\+Patch\+Surface\+::get\+Control\+Point\+Buffer (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_patch_surface_a41fb9a71633f5658bac6c83403f46a43}\label{class_ogre_1_1_patch_surface_a41fb9a71633f5658bac6c83403f46a43}} 
\index{Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}!notify\+Control\+Point\+Buffer\+Deallocated@{notify\+Control\+Point\+Buffer\+Deallocated}}
\index{notify\+Control\+Point\+Buffer\+Deallocated@{notify\+Control\+Point\+Buffer\+Deallocated}!Ogre\+::\+Patch\+Surface@{Ogre\+::\+Patch\+Surface}}
\subsubsection{\texorpdfstring{notify\+Control\+Point\+Buffer\+Deallocated()}{notifyControlPointBufferDeallocated()}}
{\footnotesize\ttfamily void Ogre\+::\+Patch\+Surface\+::notify\+Control\+Point\+Buffer\+Deallocated (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Convenience method for telling the patch that the control points have been deleted, since once the patch has been built they are not required. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_patch_surface_8h}{Ogre\+Patch\+Surface.\+h}\end{DoxyCompactItemize}
