-
Notifications
You must be signed in to change notification settings - Fork 1
/
renderer2D.html
613 lines (590 loc) · 32.4 KB
/
renderer2D.html
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
<html>
<head>
<title>The X Toolkit API</title>
<link href="doc.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['orgchart']});
</script>
<script type="text/javascript">
// don't show internals by default
var displayInternals = false;
var toggleInternals = function() {
// toggle the display variable
displayInternals = !displayInternals;
if (!document.styleSheets)
return;
var thecss = new Array();
if (document.styleSheets[0].cssRules) thecss = document.styleSheets[0].cssRules;
else thecss = document.styleSheets[0].rules;
for (i = 0; i < thecss.length; i++) {
if (thecss[i].selectorText.toLowerCase() == '.private') {
if (displayInternals) {
thecss[i].style.cssText += "display: block;";
document.getElementById('togglBtn').innerHTML = 'Hide Internals'
} else {
thecss[i].style.cssText += "display: none;";
document.getElementById('togglBtn').innerHTML = 'Show Internals'
}
} else if (thecss[i].selectorText.toLowerCase() == '.private_quicklink') {
if (displayInternals) {
thecss[i].style.cssText += "display: inline;";
} else {
thecss[i].style.cssText += "display: none;";
}
}
}
}
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
[{v:"goog.events.EventTarget",f:"<font color=green>goog.events.EventTarget</font>"},null,null],
["X.base","goog.events.EventTarget",null],
["X.renderer","X.base",null],
["X.renderer2D","X.renderer",null],
]);
// Create and draw the visualization.
new google.visualization.OrgChart(document.getElementById('diagram')).
draw(data, {allowHtml: true, size:'small', color:'#f3f3f3'});
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body>
<h1>The X Toolkit API</h1>
<div class="menu"><b>X</b><br><span class="menuitem"><a href="counter.html">X.counter</a></span><br><br><b>CORE</b><br><span class="menuitem"><a href="base.html">X.base</a></span><br><span class="menuitem"><a href="colortable.html">X.colortable</a></span><br><span class="menuitem"><a href="event.html">X.event</a></span><br><span class="menuitem"><a href="file.html">X.file</a></span><br><span class="menuitem"><a href="HoverEndEvent.html">X.HoverEndEvent</a></span><br><span class="menuitem"><a href="HoverEvent.html">X.HoverEvent</a></span><br><span class="menuitem"><a href="ModifiedEvent.html">X.ModifiedEvent</a></span><br><span class="menuitem"><a href="PanEvent.html">X.PanEvent</a></span><br><span class="menuitem"><a href="ProgressEvent.html">X.ProgressEvent</a></span><br><span class="menuitem"><a href="RenderEvent.html">X.RenderEvent</a></span><br><span class="menuitem"><a href="ResetViewEvent.html">X.ResetViewEvent</a></span><br><span class="menuitem"><a href="RotateEvent.html">X.RotateEvent</a></span><br><span class="menuitem"><a href="scalars.html">X.scalars</a></span><br><span class="menuitem"><a href="ScrollEvent.html">X.ScrollEvent</a></span><br><span class="menuitem"><a href="texture.html">X.texture</a></span><br><span class="menuitem"><a href="transform.html">X.transform</a></span><br><span class="menuitem"><a href="triplets.html">X.triplets</a></span><br><span class="menuitem"><a href="WindowLevelEvent.html">X.WindowLevelEvent</a></span><br><span class="menuitem"><a href="ZoomEvent.html">X.ZoomEvent</a></span><br><br><b>INJECTS</b><br><span class="menuitem"><a href="constructable.html">X.constructable</a></span><br><span class="menuitem"><a href="displayable.html">X.displayable</a></span><br><span class="menuitem"><a href="loadable.html">X.loadable</a></span><br><span class="menuitem"><a href="thresholdable.html">X.thresholdable</a></span><br><br><b>IO</b><br><span class="menuitem"><a href="interactor.html">X.interactor</a></span><br><span class="menuitem"><a href="interactor2D.html">X.interactor2D</a></span><br><span class="menuitem"><a href="interactor3D.html">X.interactor3D</a></span><br><span class="menuitem"><a href="loader.html">X.loader</a></span><br><span class="menuitem"><a href="parser.html">X.parser</a></span><br><span class="menuitem"><a href="parserCRV.html">X.parserCRV</a></span><br><span class="menuitem"><a href="parserDCM.html">X.parserDCM</a></span><br><span class="menuitem"><a href="parserFSM.html">X.parserFSM</a></span><br><span class="menuitem"><a href="parserIMAGE.html">X.parserIMAGE</a></span><br><span class="menuitem"><a href="parserLBL.html">X.parserLBL</a></span><br><span class="menuitem"><a href="parserLUT.html">X.parserLUT</a></span><br><span class="menuitem"><a href="parserMGZ.html">X.parserMGZ</a></span><br><span class="menuitem"><a href="parserNII.html">X.parserNII</a></span><br><span class="menuitem"><a href="parserNRRD.html">X.parserNRRD</a></span><br><span class="menuitem"><a href="parserOBJ.html">X.parserOBJ</a></span><br><span class="menuitem"><a href="parserSTL.html">X.parserSTL</a></span><br><span class="menuitem"><a href="parserTRK.html">X.parserTRK</a></span><br><span class="menuitem"><a href="parserVTK.html">X.parserVTK</a></span><br><br><b>MATH</b><br><span class="menuitem"><a href="array.html">X.array</a></span><br><span class="menuitem"><a href="matrix.html">X.matrix</a></span><br><span class="menuitem"><a href="vector.html">X.vector</a></span><br><br><b>OBJECTS</b><br><span class="menuitem"><a href="cube.html">X.cube</a></span><br><span class="menuitem"><a href="cylinder.html">X.cylinder</a></span><br><span class="menuitem"><a href="fibers.html">X.fibers</a></span><br><span class="menuitem"><a href="labelmap.html">X.labelmap</a></span><br><span class="menuitem"><a href="mesh.html">X.mesh</a></span><br><span class="menuitem"><a href="object.html">X.object</a></span><br><span class="menuitem"><a href="slice.html">X.slice</a></span><br><span class="menuitem"><a href="sphere.html">X.sphere</a></span><br><span class="menuitem"><a href="volume.html">X.volume</a></span><br><br><b>UI</b><br><span class="menuitem"><a href="caption.html">X.caption</a></span><br><span class="menuitem"><a href="progressbar.html">X.progressbar</a></span><br><br><b>VISUALIZATION</b><br><span class="menuitem"><a href="buffer.html">X.buffer</a></span><br><span class="menuitem"><a href="camera.html">X.camera</a></span><br><span class="menuitem"><a href="camera2D.html">X.camera2D</a></span><br><span class="menuitem"><a href="camera3D.html">X.camera3D</a></span><br><span class="menuitem"><a href="indexer.html">X.indexer</a></span><br><span class="menuitem"><a href="renderer.html">X.renderer</a></span><br><span class="menuitem"><a href="renderer2D.html">X.renderer2D</a></span><br><span class="menuitem"><a href="renderer3D.html">X.renderer3D</a></span><br><span class="menuitem"><a href="shaders.html">X.shaders</a></span><br><br></div>
<div id="diagram"></div>
<div class="content">
<h2>X.renderer2D</h2>
<div class="public" id="renderer2D">
<pre>/**
* Create a 2D renderer inside a given DOM Element.
*
* @constructor
* @extends <a href="renderer.html">X.renderer</a>
*/</pre>
<span class="code">var r = new <span class="identifier">X.renderer2D()</span>;</span><br></div><div class="private" id="_AnimationFrameID">
<pre>/**
* The animation frame ID.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_AnimationFrameID</span> = $_ANIMATIONFRAMEID;</span><br></div><div class="private" id="_camera">
<pre>/**
* The camera of this renderer.
*
* @type {?<a href="camera.html">X.camera</a>}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_camera</span> = $_CAMERA;</span><br></div><div class="private" id="_canvas">
<pre>/**
* The Canvas of this renderer.
*
* @type {?Element}
* @public
*/</pre>
<span class="code">r.<span class="identifier">_canvas</span> = $_CANVAS;</span><br></div><div class="private" id="_classname">
<pre>/**
* The className of this class.
*
* @type {string}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_classname</span> = $_CLASSNAME;</span><br></div><div class="private" id="_config">
<pre>/**
* The configuration of this renderer.
*
* @enum {boolean}
*/</pre>
<span class="code">r.<span class="identifier">_config</span> = $_CONFIG;</span><br></div><div class="private" id="_container">
<pre>/**
* The HTML container of this renderer, E.g. a <div>.
*
* @type {!Element|HTMLBodyElement}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_container</span> = $_CONTAINER;</span><br></div><div class="private" id="_context">
<pre>/**
* The rendering context of this renderer.
*
* @type {?Object}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_context</span> = $_CONTEXT;</span><br></div><div class="private" id="_currentSlice">
<pre>/**
* The buffer of the current slice index.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_currentSlice</span> = $_CURRENTSLICE;</span><br></div><div class="private" id="_dirty">
<pre>/**
* The 'dirty' flag of this object.
*
* @type {boolean}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_dirty</span> = $_DIRTY;</span><br></div><div class="private" id="_frameBuffer">
<pre>/**
* A frame buffer for slice data.
*
* @type {?Element}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_frameBuffer</span> = $_FRAMEBUFFER;</span><br></div><div class="private" id="_frameBufferContext">
<pre>/**
* The rendering context of the slice frame buffer.
*
* @type {?Object}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_frameBufferContext</span> = $_FRAMEBUFFERCONTEXT;</span><br></div><div class="private" id="_height">
<pre>/**
* The height of this renderer.
*
* @type {!number}
* @public
*/</pre>
<span class="code">r.<span class="identifier">_height</span> = $_HEIGHT;</span><br></div><div class="private" id="_id">
<pre>/**
* The uniqueId of this instance. Each class instance in XTK has a uniqueId.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_id</span> = $_ID;</span><br></div><div class="private" id="_interactor">
<pre>/**
* The interactor of this renderer.
*
* @type {?<a href="interactor.html">X.interactor</a>}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_interactor</span> = $_INTERACTOR;</span><br></div><div class="private" id="_labelFrameBuffer">
<pre>/**
* A frame buffer for label data.
*
* @type {?Element}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_labelFrameBuffer</span> = $_LABELFRAMEBUFFER;</span><br></div><div class="private" id="_labelFrameBufferContext">
<pre>/**
* The rendering context of the label frame buffer.
*
* @type {?Object}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_labelFrameBufferContext</span> = $_LABELFRAMEBUFFERCONTEXT;</span><br></div><div class="private" id="_loader">
<pre>/**
* The loader associated with this renderer.
*
* @type {?<a href="loader.html">X.loader</a>}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_loader</span> = $_LOADER;</span><br></div><div class="private" id="_loadingCompleted">
<pre>/**
* A flag to show if the initial loading was completed.
*
* @type {boolean}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_loadingCompleted</span> = $_LOADINGCOMPLETED;</span><br></div><div class="private" id="_locked">
<pre>/**
* A locked flag for synchronizing.
*
* @type {boolean}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_locked</span> = $_LOCKED;</span><br></div><div class="private" id="_lowerThreshold">
<pre>/**
* The buffer of the current lower threshold.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_lowerThreshold</span> = $_LOWERTHRESHOLD;</span><br></div><div class="private" id="_objects">
<pre>/**
* An <a href="array.html">X.array</a> containing the displayable objects of this renderer. The object
* reflects the rendering order for the associated objects.
*
* @type {!<a href="array.html">X.array</a>}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_objects</span> = $_OBJECTS;</span><br></div><div class="private" id="_onShowtime">
<pre>/**
* A flag to indicate that the onShowtime callback is about to be called.
*
* @type {boolean}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_onShowtime</span> = $_ONSHOWTIME;</span><br></div><div class="private" id="_orientation">
<pre>/**
* The orientation of this renderer.
*
* @type {?string}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_orientation</span> = $_ORIENTATION;</span><br></div><div class="private" id="_progressBar">
<pre>/**
* The progressBar of this renderer.
*
* @type {?<a href="progressbar.html">X.progressbar</a>}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_progressBar</span> = $_PROGRESSBAR;</span><br></div><div class="private" id="_rotation">
<pre>/**
* The current rotation factor. This is positive to rotate clockwise and
* negative to rotate counter-clockwise. The factor is multiplied by 90
* degrees.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_rotation</span> = $_ROTATION;</span><br></div><div class="private" id="_sliceHeight">
<pre>/**
* The current slice height.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_sliceHeight</span> = $_SLICEHEIGHT;</span><br></div><div class="private" id="_sliceHeightSpacing">
<pre>/**
* The current slice height spacing.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_sliceHeightSpacing</span> = $_SLICEHEIGHTSPACING;</span><br></div><div class="private" id="_sliceWidth">
<pre>/**
* The current slice width.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_sliceWidth</span> = $_SLICEWIDTH;</span><br></div><div class="private" id="_sliceWidthSpacing">
<pre>/**
* The current slice width spacing.
*
* @type {number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_sliceWidthSpacing</span> = $_SLICEWIDTHSPACING;</span><br></div><div class="private" id="_topLevelObjects">
<pre>/**
* An array containing the topLevel objects (which do not have parents) of
* this renderer.
*
* @type {!Array}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_topLevelObjects</span> = $_TOPLEVELOBJECTS;</span><br></div><div class="private" id="_upperThreshold">
<pre>/**
* The buffer of the current upper threshold.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_upperThreshold</span> = $_UPPERTHRESHOLD;</span><br></div><div class="private" id="_width">
<pre>/**
* The width of this renderer.
*
* @type {!number}
* @public
*/</pre>
<span class="code">r.<span class="identifier">_width</span> = $_WIDTH;</span><br></div><div class="private" id="_windowHigh">
<pre>/**
* The buffer of the current w/l high value.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_windowHigh</span> = $_WINDOWHIGH;</span><br></div><div class="private" id="_windowLow">
<pre>/**
* The buffer of the current w/l low value.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">r.<span class="identifier">_windowLow</span> = $_WINDOWLOW;</span><br></div><div class="public" id="camera_get">
<pre>/**
* Get the camera of this renderer. The camera is null until this renderer is
* initialized.
*
* @return {?<a href="camera.html">X.camera</a>} The camera.
*/</pre>
<span class="code">var _camera = r.<span class="identifier">camera</span>;</span><br></div><div class="public" id="classname_get">
<pre>/**
* Get the className of this object.
*
* @return {string} The className of this object.
* @public
*/</pre>
<span class="code">var _classname = r.<span class="identifier">classname</span>;</span><br></div><div class="public" id="config_get">
<pre>/**
* Access the configuration of this renderer. Possible settings and there
* default values are:
*
*
* config.PROGRESSBAR_ENABLED: true
*
*
* @return {Object} The configuration.
*/</pre>
<span class="code">var _config = r.<span class="identifier">config</span>;</span><br></div><div class="public" id="container_get">
<pre>/**
* Get the container of this renderer.
*
* @return {!Element|HTMLBodyElement} The container of this renderer.
* @public
*/</pre>
<span class="code">var _container = r.<span class="identifier">container</span>;</span><br></div><div class="public" id="container_set">
<pre>/**
* Set the container for this renderer. This has to happen before
* <a href="renderer.html">X.renderer</a>.init() is called.
*
* @param {!string|Element|HTMLBodyElement} container Either an ID to a DOM
* container or the DOM element itself.
* @throws {Error} An error, if the given container is invalid.
* @public
*/</pre>
<span class="code">r.<span class="identifier">container</span> = $CONTAINER;</span><br></div><div class="public" id="id_get">
<pre>/**
* Get the id of this instance.
*
* @return {string} The className of this object.
* @public
*/</pre>
<span class="code">var _id = r.<span class="identifier">id</span>;</span><br></div><div class="public" id="interactor_get">
<pre>/**
* Get the interactor of this renderer. The interactor is null until this
* renderer is initialized.
*
* @return {?<a href="interactor.html">X.interactor</a>} The interactor.
*/</pre>
<span class="code">var _interactor = r.<span class="identifier">interactor</span>;</span><br></div><div class="public" id="loadingCompleted_get">
<pre>/**
* Check if the initial loading of all objects was completed. This value gets
* set immediately after the onShowtime function is executed.
*
* @return {boolean} TRUE if all objects were completely loaded, FALSE else
* wise.
*/</pre>
<span class="code">var _loadingCompleted = r.<span class="identifier">loadingCompleted</span>;</span><br></div><div class="public" id="orientation_get">
<pre>/**
* Get the orientation of this renderer. Valid orientations are 'x','y','z' or
* null.
*
* @return {?string} The orientation of this renderer.
*/</pre>
<span class="code">var _orientation = r.<span class="identifier">orientation</span>;</span><br></div><div class="public" id="orientation_set">
<pre>/**
* Set the orientation for this renderer. Valid orientations are 'x','y' or 'z'.
*
* @param {!string} orientation The orientation for this renderer: 'x','y' or
* 'z'.
* @throws {Error} An error, if the given orientation was wrong.
*/</pre>
<span class="code">r.<span class="identifier">orientation</span> = $ORIENTATION;</span><br></div><div class="public" id="add">
<pre>/**
* Add a new object to this renderer. The renderer has to be initialized before
* doing so. A <a href="renderer.html">X.renderer</a>.render() call has to be initiated to display added
* objects.
*
* @param {!<a href="object.html">X.object</a>} object The object to add to this renderer.
* @throws {Error} An exception if something goes wrong.
*/</pre>
<span class="code">r.<span class="identifier">add</span>($OBJECT);</span><br></div><div class="private" id="autoScale_">
<pre>/**
* Adjust the zoom (scale) to best fit the current slice.
*/</pre>
<span class="code">r.<span class="identifier">autoScale_</span>();</span><br></div><div class="public" id="destroy">
<pre>/**
* Destroy this renderer.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">destroy</span>();</span><br></div><div class="private" id="generateTree_">
<pre>/**
* Recursively loop through a hierarchy tree of objects and print it.
*
* @param {!<a href="object.html">X.object</a>} object The starting point object.
* @param {number} level The current level in the scene hierarchy.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">generateTree_</span>($OBJECT, $LEVEL);</span><br></div><div class="public" id="get">
<pre>/**
* Get the existing <a href="object.html">X.object</a> with the given id.
*
* @param {!number} id The object's id.
* @return {?<a href="object.html">X.object</a>} The requested <a href="object.html">X.object</a> or null if it was not found.
* @throws {Error} If the given id was invalid.
* @public
*/</pre>
<span class="code">var get = r.<span class="identifier">get</span>($ID);</span><br></div><div class="private" id="hideProgressBar_">
<pre>/**
* Hides the loading progress bar.
*
* @protected
*/</pre>
<span class="code">r.<span class="identifier">hideProgressBar_</span>();</span><br></div><div class="public" id="init">
<pre>/**
* Create the canvas of this renderer inside the configured container and using
* attributes like width, height etc. Then, initialize the rendering context and
* attach all necessary objects (e.g. camera, shaders..). Finally, initialize
* the event listeners.
*
* @param {string} _contextName The name of the context to create.
* @throws {Error} An exception if there were problems during initialization.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">init</span>($_CONTEXTNAME);</span><br></div><div class="private" id="onHover_">
<pre>/**
* The callback for <a href="event.html">X.event</a>.events.HOVER events which indicate a hovering over
* the viewport.
*
* @param {!<a href="event.html">X.event</a>.HoverEvent} event The hover event pointing to the relevant
* screen coordinates.
* @throws {Error} An error if the given event is invalid.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">onHover_</span>($EVENT);</span><br></div><div class="private" id="onModified">
<pre>/**
* The callback for <a href="event.html">X.event</a>.events.MODIFIED events which re-configures the
* object for rendering. This does not trigger re-rendering.
*
* @param {!<a href="event.html">X.event</a>.ModifiedEvent} event The modified event pointing to the
* modified object.
* @public
*/</pre>
<span class="code">r.<span class="identifier">onModified</span>($EVENT);</span><br></div><div class="private" id="onProgress">
<pre>/**
* The callback for <a href="event.html">X.event</a>.events.PROGRESS events which indicate progress
* updates during loading.
*
* @param {!<a href="event.html">X.event</a>.ProgressEvent} event The progress event holding the total
* progress value.
* @public
*/</pre>
<span class="code">r.<span class="identifier">onProgress</span>($EVENT);</span><br></div><div class="public" id="onRender">
<pre>/**
* Overload this function to execute code on each rendering call.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">onRender</span>();</span><br></div><div class="private" id="onResize_">
<pre>/**
* @protected
*/</pre>
<span class="code">r.<span class="identifier">onResize_</span>();</span><br></div><div class="public" id="onScroll">
<pre>/**
* Overload this function to execute code after scrolling has completed and just
* before the next rendering call.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">onScroll</span>();</span><br></div><div class="private" id="onScroll_">
<pre>/**
* The callback for <a href="event.html">X.event</a>.events.SCROLL events which indicate scrolling of the
* viewport.
*
* @param {!<a href="event.html">X.event</a>.ScrollEvent} event The scroll event indicating the scrolling
* direction.
* @throws {Error} An error if the given event is invalid.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">onScroll_</span>($EVENT);</span><br></div><div class="public" id="onShowtime">
<pre>/**
* Overload this function to execute code after all initial loading (files,
* textures..) has completed and just before the first real rendering call.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">onShowtime</span>();</span><br></div><div class="public" id="onWindowLevel">
<pre>/**
* Overload this function to execute code after window/level adjustment has
* completed and just before the next rendering call.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">onWindowLevel</span>();</span><br></div><div class="private" id="onWindowLevel_">
<pre>/**
* Performs window/level adjustment for the currently loaded volume.
*
* @param {!<a href="event.html">X.event</a>.WindowLevelEvent} event The window/level event from the
* camera.
*/</pre>
<span class="code">r.<span class="identifier">onWindowLevel_</span>($EVENT);</span><br></div><div class="private" id="printScene">
<pre>/**
* Print the full hierarchy tree of objects.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">printScene</span>();</span><br></div><div class="public" id="render">
<pre>/**
* (Re-)render all associated displayable objects of this renderer. This method
* clears the viewport and re-draws everything by looping through the tree of
* objects. The current camera is used to setup the world space.
*
* @public
*/</pre>
<span class="code">r.<span class="identifier">render</span>();</span><br></div><div class="private" id="render_">
<pre>/**
* Internal function to perform the actual rendering by looping through all
* associated <a href="object.html">X.object</a>s.
*
* @param {boolean} picking If TRUE, perform picking - if FALSE render to the
* canvas viewport.
* @param {?boolean=} invoked If TRUE, the render counts as invoked and f.e.
* statistics are generated.
* @throws {Error} If anything goes wrong.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">render_</span>($PICKING, $INVOKED);</span><br></div><div class="public" id="resetViewAndRender">
<pre>/**
* Resets the view according to the global bounding box of all associated
* objects, the configured camera position as well as its focus _and_ triggers
* re-rendering.
*/</pre>
<span class="code">r.<span class="identifier">resetViewAndRender</span>();</span><br></div><div class="public" id="rotate">
<pre>/**
* Rotate the current view clock-wise.
*/</pre>
<span class="code">r.<span class="identifier">rotate</span>();</span><br></div><div class="public" id="rotateCounter">
<pre>/**
* Rotate the current view counter clock-wise.
*/</pre>
<span class="code">r.<span class="identifier">rotateCounter</span>();</span><br></div><div class="private" id="showProgressBar_">
<pre>/**
* Shows the loading progress bar by modifying the DOM tree.
*
* @protected
*/</pre>
<span class="code">r.<span class="identifier">showProgressBar_</span>();</span><br></div><div class="private" id="update_">
<pre>/**
* Configure a displayable object within this renderer. The object can be a
* newly created one or an existing one. A <a href="renderer.html">X.renderer</a>.render() call has to be
* initiated to display the object.
*
* @param {!<a href="object.html">X.object</a>} object The displayable object to setup within this
* renderer.
* @throws {Error} An exception if something goes wrong.
* @protected
*/</pre>
<span class="code">r.<span class="identifier">update_</span>($OBJECT);</span><br></div>
</div>
<div id="toolbox">
<center><button id="togglBtn" type="button" onclick="javascript:toggleInternals();">Show Internals</button></center><br><br>
<b>CONSTRUCTORS</b><br>
<span class="public_quicklink"><a href="#renderer2D">X.renderer2D</a><br></span><br>
<b>PROPERTIES</b><br>
<span class="private_quicklink"><a href="#_AnimationFrameID">_AnimationFrameID</a><br></span><span class="private_quicklink"><a href="#_camera">_camera</a><br></span><span class="private_quicklink"><a href="#_canvas">_canvas</a><br></span><span class="private_quicklink"><a href="#_classname">_classname</a><br></span><span class="private_quicklink"><a href="#_config">_config</a><br></span><span class="private_quicklink"><a href="#_container">_container</a><br></span><span class="private_quicklink"><a href="#_context">_context</a><br></span><span class="private_quicklink"><a href="#_currentSlice">_currentSlice</a><br></span><span class="private_quicklink"><a href="#_dirty">_dirty</a><br></span><span class="private_quicklink"><a href="#_frameBuffer">_frameBuffer</a><br></span><span class="private_quicklink"><a href="#_frameBufferContext">_frameBufferContext</a><br></span><span class="private_quicklink"><a href="#_height">_height</a><br></span><span class="private_quicklink"><a href="#_id">_id</a><br></span><span class="private_quicklink"><a href="#_interactor">_interactor</a><br></span><span class="private_quicklink"><a href="#_labelFrameBuffer">_labelFrameBuffer</a><br></span><span class="private_quicklink"><a href="#_labelFrameBufferContext">_labelFrameBufferContext</a><br></span><span class="private_quicklink"><a href="#_loader">_loader</a><br></span><span class="private_quicklink"><a href="#_loadingCompleted">_loadingCompleted</a><br></span><span class="private_quicklink"><a href="#_locked">_locked</a><br></span><span class="private_quicklink"><a href="#_lowerThreshold">_lowerThreshold</a><br></span><span class="private_quicklink"><a href="#_objects">_objects</a><br></span><span class="private_quicklink"><a href="#_onShowtime">_onShowtime</a><br></span><span class="private_quicklink"><a href="#_orientation">_orientation</a><br></span><span class="private_quicklink"><a href="#_progressBar">_progressBar</a><br></span><span class="private_quicklink"><a href="#_rotation">_rotation</a><br></span><span class="private_quicklink"><a href="#_sliceHeight">_sliceHeight</a><br></span><span class="private_quicklink"><a href="#_sliceHeightSpacing">_sliceHeightSpacing</a><br></span><span class="private_quicklink"><a href="#_sliceWidth">_sliceWidth</a><br></span><span class="private_quicklink"><a href="#_sliceWidthSpacing">_sliceWidthSpacing</a><br></span><span class="private_quicklink"><a href="#_topLevelObjects">_topLevelObjects</a><br></span><span class="private_quicklink"><a href="#_upperThreshold">_upperThreshold</a><br></span><span class="private_quicklink"><a href="#_width">_width</a><br></span><span class="private_quicklink"><a href="#_windowHigh">_windowHigh</a><br></span><span class="private_quicklink"><a href="#_windowLow">_windowLow</a><br></span><br>
<b>GETTERS/SETTERS</b><br>
<span class="public_quicklink"><a href="#camera_get">camera</a><br></span><span class="public_quicklink"><a href="#classname_get">classname</a><br></span><span class="public_quicklink"><a href="#config_get">config</a><br></span><span class="public_quicklink"><a href="#container_get">container</a><br></span><span class="public_quicklink"><a href="#id_get">id</a><br></span><span class="public_quicklink"><a href="#interactor_get">interactor</a><br></span><span class="public_quicklink"><a href="#loadingCompleted_get">loadingCompleted</a><br></span><span class="public_quicklink"><a href="#orientation_get">orientation</a><br></span><br>
<b>FUNCTIONS</b><br>
<span class="public_quicklink"><a href="#add">add</a><br></span><span class="private_quicklink"><a href="#autoScale_">autoScale_</a><br></span><span class="public_quicklink"><a href="#destroy">destroy</a><br></span><span class="private_quicklink"><a href="#generateTree_">generateTree_</a><br></span><span class="public_quicklink"><a href="#get">get</a><br></span><span class="private_quicklink"><a href="#hideProgressBar_">hideProgressBar_</a><br></span><span class="public_quicklink"><a href="#init">init</a><br></span><span class="private_quicklink"><a href="#onHover_">onHover_</a><br></span><span class="private_quicklink"><a href="#onModified">onModified</a><br></span><span class="private_quicklink"><a href="#onProgress">onProgress</a><br></span><span class="public_quicklink"><a href="#onRender">onRender</a><br></span><span class="private_quicklink"><a href="#onResize_">onResize_</a><br></span><span class="public_quicklink"><a href="#onScroll">onScroll</a><br></span><span class="private_quicklink"><a href="#onScroll_">onScroll_</a><br></span><span class="public_quicklink"><a href="#onShowtime">onShowtime</a><br></span><span class="public_quicklink"><a href="#onWindowLevel">onWindowLevel</a><br></span><span class="private_quicklink"><a href="#onWindowLevel_">onWindowLevel_</a><br></span><span class="private_quicklink"><a href="#printScene">printScene</a><br></span><span class="public_quicklink"><a href="#render">render</a><br></span><span class="private_quicklink"><a href="#render_">render_</a><br></span><span class="public_quicklink"><a href="#resetViewAndRender">resetViewAndRender</a><br></span><span class="public_quicklink"><a href="#rotate">rotate</a><br></span><span class="public_quicklink"><a href="#rotateCounter">rotateCounter</a><br></span><span class="private_quicklink"><a href="#showProgressBar_">showProgressBar_</a><br></span><span class="private_quicklink"><a href="#update_">update_</a><br></span><br>
<b>STATIC</b><br>
<br><br><br>
<center><small><a href="https://github.com/xtk/X/blob/master/visualization/renderer2D.js" target="_blank">SOURCECODE</a><br></small></center>
</div>
<br><br><br>
</body>
</html>