\hypertarget{class_ogre_1_1_terrain_layer_blend_map}{}\section{Ogre\+:\+:Terrain\+Layer\+Blend\+Map Class Reference}
\label{class_ogre_1_1_terrain_layer_blend_map}\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}


Class exposing an interface to a blend map for a given layer.  




{\ttfamily \#include $<$Ogre\+Terrain\+Layer\+Blend\+Map.\+h$>$}



Inheritance diagram for Ogre\+:\+:Terrain\+Layer\+Blend\+Map\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=234pt]{class_ogre_1_1_terrain_layer_blend_map__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7ec621ee0931d9f630f800a8427c1f5d}{Terrain\+Layer\+Blend\+Map} (\hyperlink{class_ogre_1_1_terrain}{Terrain} $\ast$parent, \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} layer\+Index, \hyperlink{class_ogre_1_1_hardware_pixel_buffer}{Hardware\+Pixel\+Buffer} $\ast$buf)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a374ef6e33f6dc7671fd6b6105dae759e}{$\sim$\+Terrain\+Layer\+Blend\+Map} ()
\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a59d79d1b5da14f42d93cdea553d50b5b}{blit} (const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&src, const \hyperlink{struct_ogre_1_1_box}{Box} \&dst\+Box)
\begin{DoxyCompactList}\small\item\em Blits a set of values into a region on the blend map. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a4e753bc130ea3731f71f90ab9c8f53c5}{blit} (const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&src)
\begin{DoxyCompactList}\small\item\em Blits a set of values into the entire map. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_abe74e7c92015442d95044887b492875d}{convert\+Image\+To\+Terrain\+Space} (size\+\_\+t x, size\+\_\+t y, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outX, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outY)
\begin{DoxyCompactList}\small\item\em Convert image space (0, image\+Size) to terrain space values (0,1). \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a8a50367f64f892ae402429f5f1926a60}{convert\+Image\+To\+U\+V\+Space} (size\+\_\+t x, size\+\_\+t y, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outX, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outY)
\begin{DoxyCompactList}\small\item\em Convert image space (0, image\+Size) to local space values (0,1). \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_ad7648915beabaa57229cfdfd4f9dd7dd}{convert\+Terrain\+To\+Image\+Space} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} x, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} y, size\+\_\+t $\ast$outX, size\+\_\+t $\ast$outY)
\begin{DoxyCompactList}\small\item\em Convert terrain space values (0,1) to image space (0, image\+Size). \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a6d4912bb1b2e90443ca6ff3ecef9d57b}{convert\+U\+V\+To\+Image\+Space} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} x, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} y, size\+\_\+t $\ast$outX, size\+\_\+t $\ast$outY)
\begin{DoxyCompactList}\small\item\em Convert local space values (0,1) to image space (0, image\+Size). \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a44ac5a3109a4234a298392e43df2edf0}{convert\+U\+V\+To\+World\+Space} (\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} x, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} y, \hyperlink{class_ogre_1_1_vector3}{Vector3} $\ast$out\+World\+Pos)
\begin{DoxyCompactList}\small\item\em Helper method -\/ convert a point in local space to worldspace based on the terrain settings. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}{convert\+World\+To\+U\+V\+Space} (const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&world\+Pos, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outX, \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$outY)
\begin{DoxyCompactList}\small\item\em Helper method -\/ convert a point in world space to UV space based on the terrain settings. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_afc1e25e221980f7b3ce696dfc22223ca}{dirty} ()
\begin{DoxyCompactList}\small\item\em Indicate that all of the blend data is dirty and needs updating. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_aa1746e4fe6ba9de17b626c1d44f56879}{dirty\+Rect} (const \hyperlink{group___general_gae714035a753a8f484650598dc4143db8}{Rect} \&rect)
\begin{DoxyCompactList}\small\item\em Indicate that a portion of the blend data is dirty and needs updating. \end{DoxyCompactList}\item 
float $\ast$ \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7a2e86bf826528459f4c9813d9f11b18}{get\+Blend\+Pointer} ()
\begin{DoxyCompactList}\small\item\em Get a pointer to the whole blend data. \end{DoxyCompactList}\item 
float \hyperlink{class_ogre_1_1_terrain_layer_blend_map_aeb38f19289a5824a92f3d86d4d0c34f8}{get\+Blend\+Value} (size\+\_\+t x, size\+\_\+t y)
\begin{DoxyCompactList}\small\item\em Get a single value of blend information, in image space. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a9e5059cad03d64d41f75538a44816b19}{get\+Layer\+Index} () const
\begin{DoxyCompactList}\small\item\em Get the index of the layer this is targeting. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_terrain}{Terrain} $\ast$ \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a646ac7e72f6fce0cfd4164e37145abe1}{get\+Parent} () const
\begin{DoxyCompactList}\small\item\em Get the parent terrain. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a69fc5e9bc78cbd909bdcc5b535c9c60a}{load\+Image} (const \hyperlink{class_ogre_1_1_image}{Image} \&img)
\begin{DoxyCompactList}\small\item\em Load an image into this blend layer. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a41e4f2242cc050b1f965bfa16740758b}{load\+Image} (\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&stream, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&ext=\hyperlink{group___general_gad842a4b416bd2f3245d2b44826a0aedc}{B\+L\+A\+N\+K\+S\+T\+R\+I\+NG})
\begin{DoxyCompactList}\small\item\em Load an image into this blend layer. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_ae9713419de094e337f0dcef41dd9302d}{load\+Image} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&filename, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&group\+Name)
\begin{DoxyCompactList}\small\item\em Load an image into this blend layer. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7f00a78f9c0eac408e87ebed4458546d}{set\+Blend\+Value} (size\+\_\+t x, size\+\_\+t y, float val)
\begin{DoxyCompactList}\small\item\em Set a single value of blend information (0 = transparent, 255 = solid) \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7b84ae6db639c23977a433047ec955bb}{update} ()
\begin{DoxyCompactList}\small\item\em Publish any changes you made to the blend data back to the blend map. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class exposing an interface to a blend map for a given layer. 

