aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/instance__material__user_8h-source.html
blob: 96cf5e2fe90e433e50bbfc68a45a3a3179286225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
	<TITLE>nevrax.org : docs</TITLE>
	<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">

<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0>
 <TR>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=140 BGCOLOR=#dddddd><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
        <TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
        <TD><IMG  width=6 height=14  SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
 </TR>
</TABLE> 

<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 WIDTH=100%>
 <TR><TD  BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG  SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>

<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0  BORDER=0 height=100%>
 <TR>
	<TD WIDTH=16><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
	<TD WIDTH=140   BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

		<!------ Begin Box ------>
		<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0  cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
		<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td  colspan=2 bgcolor=#FFFFFF>
		<TABLE cellspacing=0 cellpadding=1 border=0>
			<tr><td ALIGN=middle><a  class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15  hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a  class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11  hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a  class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16  hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a  class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17  hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a  class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16  hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a  class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
			<tr><td ALIGN=middle><a  class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img  width=18 height=12   hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a  class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
		</TABLE>
		</TD></TR></TABLE></TD></TR></TABLE>
		<!------ End Box  ------>

	</TD>
	<TD WIDTH=15><IMG  SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
	<TD ALIGN=left valign=top><IMG  SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">

<!-- title -->
<TABLE  background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG  SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
&nbsp;

<!-- block -->
<TABLE  bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0  BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
	<TD><B>Documentation</B></TD>
	<TD ALIGN=RIGHT>&nbsp;</td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
