aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03704.html
blob: def00be9a36822e20d127c247717428d8c24201c (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
<!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::CViewport 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::CViewport Class Reference</h1><code>#include &lt;<a class="el" href="a06723.html">viewport.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="a03704.html">CViewport</a> is the description of the viewport used to render with a driver 
<p>

<p>
Definition at line <a class="el" href="a06723.html#l00052">52</a> of file <a class="el" href="a06723.html">viewport.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="a03704.html#NL3D_1_1CViewporta0">CViewport</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. Setup a fullscreen viewport.  <a href="#NL3D_1_1CViewporta0"></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="a03704.html#NL3D_1_1CViewporta1">getHeight</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta2">getRayWithPoint</a> (float <a class="el" href="a04223.html#a572">x</a>, float <a class="el" href="a04223.html#a573">y</a>, <a class="el" href="a03128.html">CVector</a> &amp;pos, <a class="el" href="a03128.html">CVector</a> &amp;dir, const <a class="el" href="a02851.html">CMatrix</a> &amp;camMatrix, const <a class="el" href="a02562.html">CFrustum</a> &amp;camFrust) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta3">getValues</a> (float &amp;<a class="el" href="a04223.html#a572">x</a>, float &amp;<a class="el" href="a04223.html#a573">y</a>, float &amp;<a class="el" href="a04223.html#a632">width</a>, float &amp;<a class="el" href="a04223.html#a633">height</a>) const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta4">getWidth</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta5">getX</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta6">getY</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03704.html#NL3D_1_1CViewporta7">init</a> (float <a class="el" href="a04223.html#a572">x</a>, float <a class="el" href="a04223.html#a573">y</a>, float <a class="el" href="a04223.html#a632">width</a>, float <a class="el" href="a04223.html#a633">height</a>)</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup a 16/9 viewport.  <a href="#NL3D_1_1CViewporta8"></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="a03704.html#NL3D_1_1CViewporta9">initFullScreen</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup a fullscreen viewport.  <a href="#NL3D_1_1CViewporta9"></a><br><br></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="a03704.html#NL3D_1_1CViewportr0">_Height</a></td></tr>

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

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

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

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NL3D_1_1CViewporta0" doxytag="NL3D::CViewport::CViewport" ></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::CViewport::CViewport </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>
Default constructor. Setup a fullscreen viewport. 
<p>

<p>
Definition at line <a class="el" href="a06722.html#l00037">37</a> of file <a class="el" href="a06722.html">viewport.cpp</a>.
<p>
References <a class="el" href="a06722.html#l00059">initFullScreen()</a>, and <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>.
<p>
<div class="fragment"><pre>00038 {
00039         <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00040         <a class="code" href="a03704.html#NL3D_1_1CViewporta9">initFullScreen</a> ();
00041 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NL3D_1_1CViewporta1" doxytag="NL3D::CViewport::getHeight" ></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::CViewport::getHeight </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>

<p>
Definition at line <a class="el" href="a06723.html#l00105">105</a> of file <a class="el" href="a06723.html">viewport.h</a>.
<p>
Referenced by <a class="el" href="a05712.html#l00063">NL3D::CFlareModel::traverseRender()</a>.
<p>
<div class="fragment"><pre>00105 { <span class="keywordflow">return</span> <a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>; }     
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta2" doxytag="NL3D::CViewport::getRayWithPoint" ></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::CViewport::getRayWithPoint </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a03128.html">CVector</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>dir</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>camMatrix</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a02562.html">CFrustum</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>camFrust</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const</td>
        </tr>

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

<p>
Get a 3d ray with a 2d point<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>is the x coordinate in the window coordinate system of the 2d point. </td></tr>
    <tr><td valign=top><em>y</em>&nbsp;</td><td>is the y coordinate in the window coordinate system of the 2d point. </td></tr>
    <tr><td valign=top><em>pos</em>&nbsp;</td><td>gets the position of a 3d point on the ray. It is also the position of the camera </td></tr>
    <tr><td valign=top><em>dir</em>&nbsp;</td><td>gets the direction of the ray. The direction is the same than the camera one. It is NOT normalized. </td></tr>
    <tr><td valign=top><em>camMatrix</em>&nbsp;</td><td>is the matrix of the camera in use in this viewport. </td></tr>
    <tr><td valign=top><em>camFrust</em>&nbsp;</td><td>is the frustum of the camera in use in this viewport.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06722.html#l00081">81</a> of file <a class="el" href="a06722.html">viewport.cpp</a>.
<p>
References <a class="el" href="a05973.html#l00198">NLMISC::CMatrix::getPos()</a>, <a class="el" href="a05732.html#l00064">NL3D::CFrustum::getValues()</a>, <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>, <a class="el" href="a05972.html#l00267">NLMISC::CMatrix::setPos()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a05686.html#l00089">NL3D::CEvent3dMouseListener::operator()()</a>.
<p>
<div class="fragment"><pre>00082 {
00083         <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00084         <span class="keywordtype">float</span> xVP=(<a class="code" href="a04223.html#a572">x</a>-<a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>)/<a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>;
00085         <span class="keywordtype">float</span> yVP=(<a class="code" href="a04223.html#a573">y</a>-<a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>)/<a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>;
00086 
00087         <span class="comment">// Pos of the ray</span>
00088         pos= camMatrix.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1963_6">getPos</a>();
00089 
00090         <span class="comment">// Get camera frustrum</span>
00091         <span class="keywordtype">float</span> left;
00092         <span class="keywordtype">float</span> right;
00093         <span class="keywordtype">float</span> bottom;
00094         <span class="keywordtype">float</span> top;
00095         <span class="keywordtype">float</span> znear;
00096         <span class="keywordtype">float</span> zfar;
00097         camFrust.getValues (left, right, bottom, top, znear, zfar);
00098 
00099         <span class="comment">// Get a local direction</span>
00100         dir.x=left+(right-left)*xVP;
00101         dir.y=znear;
00102         dir.z=bottom+(top-bottom)*yVP;
00103 
00104         <span class="comment">// Get a world direction</span>
00105         <a class="code" href="a02851.html">CMatrix</a> mat=camMatrix;
00106         mat.<a class="code" href="a02851.html#NLMISC_1_1CMatrixz1961_4">setPos</a> (CVector (0,0,0));
00107         dir=mat*dir;
00108 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta3" doxytag="NL3D::CViewport::getValues" ></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::CViewport::getValues </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>height</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> 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 viewport values<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>get the x coordinate of the left edge of the viewport in the window coordinate system . Must be between 0.f and 1.f. </td></tr>
    <tr><td valign=top><em>y</em>&nbsp;</td><td>get the y coordinate of the bottom edge of the viewport in the window coordinate system . Must be between 0.f and 1.f. </td></tr>
    <tr><td valign=top><em>width</em>&nbsp;</td><td>get the width of the view port. Must be between 0.f and 1.f-x. </td></tr>
    <tr><td valign=top><em>height</em>&nbsp;</td><td>get the height of the view port. Must be between 0.f and 1.f-y.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06723.html#l00093">93</a> of file <a class="el" href="a06723.html">viewport.h</a>.
<p>
References <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
<div class="fragment"><pre>00094         {
00095                 <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00096                 <a class="code" href="a04223.html#a572">x</a>=<a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>;
00097                 <a class="code" href="a04223.html#a573">y</a>=<a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>;
00098                 <a class="code" href="a04223.html#a632">width</a>=<a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>;
00099                 <a class="code" href="a04223.html#a633">height</a>=<a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>;
00100         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta4" doxytag="NL3D::CViewport::getWidth" ></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::CViewport::getWidth </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>

<p>
Definition at line <a class="el" href="a06723.html#l00104">104</a> of file <a class="el" href="a06723.html">viewport.h</a>.
<p>
Referenced by <a class="el" href="a05712.html#l00063">NL3D::CFlareModel::traverseRender()</a>.
<p>
<div class="fragment"><pre>00104 { <span class="keywordflow">return</span> <a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>; }      
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta5" doxytag="NL3D::CViewport::getX" ></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::CViewport::getX </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>

<p>
Definition at line <a class="el" href="a06723.html#l00102">102</a> of file <a class="el" href="a06723.html">viewport.h</a>.
<p>
Referenced by <a class="el" href="a05712.html#l00063">NL3D::CFlareModel::traverseRender()</a>.
<p>
<div class="fragment"><pre>00102 { <span class="keywordflow">return</span> <a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>; }  
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta6" doxytag="NL3D::CViewport::getY" ></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::CViewport::getY </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>

<p>
Definition at line <a class="el" href="a06723.html#l00103">103</a> of file <a class="el" href="a06723.html">viewport.h</a>.
<p>
Referenced by <a class="el" href="a05712.html#l00063">NL3D::CFlareModel::traverseRender()</a>.
<p>
<div class="fragment"><pre>00103 { <span class="keywordflow">return</span> <a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>; }  
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta7" doxytag="NL3D::CViewport::init" ></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::CViewport::init </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">float&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>float&nbsp;</td>
          <td class="mdname" nowrap> <em>height</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>
Constructor<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>x</em>&nbsp;</td><td>coordinate of the left edge of the viewport in the window coordinate system . Must be between 0.f and 1.f. </td></tr>
    <tr><td valign=top><em>y</em>&nbsp;</td><td>coordinate of the bottom edge of the viewport in the window coordinate system . Must be between 0.f and 1.f. </td></tr>
    <tr><td valign=top><em>width</em>&nbsp;</td><td>of the view port. Must be between 0.f and 1.f-x. </td></tr>
    <tr><td valign=top><em>height</em>&nbsp;</td><td>of the view port. Must be between 0.f and 1.f-y.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a06722.html#l00044">44</a> of file <a class="el" href="a06722.html">viewport.cpp</a>.
<p>
References <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05646.html#l01013">height</a>, <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>, <a class="el" href="a05646.html#l01013">width</a>, <a class="el" href="a05646.html#l00236">x</a>, and <a class="el" href="a05646.html#l00236">y</a>.
<p>
Referenced by <a class="el" href="a05557.html#l00509">NL3D::CCloud::genBill()</a>, <a class="el" href="a06372.html#l00234">NL3D::CShadowMapManager::renderGenerate()</a>, and <a class="el" href="a05642.html#l01821">NL3D::CDriverGL::setupViewport()</a>.
<p>
<div class="fragment"><pre>00045 {
00046         <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00047         <span class="comment">// Simply copy</span>
00048         <a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>=<a class="code" href="a04223.html#a572">x</a>;
00049         <a class="code" href="a05378.html#a374">clamp</a> (_X, 0.f, 1.f);
00050         <a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>=<a class="code" href="a04223.html#a573">y</a>;
00051         <a class="code" href="a05378.html#a374">clamp</a> (_Y, 0.f, 1.f);
00052         <a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>=<a class="code" href="a04223.html#a632">width</a>;
00053         <a class="code" href="a05378.html#a374">clamp</a> (_Width, 0.f, 1.f-_X);
00054         <a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>=<a class="code" href="a04223.html#a633">height</a>;
00055         <a class="code" href="a05378.html#a374">clamp</a> (_Height, 0.f, 1.f-_Y);
00056 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta8" doxytag="NL3D::CViewport::init16_9" ></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::CViewport::init16_9 </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>
Setup a 16/9 viewport. 
<p>

<p>
Definition at line <a class="el" href="a06722.html#l00070">70</a> of file <a class="el" href="a06722.html">viewport.cpp</a>.
<p>
References <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>.
<p>
<div class="fragment"><pre>00071 {
00072         <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00073         <span class="comment">// Very easy</span>
00074         <a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>=0.f;
00075         <a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>=(1.f-0.75f)/2;
00076         <a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>=1.f;
00077         <a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>=0.75f;
00078 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewporta9" doxytag="NL3D::CViewport::initFullScreen" ></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::CViewport::initFullScreen </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>
Setup a fullscreen viewport. 
<p>

<p>
Definition at line <a class="el" href="a06722.html#l00059">59</a> of file <a class="el" href="a06722.html">viewport.cpp</a>.
<p>
References <a class="el" href="a06723.html#l00034">NL3D_MEM_VIEWPORT</a>.
<p>
Referenced by <a class="el" href="a05686.html#l00040">NL3D::CEvent3dMouseListener::CEvent3dMouseListener()</a>, <a class="el" href="a06722.html#l00037">CViewport()</a>, <a class="el" href="a05557.html#l00509">NL3D::CCloud::genBill()</a>, <a class="el" href="a06372.html#l00234">NL3D::CShadowMapManager::renderGenerate()</a>, and <a class="el" href="a05657.html#l00230">NL3D::CDriverUser::setDisplay()</a>.
<p>
<div class="fragment"><pre>00060 {
00061         <a class="code" href="a05300.html#a0">NL3D_MEM_VIEWPORT</a>
00062         <span class="comment">// Very easy</span>
00063         <a class="code" href="a03704.html#NL3D_1_1CViewportr2">_X</a>=0.f;
00064         <a class="code" href="a03704.html#NL3D_1_1CViewportr3">_Y</a>=0.f;
00065         <a class="code" href="a03704.html#NL3D_1_1CViewportr1">_Width</a>=1.f;
00066         <a class="code" href="a03704.html#NL3D_1_1CViewportr0">_Height</a>=1.f;
00067 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NL3D_1_1CViewportr0" doxytag="NL3D::CViewport::_Height" ></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="a03704.html#NL3D_1_1CViewportr0">NL3D::CViewport::_Height</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="a06723.html#l00112">112</a> of file <a class="el" href="a06723.html">viewport.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewportr1" doxytag="NL3D::CViewport::_Width" ></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="a03704.html#NL3D_1_1CViewportr1">NL3D::CViewport::_Width</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="a06723.html#l00111">111</a> of file <a class="el" href="a06723.html">viewport.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewportr2" doxytag="NL3D::CViewport::_X" ></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="a03704.html#NL3D_1_1CViewportr2">NL3D::CViewport::_X</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="a06723.html#l00109">109</a> of file <a class="el" href="a06723.html">viewport.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NL3D_1_1CViewportr3" doxytag="NL3D::CViewport::_Y" ></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="a03704.html#NL3D_1_1CViewportr3">NL3D::CViewport::_Y</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="a06723.html#l00110">110</a> of file <a class="el" href="a06723.html">viewport.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06723.html">viewport.h</a><li><a class="el" href="a06722.html">viewport.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:26:17 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>