\hypertarget{class_ogre_1_1_volume_1_1_grid_source}{}\doxysection{Ogre\+::Volume\+::Grid\+Source Class Reference}
\label{class_ogre_1_1_volume_1_1_grid_source}\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}


A volume source from a discrete 3d grid.  




{\ttfamily \#include $<$Ogre\+Volume\+Grid\+Source.\+h$>$}



Inheritance diagram for Ogre\+::Volume\+::Grid\+Source\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_volume_1_1_grid_source__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_a061baf427896c9a1fcf8152d03d4e8bd}{Grid\+Source}} (bool trilinear\+Value, bool trilinear\+Gradient, bool sobel\+Gradient)
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_a8be67f783487a5b0d80b9c7833f765a6}{$\sim$\+Grid\+Source}} (void)
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_abd60d14fc352b58a18ad921140dd2e5e}{combine\+With\+Source}} (\mbox{\hyperlink{class_ogre_1_1_volume_1_1_c_s_g_operation_source}{C\+S\+G\+Operation\+Source}} $\ast$operation, \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source}{Source}} $\ast$source, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&center, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} radius)
\begin{DoxyCompactList}\small\item\em Updates this grid with another source in a certain area. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_a2b3f3066c875ee88c5c6217c840f79a6}{get\+Depth}} (void) const
\begin{DoxyCompactList}\small\item\em Gets the depth of the texture. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_a3f107f5949b7e9de9bd713f3a21f655a}{get\+First\+Ray\+Intersection}} (const \mbox{\hyperlink{class_ogre_1_1_ray}{Ray}} \&ray, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&result, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} scale=(\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}) 1.\+0, size\+\_\+t max\+Iterations=5000, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} max\+Distance=(\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}) 10000.\+0) const
\begin{DoxyCompactList}\small\item\em Gets the first intersection of a ray with the volume. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_ab55fbe3136da1e477521fe2314a5017b}{get\+Height}} (void) const
\begin{DoxyCompactList}\small\item\em Gets the height of the texture. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_a53520582a00e496bf90aba5a21a254b6}{get\+Value}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&position) const
\begin{DoxyCompactList}\small\item\em Overridden from Volume\+Source. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_a739a289a4d5235f5f509a1795f5ffd5b}{Vector4}} \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_abd503727f50af4b458fd8d3c6af204c3}{get\+Value\+And\+Gradient}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&position) const
\begin{DoxyCompactList}\small\item\em Overridden from Volume\+Source. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_abe9a740187b9e237fceec8afd4ec0546}{get\+Volume\+Space\+To\+World\+Space\+Factor}} (void) const
\begin{DoxyCompactList}\small\item\em Overridden from Volume\+Source. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_volume_1_1_grid_source_ab7d2024e1888894bdea54596c26d7f38}{get\+Width}} (void) const
\begin{DoxyCompactList}\small\item\em Gets the width of the texture. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_a6c7d66b981f8390cf697250c378f9564}{serialize}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&from, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&to, float voxel\+Width, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&file)
\begin{DoxyCompactList}\small\item\em Serializes a volume source to a discrete grid file with deflated compression. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_ac02c21de1fef47cb5877657dcb4c6b8d}{serialize}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&from, const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&to, float voxel\+Width, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} max\+Clamped\+Absolute\+Density, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&file)
\begin{DoxyCompactList}\small\item\em Same as the other serialize function but with a user definable maximum absolute density value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_aba96b1aef0b798535549600b9563560b}{S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE}}
\begin{DoxyCompactList}\small\item\em The amount of items being written as one chunk during serialization. \end{DoxyCompactList}\item 
static const \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_acc0c020bce454d4efe7afc63ebacb372}{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID}}
\begin{DoxyCompactList}\small\item\em The id of volume files. \end{DoxyCompactList}\item 
static const \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_a348e2692fb3b2b65223b1331a42e91dd}{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON}}
\begin{DoxyCompactList}\small\item\em The version of volume files. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A volume source from a discrete 3d grid. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_a061baf427896c9a1fcf8152d03d4e8bd}\label{class_ogre_1_1_volume_1_1_grid_source_a061baf427896c9a1fcf8152d03d4e8bd}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!GridSource@{GridSource}}
\index{GridSource@{GridSource}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{GridSource()}{GridSource()}}
{\footnotesize\ttfamily Ogre\+::\+Volume\+::\+Grid\+Source\+::\+Grid\+Source (\begin{DoxyParamCaption}\item[{bool}]{trilinear\+Value,  }\item[{bool}]{trilinear\+Gradient,  }\item[{bool}]{sobel\+Gradient }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_a8be67f783487a5b0d80b9c7833f765a6}\label{class_ogre_1_1_volume_1_1_grid_source_a8be67f783487a5b0d80b9c7833f765a6}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!````~GridSource@{$\sim$GridSource}}
\index{````~GridSource@{$\sim$GridSource}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{$\sim$GridSource()}{~GridSource()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Volume\+::\+Grid\+Source\+::$\sim$\+Grid\+Source (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Destructor. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_abd503727f50af4b458fd8d3c6af204c3}\label{class_ogre_1_1_volume_1_1_grid_source_abd503727f50af4b458fd8d3c6af204c3}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getValueAndGradient@{getValueAndGradient}}
\index{getValueAndGradient@{getValueAndGradient}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getValueAndGradient()}{getValueAndGradient()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_a739a289a4d5235f5f509a1795f5ffd5b}{Vector4}} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Value\+And\+Gradient (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{position }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Overridden from Volume\+Source. 



Implements \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_a63ffbcaa54a0d18f67145cca042c5788}{Ogre\+::\+Volume\+::\+Source}}.

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_a53520582a00e496bf90aba5a21a254b6}\label{class_ogre_1_1_volume_1_1_grid_source_a53520582a00e496bf90aba5a21a254b6}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getValue@{getValue}}
\index{getValue@{getValue}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getValue()}{getValue()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Value (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{position }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Overridden from Volume\+Source. 



Implements \mbox{\hyperlink{class_ogre_1_1_volume_1_1_source_a0ba42c881a073142bdc67e93f7d771a6}{Ogre\+::\+Volume\+::\+Source}}.

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_ab7d2024e1888894bdea54596c26d7f38}\label{class_ogre_1_1_volume_1_1_grid_source_ab7d2024e1888894bdea54596c26d7f38}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getWidth@{getWidth}}
\index{getWidth@{getWidth}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getWidth()}{getWidth()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Width (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the width of the texture. 

\begin{DoxyReturn}{Returns}
The width of the texture. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_ab55fbe3136da1e477521fe2314a5017b}\label{class_ogre_1_1_volume_1_1_grid_source_ab55fbe3136da1e477521fe2314a5017b}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getHeight@{getHeight}}
\index{getHeight@{getHeight}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getHeight()}{getHeight()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Height (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the height of the texture. 

\begin{DoxyReturn}{Returns}
The height of the texture. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_a2b3f3066c875ee88c5c6217c840f79a6}\label{class_ogre_1_1_volume_1_1_grid_source_a2b3f3066c875ee88c5c6217c840f79a6}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getDepth@{getDepth}}
\index{getDepth@{getDepth}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getDepth()}{getDepth()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Depth (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the depth of the texture. 

\begin{DoxyReturn}{Returns}
The depth of the texture. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_abd60d14fc352b58a18ad921140dd2e5e}\label{class_ogre_1_1_volume_1_1_grid_source_abd60d14fc352b58a18ad921140dd2e5e}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!combineWithSource@{combineWithSource}}
\index{combineWithSource@{combineWithSource}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{combineWithSource()}{combineWithSource()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Volume\+::\+Grid\+Source\+::combine\+With\+Source (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_volume_1_1_c_s_g_operation_source}{C\+S\+G\+Operation\+Source}} $\ast$}]{operation,  }\item[{\mbox{\hyperlink{class_ogre_1_1_volume_1_1_source}{Source}} $\ast$}]{source,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{center,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{radius }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Updates this grid with another source in a certain area. 

Use it for example to add spheres as a brush. 
\begin{DoxyParams}{Parameters}
{\em operation} & The operation to use, will use this source and the other given one as operands. Beware that this function overrides the maybe existing sources in the operation. \\
\hline
{\em source} & The other source to combine this one with. \\
\hline
{\em center} & The rough center of the affected area by the operation. If the other source is a sphere, take its center for example. \\
\hline
{\em radius} & The radius of the affected area. For the example sphere, you might use its radius times two because the density outside of the sphere is needed, too. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_grid_source_abe9a740187b9e237fceec8afd4ec0546}\label{class_ogre_1_1_volume_1_1_grid_source_abe9a740187b9e237fceec8afd4ec0546}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getVolumeSpaceToWorldSpaceFactor@{getVolumeSpaceToWorldSpaceFactor}}
\index{getVolumeSpaceToWorldSpaceFactor@{getVolumeSpaceToWorldSpaceFactor}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getVolumeSpaceToWorldSpaceFactor()}{getVolumeSpaceToWorldSpaceFactor()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Volume\+Space\+To\+World\+Space\+Factor (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Overridden from Volume\+Source. 

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_a6c7d66b981f8390cf697250c378f9564}\label{class_ogre_1_1_volume_1_1_source_a6c7d66b981f8390cf697250c378f9564}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!serialize@{serialize}}
\index{serialize@{serialize}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{serialize()}{serialize()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Volume\+::\+Source\+::serialize (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{from,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{to,  }\item[{float}]{voxel\+Width,  }\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{file }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inherited]}}



Serializes a volume source to a discrete grid file with deflated compression. 

To achieve better compression, all density values are clamped within a maximum absolute value of (to -\/ from).length() / 16.\+0. The values are scanned in this inner-\/loop-\/order\+: z, x, y. y last because there is usually the least isosurface intersection to be expected in the use case of terrain and so more often the maximum density value hit. The values are written as 16 Bit floats to save space. Note that this process is not lossless, the tradeoff is between accuracy of the source-\/reproduction (smaller voxel\+Width) and smaller filesize (bigger voxel\+Width). 
\begin{DoxyParams}{Parameters}
{\em from} & The start point to scan the volume. \\
\hline
{\em to} & The end point to scan the volume. \\
\hline
{\em voxel\+Width} & The width of a single cube in the density grid. \\
\hline
{\em file} & The file to write the grid to. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_ac02c21de1fef47cb5877657dcb4c6b8d}\label{class_ogre_1_1_volume_1_1_source_ac02c21de1fef47cb5877657dcb4c6b8d}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!serialize@{serialize}}
\index{serialize@{serialize}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{serialize()}{serialize()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Volume\+::\+Source\+::serialize (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{from,  }\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{to,  }\item[{float}]{voxel\+Width,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{max\+Clamped\+Absolute\+Density,  }\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{file }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inherited]}}



Same as the other serialize function but with a user definable maximum absolute density value. 


\begin{DoxyParams}{Parameters}
{\em from} & The start point to scan the volume. \\
\hline
{\em to} & The end point to scan the volume. \\
\hline
{\em voxel\+Width} & The width of a single cube in the density grid. \\
\hline
{\em max\+Clamped\+Absolute\+Density} & The maximum absolute density value to be written into the file, influencing the compression rate. \\
\hline
{\em file} & The file to write the grid to. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_a3f107f5949b7e9de9bd713f3a21f655a}\label{class_ogre_1_1_volume_1_1_source_a3f107f5949b7e9de9bd713f3a21f655a}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!getFirstRayIntersection@{getFirstRayIntersection}}
\index{getFirstRayIntersection@{getFirstRayIntersection}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{getFirstRayIntersection()}{getFirstRayIntersection()}}
{\footnotesize\ttfamily bool Ogre\+::\+Volume\+::\+Source\+::get\+First\+Ray\+Intersection (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_ray}{Ray}} \&}]{ray,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{result,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{scale = {\ttfamily (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}})~1.0},  }\item[{size\+\_\+t}]{max\+Iterations = {\ttfamily 5000},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{max\+Distance = {\ttfamily (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}})~10000.0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inherited]}}