Each layer after the first layer in a terrain has a blend map which expresses how it is alpha blended with the layers beneath. Internally, this blend map is packed into one channel of an R\+GB or R\+G\+BA texture in order to use the smallest number of samplers, but this class allows a caller to manipulate the data more easily without worrying about this packing. Also, the values you use to interact with the blend map are floating point, which gives you full precision for updating, but in fact the values are packed into 8-\/bit integers in the actual blend map. \begin{DoxyParagraph}{}
You shouldn\textquotesingle{}t construct this class directly, use \hyperlink{class_ogre_1_1_terrain_a68d05f4414e020b6eed2c4f90888b6fd}{Terrain\+::get\+Layer\+Blend\+Map()}. 
\end{DoxyParagraph}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a7ec621ee0931d9f630f800a8427c1f5d}\label{class_ogre_1_1_terrain_layer_blend_map_a7ec621ee0931d9f630f800a8427c1f5d}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!Terrain\+Layer\+Blend\+Map@{Terrain\+Layer\+Blend\+Map}}
\index{Terrain\+Layer\+Blend\+Map@{Terrain\+Layer\+Blend\+Map}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{Terrain\+Layer\+Blend\+Map()}{TerrainLayerBlendMap()}}
{\footnotesize\ttfamily Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::\+Terrain\+Layer\+Blend\+Map (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_terrain}{Terrain} $\ast$}]{parent,  }\item[{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}]{layer\+Index,  }\item[{\hyperlink{class_ogre_1_1_hardware_pixel_buffer}{Hardware\+Pixel\+Buffer} $\ast$}]{buf }\end{DoxyParamCaption})}



Constructor. 


