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


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=235pt]{class_ogre_1_1_terrain_layer_blend_map__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a7ec621ee0931d9f630f800a8427c1f5d}{Terrain\+Layer\+Blend\+Map}} (\mbox{\hyperlink{class_ogre_1_1_terrain}{Terrain}} $\ast$parent, \mbox{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}} layer\+Index, \mbox{\hyperlink{class_ogre_1_1_hardware_pixel_buffer}{Hardware\+Pixel\+Buffer}} $\ast$buf)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a374ef6e33f6dc7671fd6b6105dae759e}{$\sim$\+Terrain\+Layer\+Blend\+Map}} ()
\item 
void \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a4e753bc130ea3731f71f90ab9c8f53c5}{blit}} (const \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a59d79d1b5da14f42d93cdea553d50b5b}{blit}} (const \mbox{\hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box}} \&src, const \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_abe74e7c92015442d95044887b492875d}{convert\+Image\+To\+Terrain\+Space}} (size\+\_\+t x, size\+\_\+t y, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$outX, \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a8a50367f64f892ae402429f5f1926a60}{convert\+Image\+To\+U\+V\+Space}} (size\+\_\+t x, size\+\_\+t y, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$outX, \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_ad7648915beabaa57229cfdfd4f9dd7dd}{convert\+Terrain\+To\+Image\+Space}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} x, \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a6d4912bb1b2e90443ca6ff3ecef9d57b}{convert\+U\+V\+To\+Image\+Space}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} x, \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a44ac5a3109a4234a298392e43df2edf0}{convert\+U\+V\+To\+World\+Space}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} x, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} y, \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}{convert\+World\+To\+U\+V\+Space}} (const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&world\+Pos, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$outX, \mbox{\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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_aa1746e4fe6ba9de17b626c1d44f56879}{dirty\+Rect}} (const \mbox{\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$ \mbox{\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 \mbox{\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 
\mbox{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}} \mbox{\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 
\mbox{\hyperlink{class_ogre_1_1_terrain}{Terrain}} $\ast$ \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a69fc5e9bc78cbd909bdcc5b535c9c60a}{load\+Image}} (const \mbox{\hyperlink{class_ogre_1_1_image}{Image}} \&img)
\begin{DoxyCompactList}\small\item\em Load an image into this blend layer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_ae9713419de094e337f0dcef41dd9302d}{load\+Image}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&filename, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&group\+Name)
\begin{DoxyCompactList}\small\item\em Load an image into this blend layer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_terrain_layer_blend_map_a41e4f2242cc050b1f965bfa16740758b}{load\+Image}} (\mbox{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr}} \&stream, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&ext=\mbox{\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 \mbox{\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 \mbox{\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}


\doxysubsection{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 \mbox{\hyperlink{class_ogre_1_1_terrain_a68d05f4414e020b6eed2c4f90888b6fd}{Terrain\+::get\+Layer\+Blend\+Map()}}. 
\end{DoxyParagraph}


\doxysubsection{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!TerrainLayerBlendMap@{TerrainLayerBlendMap}}
\index{TerrainLayerBlendMap@{TerrainLayerBlendMap}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{TerrainLayerBlendMap()}{TerrainLayerBlendMap()}}
{\footnotesize\ttfamily Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::\+Terrain\+Layer\+Blend\+Map (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_terrain}{Terrain}} $\ast$}]{parent,  }\item[{\mbox{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}}]{layer\+Index,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!````~TerrainLayerBlendMap@{$\sim$TerrainLayerBlendMap}}
\index{````~TerrainLayerBlendMap@{$\sim$TerrainLayerBlendMap}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{$\sim$TerrainLayerBlendMap()}{~TerrainLayerBlendMap()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::$\sim$\+Terrain\+Layer\+Blend\+Map (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\doxysubsection{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!getParent@{getParent}}
\index{getParent@{getParent}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{getParent()}{getParent()}}
{\footnotesize\ttfamily \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!getLayerIndex@{getLayerIndex}}
\index{getLayerIndex@{getLayerIndex}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{getLayerIndex()}{getLayerIndex()}}
{\footnotesize\ttfamily \mbox{\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. 

\mbox{\Hypertarget{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}\label{class_ogre_1_1_terrain_layer_blend_map_ab12d294404bb840b5f6a76568e5fdfdc}} 
\index{Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertWorldToUVSpace@{convertWorldToUVSpace}}
\index{convertWorldToUVSpace@{convertWorldToUVSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertWorldToUVSpace()}{convertWorldToUVSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+World\+To\+U\+V\+Space (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{Vector3}} \&}]{world\+Pos,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$}]{outX,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertUVToWorldSpace@{convertUVToWorldSpace}}
\index{convertUVToWorldSpace@{convertUVToWorldSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertUVToWorldSpace()}{convertUVToWorldSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+U\+V\+To\+World\+Space (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{x,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{y,  }\item[{\mbox{\hyperlink{namespace_ogre_ac94fc4008c1165dea017263fee56b273}{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertUVToImageSpace@{convertUVToImageSpace}}
\index{convertUVToImageSpace@{convertUVToImageSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertUVToImageSpace()}{convertUVToImageSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+U\+V\+To\+Image\+Space (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{x,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertImageToUVSpace@{convertImageToUVSpace}}
\index{convertImageToUVSpace@{convertImageToUVSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertImageToUVSpace()}{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[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$}]{outX,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertImageToTerrainSpace@{convertImageToTerrainSpace}}
\index{convertImageToTerrainSpace@{convertImageToTerrainSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertImageToTerrainSpace()}{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[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} $\ast$}]{outX,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!convertTerrainToImageSpace@{convertTerrainToImageSpace}}
\index{convertTerrainToImageSpace@{convertTerrainToImageSpace}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{convertTerrainToImageSpace()}{convertTerrainToImageSpace()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::convert\+Terrain\+To\+Image\+Space (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{x,  }\item[{\mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!getBlendValue@{getBlendValue}}
\index{getBlendValue@{getBlendValue}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{getBlendValue()}{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!setBlendValue@{setBlendValue}}
\index{setBlendValue@{setBlendValue}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{setBlendValue()}{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!getBlendPointer@{getBlendPointer}}
\index{getBlendPointer@{getBlendPointer}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{getBlendPointer()}{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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!dirty@{dirty}}
\index{dirty@{dirty}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!dirtyRect@{dirtyRect}}
\index{dirtyRect@{dirtyRect}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{dirtyRect()}{dirtyRect()}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::dirty\+Rect (\begin{DoxyParamCaption}\item[{const \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!blit@{blit}}
\index{blit@{blit}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{blit()}{blit()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::blit (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box}} \&}]{src,  }\item[{const \mbox{\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} & \mbox{\hyperlink{class_ogre_1_1_pixel_box}{Pixel\+Box}} containing the source pixels and format \\
\hline
{\em dst\+Box} & \mbox{\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 \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!blit@{blit}}
\index{blit@{blit}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{blit()}{blit()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::blit (\begin{DoxyParamCaption}\item[{const \mbox{\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} & \mbox{\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 \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!loadImage@{loadImage}}
\index{loadImage@{loadImage}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{loadImage()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{const \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!loadImage@{loadImage}}
\index{loadImage@{loadImage}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{loadImage()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr}} \&}]{stream,  }\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{ext = {\ttfamily \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!loadImage@{loadImage}}
\index{loadImage@{loadImage}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\texorpdfstring{loadImage()}{loadImage()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily void Ogre\+::\+Terrain\+Layer\+Blend\+Map\+::load\+Image (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{filename,  }\item[{const \mbox{\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::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}!update@{update}}
\index{update@{update}!Ogre::TerrainLayerBlendMap@{Ogre::TerrainLayerBlendMap}}
\doxysubsubsection{\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 
\mbox{\hyperlink{_ogre_terrain_layer_blend_map_8h}{Ogre\+Terrain\+Layer\+Blend\+Map.\+h}}\end{DoxyCompactItemize}