Gets the first intersection of a ray with the volume. 

If you are using this together with the Volume\+Chunk\+: Beware of the possible scaling or other transformations you did on the Chunk! Do the inverse first on the ray origin. Example of a scaling with the factor 10\+: ray.\+set\+Origin(ray.\+get\+Origin() / (Real)10.\+0); 
\begin{DoxyParams}{Parameters}
{\em ray} & The ray. \\
\hline
{\em result} & Will hold the intersection point if there is an intersection. \\
\hline
{\em scale} & The scaling of the volume compared to the world. \\
\hline
{\em max\+Iterations} & The maximum amount of iterations on the ray before giving up. \\
\hline
{\em max\+Distance} & The maximum distance of the intersection point. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_acc0c020bce454d4efe7afc63ebacb372}\label{class_ogre_1_1_volume_1_1_source_acc0c020bce454d4efe7afc63ebacb372}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!VOLUME\_CHUNK\_ID@{VOLUME\_CHUNK\_ID}}
\index{VOLUME\_CHUNK\_ID@{VOLUME\_CHUNK\_ID}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{VOLUME\_CHUNK\_ID}{VOLUME\_CHUNK\_ID}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} Ogre\+::\+Volume\+::\+Source\+::\+V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [inherited]}}



The id of volume files. 

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_a348e2692fb3b2b65223b1331a42e91dd}\label{class_ogre_1_1_volume_1_1_source_a348e2692fb3b2b65223b1331a42e91dd}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!VOLUME\_CHUNK\_VERSION@{VOLUME\_CHUNK\_VERSION}}
\index{VOLUME\_CHUNK\_VERSION@{VOLUME\_CHUNK\_VERSION}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{VOLUME\_CHUNK\_VERSION}{VOLUME\_CHUNK\_VERSION}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} Ogre\+::\+Volume\+::\+Source\+::\+V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [inherited]}}



The version of volume files. 

\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_source_aba96b1aef0b798535549600b9563560b}\label{class_ogre_1_1_volume_1_1_source_aba96b1aef0b798535549600b9563560b}} 
\index{Ogre::Volume::GridSource@{Ogre::Volume::GridSource}!SERIALIZATION\_CHUNK\_SIZE@{SERIALIZATION\_CHUNK\_SIZE}}
\index{SERIALIZATION\_CHUNK\_SIZE@{SERIALIZATION\_CHUNK\_SIZE}!Ogre::Volume::GridSource@{Ogre::Volume::GridSource}}
\doxysubsubsection{\texorpdfstring{SERIALIZATION\_CHUNK\_SIZE}{SERIALIZATION\_CHUNK\_SIZE}}
{\footnotesize\ttfamily const size\+\_\+t Ogre\+::\+Volume\+::\+Source\+::\+S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [inherited]}}



The amount of items being written as one chunk during serialization. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_volume_grid_source_8h}{Ogre\+Volume\+Grid\+Source.\+h}}\end{DoxyCompactItemize}
