\hypertarget{class_ogre_1_1_volume_1_1_half_float_grid_source}{}\section{Ogre\+:\+:Volume\+:\+:Half\+Float\+Grid\+Source Class Reference}
\label{class_ogre_1_1_volume_1_1_half_float_grid_source}\index{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}


A volume source from a 16 Bit float 3D grid capable of loading volume serializations.  




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



Inheritance diagram for Ogre\+:\+:Volume\+:\+:Half\+Float\+Grid\+Source\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=233pt]{class_ogre_1_1_volume_1_1_half_float_grid_source__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_volume_1_1_half_float_grid_source_a906b862d1ba88f329163e1be1d76b4a5}{Half\+Float\+Grid\+Source} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&serialized\+Volume\+File, const bool trilinear\+Value=true, const bool trilinear\+Gradient=false, const bool sobel\+Gradient=false)
\begin{DoxyCompactList}\small\item\em Constructur. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_volume_1_1_half_float_grid_source_ac5316e05f65cb193172b1f58baf2e1ed}{$\sim$\+Half\+Float\+Grid\+Source} (void)
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_volume_1_1_grid_source_abd60d14fc352b58a18ad921140dd2e5e}{combine\+With\+Source} (\hyperlink{class_ogre_1_1_volume_1_1_c_s_g_operation_source}{C\+S\+G\+Operation\+Source} $\ast$operation, \hyperlink{class_ogre_1_1_volume_1_1_source}{Source} $\ast$source, const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&center, \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 \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 \hyperlink{class_ogre_1_1_volume_1_1_source_a3f107f5949b7e9de9bd713f3a21f655a}{get\+First\+Ray\+Intersection} (const \hyperlink{class_ogre_1_1_ray}{Ray} \&ray, \hyperlink{class_ogre_1_1_vector3}{Vector3} \&result, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} scale=(\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}) 1.\+0, size\+\_\+t max\+Iterations=5000, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} max\+Distance=(\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 \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 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_volume_1_1_half_float_grid_source_a2cc1844d303ebd13e76f5e22139a17a0}{get\+Max\+Clamped\+Absolute\+Density} (void) const
\begin{DoxyCompactList}\small\item\em Gets the maximum absolute density value to be written into the data when combining, influencing the compression rate on serialization. \end{DoxyCompactList}\item 
virtual \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_volume_1_1_grid_source_a53520582a00e496bf90aba5a21a254b6}{get\+Value} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&position) const
\begin{DoxyCompactList}\small\item\em Overridden from Volume\+Source. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_vector4}{Vector4} \hyperlink{class_ogre_1_1_volume_1_1_grid_source_abd503727f50af4b458fd8d3c6af204c3}{get\+Value\+And\+Gradient} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&position) const
\begin{DoxyCompactList}\small\item\em Overridden from Volume\+Source. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \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 \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 \hyperlink{class_ogre_1_1_volume_1_1_source_a6c7d66b981f8390cf697250c378f9564}{serialize} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&from, const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&to, float voxel\+Width, const \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 \hyperlink{class_ogre_1_1_volume_1_1_source_ac02c21de1fef47cb5877657dcb4c6b8d}{serialize} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&from, const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&to, float voxel\+Width, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} max\+Clamped\+Absolute\+Density, const \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}\item 
void \hyperlink{class_ogre_1_1_volume_1_1_half_float_grid_source_a1419b15c09b80b18581a83173eb6c81b}{set\+Max\+Clamped\+Absolute\+Density} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} max\+Clamped\+Absolute\+Density)
\begin{DoxyCompactList}\small\item\em Sets the maximum absolute density value to be written into the data when combining, influencing the compression rate on serialization. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const size\+\_\+t \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 \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} \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 \hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16} \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}


