-
Notifications
You must be signed in to change notification settings - Fork 1
/
cube.html
628 lines (605 loc) · 32.5 KB
/
cube.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
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<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.object","X.base",null],
[{v:"X.displayable",f:"<font color=green>X.displayable</font>"},null,null],
["X.object","X.displayable",null],
["X.cube","X.object",null],
[{v:"X.constructable",f:"<font color=green>X.constructable</font>"},null,null],
["X.cube","X.constructable",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.cube</h2>
<div class="public" id="cube">
<pre>/**
* Create a displayable cube.
*
* @constructor
* @extends <a href="object.html">X.object</a>
* @mixin <a href="constructable.html">X.constructable</a>
*/</pre>
<span class="code">var c = new <span class="identifier">X.cube()</span>;</span><br></div><div class="private" id="_caption">
<pre>/**
* The caption of this object.
*
* @type {?string}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_caption</span> = $_CAPTION;</span><br></div><div class="private" id="_center">
<pre>/**
* The center of this cube in the world space.
*
* @type {!Array}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_center</span> = $_CENTER;</span><br></div><div class="private" id="_children">
<pre>/**
* The children of this object.
*
* @type {!Array}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_children</span> = $_CHILDREN;</span><br></div><div class="private" id="_classname">
<pre>/**
* The className of this class.
*
* @type {string}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_classname</span> = $_CLASSNAME;</span><br></div><div class="private" id="_color">
<pre>/**
* The object color. By default, this is white.
*
* @type {!Array}
* @public
*/</pre>
<span class="code">c.<span class="identifier">_color</span> = $_COLOR;</span><br></div><div class="private" id="_colors">
<pre>/**
* The point colors of this object.
*
* @type {?<a href="triplets.html">X.triplets</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_colors</span> = $_COLORS;</span><br></div><div class="private" id="_colortable">
<pre>/**
* The color table of this object.
*
* @type {?<a href="colortable.html">X.colortable</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_colortable</span> = $_COLORTABLE;</span><br></div><div class="private" id="_dirty">
<pre>/**
* The 'dirty' flag of this object.
*
* @type {boolean}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_dirty</span> = $_DIRTY;</span><br></div><div class="private" id="_distance">
<pre>/**
* This distance of this object to the viewer's eye.
*
* @type {number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_distance</span> = $_DISTANCE;</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">c.<span class="identifier">_id</span> = $_ID;</span><br></div><div class="private" id="_lengthX">
<pre>/**
* The edge length in X-direction.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_lengthX</span> = $_LENGTHX;</span><br></div><div class="private" id="_lengthY">
<pre>/**
* The edge length in Y-direction.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_lengthY</span> = $_LENGTHY;</span><br></div><div class="private" id="_lengthZ">
<pre>/**
* The edge length in Z-direction.
*
* @type {!number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_lengthZ</span> = $_LENGTHZ;</span><br></div><div class="private" id="_linewidth">
<pre>/**
* The line width, only used in <a href="displayable.html">X.displayable</a>.types.LINES mode.
*
* @type {number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_linewidth</span> = $_LINEWIDTH;</span><br></div><div class="private" id="_magicmode">
<pre>/**
* The flag for the magic mode.
*
* @type {!boolean}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_magicmode</span> = $_MAGICMODE;</span><br></div><div class="private" id="_normals">
<pre>/**
* The normals of this object.
*
* @type {?<a href="triplets.html">X.triplets</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_normals</span> = $_NORMALS;</span><br></div><div class="private" id="_opacity">
<pre>/**
* The opacity of this object.
*
* @type {number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_opacity</span> = $_OPACITY;</span><br></div><div class="private" id="_pointIndices">
<pre>/**
* An array reflecting the point or vertex indices.
*
* @type {!Array}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_pointIndices</span> = $_POINTINDICES;</span><br></div><div class="private" id="_points">
<pre>/**
* The points of this object.
*
* @type {?<a href="triplets.html">X.triplets</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_points</span> = $_POINTS;</span><br></div><div class="private" id="_pointsize">
<pre>/**
* The point size, only used in <a href="displayable.html">X.displayable</a>.types.POINTS mode.
*
* @type {number}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_pointsize</span> = $_POINTSIZE;</span><br></div><div class="private" id="_scalars">
<pre>/**
* The scalars of this object.
*
* @type {?<a href="scalars.html">X.scalars</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_scalars</span> = $_SCALARS;</span><br></div><div class="private" id="_texture">
<pre>/**
* The texture of this object.
*
* @type {?<a href="texture.html">X.texture</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_texture</span> = $_TEXTURE;</span><br></div><div class="private" id="_textureCoordinateMap">
<pre>/**
* The mapping between object and texture coordinates.
*
* @type {?Array}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_textureCoordinateMap</span> = $_TEXTURECOORDINATEMAP;</span><br></div><div class="private" id="_transform">
<pre>/**
* The transform of this object.
*
* @type {!<a href="transform.html">X.transform</a>}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_transform</span> = $_TRANSFORM;</span><br></div><div class="private" id="_type">
<pre>/**
* The rendering type of this object, default is
* {<a href="displayable.html">X.displayable</a>.types.TRIANGLES}.
*
* @type {<a href="displayable.html">X.displayable</a>.types}
* @protected
*/</pre>
<span class="code">c.<span class="identifier">_type</span> = $_TYPE;</span><br></div><div class="private" id="_visible">
<pre>/**
* The visibility of this object.
*
* @type {boolean}
* @public
*/</pre>
<span class="code">c.<span class="identifier">_visible</span> = $_VISIBLE;</span><br></div><div class="public" id="caption_get">
<pre>/**
* Get the caption of this object.
*
* @return {?string} The caption of this object.
* @public
*/</pre>
<span class="code">var _caption = c.<span class="identifier">caption</span>;</span><br></div><div class="public" id="caption_set">
<pre>/**
* Set the caption for this object.
*
* @param {?string} caption The caption for this object.
* @public
*/</pre>
<span class="code">c.<span class="identifier">caption</span> = $CAPTION;</span><br></div><div class="public" id="center_get">
<pre>/**
* Get the center of this cube.
*
* @return {!Array} The center as an array with length 3.
* @public
*/</pre>
<span class="code">var _center = c.<span class="identifier">center</span>;</span><br></div><div class="public" id="center_set">
<pre>/**
* Set the center of this cube.
*
* @param {!Array} center The center as an array with length 3 ([X,Y,Z]).
* @throws {Error} An error, if the center is invalid.
* @public
*/</pre>
<span class="code">c.<span class="identifier">center</span> = $CENTER;</span><br></div><div class="public" id="children_get">
<pre>/**
* Get the children of this object. Each object can have N children which get
* automatically rendered when the top level object gets rendered.
*
* @return {!Array} The children of this object which are again objects.
*/</pre>
<span class="code">var _children = c.<span class="identifier">children</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 = c.<span class="identifier">classname</span>;</span><br></div><div class="public" id="color_get">
<pre>/**
* Get the object color.
*
* @return {!Array} The object color.
*/</pre>
<span class="code">var _color = c.<span class="identifier">color</span>;</span><br></div><div class="public" id="color_set">
<pre>/**
* Set the object color. This overrides any point colors.
*
* @param {!Array} color The object color as an array with length 3 and values
* between 0..1.
* @throws {Error} An exception if the given color is invalid.
*/</pre>
<span class="code">c.<span class="identifier">color</span> = $COLOR;</span><br></div><div class="public" id="colors_get">
<pre>/**
* Get the point colors of this object.
*
* @return {!<a href="triplets.html">X.triplets</a>} The point colors.
*/</pre>
<span class="code">var _colors = c.<span class="identifier">colors</span>;</span><br></div><div class="public" id="colors_set">
<pre>/**
* Set the colors of this object.
*
* @param {!<a href="triplets.html">X.triplets</a>} colors The colors.
*/</pre>
<span class="code">c.<span class="identifier">colors</span> = $COLORS;</span><br></div><div class="public" id="colortable_get">
<pre>/**
* The color table associated with this object.
*
* @return {?<a href="colortable.html">X.colortable</a>} The color table.
*/</pre>
<span class="code">var _colortable = c.<span class="identifier">colortable</span>;</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 = c.<span class="identifier">id</span>;</span><br></div><div class="public" id="lengthX_get">
<pre>/**
* Get the edge length in X-direction.
*
* @return {!number} The edge length in X-direction.
* @public
*/</pre>
<span class="code">var _lengthX = c.<span class="identifier">lengthX</span>;</span><br></div><div class="public" id="lengthX_set">
<pre>/**
* Set the edge length in X-direction.
*
* @param {!number} lengthX The edge length in X-direction.
* @throws {Error} An error, if the given length is invalid.
* @public
*/</pre>
<span class="code">c.<span class="identifier">lengthX</span> = $LENGTHX;</span><br></div><div class="public" id="lengthY_get">
<pre>/**
* Get the edge length in Y-direction.
*
* @return {!number} The edge length in Y-direction.
* @public
*/</pre>
<span class="code">var _lengthY = c.<span class="identifier">lengthY</span>;</span><br></div><div class="public" id="lengthY_set">
<pre>/**
* Set the edge length in Y-direction.
*
* @param {!number} lengthY The edge length in Y-direction.
* @throws {Error} An error, if the given length is invalid.
* @public
*/</pre>
<span class="code">c.<span class="identifier">lengthY</span> = $LENGTHY;</span><br></div><div class="public" id="lengthZ_get">
<pre>/**
* Get the edge length in Z-direction.
*
* @return {!number} The edge length in Z-direction.
* @public
*/</pre>
<span class="code">var _lengthZ = c.<span class="identifier">lengthZ</span>;</span><br></div><div class="public" id="lengthZ_set">
<pre>/**
* Set the edge length in Z-direction.
*
* @param {!number} lengthZ The edge length in Z-direction.
* @throws {Error} An error, if the given length is invalid.
* @public
*/</pre>
<span class="code">c.<span class="identifier">lengthZ</span> = $LENGTHZ;</span><br></div><div class="public" id="linewidth_get">
<pre>/**
* Get the line width of this object. The line width is only used in
* <a href="displayable.html">X.displayable</a>.types.LINES rendering mode.
*
* @return {!number} The line width.
*/</pre>
<span class="code">var _linewidth = c.<span class="identifier">linewidth</span>;</span><br></div><div class="public" id="linewidth_set">
<pre>/**
* Set the line width for this object. The line width is only used in
* <a href="displayable.html">X.displayable</a>.types.LINES rendering mode.
*
* @param {!number} width The line width.
* @throws {Error} An exception if the given width is invalid.
*/</pre>
<span class="code">c.<span class="identifier">linewidth</span> = $WIDTH;</span><br></div><div class="public" id="magicmode_get">
<pre>/**
* Get the magic mode flag.
*
* @return {!boolean} The magic mode flag.
*/</pre>
<span class="code">var _magicmode = c.<span class="identifier">magicmode</span>;</span><br></div><div class="public" id="magicmode_set">
<pre>/**
* Set the magic mode flag.
*
* @param {!boolean} magicmode The magic mode flag.
*/</pre>
<span class="code">c.<span class="identifier">magicmode</span> = $MAGICMODE;</span><br></div><div class="public" id="normals_get">
<pre>/**
* Get the normals of this object.
*
* @return {!<a href="triplets.html">X.triplets</a>} The normals.
*/</pre>
<span class="code">var _normals = c.<span class="identifier">normals</span>;</span><br></div><div class="public" id="normals_set">
<pre>/**
* Set the normals of this object.
*
* @param {!<a href="triplets.html">X.triplets</a>} normals The normals.
*/</pre>
<span class="code">c.<span class="identifier">normals</span> = $NORMALS;</span><br></div><div class="public" id="opacity_get">
<pre>/**
* Get the opacity of this object. If the object is fully opaque, this returns
* 1.
*
* @return {number} The opacity in the range 0..1.
*/</pre>
<span class="code">var _opacity = c.<span class="identifier">opacity</span>;</span><br></div><div class="public" id="opacity_set">
<pre>/**
* Set the opacity of this object.
*
* @param {number} opacity The opacity value in the range 0..1.
*/</pre>
<span class="code">c.<span class="identifier">opacity</span> = $OPACITY;</span><br></div><div class="public" id="points_get">
<pre>/**
* Get the points of this object.
*
* @return {!<a href="triplets.html">X.triplets</a>} The points.
*/</pre>
<span class="code">var _points = c.<span class="identifier">points</span>;</span><br></div><div class="public" id="points_set">
<pre>/**
* Set the points of this object.
*
* @param {!<a href="triplets.html">X.triplets</a>} points The points.
*/</pre>
<span class="code">c.<span class="identifier">points</span> = $POINTS;</span><br></div><div class="public" id="pointsize_get">
<pre>/**
* Get the point size of this object. The point size is only used in
* <a href="displayable.html">X.displayable</a>.types.POINTS rendering mode.
*
* @return {!number} The point size.
*/</pre>
<span class="code">var _pointsize = c.<span class="identifier">pointsize</span>;</span><br></div><div class="public" id="pointsize_set">
<pre>/**
* Set the point size for this object. The point size is only used in
* <a href="displayable.html">X.displayable</a>.types.POINTS rendering mode.
*
* @param {!number} size The point size.
* @throws {Error} An exception if the given size is invalid.
*/</pre>
<span class="code">c.<span class="identifier">pointsize</span> = $SIZE;</span><br></div><div class="public" id="scalars_get">
<pre>/**
* The scalars associated with this object.
*
* @return {?<a href="scalars.html">X.scalars</a>} The scalars.
*/</pre>
<span class="code">var _scalars = c.<span class="identifier">scalars</span>;</span><br></div><div class="public" id="texture_get">
<pre>/**
* Get the texture of this object.
*
* @return {!<a href="texture.html">X.texture</a>} The texture.
*/</pre>
<span class="code">var _texture = c.<span class="identifier">texture</span>;</span><br></div><div class="public" id="transform_get">
<pre>/**
* Get the transform of this object.
*
* @return {!<a href="transform.html">X.transform</a>} The transform.
*/</pre>
<span class="code">var _transform = c.<span class="identifier">transform</span>;</span><br></div><div class="public" id="type_get">
<pre>/**
* Get the render type of this object.
*
* @return {!string} The render type.
*/</pre>
<span class="code">var _type = c.<span class="identifier">type</span>;</span><br></div><div class="public" id="type_set">
<pre>/**
* Set the render type of this object. Valid types are: TRIANGLES,
* TRIANGLE_STRIPS, LINES, POINTS, POLYGONS
*
* @param {!string} type The render type.
*/</pre>
<span class="code">c.<span class="identifier">type</span> = $TYPE;</span><br></div><div class="public" id="visible_get">
<pre>/**
* Get the visibility of this object.
*
* @return {boolean} TRUE if the object is visible, FALSE otherwise.
* @public
*/</pre>
<span class="code">var _visible = c.<span class="identifier">visible</span>;</span><br></div><div class="public" id="visible_set">
<pre>/**
* Set the visibility of this object.
*
* @param {boolean} visible The object's new visibility.
* @public
*/</pre>
<span class="code">c.<span class="identifier">visible</span> = $VISIBLE;</span><br></div><div class="private" id="copy_">
<pre>/**
* Copies the properties from a given object to this object. The texture,
* textureCoordinateMap and the children are not copied but linked.
*
* @param {*} object The given object.
* @protected
*/</pre>
<span class="code">c.<span class="identifier">copy_</span>($OBJECT);</span><br></div><div class="private" id="fromCSG">
<pre>/**
* Convert a CSG object to this <a href="object.html">X.object</a>.
*
* @param {!CSG} csg The CSG object.
* @throws {Error} An error if the given object is invalid.
*/</pre>
<span class="code">c.<span class="identifier">fromCSG</span>($CSG);</span><br></div><div class="public" id="intersect">
<pre>/**
* Intersect an <a href="object.html">X.object</a> or a CSG object with this <a href="object.html">X.object</a> and return a new
* <a href="object.html">X.object</a>.
*
* @param {!CSG|<a href="object.html">X.object</a>} object The object to use for the intersect operation.
* @return {<a href="object.html">X.object</a>} A new <a href="object.html">X.object</a>.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/</pre>
<span class="code">var intersect = c.<span class="identifier">intersect</span>($OBJECT);</span><br></div><div class="public" id="inverse">
<pre>/**
* Inverse this <a href="object.html">X.object</a> and return a new <a href="object.html">X.object</a>.
*
* @return {<a href="object.html">X.object</a>} A new <a href="object.html">X.object</a>.
* @suppress {missingProperties}
*/</pre>
<span class="code">var inverse = c.<span class="identifier">inverse</span>();</span><br></div><div class="public" id="modified">
<pre>/**
* Fire a modified event for this object.
*
* @param {?boolean=} propagateEvent An optional flag to stop propagating down to child classes.
*/</pre>
<span class="code">c.<span class="identifier">modified</span>($PROPAGATEEVENT);</span><br></div><div class="public" id="subtract">
<pre>/**
* Subtract an <a href="object.html">X.object</a> or a CSG object from this <a href="object.html">X.object</a> and return a new
* <a href="object.html">X.object</a>.
*
* @param {!CSG|<a href="object.html">X.object</a>} object The object to subtract.
* @return {<a href="object.html">X.object</a>} A new <a href="object.html">X.object</a>.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/</pre>
<span class="code">var subtract = c.<span class="identifier">subtract</span>($OBJECT);</span><br></div><div class="private" id="toCSG">
<pre>/**
* Convert this <a href="object.html">X.object</a> to a CSG object.
*
* @return {!CSG} The created CSG object.
*/</pre>
<span class="code">var toCSG = c.<span class="identifier">toCSG</span>();</span><br></div><div class="public" id="union">
<pre>/**
* Union this <a href="object.html">X.object</a> with either another <a href="object.html">X.object</a> or a CSG object and return a
* new <a href="object.html">X.object</a>.
*
* @param {!CSG|<a href="object.html">X.object</a>} object The other <a href="object.html">X.object</a> or CSG object.
* @return {<a href="object.html">X.object</a>} A new <a href="object.html">X.object</a>.
* @throws {Error} An error if the given object is invalid.
* @suppress {missingProperties}
*/</pre>
<span class="code">var union = c.<span class="identifier">union</span>($OBJECT);</span><br></div><div class="private" id="OPACITY_COMPARATOR">
<pre>/**
* Compare two <a href="object.html">X.object</a>s by their opacity values and their distance to the
* viewer's eye. Fully opaque objects should be always ordered before
* transparent ones, and the transparent ones should be ordered back-to-front in
* terms of the distance to the viewer's eye.
*
* @param {<a href="object.html">X.object</a>} object1 Object1 to compare against Object2.
* @param {<a href="object.html">X.object</a>} object2 Object2 to compare against Object1.
* @return {!number} 1, if Object1 should be ordered after Object2. -1, if
* Object1 should be ordered before Object2
*/</pre>
<span class="code">var OPACITY_COMPARATOR = X.cube.<span class="identifier">OPACITY_COMPARATOR</span>($OBJECT1, $OBJECT2);</span><br></div><div class="private" id="types">
<pre>/**
* Different render types for any displayable objects.
*
* @enum {string}
*/</pre>
<span class="code">X.cube.<span class="identifier">types</span>();</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="#cube">X.cube</a><br></span><br>
<b>PROPERTIES</b><br>
<span class="private_quicklink"><a href="#_caption">_caption</a><br></span><span class="private_quicklink"><a href="#_center">_center</a><br></span><span class="private_quicklink"><a href="#_children">_children</a><br></span><span class="private_quicklink"><a href="#_classname">_classname</a><br></span><span class="private_quicklink"><a href="#_color">_color</a><br></span><span class="private_quicklink"><a href="#_colors">_colors</a><br></span><span class="private_quicklink"><a href="#_colortable">_colortable</a><br></span><span class="private_quicklink"><a href="#_dirty">_dirty</a><br></span><span class="private_quicklink"><a href="#_distance">_distance</a><br></span><span class="private_quicklink"><a href="#_id">_id</a><br></span><span class="private_quicklink"><a href="#_lengthX">_lengthX</a><br></span><span class="private_quicklink"><a href="#_lengthY">_lengthY</a><br></span><span class="private_quicklink"><a href="#_lengthZ">_lengthZ</a><br></span><span class="private_quicklink"><a href="#_linewidth">_linewidth</a><br></span><span class="private_quicklink"><a href="#_magicmode">_magicmode</a><br></span><span class="private_quicklink"><a href="#_normals">_normals</a><br></span><span class="private_quicklink"><a href="#_opacity">_opacity</a><br></span><span class="private_quicklink"><a href="#_pointIndices">_pointIndices</a><br></span><span class="private_quicklink"><a href="#_points">_points</a><br></span><span class="private_quicklink"><a href="#_pointsize">_pointsize</a><br></span><span class="private_quicklink"><a href="#_scalars">_scalars</a><br></span><span class="private_quicklink"><a href="#_texture">_texture</a><br></span><span class="private_quicklink"><a href="#_textureCoordinateMap">_textureCoordinateMap</a><br></span><span class="private_quicklink"><a href="#_transform">_transform</a><br></span><span class="private_quicklink"><a href="#_type">_type</a><br></span><span class="private_quicklink"><a href="#_visible">_visible</a><br></span><br>
<b>GETTERS/SETTERS</b><br>
<span class="public_quicklink"><a href="#caption_get">caption</a><br></span><span class="public_quicklink"><a href="#center_get">center</a><br></span><span class="public_quicklink"><a href="#children_get">children</a><br></span><span class="public_quicklink"><a href="#classname_get">classname</a><br></span><span class="public_quicklink"><a href="#color_get">color</a><br></span><span class="public_quicklink"><a href="#colors_get">colors</a><br></span><span class="public_quicklink"><a href="#colortable_get">colortable</a><br></span><span class="public_quicklink"><a href="#id_get">id</a><br></span><span class="public_quicklink"><a href="#lengthX_get">lengthX</a><br></span><span class="public_quicklink"><a href="#lengthY_get">lengthY</a><br></span><span class="public_quicklink"><a href="#lengthZ_get">lengthZ</a><br></span><span class="public_quicklink"><a href="#linewidth_get">linewidth</a><br></span><span class="public_quicklink"><a href="#magicmode_get">magicmode</a><br></span><span class="public_quicklink"><a href="#normals_get">normals</a><br></span><span class="public_quicklink"><a href="#opacity_get">opacity</a><br></span><span class="public_quicklink"><a href="#points_get">points</a><br></span><span class="public_quicklink"><a href="#pointsize_get">pointsize</a><br></span><span class="public_quicklink"><a href="#scalars_get">scalars</a><br></span><span class="public_quicklink"><a href="#texture_get">texture</a><br></span><span class="public_quicklink"><a href="#transform_get">transform</a><br></span><span class="public_quicklink"><a href="#type_get">type</a><br></span><span class="public_quicklink"><a href="#visible_get">visible</a><br></span><br>
<b>FUNCTIONS</b><br>
<span class="private_quicklink"><a href="#copy_">copy_</a><br></span><span class="private_quicklink"><a href="#fromCSG">fromCSG</a><br></span><span class="public_quicklink"><a href="#intersect">intersect</a><br></span><span class="public_quicklink"><a href="#inverse">inverse</a><br></span><span class="public_quicklink"><a href="#modified">modified</a><br></span><span class="public_quicklink"><a href="#subtract">subtract</a><br></span><span class="private_quicklink"><a href="#toCSG">toCSG</a><br></span><span class="public_quicklink"><a href="#union">union</a><br></span><br>
<b>STATIC</b><br>
<span class="private_quicklink"><a href="#OPACITY_COMPARATOR">OPACITY_COMPARATOR</a><br></span><span class="private_quicklink"><a href="#types">types</a><br></span><br><br><br>
<center><small><a href="https://github.com/xtk/X/blob/master/objects/cube.js" target="_blank">SOURCECODE</a><br></small></center>
</div>
<br><br><br>
</body>
</html>