mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-16 23:40:25 +01:00
310 lines
34 KiB
HTML
310 lines
34 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<title>Irrlicht 3D Engine: SMaterialLayer.h Source File</title>
|
|
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div! -->
|
|
|
|
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
|
|
<td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
|
|
|
|
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Irrlicht 3D Engine
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Generated by Doxygen 1.7.5.1 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</div>
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
initNavTree('_s_material_layer_8h.html','');
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">SMaterialLayer.h</div> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<a href="_s_material_layer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span>
|
|
<a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span>
|
|
<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span>
|
|
<a name="l00004"></a>00004
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __S_MATERIAL_LAYER_H_INCLUDED__</span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __S_MATERIAL_LAYER_H_INCLUDED__</span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor"></span>
|
|
<a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="matrix4_8h.html">matrix4.h</a>"</span>
|
|
<a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="irr_allocator_8h.html">irrAllocator.h</a>"</span>
|
|
<a name="l00010"></a>00010
|
|
<a name="l00011"></a>00011 <span class="keyword">namespace </span>irr
|
|
<a name="l00012"></a>00012 {
|
|
<a name="l00013"></a>00013 <span class="keyword">namespace </span>video
|
|
<a name="l00014"></a>00014 {
|
|
<a name="l00015"></a>00015 <span class="keyword">class </span>ITexture;
|
|
<a name="l00016"></a>00016
|
|
<a name="l00018"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811f">00018</a> <span class="keyword">enum</span> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811f" title="Texture coord clamp mode outside [0.0, 1.0].">E_TEXTURE_CLAMP</a>
|
|
<a name="l00019"></a>00019 {
|
|
<a name="l00021"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa2e2a1ec3f8045fd2653c4cd6171ac12b">00021</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa2e2a1ec3f8045fd2653c4cd6171ac12b" title="Texture repeats.">ETC_REPEAT</a> = 0,
|
|
<a name="l00023"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa36f63a356ae97db58914ef8920cae488">00023</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa36f63a356ae97db58914ef8920cae488" title="Texture is clamped to the last pixel.">ETC_CLAMP</a>,
|
|
<a name="l00025"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fac35b809116d29a3c77bab79b6a31eda3">00025</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fac35b809116d29a3c77bab79b6a31eda3" title="Texture is clamped to the edge pixel.">ETC_CLAMP_TO_EDGE</a>,
|
|
<a name="l00027"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa3c8beb993f3bb31a76a3811eb460882a">00027</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa3c8beb993f3bb31a76a3811eb460882a" title="Texture is clamped to the border pixel (if exists)">ETC_CLAMP_TO_BORDER</a>,
|
|
<a name="l00029"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa6c86659cd8f985e5e7701220660d6d76">00029</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa6c86659cd8f985e5e7701220660d6d76" title="Texture is alternatingly mirrored (0..1..0..1..0..)">ETC_MIRROR</a>,
|
|
<a name="l00031"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811faba0505a920aa4cc0a2ebbd97385a9957">00031</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811faba0505a920aa4cc0a2ebbd97385a9957" title="Texture is mirrored once and then clamped (0..1..0)">ETC_MIRROR_CLAMP</a>,
|
|
<a name="l00033"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811faa4629bd5f10231c7e8b765ed6884e7c8">00033</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811faa4629bd5f10231c7e8b765ed6884e7c8" title="Texture is mirrored once and then clamped to edge.">ETC_MIRROR_CLAMP_TO_EDGE</a>,
|
|
<a name="l00035"></a><a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa43169cc95e7157afe93429324a3ba371">00035</a> <a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa43169cc95e7157afe93429324a3ba371" title="Texture is mirrored once and then clamped to border.">ETC_MIRROR_CLAMP_TO_BORDER</a>
|
|
<a name="l00036"></a>00036 };
|
|
<a name="l00037"></a>00037 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> aTextureClampNames[] = {
|
|
<a name="l00038"></a>00038 <span class="stringliteral">"texture_clamp_repeat"</span>,
|
|
<a name="l00039"></a>00039 <span class="stringliteral">"texture_clamp_clamp"</span>,
|
|
<a name="l00040"></a>00040 <span class="stringliteral">"texture_clamp_clamp_to_edge"</span>,
|
|
<a name="l00041"></a>00041 <span class="stringliteral">"texture_clamp_clamp_to_border"</span>,
|
|
<a name="l00042"></a>00042 <span class="stringliteral">"texture_clamp_mirror"</span>,
|
|
<a name="l00043"></a>00043 <span class="stringliteral">"texture_clamp_mirror_clamp"</span>,
|
|
<a name="l00044"></a>00044 <span class="stringliteral">"texture_clamp_mirror_clamp_to_edge"</span>,
|
|
<a name="l00045"></a>00045 <span class="stringliteral">"texture_clamp_mirror_clamp_to_border"</span>, 0};
|
|
<a name="l00046"></a>00046
|
|
<a name="l00048"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html">00048</a> <span class="keyword">class </span><a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>
|
|
<a name="l00049"></a>00049 {
|
|
<a name="l00050"></a>00050 <span class="keyword">public</span>:
|
|
<a name="l00052"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa33412579ecf68093eec0926cfddfcda">00052</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa33412579ecf68093eec0926cfddfcda" title="Default constructor.">SMaterialLayer</a>()
|
|
<a name="l00053"></a>00053 : <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a>(0),
|
|
<a name="l00054"></a>00054 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a>(<a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa2e2a1ec3f8045fd2653c4cd6171ac12b" title="Texture repeats.">ETC_REPEAT</a>),
|
|
<a name="l00055"></a>00055 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a>(<a class="code" href="namespaceirr_1_1video.html#a5d9933edc5ed7704a7a084f84b39811fa2e2a1ec3f8045fd2653c4cd6171ac12b" title="Texture repeats.">ETC_REPEAT</a>),
|
|
<a name="l00056"></a>00056 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a>(true),
|
|
<a name="l00057"></a>00057 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a>(false),
|
|
<a name="l00058"></a>00058 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a>(0),
|
|
<a name="l00059"></a>00059 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a>(0),
|
|
<a name="l00060"></a>00060 TextureMatrix(0)
|
|
<a name="l00061"></a>00061 {}
|
|
<a name="l00062"></a>00062
|
|
<a name="l00064"></a>00064
|
|
<a name="l00065"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8b8d94178e389f8afa1e6190a35f9d">00065</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa33412579ecf68093eec0926cfddfcda" title="Default constructor.">SMaterialLayer</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>& other)
|
|
<a name="l00066"></a>00066 {
|
|
<a name="l00067"></a>00067 <span class="comment">// This pointer is checked during assignment</span>
|
|
<a name="l00068"></a>00068 TextureMatrix = 0;
|
|
<a name="l00069"></a>00069 *<span class="keyword">this</span> = other;
|
|
<a name="l00070"></a>00070 }
|
|
<a name="l00071"></a>00071
|
|
<a name="l00073"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a3a95dd1993dcc1f2d4bf873602b49b4e">00073</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a3a95dd1993dcc1f2d4bf873602b49b4e" title="Destructor.">~SMaterialLayer</a>()
|
|
<a name="l00074"></a>00074 {
|
|
<a name="l00075"></a>00075 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a59e37e05219bd2ef3e57e66db4b994eb" title="Destruct an element.">destruct</a>(TextureMatrix);
|
|
<a name="l00076"></a>00076 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a7670f5dc0be9162c669eb6ac5eae00a8" title="Deallocate memory for an array of objects.">deallocate</a>(TextureMatrix);
|
|
<a name="l00077"></a>00077 }
|
|
<a name="l00078"></a>00078
|
|
<a name="l00080"></a>00080
|
|
<a name="l00082"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a94f5f3af3cd4ded545779e1942c63734">00082</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>& <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a94f5f3af3cd4ded545779e1942c63734" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>& other)
|
|
<a name="l00083"></a>00083 {
|
|
<a name="l00084"></a>00084 <span class="comment">// Check for self-assignment!</span>
|
|
<a name="l00085"></a>00085 <span class="keywordflow">if</span> (<span class="keyword">this</span> == &other)
|
|
<a name="l00086"></a>00086 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
|
<a name="l00087"></a>00087
|
|
<a name="l00088"></a>00088 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a>;
|
|
<a name="l00089"></a>00089 <span class="keywordflow">if</span> (TextureMatrix)
|
|
<a name="l00090"></a>00090 {
|
|
<a name="l00091"></a>00091 <span class="keywordflow">if</span> (other.TextureMatrix)
|
|
<a name="l00092"></a>00092 *TextureMatrix = *other.TextureMatrix;
|
|
<a name="l00093"></a>00093 <span class="keywordflow">else</span>
|
|
<a name="l00094"></a>00094 {
|
|
<a name="l00095"></a>00095 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a59e37e05219bd2ef3e57e66db4b994eb" title="Destruct an element.">destruct</a>(TextureMatrix);
|
|
<a name="l00096"></a>00096 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a7670f5dc0be9162c669eb6ac5eae00a8" title="Deallocate memory for an array of objects.">deallocate</a>(TextureMatrix);
|
|
<a name="l00097"></a>00097 TextureMatrix = 0;
|
|
<a name="l00098"></a>00098 }
|
|
<a name="l00099"></a>00099 }
|
|
<a name="l00100"></a>00100 <span class="keywordflow">else</span>
|
|
<a name="l00101"></a>00101 {
|
|
<a name="l00102"></a>00102 <span class="keywordflow">if</span> (other.TextureMatrix)
|
|
<a name="l00103"></a>00103 {
|
|
<a name="l00104"></a>00104 TextureMatrix = MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#ac4b471d893b1f19da361302af977c5c1" title="Allocate memory for an array of objects.">allocate</a>(1);
|
|
<a name="l00105"></a>00105 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a24601bd03410855534207c3e5ad7a24b" title="Construct an element.">construct</a>(TextureMatrix,*other.TextureMatrix);
|
|
<a name="l00106"></a>00106 }
|
|
<a name="l00107"></a>00107 <span class="keywordflow">else</span>
|
|
<a name="l00108"></a>00108 TextureMatrix = 0;
|
|
<a name="l00109"></a>00109 }
|
|
<a name="l00110"></a>00110 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a>;
|
|
<a name="l00111"></a>00111 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a>;
|
|
<a name="l00112"></a>00112 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a>;
|
|
<a name="l00113"></a>00113 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a>;
|
|
<a name="l00114"></a>00114 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a>;
|
|
<a name="l00115"></a>00115 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a> = other.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a>;
|
|
<a name="l00116"></a>00116
|
|
<a name="l00117"></a>00117 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
|
<a name="l00118"></a>00118 }
|
|
<a name="l00119"></a>00119
|
|
<a name="l00121"></a>00121
|
|
<a name="l00122"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa8d7c025f5bb282537b8886c340dbe63">00122</a> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa8d7c025f5bb282537b8886c340dbe63" title="Gets the texture transformation matrix.">getTextureMatrix</a>()
|
|
<a name="l00123"></a>00123 {
|
|
<a name="l00124"></a>00124 <span class="keywordflow">if</span> (!TextureMatrix)
|
|
<a name="l00125"></a>00125 {
|
|
<a name="l00126"></a>00126 TextureMatrix = MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#ac4b471d893b1f19da361302af977c5c1" title="Allocate memory for an array of objects.">allocate</a>(1);
|
|
<a name="l00127"></a>00127 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a24601bd03410855534207c3e5ad7a24b" title="Construct an element.">construct</a>(TextureMatrix,<a class="code" href="namespaceirr_1_1core.html#ac4561f3920d3fbfbfff74c9bed1f2713" title="global const identity matrix">core::IdentityMatrix</a>);
|
|
<a name="l00128"></a>00128 }
|
|
<a name="l00129"></a>00129 <span class="keywordflow">return</span> *TextureMatrix;
|
|
<a name="l00130"></a>00130 }
|
|
<a name="l00131"></a>00131
|
|
<a name="l00133"></a>00133
|
|
<a name="l00134"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb93485db1af2c83486e55826be59049">00134</a> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aa8d7c025f5bb282537b8886c340dbe63" title="Gets the texture transformation matrix.">getTextureMatrix</a>()<span class="keyword"> const</span>
|
|
<a name="l00135"></a>00135 <span class="keyword"> </span>{
|
|
<a name="l00136"></a>00136 <span class="keywordflow">if</span> (TextureMatrix)
|
|
<a name="l00137"></a>00137 <span class="keywordflow">return</span> *TextureMatrix;
|
|
<a name="l00138"></a>00138 <span class="keywordflow">else</span>
|
|
<a name="l00139"></a>00139 <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1core.html#ac4561f3920d3fbfbfff74c9bed1f2713" title="global const identity matrix">core::IdentityMatrix</a>;
|
|
<a name="l00140"></a>00140 }
|
|
<a name="l00141"></a>00141
|
|
<a name="l00143"></a>00143
|
|
<a name="l00144"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a0f84f47351a17b2a6041688a425fda1a">00144</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a0f84f47351a17b2a6041688a425fda1a" title="Sets the texture transformation matrix to mat.">setTextureMatrix</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>& mat)
|
|
<a name="l00145"></a>00145 {
|
|
<a name="l00146"></a>00146 <span class="keywordflow">if</span> (!TextureMatrix)
|
|
<a name="l00147"></a>00147 {
|
|
<a name="l00148"></a>00148 TextureMatrix = MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#ac4b471d893b1f19da361302af977c5c1" title="Allocate memory for an array of objects.">allocate</a>(1);
|
|
<a name="l00149"></a>00149 MatrixAllocator.<a class="code" href="classirr_1_1core_1_1irr_allocator.html#a24601bd03410855534207c3e5ad7a24b" title="Construct an element.">construct</a>(TextureMatrix,mat);
|
|
<a name="l00150"></a>00150 }
|
|
<a name="l00151"></a>00151 <span class="keywordflow">else</span>
|
|
<a name="l00152"></a>00152 *TextureMatrix = mat;
|
|
<a name="l00153"></a>00153 }
|
|
<a name="l00154"></a>00154
|
|
<a name="l00156"></a>00156
|
|
<a name="l00158"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a400cc9efd2910b66dcdc57cbb244ce92">00158</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a400cc9efd2910b66dcdc57cbb244ce92" title="Inequality operator.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>& b)<span class="keyword"> const</span>
|
|
<a name="l00159"></a>00159 <span class="keyword"> </span>{
|
|
<a name="l00160"></a>00160 <span class="keywordtype">bool</span> different =
|
|
<a name="l00161"></a>00161 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a> ||
|
|
<a name="l00162"></a>00162 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a> ||
|
|
<a name="l00163"></a>00163 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a> ||
|
|
<a name="l00164"></a>00164 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a> ||
|
|
<a name="l00165"></a>00165 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a> ||
|
|
<a name="l00166"></a>00166 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a> ||
|
|
<a name="l00167"></a>00167 <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a> != b.<a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a>;
|
|
<a name="l00168"></a>00168 <span class="keywordflow">if</span> (different)
|
|
<a name="l00169"></a>00169 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|
<a name="l00170"></a>00170 <span class="keywordflow">else</span>
|
|
<a name="l00171"></a>00171 different |= (TextureMatrix != b.TextureMatrix) &&
|
|
<a name="l00172"></a>00172 TextureMatrix && b.TextureMatrix &&
|
|
<a name="l00173"></a>00173 (*TextureMatrix != *(b.TextureMatrix));
|
|
<a name="l00174"></a>00174 <span class="keywordflow">return</span> different;
|
|
<a name="l00175"></a>00175 }
|
|
<a name="l00176"></a>00176
|
|
<a name="l00178"></a>00178
|
|
<a name="l00180"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ac35ecbecf111244de7b91626d935494d">00180</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ac35ecbecf111244de7b91626d935494d" title="Equality operator.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html" title="Struct for holding material parameters which exist per texture layer.">SMaterialLayer</a>& b)<span class="keyword"> const</span>
|
|
<a name="l00181"></a>00181 <span class="keyword"> </span>{ <span class="keywordflow">return</span> !(b!=*<span class="keyword">this</span>); }
|
|
<a name="l00182"></a>00182
|
|
<a name="l00184"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450">00184</a> <a class="code" href="classirr_1_1video_1_1_i_texture.html" title="Interface of a Video Driver dependent Texture.">ITexture</a>* <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aee7162444c5ed350375c7a46e1bbe450" title="Texture.">Texture</a>;
|
|
<a name="l00185"></a>00185
|
|
<a name="l00187"></a>00187
|
|
<a name="l00188"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb">00188</a> <a class="code" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761" title="8 bit unsigned variable.">u8</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#afb8408075afd8e84c8ff7c46f7a899bb" title="Texture Clamp Mode.">TextureWrapU</a>:4;
|
|
<a name="l00189"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">00189</a> <a class="code" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761" title="8 bit unsigned variable.">u8</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ab53382f9a43cea8255d0ed48cd5676d1">TextureWrapV</a>:4;
|
|
<a name="l00190"></a>00190
|
|
<a name="l00192"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac">00192</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a72b122a636971204922d399ec6c0e8ac" title="Is bilinear filtering enabled? Default: true.">BilinearFilter</a>:1;
|
|
<a name="l00193"></a>00193
|
|
<a name="l00195"></a>00195
|
|
<a name="l00197"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67">00197</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#ad1b093b1a8e26cb10156a02ac78bdf67" title="Is trilinear filtering enabled? Default: false.">TrilinearFilter</a>:1;
|
|
<a name="l00198"></a>00198
|
|
<a name="l00200"></a>00200
|
|
<a name="l00206"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb">00206</a> <a class="code" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761" title="8 bit unsigned variable.">u8</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#aed142b316a920ec8fc5e0df09d3de3eb" title="Is anisotropic filtering enabled? Default: 0, disabled.">AnisotropicFilter</a>;
|
|
<a name="l00207"></a>00207
|
|
<a name="l00209"></a>00209
|
|
<a name="l00213"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53">00213</a> <a class="code" href="namespaceirr.html#adc3ec66d7537550be0fea1c9eeadd63d" title="8 bit signed variable.">s8</a> <a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a5d1ac213ab5b7bcab23464eefd102b53" title="Bias for the mipmap choosing decision.">LODBias</a>;
|
|
<a name="l00214"></a>00214
|
|
<a name="l00215"></a>00215 <span class="keyword">private</span>:
|
|
<a name="l00216"></a><a class="code" href="classirr_1_1video_1_1_s_material_layer.html#a178a261c0a0cf47aa84fb7e9345f6d6f">00216</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classirr_1_1video_1_1_s_material.html" title="Struct for holding parameters for a material renderer.">SMaterial</a>;
|
|
<a name="l00217"></a>00217 <a class="code" href="classirr_1_1core_1_1irr_allocator.html">irr::core::irrAllocator<irr::core::matrix4></a> MatrixAllocator;
|
|
<a name="l00218"></a>00218
|
|
<a name="l00220"></a>00220
|
|
<a name="l00222"></a>00222 <a class="code" href="classirr_1_1core_1_1_c_matrix4.html" title="4x4 matrix. Mostly used as transformation matrix for 3d calculations.">core::matrix4</a>* TextureMatrix;
|
|
<a name="l00223"></a>00223 };
|
|
<a name="l00224"></a>00224
|
|
<a name="l00225"></a>00225 } <span class="comment">// end namespace video</span>
|
|
<a name="l00226"></a>00226 } <span class="comment">// end namespace irr</span>
|
|
<a name="l00227"></a>00227
|
|
<a name="l00228"></a>00228 <span class="preprocessor">#endif // __S_MATERIAL_LAYER_H_INCLUDED__</span>
|
|
</pre></div></div>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="_s_material_layer_8h.html">SMaterialLayer.h</a> </li>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
|
|
<li class="footer">
|
|
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht
|
|
Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Jan 19 2016 16:08:46 for Irrlicht 3D Engine by
|
|
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|