aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/doc/html/dimension2d_8h_source.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/doc/html/dimension2d_8h_source.html305
1 files changed, 305 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/dimension2d_8h_source.html b/libraries/irrlicht-1.8/doc/html/dimension2d_8h_source.html
new file mode 100644
index 0000000..5434bc7
--- /dev/null
+++ b/libraries/irrlicht-1.8/doc/html/dimension2d_8h_source.html
@@ -0,0 +1,305 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>Irrlicht 3D Engine: dimension2d.h Source File</title>
6
7<link href="tabs.css" rel="stylesheet" type="text/css"/>
8<link href="doxygen.css" rel="stylesheet" type="text/css" />
9<link href="navtree.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="resize.js"></script>
12<script type="text/javascript" src="navtree.js"></script>
13<script type="text/javascript">
14 $(document).ready(initResizable);
15</script>
16<link href="search/search.css" rel="stylesheet" type="text/css"/>
17<script type="text/javascript" src="search/search.js"></script>
18<script type="text/javascript">
19 $(document).ready(function() { searchBox.OnSelectItem(0); });
20</script>
21
22</head>
23<body>
24<div id="top"><!-- do not remove this div! -->
25
26
27<div id="titlearea">
28<table cellspacing="0" cellpadding="0">
29 <tbody>
30 <tr style="height: 56px;">
31
32 <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
33
34
35 <td style="padding-left: 0.5em;">
36 <div id="projectname">Irrlicht 3D Engine
37
38 </div>
39
40 </td>
41
42
43
44
45 <td> <div id="MSearchBox" class="MSearchBoxInactive">
46 <span class="left">
47 <img id="MSearchSelect" src="search/mag_sel.png"
48 onmouseover="return searchBox.OnSearchSelectShow()"
49 onmouseout="return searchBox.OnSearchSelectHide()"
50 alt=""/>
51 <input type="text" id="MSearchField" value="Search" accesskey="S"
52 onfocus="searchBox.OnSearchFieldFocus(true)"
53 onblur="searchBox.OnSearchFieldFocus(false)"
54 onkeyup="searchBox.OnSearchFieldChange(event)"/>
55 </span><span class="right">
56 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
57 </span>
58 </div>
59</td>
60
61
62 </tr>
63 </tbody>
64</table>
65</div>
66
67<!-- Generated by Doxygen 1.7.5.1 -->
68<script type="text/javascript">
69var searchBox = new SearchBox("searchBox", "search",false,'Search');
70</script>
71<script type="text/javascript" src="dynsections.js"></script>
72</div>
73<div id="side-nav" class="ui-resizable side-nav-resizable">
74 <div id="nav-tree">
75 <div id="nav-tree-contents">
76 </div>
77 </div>
78 <div id="splitbar" style="-moz-user-select:none;"
79 class="ui-resizable-handle">
80 </div>
81</div>
82<script type="text/javascript">
83 initNavTree('dimension2d_8h.html','');
84</script>
85<div id="doc-content">
86<div class="header">
87 <div class="headertitle">
88<div class="title">dimension2d.h</div> </div>
89</div>
90<div class="contents">
91<a href="dimension2d_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>
92<a name="l00002"></a>00002 <span class="comment">// This file is part of the &quot;Irrlicht Engine&quot;.</span>
93<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span>
94<a name="l00004"></a>00004
95<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __IRR_DIMENSION2D_H_INCLUDED__</span>
96<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __IRR_DIMENSION2D_H_INCLUDED__</span>
97<a name="l00007"></a>00007 <span class="preprocessor"></span>
98<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="irr_types_8h.html">irrTypes.h</a>&quot;</span>
99<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="irr_math_8h.html">irrMath.h</a>&quot;</span> <span class="comment">// for irr::core::equals()</span>
100<a name="l00010"></a>00010
101<a name="l00011"></a>00011 <span class="keyword">namespace </span>irr
102<a name="l00012"></a>00012 {
103<a name="l00013"></a>00013 <span class="keyword">namespace </span>core
104<a name="l00014"></a>00014 {
105<a name="l00015"></a>00015 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
106<a name="l00016"></a>00016 <span class="keyword">class </span>vector2d;
107<a name="l00017"></a>00017
108<a name="l00019"></a>00019 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
109<a name="l00020"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html">00020</a> <span class="keyword">class </span><a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d</a>
110<a name="l00021"></a>00021 {
111<a name="l00022"></a>00022 <span class="keyword">public</span>:
112<a name="l00024"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04">00024</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04" title="Default constructor for empty dimension.">dimension2d</a>() : <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>(0), <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>(0) {}
113<a name="l00026"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a9032aa6e975b32497ed3b570e3d03b76">00026</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04" title="Default constructor for empty dimension.">dimension2d</a>(<span class="keyword">const</span> T&amp; width, <span class="keyword">const</span> T&amp; height)
114<a name="l00027"></a>00027 : <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>(width), <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>(height) {}
115<a name="l00028"></a>00028
116<a name="l00029"></a>00029 <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04" title="Default constructor for empty dimension.">dimension2d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other); <span class="comment">// Defined in vector2d.h</span>
117<a name="l00030"></a>00030
118<a name="l00032"></a>00032 <span class="keyword">template</span> &lt;<span class="keyword">class</span> U&gt;
119<a name="l00033"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a50814f5fc29d226104d5739350befb31">00033</a> <span class="keyword">explicit</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04" title="Default constructor for empty dimension.">dimension2d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;U&gt;</a>&amp; other) :
120<a name="l00034"></a>00034 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>((T)other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>), <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>((T)other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>) { }
121<a name="l00035"></a>00035
122<a name="l00036"></a>00036 <span class="keyword">template</span> &lt;<span class="keyword">class</span> U&gt;
123<a name="l00037"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a22388905976bbcd11f32a765a601a4fd">00037</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1dimension2d.html#a22388905976bbcd11f32a765a601a4fd">operator=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;U&gt;</a>&amp; other)
124<a name="l00038"></a>00038 {
125<a name="l00039"></a>00039 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> = (T) other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>;
126<a name="l00040"></a>00040 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> = (T) other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
127<a name="l00041"></a>00041 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
128<a name="l00042"></a>00042 }
129<a name="l00043"></a>00043
130<a name="l00044"></a>00044
131<a name="l00046"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#aa8e64f2adf3d069324e6159cfb6aa82d">00046</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#aa8e64f2adf3d069324e6159cfb6aa82d" title="Equality operator.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
132<a name="l00047"></a>00047 <span class="keyword"> </span>{
133<a name="l00048"></a>00048 <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>) &amp;&amp;
134<a name="l00049"></a>00049 <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>, other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>);
135<a name="l00050"></a>00050 }
136<a name="l00051"></a>00051
137<a name="l00053"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a76c0933b790d66cb3b0c7446bb45e089">00053</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a76c0933b790d66cb3b0c7446bb45e089" title="Inequality operator.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
138<a name="l00054"></a>00054 <span class="keyword"> </span>{
139<a name="l00055"></a>00055 <span class="keywordflow">return</span> ! (*<span class="keyword">this</span> == other);
140<a name="l00056"></a>00056 }
141<a name="l00057"></a>00057
142<a name="l00058"></a>00058 <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#aa8e64f2adf3d069324e6159cfb6aa82d" title="Equality operator.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) <span class="keyword">const</span>; <span class="comment">// Defined in vector2d.h</span>
143<a name="l00059"></a>00059
144<a name="l00060"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a91d1aee9d097f3b9e7259e7a79bbd19d">00060</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a76c0933b790d66cb3b0c7446bb45e089" title="Inequality operator.">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
145<a name="l00061"></a>00061 <span class="keyword"> </span>{
146<a name="l00062"></a>00062 <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);
147<a name="l00063"></a>00063 }
148<a name="l00064"></a>00064
149<a name="l00066"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a81860d7ff5a888a37af84f7bbbad7c91">00066</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <span class="keyword">set</span>(<span class="keyword">const</span> T&amp; width, <span class="keyword">const</span> T&amp; height)
150<a name="l00067"></a>00067 {
151<a name="l00068"></a>00068 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> = width;
152<a name="l00069"></a>00069 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> = height;
153<a name="l00070"></a>00070 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
154<a name="l00071"></a>00071 }
155<a name="l00072"></a>00072
156<a name="l00074"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#ac581fbe07dabf2a342314c7a73f862c8">00074</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1dimension2d.html#ac581fbe07dabf2a342314c7a73f862c8" title="Divide width and height by scalar.">operator/=</a>(<span class="keyword">const</span> T&amp; scale)
157<a name="l00075"></a>00075 {
158<a name="l00076"></a>00076 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> /= scale;
159<a name="l00077"></a>00077 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> /= scale;
160<a name="l00078"></a>00078 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
161<a name="l00079"></a>00079 }
162<a name="l00080"></a>00080
163<a name="l00082"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#ab5539b955741b270081559f82c413b70">00082</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#ab5539b955741b270081559f82c413b70" title="Divide width and height by scalar.">operator/</a>(<span class="keyword">const</span> T&amp; scale)<span class="keyword"> const</span>
164<a name="l00083"></a>00083 <span class="keyword"> </span>{
165<a name="l00084"></a>00084 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>/scale, <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>/scale);
166<a name="l00085"></a>00085 }
167<a name="l00086"></a>00086
168<a name="l00088"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#acd311b8270b3c95791edf9a5b2869b1b">00088</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1dimension2d.html#acd311b8270b3c95791edf9a5b2869b1b" title="Multiply width and height by scalar.">operator*=</a>(<span class="keyword">const</span> T&amp; scale)
169<a name="l00089"></a>00089 {
170<a name="l00090"></a>00090 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> *= scale;
171<a name="l00091"></a>00091 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> *= scale;
172<a name="l00092"></a>00092 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
173<a name="l00093"></a>00093 }
174<a name="l00094"></a>00094
175<a name="l00096"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a2e4febe786961e1fb3f0c1d61d65cc58">00096</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a2e4febe786961e1fb3f0c1d61d65cc58" title="Multiply width and height by scalar.">operator*</a>(<span class="keyword">const</span> T&amp; scale)<span class="keyword"> const</span>
176<a name="l00097"></a>00097 <span class="keyword"> </span>{
177<a name="l00098"></a>00098 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>*scale, <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>*scale);
178<a name="l00099"></a>00099 }
179<a name="l00100"></a>00100
180<a name="l00102"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#ae233386e59e95f213367922f7638bc46">00102</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae233386e59e95f213367922f7638bc46" title="Add another dimension to this one.">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)
181<a name="l00103"></a>00103 {
182<a name="l00104"></a>00104 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> += other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>;
183<a name="l00105"></a>00105 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> += other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
184<a name="l00106"></a>00106 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
185<a name="l00107"></a>00107 }
186<a name="l00108"></a>00108
187<a name="l00110"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a6f3010fe9e2e9acbf56a1ec15a142765">00110</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a6f3010fe9e2e9acbf56a1ec15a142765" title="Add two dimensions.">operator+</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
188<a name="l00111"></a>00111 <span class="keyword"> </span>{
189<a name="l00112"></a>00112 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>+other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>+other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>);
190<a name="l00113"></a>00113 }
191<a name="l00114"></a>00114
192<a name="l00116"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#af5bb67163a3cdbcbceb9eda015382bfe">00116</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1dimension2d.html#af5bb67163a3cdbcbceb9eda015382bfe" title="Subtract a dimension from this one.">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)
193<a name="l00117"></a>00117 {
194<a name="l00118"></a>00118 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> -= other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>;
195<a name="l00119"></a>00119 <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> -= other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
196<a name="l00120"></a>00120 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
197<a name="l00121"></a>00121 }
198<a name="l00122"></a>00122
199<a name="l00124"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a323cdb56e179c78f37f5016e49587d2c">00124</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a323cdb56e179c78f37f5016e49587d2c" title="Subtract one dimension from another.">operator-</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
200<a name="l00125"></a>00125 <span class="keyword"> </span>{
201<a name="l00126"></a>00126 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>-other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>-other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>);
202<a name="l00127"></a>00127 }
203<a name="l00128"></a>00128
204<a name="l00130"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a1454be218dbb43736488ff9f4236f0da">00130</a> T <a class="code" href="classirr_1_1core_1_1dimension2d.html#a1454be218dbb43736488ff9f4236f0da" title="Get area.">getArea</a>()<span class="keyword"> const</span>
205<a name="l00131"></a>00131 <span class="keyword"> </span>{
206<a name="l00132"></a>00132 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>*<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
207<a name="l00133"></a>00133 }
208<a name="l00134"></a>00134
209<a name="l00136"></a>00136
210<a name="l00150"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a0490f90fb05d89434cdf367a835abd28">00150</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0490f90fb05d89434cdf367a835abd28" title="Get the optimal size according to some properties.">getOptimalSize</a>(
211<a name="l00151"></a>00151 <span class="keywordtype">bool</span> requirePowerOfTwo=<span class="keyword">true</span>,
212<a name="l00152"></a>00152 <span class="keywordtype">bool</span> requireSquare=<span class="keyword">false</span>,
213<a name="l00153"></a>00153 <span class="keywordtype">bool</span> larger=<span class="keyword">true</span>,
214<a name="l00154"></a>00154 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> maxValue = 0)<span class="keyword"> const</span>
215<a name="l00155"></a>00155 <span class="keyword"> </span>{
216<a name="l00156"></a>00156 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i=1;
217<a name="l00157"></a>00157 <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> j=1;
218<a name="l00158"></a>00158 <span class="keywordflow">if</span> (requirePowerOfTwo)
219<a name="l00159"></a>00159 {
220<a name="l00160"></a>00160 <span class="keywordflow">while</span> (i&lt;(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>)
221<a name="l00161"></a>00161 i&lt;&lt;=1;
222<a name="l00162"></a>00162 <span class="keywordflow">if</span> (!larger &amp;&amp; i!=1 &amp;&amp; i!=(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)Width)
223<a name="l00163"></a>00163 i&gt;&gt;=1;
224<a name="l00164"></a>00164 <span class="keywordflow">while</span> (j&lt;(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>)
225<a name="l00165"></a>00165 j&lt;&lt;=1;
226<a name="l00166"></a>00166 <span class="keywordflow">if</span> (!larger &amp;&amp; j!=1 &amp;&amp; j!=(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)Height)
227<a name="l00167"></a>00167 j&gt;&gt;=1;
228<a name="l00168"></a>00168 }
229<a name="l00169"></a>00169 <span class="keywordflow">else</span>
230<a name="l00170"></a>00170 {
231<a name="l00171"></a>00171 i=(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>;
232<a name="l00172"></a>00172 j=(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a>)<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
233<a name="l00173"></a>00173 }
234<a name="l00174"></a>00174
235<a name="l00175"></a>00175 <span class="keywordflow">if</span> (requireSquare)
236<a name="l00176"></a>00176 {
237<a name="l00177"></a>00177 <span class="keywordflow">if</span> ((larger &amp;&amp; (i&gt;j)) || (!larger &amp;&amp; (i&lt;j)))
238<a name="l00178"></a>00178 j=i;
239<a name="l00179"></a>00179 <span class="keywordflow">else</span>
240<a name="l00180"></a>00180 i=j;
241<a name="l00181"></a>00181 }
242<a name="l00182"></a>00182
243<a name="l00183"></a>00183 <span class="keywordflow">if</span> ( maxValue &gt; 0 &amp;&amp; i &gt; maxValue)
244<a name="l00184"></a>00184 i = maxValue;
245<a name="l00185"></a>00185
246<a name="l00186"></a>00186 <span class="keywordflow">if</span> ( maxValue &gt; 0 &amp;&amp; j &gt; maxValue)
247<a name="l00187"></a>00187 j = maxValue;
248<a name="l00188"></a>00188
249<a name="l00189"></a>00189 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>((T)i,(T)j);
250<a name="l00190"></a>00190 }
251<a name="l00191"></a>00191
252<a name="l00193"></a>00193
253<a name="l00196"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a80462f0ce0720f6fc61aed13873db817">00196</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#a80462f0ce0720f6fc61aed13873db817" title="Get the interpolated dimension.">getInterpolated</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other, <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> d)<span class="keyword"> const</span>
254<a name="l00197"></a>00197 <span class="keyword"> </span>{
255<a name="l00198"></a>00198 <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> inv = (1.0f - d);
256<a name="l00199"></a>00199 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>( (T)(other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>*inv + <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>*d), (T)(other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>*inv + <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>*d));
257<a name="l00200"></a>00200 }
258<a name="l00201"></a>00201
259<a name="l00202"></a>00202
260<a name="l00204"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4">00204</a> T <a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>;
261<a name="l00206"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b">00206</a> T <a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>;
262<a name="l00207"></a>00207 };
263<a name="l00208"></a>00208
264<a name="l00210"></a><a class="code" href="namespaceirr_1_1core.html#af6dc5c45ff13e7712758c827ff58676b">00210</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;f32&gt;</a> <a class="code" href="namespaceirr_1_1core.html#af6dc5c45ff13e7712758c827ff58676b" title="Typedef for an f32 dimension.">dimension2df</a>;
265<a name="l00212"></a><a class="code" href="namespaceirr_1_1core.html#ad2e562e3219072e2f7fc7c2bba0ef0cb">00212</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html">dimension2d&lt;u32&gt;</a> <a class="code" href="namespaceirr_1_1core.html#ad2e562e3219072e2f7fc7c2bba0ef0cb" title="Typedef for an unsigned integer dimension.">dimension2du</a>;
266<a name="l00213"></a>00213
267<a name="l00215"></a>00215
268<a name="l00217"></a><a class="code" href="namespaceirr_1_1core.html#ac79bc3704cf28bc1ab72d7cd1cae78d1">00217</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;s32&gt;</a> <a class="code" href="namespaceirr_1_1core.html#ac79bc3704cf28bc1ab72d7cd1cae78d1" title="Typedef for an integer dimension.">dimension2di</a>;
269<a name="l00218"></a>00218
270<a name="l00219"></a>00219
271<a name="l00220"></a>00220 } <span class="comment">// end namespace core</span>
272<a name="l00221"></a>00221 } <span class="comment">// end namespace irr</span>
273<a name="l00222"></a>00222
274<a name="l00223"></a>00223 <span class="preprocessor">#endif</span>
275<a name="l00224"></a>00224 <span class="preprocessor"></span>
276</pre></div></div>
277</div>
278 <div id="nav-path" class="navpath">
279 <ul>
280 <li class="navelem"><a class="el" href="dimension2d_8h.html">dimension2d.h</a> </li>
281<!-- window showing the filter options -->
282<div id="MSearchSelectWindow"
283 onmouseover="return searchBox.OnSearchSelectShow()"
284 onmouseout="return searchBox.OnSearchSelectHide()"
285 onkeydown="return searchBox.OnSearchSelectKey(event)">
286<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>
287
288<!-- iframe showing the search results (closed by default) -->
289<div id="MSearchResultsWindow">
290<iframe src="javascript:void(0)" frameborder="0"
291 name="MSearchResults" id="MSearchResults">
292</iframe>
293</div>
294
295
296 <li class="footer">
297<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht
298Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Tue Nov 6 2012 11:05:59 for Irrlicht 3D Engine by
299<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
300 </ul>
301 </div>
302
303
304</body>
305</html>