\subsection{Detailed Description}
A volume source from a 16 Bit float 3D grid capable of loading volume serializations. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_half_float_grid_source_a906b862d1ba88f329163e1be1d76b4a5}\label{class_ogre_1_1_volume_1_1_half_float_grid_source_a906b862d1ba88f329163e1be1d76b4a5}} 
\index{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!Half\+Float\+Grid\+Source@{Half\+Float\+Grid\+Source}}
\index{Half\+Float\+Grid\+Source@{Half\+Float\+Grid\+Source}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{Half\+Float\+Grid\+Source()}{HalfFloatGridSource()}}
{\footnotesize\ttfamily Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source\+::\+Half\+Float\+Grid\+Source (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{serialized\+Volume\+File,  }\item[{const bool}]{trilinear\+Value = {\ttfamily true},  }\item[{const bool}]{trilinear\+Gradient = {\ttfamily false},  }\item[{const bool}]{sobel\+Gradient = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}



Constructur. 


\begin{DoxyParams}{Parameters}
{\em serialized\+Volume\+File} & Which volume serialization to get the data from. \\
\hline
{\em trilinear\+Value} & Whether to use trilinear filtering (true) or nearest neighbour (false) for the value. \\
\hline
{\em trilinear\+Gradient} & Whether to use trilinear filtering (true) or nearest neighbour (false) for the gradient. \\
\hline
{\em sobel\+Gradient} & Whether to add a bit of blur to the gradient like in a sobel filter. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_half_float_grid_source_ac5316e05f65cb193172b1f58baf2e1ed}\label{class_ogre_1_1_volume_1_1_half_float_grid_source_ac5316e05f65cb193172b1f58baf2e1ed}} 
\index{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!````~Half\+Float\+Grid\+Source@{$\sim$\+Half\+Float\+Grid\+Source}}
\index{````~Half\+Float\+Grid\+Source@{$\sim$\+Half\+Float\+Grid\+Source}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{$\sim$\+Half\+Float\+Grid\+Source()}{~HalfFloatGridSource()}}
{\footnotesize\ttfamily Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source\+::$\sim$\+Half\+Float\+Grid\+Source (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Destructor. 



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_half_float_grid_source_a1419b15c09b80b18581a83173eb6c81b}\label{class_ogre_1_1_volume_1_1_half_float_grid_source_a1419b15c09b80b18581a83173eb6c81b}} 
\index{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!set\+Max\+Clamped\+Absolute\+Density@{set\+Max\+Clamped\+Absolute\+Density}}
\index{set\+Max\+Clamped\+Absolute\+Density@{set\+Max\+Clamped\+Absolute\+Density}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{set\+Max\+Clamped\+Absolute\+Density()}{setMaxClampedAbsoluteDensity()}}
{\footnotesize\ttfamily void Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source\+::set\+Max\+Clamped\+Absolute\+Density (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{max\+Clamped\+Absolute\+Density }\end{DoxyParamCaption})}



Sets the maximum absolute density value to be written into the data when combining, influencing the compression rate on serialization. 

Set it to 0.\+0 to deactivate. 
\begin{DoxyParams}{Parameters}
{\em max\+Clamped\+Absolute\+Density} & The maximum absolute density value. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_volume_1_1_half_float_grid_source_a2cc1844d303ebd13e76f5e22139a17a0}\label{class_ogre_1_1_volume_1_1_half_float_grid_source_a2cc1844d303ebd13e76f5e22139a17a0}} 
\index{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Max\+Clamped\+Absolute\+Density@{get\+Max\+Clamped\+Absolute\+Density}}
\index{get\+Max\+Clamped\+Absolute\+Density@{get\+Max\+Clamped\+Absolute\+Density}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Max\+Clamped\+Absolute\+Density()}{getMaxClampedAbsoluteDensity()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source\+::get\+Max\+Clamped\+Absolute\+Density (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const}



Gets the maximum absolute density value to be written into the data when combining, influencing the compression rate on serialization. 

\begin{DoxyReturn}{Returns}
The maximum absolute density value, 0.\+0 when deactivated. 
\end{DoxyReturn}
\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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Value\+And\+Gradient@{get\+Value\+And\+Gradient}}
\index{get\+Value\+And\+Gradient@{get\+Value\+And\+Gradient}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Value\+And\+Gradient()}{getValueAndGradient()}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_vector4}{Vector4} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Value\+And\+Gradient (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{position }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [inherited]}}