\begin{DoxyParams}{Parameters}
{\em parent} & The parent terrain \\
\hline
{\em layer\+Index} & The layer index (should be 1 or higher) \\
\hline
{\em buf} & The buffer holding the data \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a374ef6e33f6dc7671fd6b6105dae759e}\label{class_ogre_1_1_terrain_layer_blend_map_a374ef6e33f6dc7671fd6b6105dae759e}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!````~Terrain\+Layer\+Blend\+Map@{$\sim$\+Terrain\+Layer\+Blend\+Map}}
\index{````~Terrain\+Layer\+Blend\+Map@{$\sim$\+Terrain\+Layer\+Blend\+Map}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{$\sim$\+Terrain\+Layer\+Blend\+Map()}{~TerrainLayerBlendMap()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::$\sim$\+Terrain\+Layer\+Blend\+Map (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a646ac7e72f6fce0cfd4164e37145abe1}\label{class_ogre_1_1_terrain_layer_blend_map_a646ac7e72f6fce0cfd4164e37145abe1}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!get\+Parent@{get\+Parent}}
\index{get\+Parent@{get\+Parent}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{get\+Parent()}{getParent()}}
{\footnotesize\ttfamily \hyperlink{class_ogre_1_1_terrain}{Terrain}$\ast$ Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::get\+Parent (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the parent terrain. 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a9e5059cad03d64d41f75538a44816b19}\label{class_ogre_1_1_terrain_layer_blend_map_a9e5059cad03d64d41f75538a44816b19}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!get\+Layer\+Index@{get\+Layer\+Index}}
\index{get\+Layer\+Index@{get\+Layer\+Index}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{get\+Layer\+Index()}{getLayerIndex()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8} Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::get\+Layer\+Index (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the index of the layer this is targeting. 



References Ogre\+::\+B\+L\+A\+N\+K\+S\+T\+R\+I\+NG.

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}\label{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+World\+To\+U\+V\+Space@{convert\+World\+To\+U\+V\+Space}}
\index{convert\+World\+To\+U\+V\+Space@{convert\+World\+To\+U\+V\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+World\+To\+U\+V\+Space()}{convertWorldToUVSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+World\+To\+U\+V\+Space (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_vector3}{Vector3} \&}]{world\+Pos,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outX,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outY }\end{DoxyParamCaption})}



Helper method -\/ convert a point in world space to UV space based on the terrain settings. 


\begin{DoxyParams}{Parameters}
{\em world\+Pos} & World position \\
\hline
{\em outX,outY} & Pointers to variables which will be filled in with the local UV space value. Note they are deliberately signed Real values, because the point you supply may be outside of image space and may be between texels. The values will range from 0 to 1, top/bottom, left/right. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a44ac5a3109a4234a298392e43df2edf0}\label{class_ogre_1_1_terrain_layer_blend_map_a44ac5a3109a4234a298392e43df2edf0}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+U\+V\+To\+World\+Space@{convert\+U\+V\+To\+World\+Space}}
\index{convert\+U\+V\+To\+World\+Space@{convert\+U\+V\+To\+World\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+U\+V\+To\+World\+Space()}{convertUVToWorldSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+U\+V\+To\+World\+Space (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{x,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{y,  }\item[{\hyperlink{class_ogre_1_1_vector3}{Vector3} $\ast$}]{out\+World\+Pos }\end{DoxyParamCaption})}



Helper method -\/ convert a point in local space to worldspace based on the terrain settings. 


\begin{DoxyParams}{Parameters}
{\em x,y} & Local position, ranging from 0 to 1, top/bottom, left/right. \\
\hline
{\em out\+World\+Pos} & Pointer will be filled in with the world space value \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a6d4912bb1b2e90443ca6ff3ecef9d57b}\label{class_ogre_1_1_terrain_layer_blend_map_a6d4912bb1b2e90443ca6ff3ecef9d57b}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+U\+V\+To\+Image\+Space@{convert\+U\+V\+To\+Image\+Space}}
\index{convert\+U\+V\+To\+Image\+Space@{convert\+U\+V\+To\+Image\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+U\+V\+To\+Image\+Space()}{convertUVToImageSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+U\+V\+To\+Image\+Space (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{x,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{y,  }\item[{size\+\_\+t $\ast$}]{outX,  }\item[{size\+\_\+t $\ast$}]{outY }\end{DoxyParamCaption})}



Convert local space values (0,1) to image space (0, image\+Size). 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a8a50367f64f892ae402429f5f1926a60}\label{class_ogre_1_1_terrain_layer_blend_map_a8a50367f64f892ae402429f5f1926a60}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+Image\+To\+U\+V\+Space@{convert\+Image\+To\+U\+V\+Space}}
\index{convert\+Image\+To\+U\+V\+Space@{convert\+Image\+To\+U\+V\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+Image\+To\+U\+V\+Space()}{convertImageToUVSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+Image\+To\+U\+V\+Space (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{x,  }\item[{size\+\_\+t}]{y,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outX,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outY }\end{DoxyParamCaption})}



Convert image space (0, image\+Size) to local space values (0,1). 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_abe74e7c92015442d95044887b492875d}\label{class_ogre_1_1_terrain_layer_blend_map_abe74e7c92015442d95044887b492875d}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+Image\+To\+Terrain\+Space@{convert\+Image\+To\+Terrain\+Space}}
\index{convert\+Image\+To\+Terrain\+Space@{convert\+Image\+To\+Terrain\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+Image\+To\+Terrain\+Space()}{convertImageToTerrainSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+Image\+To\+Terrain\+Space (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{x,  }\item[{size\+\_\+t}]{y,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outX,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} $\ast$}]{outY }\end{DoxyParamCaption})}



