aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03370.html
blob: bd6c050c46659d1dbdcd82b1893c50b4f3bf36ff (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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NL3D::CShadowMap class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NL3D::CShadowMap Class Reference</h1><code>#include &lt;<a class="el" href="a06371.html">shadow_map.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class encapsulate all Data generated by a Shadow Caster, and read for a Shadow Receiver. <dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2003 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00053">53</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa0">CShadowMap</a> (<a class="el" href="a03371.html">CShadowMapManager</a> *smm)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. NB: ptr is owned =&gt; shadowMap should no still live while smm dead.  <a href="#NL3D_1_1CShadowMapa0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa1">getFadeAround</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return compiled max of DistanceFade and TemporalOutScreenFade.  <a href="#NL3D_1_1CShadowMapa1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa2">getFinalFade</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">same but maximize with the TemporalInScreenFade;  <a href="#NL3D_1_1CShadowMapa2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03487.html">ITexture</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa3">getTexture</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">You can only get the texture for filling / use in a material.  <a href="#NL3D_1_1CShadowMapa3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa4">getTextureSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the TextureSize  <a href="#NL3D_1_1CShadowMapa4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa5">initTexture</a> (<a class="el" href="a04558.html#a15">uint</a> textSize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">create the Texture. It reset the texture if not of same size.  <a href="#NL3D_1_1CShadowMapa5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa6">processFades</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa7">resetTexture</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reset the Texture  <a href="#NL3D_1_1CShadowMapa7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapa8">~CShadowMap</a> ()</td></tr>

<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapz896_0">buildCasterCameraMatrix</a> (const <a class="el" href="a03128.html">CVector</a> &amp;lightDir, const <a class="el" href="a02851.html">CMatrix</a> &amp;localPosMatrix, const <a class="el" href="a02156.html">CAABBox</a> &amp;bbShape, <a class="el" href="a02851.html">CMatrix</a> &amp;cameraMatrix)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapz896_1">buildClipInfoFromMatrix</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapz896_2">buildProjectionInfos</a> (const <a class="el" href="a02851.html">CMatrix</a> &amp;cameraMatrix, const <a class="el" href="a03128.html">CVector</a> &amp;backPoint, const <a class="el" href="a03348.html">CScene</a> *scene)</td></tr>

<tr><td colspan=2><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo0">DistanceFade</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo1">InScreenFadeAccum</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo2">LastGenerationFrame</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02156.html">CAABBox</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a03082.html">CPlane</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02851.html">CMatrix</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo5">LocalProjectionMatrix</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo6">TemporalInScreenFade</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapo7">TemporalOutScreenFade</a></td></tr>

<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapr0">_FadeAround</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapr1">_FinalFade</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03371.html">CShadowMapManager</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapr2">_ShadowMapManager</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt; <a class="el" href="a03487.html">ITexture</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03370.html#NL3D_1_1CShadowMapr4">_Texture</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CShadowMapa0" doxytag="NL3D::CShadowMap::CShadowMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CShadowMap::CShadowMap </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a03371.html">CShadowMapManager</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>smm</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. NB: ptr is owned =&gt; shadowMap should no still live while smm dead. 
<p>

<p>
Definition at line <a class="el" href="a06370.html#l00043">43</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06371.html#l00154">_FadeAround</a>, <a class="el" href="a06371.html#l00155">_FinalFade</a>, <a class="el" href="a06371.html#l00152">_TextSize</a>, <a class="el" href="a06371.html#l00086">DistanceFade</a>, <a class="el" href="a06371.html#l00097">InScreenFadeAccum</a>, <a class="el" href="a06371.html#l00078">LastGenerationFrame</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a06371.html#l00090">TemporalInScreenFade</a>, and <a class="el" href="a06371.html#l00088">TemporalOutScreenFade</a>.
<p>
<div class="fragment"><pre>00044 {
00045         <a class="code" href="a04199.html#a6">nlassert</a>(smm);
00046         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr2">_ShadowMapManager</a>= smm;
00047         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a>= 0;
00048         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo2">LastGenerationFrame</a>= 0;
00049         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo0">DistanceFade</a>= 0;
00050         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo7">TemporalOutScreenFade</a>= 0;
00051         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo6">TemporalInScreenFade</a>= 0;
00052         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr0">_FadeAround</a>= 0;
00053         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr1">_FinalFade</a>= 1;
00054         <span class="comment">// see doc why 1.</span>
00055         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo1">InScreenFadeAccum</a>= 1;
00056 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa8" doxytag="NL3D::CShadowMap::~CShadowMap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> NL3D::CShadowMap::~<a class="el" href="a03370.html">CShadowMap</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06370.html#l00060">60</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06370.html#l00085">resetTexture()</a>.
<p>
<div class="fragment"><pre>00061 {
00062         <a class="code" href="a03370.html#NL3D_1_1CShadowMapa7">resetTexture</a>();
00063 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CShadowMapz896_0" doxytag="NL3D::CShadowMap::buildCasterCameraMatrix" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::buildCasterCameraMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>lightDir</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02851.html">CMatrix</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>localPosMatrix</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02156.html">CAABBox</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bbShape</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02851.html">CMatrix</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>cameraMatrix</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
From A BBox in Object Space, the lightDir, and the (nearly) worldMatrix, build the Camera for common Render Projection The caller has then just to do driver-&gt;setFrustum(0,1,0,1,0,1,false); driver-&gt;setupViewMatrix(cameraMatrix.inverted()); driver-&gt;setupModelMatrix(localPosMatrix); Then render his mesh.
<p>
Definition at line <a class="el" href="a06370.html#l00135">135</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a05385.html#l00091">NLMISC::CAABBox::getHalfSize()</a>, <a class="el" href="a05972.html#l00419">NLMISC::CMatrix::getI()</a>, <a class="el" href="a05972.html#l00427">NLMISC::CMatrix::getJ()</a>, <a class="el" href="a05972.html#l00435">NLMISC::CMatrix::getK()</a>, <a class="el" href="a05385.html#l00086">NLMISC::CAABBox::getMin()</a>, <a class="el" href="a05385.html#l00093">NLMISC::CAABBox::getSize()</a>, <a class="el" href="a06371.html#l00110">getTextureSize()</a>, <a class="el" href="a05972.html#l01090">NLMISC::CMatrix::inverted()</a>, <a class="el" href="a05972.html#l01170">NLMISC::CMatrix::normalize()</a>, <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>, <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>, <a class="el" href="a05384.html#l00262">NLMISC::CAABBox::transformAABBox()</a>, <a class="el" href="a05972.html#l00470">NLMISC::CMatrix::translate()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a06393.html#l01781">NL3D::CSkeletonModel::generateShadowMap()</a>, and <a class="el" href="a06001.html#l00166">NL3D::CMeshInstance::generateShadowMap()</a>.
<p>
<div class="fragment"><pre>00136 {
00137         <span class="comment">// compute the orthogonal LightSpace camera matrix. Remind that J look forward and K is up here.</span>
00138         cameraMatrix.setRot(CVector::I, lightDir, CVector::K);
00139         cameraMatrix.normalize(CMatrix::YZX);
00140 
00141         <a class="code" href="a02156.html">CAABBox</a>         bbLocal;
00142         bbLocal= <a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1908_3">CAABBox::transformAABBox</a>(cameraMatrix.inverted() * localPosMatrix, bbShape);
00143 
00144         <span class="comment">// Enlarge for 1 pixel left and right.</span>
00145         <span class="keywordtype">float</span>   scaleSize= (<span class="keywordtype">float</span>)<a class="code" href="a03370.html#NL3D_1_1CShadowMapa4">getTextureSize</a>();
00146         scaleSize= (scaleSize+2)/scaleSize;
00147         CVector         hs= bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_1">getHalfSize</a>();
00148         hs.x*= scaleSize;
00149         hs.z*= scaleSize;
00150         <span class="comment">// TestUniform</span>
00151         <span class="comment">/*float maxLen= max(hs.x, hs.y);</span>
00152 <span class="comment">        maxLen= max(maxLen, hs.z);</span>
00153 <span class="comment">        hs.x= hs.y= hs.z= maxLen;*/</span>
00154         <span class="comment">// EndTestUniform</span>
00155         bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(hs);
00156 
00157         <span class="comment">// setup the orthogonal camera Matrix so that it includes all the BBox</span>
00158         cameraMatrix.translate(bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_5">getMin</a>());
00159         CVector vi= cameraMatrix.getI() * bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_8">getSize</a>().x;
00160         CVector vj= cameraMatrix.getJ() * bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_8">getSize</a>().y;
00161         CVector vk= cameraMatrix.getK() * bbLocal.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1904_8">getSize</a>().z;
00162         cameraMatrix.setRot(vi,vj,vk);
00163 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapz896_1" doxytag="NL3D::CShadowMap::buildClipInfoFromMatrix" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::buildClipInfoFromMatrix </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The ShadowMap Caster can call this method after setting LocalProjectionMatrix. It computes auto the LocalClipPlanes and LocalBoundingBox from it. NB: don't use it if you use <a class="el" href="a03370.html#NL3D_1_1CShadowMapz896_2">buildProjectionInfos()</a>.
<p>
Definition at line <a class="el" href="a06370.html#l00098">98</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a05384.html#l00215">NLMISC::CAABBox::extend()</a>, <a class="el" href="a05972.html#l00419">NLMISC::CMatrix::getI()</a>, <a class="el" href="a05972.html#l00427">NLMISC::CMatrix::getJ()</a>, <a class="el" href="a05972.html#l00435">NLMISC::CMatrix::getK()</a>, <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a06371.html#l00074">LocalBoundingBox</a>, <a class="el" href="a06371.html#l00069">LocalClipPlanes</a>, <a class="el" href="a06371.html#l00062">LocalProjectionMatrix</a>, <a class="el" href="a05385.html#l00066">NLMISC::CAABBox::setCenter()</a>, and <a class="el" href="a05385.html#l00067">NLMISC::CAABBox::setHalfSize()</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00167">buildProjectionInfos()</a>.
<p>
<div class="fragment"><pre>00099 {
00100         <span class="keyword">const</span>   CMatrix &amp;cameraMatrix= <a class="code" href="a03370.html#NL3D_1_1CShadowMapo5">LocalProjectionMatrix</a>;
00101         CVector vi= LocalProjectionMatrix.getI();
00102         CVector vj= LocalProjectionMatrix.getJ();
00103         CVector vk= LocalProjectionMatrix.getK();
00104         CVector vp= LocalProjectionMatrix.getPos();
00105 
00106         <span class="comment">// **** Compute the planes.</span>
00107         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>.resize(6);
00108         <span class="comment">// The plane 0 is the back plane.</span>
00109         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[0].make(-vj, vp);
00110         <span class="comment">// Left and botom plane.</span>
00111         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[1].make(-vi, vp);
00112         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[2].make(-vk, vp);
00113         <span class="comment">// Right and top plane.</span>
00114         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[3].make(vi, vp + vi);
00115         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[4].make(vk, vp + vk);
00116         <span class="comment">// Front plane.</span>
00117         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo4">LocalClipPlanes</a>[5].make(vj, vp + vj);
00118 
00119         <span class="comment">// **** Compute the AA bounding box.</span>
00120         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_2">setHalfSize</a>(CVector::Null);
00121         CVector         p0= vp;
00122         CVector         p1= p0 + vi + vj + vk;
00123         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxz1902_1">setCenter</a>(p0);
00124         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p0 + vi);
00125         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p0 + vj);
00126         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p0 + vk);
00127         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p1 - vi);
00128         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p1 - vj);
00129         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p1 - vk);
00130         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo3">LocalBoundingBox</a>.<a class="code" href="a02156.html#NLMISC_1_1CAABBoxExtz1902_0">extend</a>(p1);
00131 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapz896_2" doxytag="NL3D::CShadowMap::buildProjectionInfos" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::buildProjectionInfos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a02851.html">CMatrix</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>cameraMatrix</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>backPoint</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03348.html">CScene</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>scene</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
From the Camera matrix computed with buildCasterCameraMatrix, compute the LocalProjectionMatrix, which modify the J axis according to backPoint and Shadow Depth. NB: automatically calls the <a class="el" href="a03370.html#NL3D_1_1CShadowMapz896_1">buildClipInfoFromMatrix()</a> method
<p>
Definition at line <a class="el" href="a06370.html#l00167">167</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06370.html#l00098">buildClipInfoFromMatrix()</a>, <a class="el" href="a05972.html#l00419">NLMISC::CMatrix::getI()</a>, <a class="el" href="a05972.html#l00427">NLMISC::CMatrix::getJ()</a>, <a class="el" href="a05972.html#l00435">NLMISC::CMatrix::getK()</a>, <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a06349.html#l00567">NL3D::CScene::getShadowMapMaxDepth()</a>, <a class="el" href="a06371.html#l00062">LocalProjectionMatrix</a>, <a class="el" href="a06682.html#l00125">NLMISC::CVector::normed()</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, and <a class="el" href="a05972.html#l00209">NLMISC::CMatrix::setRot()</a>.
<p>
Referenced by <a class="el" href="a06393.html#l01781">NL3D::CSkeletonModel::generateShadowMap()</a>, and <a class="el" href="a06001.html#l00166">NL3D::CMeshInstance::generateShadowMap()</a>.
<p>
<div class="fragment"><pre>00168 {
00169         <span class="comment">// Modify the cameraMatrix to define the Aera of Shadow.</span>
00170         CVector         projp= cameraMatrix.getPos();
00171         CVector         proji= cameraMatrix.getI();
00172         CVector         projj= cameraMatrix.getJ();
00173         CVector         projk= cameraMatrix.getK();
00174         <span class="comment">// modify the J vector so that it gets the Wanted Len</span>
00175         CVector vj= projj.normed();
00176         projj= vj*scene-&gt;getShadowMapMaxDepth();
00177         <span class="comment">// Must move Pos so that the IK plane include the backPoint</span>
00178         projp+= (backPoint*vj-projp*vj) * vj;
00179         <span class="comment">// set the matrix</span>
00180         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo5">LocalProjectionMatrix</a>.setRot(proji, projj, projk);
00181         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo5">LocalProjectionMatrix</a>.setPos(projp);
00182 
00183         <span class="comment">// compute The clipPlanes and bbox.</span>
00184         <a class="code" href="a03370.html#NL3D_1_1CShadowMapz896_1">buildClipInfoFromMatrix</a>();
00185 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa1" doxytag="NL3D::CShadowMap::getFadeAround" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float NL3D::CShadowMap::getFadeAround </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return compiled max of DistanceFade and TemporalOutScreenFade. 
<p>

<p>
Definition at line <a class="el" href="a06371.html#l00145">145</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
References <a class="el" href="a06371.html#l00154">_FadeAround</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00189">processFades()</a>.
<p>
<div class="fragment"><pre>00145 {<span class="keywordflow">return</span> <a class="code" href="a03370.html#NL3D_1_1CShadowMapr0">_FadeAround</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa2" doxytag="NL3D::CShadowMap::getFinalFade" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float NL3D::CShadowMap::getFinalFade </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
same but maximize with the TemporalInScreenFade; 
<p>

<p>
Definition at line <a class="el" href="a06371.html#l00147">147</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
References <a class="el" href="a06371.html#l00155">_FinalFade</a>.
<p>
Referenced by <a class="el" href="a06372.html#l00445">NL3D::CShadowMapManager::renderProject()</a>, and <a class="el" href="a06372.html#l00880">NL3D::CShadowMapManager::selectShadowMapsToGenerate()</a>.
<p>
<div class="fragment"><pre>00147 {<span class="keywordflow">return</span> <a class="code" href="a03370.html#NL3D_1_1CShadowMapr1">_FinalFade</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa3" doxytag="NL3D::CShadowMap::getTexture" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03487.html">ITexture</a>* NL3D::CShadowMap::getTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
You can only get the texture for filling / use in a material. 
<p>

<p>
Definition at line <a class="el" href="a06371.html#l00113">113</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06372.html#l00234">NL3D::CShadowMapManager::renderGenerate()</a>, and <a class="el" href="a06372.html#l00445">NL3D::CShadowMapManager::renderProject()</a>.
<p>
<div class="fragment"><pre>00113 {<span class="keywordflow">return</span> <a class="code" href="a03370.html#NL3D_1_1CShadowMapr4">_Texture</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa4" doxytag="NL3D::CShadowMap::getTextureSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NL3D::CShadowMap::getTextureSize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the TextureSize 
<p>

<p>
Definition at line <a class="el" href="a06371.html#l00110">110</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
References <a class="el" href="a06371.html#l00152">_TextSize</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00135">buildCasterCameraMatrix()</a>, <a class="el" href="a06393.html#l01872">NL3D::CSkeletonModel::updateShadowMap()</a>, and <a class="el" href="a06001.html#l00319">NL3D::CMeshInstance::updateShadowMap()</a>.
<p>
<div class="fragment"><pre>00110 {<span class="keywordflow">return</span> <a class="code" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa5" doxytag="NL3D::CShadowMap::initTexture" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::initTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>textSize</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
create the Texture. It reset the texture if not of same size. 
<p>

<p>
Definition at line <a class="el" href="a06370.html#l00066">66</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06371.html#l00152">_TextSize</a>, <a class="el" href="a06372.html#l00957">NL3D::CShadowMapManager::allocateTexture()</a>, <a class="el" href="a06371.html#l00078">LastGenerationFrame</a>, <a class="el" href="a05586.html#l00349">NLMISC::raiseToNextPowerOf2()</a>, <a class="el" href="a06370.html#l00085">resetTexture()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a06393.html#l01872">NL3D::CSkeletonModel::updateShadowMap()</a>, and <a class="el" href="a06001.html#l00319">NL3D::CMeshInstance::updateShadowMap()</a>.
<p>
<div class="fragment"><pre>00067 {
00068         textSize= max(textSize, 2U);
00069         <span class="comment">// if same size than setup, quit</span>
00070         <span class="keywordflow">if</span>(<a class="code" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a>==textSize)
00071                 <span class="keywordflow">return</span>;
00072         <a class="code" href="a03370.html#NL3D_1_1CShadowMapa7">resetTexture</a>();
00073         textSize= <a class="code" href="a05378.html#a262">raiseToNextPowerOf2</a>(textSize);
00074         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a>= textSize;
00075 
00076         <span class="comment">// Allocate in the Manager.</span>
00077         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr4">_Texture</a>= <a class="code" href="a03370.html#NL3D_1_1CShadowMapr2">_ShadowMapManager</a>-&gt;allocateTexture(_TextSize);
00078 
00079         <span class="comment">// Since our texture has changed, it is no more valid. reset counter.</span>
00080         <a class="code" href="a03370.html#NL3D_1_1CShadowMapo2">LastGenerationFrame</a>= 0;
00081 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa6" doxytag="NL3D::CShadowMap::processFades" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::processFades </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Clamp Fades to 0-1. Additionaly reset the texture if DistanceFade&gt;=1 or TemporalOutScreenFade&gt;=1 See Implementation for Why. Additionally compile <a class="el" href="a03370.html#NL3D_1_1CShadowMapa1">getFadeAround()</a> and getFadeInScreen()
<p>
Definition at line <a class="el" href="a06370.html#l00189">189</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06371.html#l00154">_FadeAround</a>, <a class="el" href="a06371.html#l00155">_FinalFade</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06371.html#l00086">DistanceFade</a>, <a class="el" href="a06371.html#l00145">getFadeAround()</a>, <a class="el" href="a06370.html#l00085">resetTexture()</a>, <a class="el" href="a06371.html#l00090">TemporalInScreenFade</a>, and <a class="el" href="a06371.html#l00088">TemporalOutScreenFade</a>.
<p>
Referenced by <a class="el" href="a05555.html#l00532">NL3D::CClipTrav::clipSkeletonShadowMaps()</a>.
<p>
<div class="fragment"><pre>00190 {
00191         <a class="code" href="a05378.html#a374">clamp</a>(DistanceFade, 0.f, 1.f);
00192         <a class="code" href="a05378.html#a374">clamp</a>(TemporalOutScreenFade, 0.f, 1.f);
00193         <a class="code" href="a05378.html#a374">clamp</a>(TemporalInScreenFade, 0.f, 1.f);
00194 
00195         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr0">_FadeAround</a>= max(DistanceFade, TemporalOutScreenFade);
00196         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr1">_FinalFade</a>= max(_FadeAround, TemporalInScreenFade);
00197 
00198         <span class="comment">/* if the fadeAround is 1, then release the texture</span>
00199 <span class="comment">                Don't take _FinalFade because this last may change too much cause of TemporalInScreenFade.</span>
00200 <span class="comment">                While FadeAround is somewhat stable (as entities and the camera don't move too much),</span>
00201 <span class="comment">                TemporalInScreenFade is dependent of camera rotation.</span>
00202 <span class="comment"></span>
00203 <span class="comment">                =&gt; _FinalFade allow to not draw too much shadows (CPU gain),</span>
00204 <span class="comment">                while FadeAround allow in addition the capacity to not use too much texture memory</span>
00205 <span class="comment">        */</span>
00206         <span class="keywordflow">if</span>(<a class="code" href="a03370.html#NL3D_1_1CShadowMapa1">getFadeAround</a>()==1)
00207                 <a class="code" href="a03370.html#NL3D_1_1CShadowMapa7">resetTexture</a>();
00208 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapa7" doxytag="NL3D::CShadowMap::resetTexture" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void NL3D::CShadowMap::resetTexture </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
reset the Texture 
<p>

<p>
Definition at line <a class="el" href="a06370.html#l00085">85</a> of file <a class="el" href="a06370.html">shadow_map.cpp</a>.
<p>
References <a class="el" href="a06371.html#l00152">_TextSize</a>, and <a class="el" href="a06372.html#l01000">NL3D::CShadowMapManager::releaseTexture()</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00066">initTexture()</a>, <a class="el" href="a06370.html#l00189">processFades()</a>, and <a class="el" href="a06370.html#l00060">~CShadowMap()</a>.
<p>
<div class="fragment"><pre>00086 {
00087         <span class="comment">// release the SmartPtr</span>
00088         <span class="keywordflow">if</span>(<a class="code" href="a03370.html#NL3D_1_1CShadowMapr4">_Texture</a>)
00089         {
00090                 <a class="code" href="a03370.html#NL3D_1_1CShadowMapr2">_ShadowMapManager</a>-&gt;releaseTexture(_Texture);
00091                 <a class="code" href="a03370.html#NL3D_1_1CShadowMapr4">_Texture</a>= NULL;
00092         }
00093         <a class="code" href="a03370.html#NL3D_1_1CShadowMapr3">_TextSize</a>= 0;
00094 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CShadowMapr0" doxytag="NL3D::CShadowMap::_FadeAround" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapr0">NL3D::CShadowMap::_FadeAround</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00154">154</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00043">CShadowMap()</a>, <a class="el" href="a06371.html#l00145">getFadeAround()</a>, and <a class="el" href="a06370.html#l00189">processFades()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapr1" doxytag="NL3D::CShadowMap::_FinalFade" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapr1">NL3D::CShadowMap::_FinalFade</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00155">155</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00043">CShadowMap()</a>, <a class="el" href="a06371.html#l00147">getFinalFade()</a>, and <a class="el" href="a06370.html#l00189">processFades()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapr2" doxytag="NL3D::CShadowMap::_ShadowMapManager" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03371.html">CShadowMapManager</a>* <a class="el" href="a03370.html#NL3D_1_1CShadowMapr2">NL3D::CShadowMap::_ShadowMapManager</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00153">153</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapr3" doxytag="NL3D::CShadowMap::_TextSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03370.html#NL3D_1_1CShadowMapr3">NL3D::CShadowMap::_TextSize</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00152">152</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00043">CShadowMap()</a>, <a class="el" href="a06371.html#l00110">getTextureSize()</a>, <a class="el" href="a06370.html#l00066">initTexture()</a>, and <a class="el" href="a06370.html#l00085">resetTexture()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapr4" doxytag="NL3D::CShadowMap::_Texture" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03408.html">NLMISC::CSmartPtr</a>&lt;<a class="el" href="a03487.html">ITexture</a>&gt; <a class="el" href="a03370.html#NL3D_1_1CShadowMapr4">NL3D::CShadowMap::_Texture</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00151">151</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo0" doxytag="NL3D::CShadowMap::DistanceFade" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapo0">NL3D::CShadowMap::DistanceFade</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
They are the fade of the shadowMap, for Lod Shadow display. 0-1 values. NB: if DistanceFade==1 or TemporalOutScreenFade==1, then the ShadowMap Texture is released. Final Fade is the max of the 3.
<p>
Definition at line <a class="el" href="a06371.html#l00086">86</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a05555.html#l00532">NL3D::CClipTrav::clipSkeletonShadowMaps()</a>, <a class="el" href="a06370.html#l00043">CShadowMap()</a>, and <a class="el" href="a06370.html#l00189">processFades()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo1" doxytag="NL3D::CShadowMap::InScreenFadeAccum" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapo1">NL3D::CShadowMap::InScreenFadeAccum</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This value represent the fade time we don't know what to do with TemporalInScreenFade because the shadowMap is not visible or frustum-clipped. Once the shadowMap will be visible again, This will be add/removed (according to TemporalInScreenFade rules) to the TemporalInScreenFade. NB: by default the value is 1 so the initial state is correct when you enable cast shadowMap!
<p>
Definition at line <a class="el" href="a06371.html#l00097">97</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a05555.html#l00532">NL3D::CClipTrav::clipSkeletonShadowMaps()</a>, and <a class="el" href="a06370.html#l00043">CShadowMap()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo2" doxytag="NL3D::CShadowMap::LastGenerationFrame" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> <a class="el" href="a03370.html#NL3D_1_1CShadowMapo2">NL3D::CShadowMap::LastGenerationFrame</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00078">78</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00043">CShadowMap()</a>, <a class="el" href="a06370.html#l00066">initTexture()</a>, <a class="el" href="a06372.html#l00234">NL3D::CShadowMapManager::renderGenerate()</a>, and <a class="el" href="a06372.html#l00880">NL3D::CShadowMapManager::selectShadowMapsToGenerate()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo3" doxytag="NL3D::CShadowMap::LocalBoundingBox" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02156.html">CAABBox</a> <a class="el" href="a03370.html#NL3D_1_1CShadowMapo3">NL3D::CShadowMap::LocalBoundingBox</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Computed at shadow casting time. This is the LocalPos Bouding Box containing the shadow (AxisAligned). <dl compact><dt><b>See also:</b></dt><dd>generateClipInfoFromMatrix()</dd></dl>

<p>
Definition at line <a class="el" href="a06371.html#l00074">74</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00098">buildClipInfoFromMatrix()</a>, <a class="el" href="a06374.html#l00192">NL3D::CShadowPolyReceiver::render()</a>, and <a class="el" href="a06372.html#l00445">NL3D::CShadowMapManager::renderProject()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo4" doxytag="NL3D::CShadowMap::LocalClipPlanes" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="a03082.html">CPlane</a>&gt; <a class="el" href="a03370.html#NL3D_1_1CShadowMapo4">NL3D::CShadowMap::LocalClipPlanes</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Computed at shadow casting time. They are clipping planes used to clip receivers (mirror of the OBB). Receivers may use them to clip sub received parts (as they which) Like the ProjectionLocalMatrix, this plane are in World, but the position of the Caster model. <dl compact><dt><b>See also:</b></dt><dd>generateClipInfoFromMatrix()</dd></dl>

<p>
Definition at line <a class="el" href="a06371.html#l00069">69</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00098">buildClipInfoFromMatrix()</a>, and <a class="el" href="a06374.html#l00192">NL3D::CShadowPolyReceiver::render()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo5" doxytag="NL3D::CShadowMap::LocalProjectionMatrix" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a02851.html">CMatrix</a> <a class="el" href="a03370.html#NL3D_1_1CShadowMapo5">NL3D::CShadowMap::LocalProjectionMatrix</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Computed at shadow casting time. The matrix used to cast the Shadow. It is actualy a World ProjectionMatrix, but is only local to the Position of the Model (not rotation/scale). Hence receiver have to add the position of the caster model to this matrix to get true World. The usage of this matrix is for UV projection: XYZ= WorldProjectionMatrix * UVW. NB: Vj (ie for W) is mapped such that Vp means NearClip of the shadow and Vp+Vj means FarClip of the shadow
<p>
Definition at line <a class="el" href="a06371.html#l00062">62</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a06370.html#l00098">buildClipInfoFromMatrix()</a>, <a class="el" href="a06370.html#l00167">buildProjectionInfos()</a>, and <a class="el" href="a06372.html#l00445">NL3D::CShadowMapManager::renderProject()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo6" doxytag="NL3D::CShadowMap::TemporalInScreenFade" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapo6">NL3D::CShadowMap::TemporalInScreenFade</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00090">90</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a05555.html#l00532">NL3D::CClipTrav::clipSkeletonShadowMaps()</a>, <a class="el" href="a06370.html#l00043">CShadowMap()</a>, and <a class="el" href="a06370.html#l00189">processFades()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CShadowMapo7" doxytag="NL3D::CShadowMap::TemporalOutScreenFade" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> float <a class="el" href="a03370.html#NL3D_1_1CShadowMapo7">NL3D::CShadowMap::TemporalOutScreenFade</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a06371.html#l00088">88</a> of file <a class="el" href="a06371.html">shadow_map.h</a>.
<p>
Referenced by <a class="el" href="a05555.html#l00532">NL3D::CClipTrav::clipSkeletonShadowMaps()</a>, <a class="el" href="a06370.html#l00043">CShadowMap()</a>, and <a class="el" href="a06370.html#l00189">processFades()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06371.html">shadow_map.h</a><li><a class="el" href="a06370.html">shadow_map.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 07:43:01 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>