Overridden from Volume\+Source. 



Implements \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Value@{get\+Value}}
\index{get\+Value@{get\+Value}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Value()}{getValue()}}
{\footnotesize\ttfamily virtual \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Value (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{position }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [inherited]}}



Overridden from Volume\+Source. 



Implements \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Width@{get\+Width}}
\index{get\+Width@{get\+Width}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Width()}{getWidth()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Width (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inherited]}}



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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Height@{get\+Height}}
\index{get\+Height@{get\+Height}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Height()}{getHeight()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Height (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inherited]}}



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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Depth@{get\+Depth}}
\index{get\+Depth@{get\+Depth}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Depth()}{getDepth()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Depth (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inherited]}}



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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!combine\+With\+Source@{combine\+With\+Source}}
\index{combine\+With\+Source@{combine\+With\+Source}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{combine\+With\+Source()}{combineWithSource()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Volume\+::\+Grid\+Source\+::combine\+With\+Source (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_volume_1_1_c_s_g_operation_source}{C\+S\+G\+Operation\+Source} $\ast$}]{operation,  }\item[{\hyperlink{class_ogre_1_1_volume_1_1_source}{Source} $\ast$}]{source,  }\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{center,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{radius }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [inherited]}}



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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+Volume\+Space\+To\+World\+Space\+Factor@{get\+Volume\+Space\+To\+World\+Space\+Factor}}
\index{get\+Volume\+Space\+To\+World\+Space\+Factor@{get\+Volume\+Space\+To\+World\+Space\+Factor}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+Volume\+Space\+To\+World\+Space\+Factor()}{getVolumeSpaceToWorldSpaceFactor()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Volume\+::\+Grid\+Source\+::get\+Volume\+Space\+To\+World\+Space\+Factor (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inherited]}}



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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!serialize@{serialize}}
\index{serialize@{serialize}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{serialize()}{serialize()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Volume\+::\+Source\+::serialize (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{from,  }\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{to,  }\item[{float}]{voxel\+Width,  }\item[{const \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!serialize@{serialize}}
\index{serialize@{serialize}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{serialize()}{serialize()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Volume\+::\+Source\+::serialize (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{from,  }\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{to,  }\item[{float}]{voxel\+Width,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{max\+Clamped\+Absolute\+Density,  }\item[{const \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!get\+First\+Ray\+Intersection@{get\+First\+Ray\+Intersection}}
\index{get\+First\+Ray\+Intersection@{get\+First\+Ray\+Intersection}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{get\+First\+Ray\+Intersection()}{getFirstRayIntersection()}}
{\footnotesize\ttfamily bool Ogre\+::\+Volume\+::\+Source\+::get\+First\+Ray\+Intersection (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_ray}{Ray} \&}]{ray,  }\item[{\hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{result,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{scale = {\ttfamily (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real})~1.0},  }\item[{size\+\_\+t}]{max\+Iterations = {\ttfamily 5000},  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{max\+Distance = {\ttfamily (\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}


\subsection{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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID@{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID}}
\index{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID@{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+ID}{VOLUME\_CHUNK\_ID}}
{\footnotesize\ttfamily const \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON@{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON}}
\index{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON@{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{V\+O\+L\+U\+M\+E\+\_\+\+C\+H\+U\+N\+K\+\_\+\+V\+E\+R\+S\+I\+ON}{VOLUME\_CHUNK\_VERSION}}
{\footnotesize\ttfamily const \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\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}!S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE@{S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE}}
\index{S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE@{S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE}!Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source@{Ogre\+::\+Volume\+::\+Half\+Float\+Grid\+Source}}
\subsubsection{\texorpdfstring{S\+E\+R\+I\+A\+L\+I\+Z\+A\+T\+I\+O\+N\+\_\+\+C\+H\+U\+N\+K\+\_\+\+S\+I\+ZE}{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 
\hyperlink{_ogre_volume_half_float_grid_source_8h}{Ogre\+Volume\+Half\+Float\+Grid\+Source.\+h}\end{DoxyCompactItemize}