Convert image space (0, image\+Size) to terrain space values (0,1). 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_ad7648915beabaa57229cfdfd4f9dd7dd}\label{class_ogre_1_1_terrain_layer_blend_map_ad7648915beabaa57229cfdfd4f9dd7dd}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!convert\+Terrain\+To\+Image\+Space@{convert\+Terrain\+To\+Image\+Space}}
\index{convert\+Terrain\+To\+Image\+Space@{convert\+Terrain\+To\+Image\+Space}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{convert\+Terrain\+To\+Image\+Space()}{convertTerrainToImageSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+Terrain\+To\+Image\+Space (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{x,  }\item[{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}]{y,  }\item[{size\+\_\+t $\ast$}]{outX,  }\item[{size\+\_\+t $\ast$}]{outY }\end{DoxyParamCaption})}



Convert terrain space values (0,1) to image space (0, image\+Size). 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_aeb38f19289a5824a92f3d86d4d0c34f8}\label{class_ogre_1_1_terrain_layer_blend_map_aeb38f19289a5824a92f3d86d4d0c34f8}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!get\+Blend\+Value@{get\+Blend\+Value}}
\index{get\+Blend\+Value@{get\+Blend\+Value}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{get\+Blend\+Value()}{getBlendValue()}}
{\footnotesize\ttfamily float Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::get\+Blend\+Value (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{x,  }\item[{size\+\_\+t}]{y }\end{DoxyParamCaption})}



Get a single value of blend information, in image space. 


\begin{DoxyParams}{Parameters}
{\em x,y} & Coordinates of the point of data to get, in image space (top down) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The blend data 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a7f00a78f9c0eac408e87ebed4458546d}\label{class_ogre_1_1_terrain_layer_blend_map_a7f00a78f9c0eac408e87ebed4458546d}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!set\+Blend\+Value@{set\+Blend\+Value}}
\index{set\+Blend\+Value@{set\+Blend\+Value}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{set\+Blend\+Value()}{setBlendValue()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::set\+Blend\+Value (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{x,  }\item[{size\+\_\+t}]{y,  }\item[{float}]{val }\end{DoxyParamCaption})}



Set a single value of blend information (0 = transparent, 255 = solid) 


\begin{DoxyParams}{Parameters}
{\em x,y} & Coordinates of the point of data to get, in image space (top down) \\
\hline
{\em val} & The blend value to set (0..1) \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a7a2e86bf826528459f4c9813d9f11b18}\label{class_ogre_1_1_terrain_layer_blend_map_a7a2e86bf826528459f4c9813d9f11b18}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!get\+Blend\+Pointer@{get\+Blend\+Pointer}}
\index{get\+Blend\+Pointer@{get\+Blend\+Pointer}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{get\+Blend\+Pointer()}{getBlendPointer()}}
{\footnotesize\ttfamily float$\ast$ Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::get\+Blend\+Pointer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Get a pointer to the whole blend data. 

\begin{DoxyRemark}{Remarks}
This method allows you to get a raw pointer to all the blend data, to update it as you like. However, you must then call dirty\+Rect manually if you want those changes to be recognised. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_afc1e25e221980f7b3ce696dfc22223ca}\label{class_ogre_1_1_terrain_layer_blend_map_afc1e25e221980f7b3ce696dfc22223ca}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!dirty@{dirty}}
\index{dirty@{dirty}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{dirty()}{dirty()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::dirty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Indicate that all of the blend data is dirty and needs updating. 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_aa1746e4fe6ba9de17b626c1d44f56879}\label{class_ogre_1_1_terrain_layer_blend_map_aa1746e4fe6ba9de17b626c1d44f56879}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!dirty\+Rect@{dirty\+Rect}}
\index{dirty\+Rect@{dirty\+Rect}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{dirty\+Rect()}{dirtyRect()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::dirty\+Rect (\begin{DoxyParamCaption}\item[{const \hyperlink{group___general_gae714035a753a8f484650598dc4143db8}{Rect} \&}]{rect }\end{DoxyParamCaption})}



Indicate that a portion of the blend data is dirty and needs updating. 


\begin{DoxyParams}{Parameters}
{\em rect} & Rectangle in image space \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a59d79d1b5da14f42d93cdea553d50b5b}\label{class_ogre_1_1_terrain_layer_blend_map_a59d79d1b5da14f42d93cdea553d50b5b}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!blit@{blit}}
\index{blit@{blit}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{blit()}{blit()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::blit (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&}]{src,  }\item[{const \hyperlink{struct_ogre_1_1_box}{Box} \&}]{dst\+Box }\end{DoxyParamCaption})}