<hr><h1>instance_material_user.h</h1><a href="instance__material__user_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025 
00026 <font class="preprocessor">#ifndef NL_INSTANCE_MATERIAL_USER_H</font>
00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_INSTANCE_MATERIAL_USER_H</font>
00028 <font class="preprocessor"></font>
00029 <font class="preprocessor">#include "<a class="code" href="types__nl_8h.html">nel/misc/types_nl.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="u__instance__material_8h.html">nel/3d/u_instance_material.h</a>"</font>
00031 <font class="preprocessor">#include "<a class="code" href="material_8h.html">3d/material.h</a>"</font>
00032 <font class="preprocessor">#include "<a class="code" href="texture__file_8h.html">3d/texture_file.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="texture__multi__file_8h.html">3d/texture_multi_file.h</a>"</font>
00034 
<a name="l00035"></a><a class="code" href="instance__material__user_8h.html#a0">00035</a> <font class="preprocessor">#define NL3D_MEM_MATERIAL_INSTANCE                                              NL_ALLOC_CONTEXT( 3dMatI )</font>
00036 <font class="preprocessor"></font>
00037 <font class="keyword">namespace </font>NL3D
00038 {
00039 
00040 
00041 <font class="keyword">class </font>CMeshBaseInstance;
00042 <font class="keyword">class </font>CInstanceUser;
00043 <font class="keyword">class </font>CAsyncTextureBlock;
00044 
00045 
00046 <font class="comment">// ***************************************************************************</font>
<a name="l00053"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html">00053</a> <font class="comment"></font><font class="keyword">class </font>CInstanceMaterialUser : <font class="keyword">public</font> UInstanceMaterial
00054 {
00055 <font class="keyword">public</font>:
<a name="l00057"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a0">00057</a>         <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a0">CInstanceMaterialUser</a>(CMeshBaseInstance *mbi, CMaterial *mat, CAsyncTextureBlock *asyncTextBlock)
00058         {
00059                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00060                 <a class="code" href="debug_8h.html#a6">nlassert</a>(mat &amp;&amp; mbi &amp;&amp; asyncTextBlock);
00061                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o0">_MBI</a>= mbi;
00062                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>= mat;
00063                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o2">_AsyncTextureBlock</a>= asyncTextBlock;
00064         }
<a name="l00066"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a1">00066</a>         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a1">~CInstanceMaterialUser</a>()
00067         {
00068                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00069         }
00070 
00071 
00072 
00074         <font class="comment">// @{</font>
<a name="l00075"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_0">00075</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_0">isLighted</a>()<font class="keyword"> const </font>
00076 <font class="keyword">        </font>{
00077                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00078                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;isLighted();
00079         }
<a name="l00080"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_1">00080</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_1">isUserColor</a>()<font class="keyword"> const </font>
00081 <font class="keyword">        </font>{
00082                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00083                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getShader()==CMaterial::UserColor;
00084         }
00085         <font class="comment">// @}</font>
00086 
00087 
00089         <font class="comment">// @{</font>
00090 
<a name="l00091"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_0">00091</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_0">setEmissive</a>( CRGBA emissive=CRGBA(0,0,0) )
00092         {
00093                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00094                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setEmissive(emissive);
00095         }
<a name="l00096"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_1">00096</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_1">setAmbient</a>( CRGBA ambient=CRGBA(0,0,0) )
00097         {
00098                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00099                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setAmbient( ambient);
00100         }
<a name="l00101"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_2">00101</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_2">setDiffuse</a>( CRGBA diffuse=CRGBA(0,0,0) )
00102         {
00103                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00104                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setDiffuse( diffuse);
00105         }
<a name="l00106"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_3">00106</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_3">setOpacity</a>( uint8       opa )
00107         {
00108                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00109                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setOpacity( opa );
00110         }
<a name="l00111"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_4">00111</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_4">setSpecular</a>( CRGBA specular=CRGBA(0,0,0) )
00112         {
00113                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00114                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setSpecular( specular);
00115         }
<a name="l00116"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_5">00116</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_5">setShininess</a>( <font class="keywordtype">float</font> shininess )
00117         {
00118                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00119                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setShininess( shininess );
00120         }
00121 
<a name="l00122"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_6">00122</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_6">getEmissive</a>()<font class="keyword"> const </font>
00123 <font class="keyword">        </font>{
00124                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00125                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getEmissive();
00126         }
<a name="l00127"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_7">00127</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_7">getAmbient</a>()<font class="keyword"> const </font>
00128 <font class="keyword">        </font>{
00129                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00130                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getAmbient();
00131         }
<a name="l00132"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_8">00132</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_8">getDiffuse</a>()<font class="keyword"> const </font>
00133 <font class="keyword">        </font>{
00134                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00135                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getDiffuse();
00136         }
<a name="l00137"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_9">00137</a>         <font class="keyword">virtual</font> uint8                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_9">getOpacity</a>()<font class="keyword"> const </font>
00138 <font class="keyword">        </font>{
00139                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00140                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getOpacity();
00141         }
<a name="l00142"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_10">00142</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_10">getSpecular</a>()<font class="keyword"> const </font>
00143 <font class="keyword">        </font>{
00144                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00145                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getSpecular();
00146         }
<a name="l00147"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_11">00147</a>         <font class="keyword">virtual</font> <font class="keywordtype">float</font>                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z466_11">getShininess</a>()<font class="keyword"> const </font>
00148 <font class="keyword">        </font>{
00149                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00150                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getShininess();
00151         }
00152 
00153         <font class="comment">// @}</font>
00154 
00155 
00157         <font class="comment">// @{</font>
<a name="l00158"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z467_0">00158</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z467_0">setColor</a>(CRGBA rgba) 
00159         {
00160                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00161                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setColor(rgba) ;
00162         }
<a name="l00163"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z467_1">00163</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z467_1">getColor</a>(<font class="keywordtype">void</font>)<font class="keyword"> const </font>
00164 <font class="keyword">        </font>{
00165                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00166                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getColor();
00167         }
00168         <font class="comment">// @}</font>
00169 
00170 
00172         <font class="comment">// @{</font>
<a name="l00173"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z468_0">00173</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z468_0">setUserColor</a>(CRGBA userColor)
00174         {
00175                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00176                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_1">isUserColor</a>())
00177                         <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setUserColor(userColor);
00178         }
<a name="l00179"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z468_1">00179</a>         <font class="keyword">virtual</font> CRGBA                           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z468_1">getUserColor</a>()<font class="keyword"> const </font>
00180 <font class="keyword">        </font>{
00181                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00182                 <font class="keywordflow">if</font>(<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z465_1">isUserColor</a>())
00183                         <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getUserColor();
00184                 <font class="keywordflow">else</font>
00185                         <font class="keywordflow">return</font> CRGBA(0,0,0,0);
00186         }
00187         <font class="comment">// @}</font>
00188 
00190         <font class="comment">// @{</font>
<a name="l00191"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z469_0">00191</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z469_0">setConstantColor</a>(uint stage, <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> color)
00192         {
00193                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00194                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00195                 {
00196                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterialUser::setConstantColor : invalid stage"</font>);
00197                         <font class="keywordflow">return</font>;
00198                 }
00199                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;texConstantColor(stage, color);
00200         }
<a name="l00201"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z469_1">00201</a>         <font class="keyword">virtual</font> <a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a>           <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z469_1">getConstantColor</a>(uint stage)<font class="keyword"> const</font>
00202 <font class="keyword">        </font>{
00203                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00204                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00205                 {
00206                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterialUser::getConstantColor : invalid stage"</font>);
00207                         <font class="keywordflow">return</font> <a class="code" href="classNLMISC_1_1CRGBA.html#p0">NLMISC::CRGBA::Black</a>;
00208                 }
00209                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getTexConstantColor(stage);
00210 
00211         }
00212         <font class="comment">// @}</font>
00213 
00215         <font class="comment">// @{   </font>
00216         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z470_0">isTextureFile</a>(uint stage = 0) <font class="keyword">const</font>;
00217         <font class="keyword">virtual</font> std::string <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z470_1">getTextureFileName</a>(uint stage = 0) <font class="keyword">const</font>;
00218         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z470_2">setTextureFileName</a>(<font class="keyword">const</font> std::string &amp;fileName, uint stage = 0);
00219         <font class="comment">// @}</font>
00220 
00221         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a2">emptyTexture</a>(uint stage = 0);
00222 
00223 
<a name="l00224"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a3">00224</a>         <font class="keyword">virtual</font> sint                            <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a3">getLastTextureStage</a>()<font class="keyword"> const</font>
00225 <font class="keyword">        </font>{
00226                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00227                 sint lastStage = -1;
00228                 <font class="keywordflow">for</font>(uint k = 0; k &lt; <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>; ++k)
00229                 {
00230                         <font class="keywordflow">if</font> (<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getTexture(k) != NULL)
00231                         {
00232                                 lastStage = k;
00233                         }
00234                 }
00235                 <font class="keywordflow">return</font> lastStage;
00236         }
00237 
00239         <font class="comment">// @{</font>
<a name="l00240"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_0">00240</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_0">setBlend</a>(<font class="keywordtype">bool</font> active) 
00241         {
00242                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00243                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setBlend(active);
00244         }
<a name="l00245"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_1">00245</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_1">setBlendFunc</a>(<a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a> <a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>, <a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a> dst) 
00246         {
00247                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00248                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setBlendFunc((CMaterial::TBlend)(uint32)<a class="code" href="driver__opengl__extension__def_8h.html#a409">src</a>, (CMaterial::TBlend)(uint32)dst);
00249         }
<a name="l00250"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_2">00250</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_2">setSrcBlend</a>(<a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a> val) 
00251         {
00252                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00253                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setSrcBlend((CMaterial::TBlend)(uint32)val);
00254         }
<a name="l00255"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_3">00255</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_3">setDstBlend</a>(<a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a> val) 
00256         {
00257                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00258                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setDstBlend((CMaterial::TBlend)(uint32)val);
00259         }
00260 
<a name="l00261"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_4">00261</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_4">getBlend</a>()<font class="keyword"> const </font>
00262 <font class="keyword">        </font>{
00263                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00264                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getBlend();
00265         }
<a name="l00266"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_5">00266</a>         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a>                  <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_5">getSrcBlend</a>(<font class="keywordtype">void</font>)  <font class="keyword">const</font> 
00267         {
00268                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00269                 <font class="keywordflow">return</font> (UInstanceMaterial::TBlend)(uint32)<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getSrcBlend();
00270         }
<a name="l00271"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_6">00271</a>         <font class="keyword">virtual</font> <a class="code" href="classNL3D_1_1UInstanceMaterial.html#s7">TBlend</a>                  <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z471_6">getDstBlend</a>(<font class="keywordtype">void</font>)  <font class="keyword">const</font> 
00272         {
00273                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00274                 <font class="keywordflow">return</font> (UInstanceMaterial::TBlend)(uint32)<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getDstBlend();
00275         }
00276         <font class="comment">// @}</font>
00277 
00278 
00279 
00281         <font class="comment">// @{</font>
<a name="l00282"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_0">00282</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_0">enableUserTexMat</a>(uint stage, <font class="keywordtype">bool</font> enabled = <font class="keyword">true</font>)
00283         {
00284                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00285                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00286                 {
00287                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::enableUserTexMat : stage %d is invalid"</font>, stage);
00288                         <font class="keywordflow">return</font>;
00289                 }
00290                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;enableUserTexMat(stage, enabled);
00291         }
<a name="l00292"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_1">00292</a>         <font class="keyword">virtual</font> <font class="keywordtype">bool</font>                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_1">isUserTexMatEnabled</a>(uint stage)<font class="keyword"> const</font>
00293 <font class="keyword">        </font>{
00294                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00295                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00296                 {
00297                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::enableUserTexMat : stage %d is invalid"</font>, stage);
00298                         <font class="keywordflow">return</font> <font class="keyword">false</font>;
00299                 }
00300                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;isUserTexMatEnabled(stage);
00301         }
<a name="l00302"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_2">00302</a>         <font class="keyword">virtual</font> <font class="keywordtype">void</font>                                    <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_2">setUserTexMat</a>(uint stage, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a> &amp;m)
00303         {
00304                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00305                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00306                 {
00307                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::enableUserTexMat : stage %d is invalid"</font>, stage);
00308                         <font class="keywordflow">return</font>;
00309                 }
00310                 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;isUserTexMatEnabled(stage))
00311                 {
00312                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::setUserTexMat : texture stage %d has no user matrix."</font>, stage);
00313                 }
00314                 <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;setUserTexMat(stage, m);
00315         }
<a name="l00316"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_3">00316</a>         <font class="keyword">virtual</font> <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CMatrix.html">NLMISC::CMatrix</a>  &amp;<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#z472_3">getUserTexMat</a>(uint stage)<font class="keyword"> const</font>
00317 <font class="keyword">        </font>{
00318                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00319                 <font class="keywordflow">if</font> (stage &gt;= <a class="code" href="namespaceNL3D.html#a94">IDRV_MAT_MAXTEXTURES</a>)
00320                 {
00321                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::enableUserTexMat : stage %d is invalid"</font>, stage);
00322                         <font class="keywordflow">return</font> CMatrix::Identity;
00323                 }
00324                 <font class="keywordflow">if</font> (!<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;isUserTexMatEnabled(stage))
00325                 {
00326                         <a class="code" href="debug_8h.html#a2">nlwarning</a>(<font class="stringliteral">"UInstanceMaterial::setUserTexMat : texture stage %d has no user matrix."</font>, stage);
00327                         <font class="keywordflow">return</font> CMatrix::Identity;
00328                 }
00329                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>-&gt;getUserTexMat(stage);
00330         }
00331         <font class="comment">// @}</font>
00332 
00333 <font class="keyword">private</font>:
<a name="l00334"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o0">00334</a>         CMeshBaseInstance       *<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o0">_MBI</a>;
<a name="l00335"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">00335</a>         CMaterial                       *<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>;
<a name="l00336"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o2">00336</a>         CAsyncTextureBlock      *<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o2">_AsyncTextureBlock</a>;
00337 
00338 <font class="keyword">public</font>:
00339 
00340         <font class="comment">// Internal Use only.</font>
<a name="l00341"></a><a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a4">00341</a>         CMaterial       *<a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#a4">getMaterial</a>()<font class="keyword"> const </font>
00342 <font class="keyword">        </font>{
00343                 <a class="code" href="instance__material__user_8h.html#a0">NL3D_MEM_MATERIAL_INSTANCE</a>
00344                 <font class="keywordflow">return</font> <a class="code" href="classNL3D_1_1CInstanceMaterialUser.html#o1">_Material</a>;
00345         }
00346 
00347 };
00348 
00349 
00350 } <font class="comment">// NL3D</font>
00351 
00352 
00353 <font class="preprocessor">#endif // NL_INSTANCE_MATERIAL_USER_H</font>
00354 <font class="preprocessor"></font>
00355 <font class="comment">/* End of instance_material_user.h */</font>
</pre></div>

<!-- footer -->
<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
</TD>
<TD WIDTH=15><IMG  SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>