Blits a set of values into a region on the blend map. 


\begin{DoxyParams}{Parameters}
{\em src} & \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} containing the source pixels and format \\
\hline
{\em dst\+Box} & \hyperlink{struct_ogre_1_1_box}{Box} describing the destination region in this map \\
\hline
\end{DoxyParams}
\begin{DoxyRemark}{Remarks}
The source and destination regions dimensions don\textquotesingle{}t have to match, in which case scaling is done. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
You can call this method in a background thread if you want. You still need to call \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7b84ae6db639c23977a433047ec955bb}{update()} to commit the changes to the G\+PU. 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a4e753bc130ea3731f71f90ab9c8f53c5}\label{class_ogre_1_1_terrain_layer_blend_map_a4e753bc130ea3731f71f90ab9c8f53c5}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!blit@{blit}}
\index{blit@{blit}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{blit()}{blit()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::blit (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} \&}]{src }\end{DoxyParamCaption})}



Blits a set of values into the entire map. 

The source data is scaled if needed. 
\begin{DoxyParams}{Parameters}
{\em src} & \hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box} containing the source pixels and format \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
You can call this method in a background thread if you want. You still need to call \hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7b84ae6db639c23977a433047ec955bb}{update()} to commit the changes to the G\+PU. 
\end{DoxyNote}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a69fc5e9bc78cbd909bdcc5b535c9c60a}\label{class_ogre_1_1_terrain_layer_blend_map_a69fc5e9bc78cbd909bdcc5b535c9c60a}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!load\+Image@{load\+Image}}
\index{load\+Image@{load\+Image}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{load\+Image()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_image}{Image} \&}]{img }\end{DoxyParamCaption})}



Load an image into this blend layer. 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a41e4f2242cc050b1f965bfa16740758b}\label{class_ogre_1_1_terrain_layer_blend_map_a41e4f2242cc050b1f965bfa16740758b}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!load\+Image@{load\+Image}}
\index{load\+Image@{load\+Image}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{load\+Image()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&}]{stream,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{ext = {\ttfamily \hyperlink{group___general_gad842a4b416bd2f3245d2b44826a0aedc}{B\+L\+A\+N\+K\+S\+T\+R\+I\+NG}} }\end{DoxyParamCaption})}



Load an image into this blend layer. 


\begin{DoxyParams}{Parameters}
{\em stream} & Stream containing the image data \\
\hline
{\em ext} & Extension identifying the image type, if the stream data doesn\textquotesingle{}t identify \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_ae9713419de094e337f0dcef41dd9302d}\label{class_ogre_1_1_terrain_layer_blend_map_ae9713419de094e337f0dcef41dd9302d}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!load\+Image@{load\+Image}}
\index{load\+Image@{load\+Image}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{load\+Image()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{filename,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{group\+Name }\end{DoxyParamCaption})}



Load an image into this blend layer. 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_a7b84ae6db639c23977a433047ec955bb}\label{class_ogre_1_1_terrain_layer_blend_map_a7b84ae6db639c23977a433047ec955bb}} 
\index{Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}!update@{update}}
\index{update@{update}!Ogre\+::\+Terrain\+Layer\+Blend\+Map@{Ogre\+::\+Terrain\+Layer\+Blend\+Map}}
\subsubsection{\texorpdfstring{update()}{update()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::update (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Publish any changes you made to the blend data back to the blend map. 

\begin{DoxyNote}{Note}
Can only be called in the main render thread. 
\end{DoxyNote}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_terrain_layer_blend_map_8h}{Ogre\+Terrain\+Layer\+Blend\+Map.\+h}\end{DoxyCompactItemize}
