Normand Briere
2019-08-06 b3ae4e889872ca0b9ca76f1d17b2f0b961226729
GroupEditor.java
....@@ -23,6 +23,302 @@
2323 DragGestureListener, DragSourceListener, DropTargetListener,
2424 ItemListener // ListSelectionListener
2525 {
26
+
27
+ public void AddSkyboxButton(String f, String s, cGridBag row)
28
+ {
29
+ cButton skyboxButton;
30
+ final String path = "cubemaps/" + f + "-skyboxes/" + s;
31
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
33
+ skyboxButton.setToolTipText(s);
34
+ skyboxButton.addActionListener(new ActionListener()
35
+ {
36
+ @Override
37
+ public void actionPerformed(ActionEvent e)
38
+ {
39
+ ChangeSkybox(path);
40
+ }
41
+ });
42
+ }
43
+
44
+ public void AddSkyboxTab0(JTabbedPane skyboxpanel)
45
+ {
46
+ cGridBag tab0 = new cGridBag().setVertical(true);
47
+
48
+ tab0.setName("Urban");
49
+ skyboxpanel.add(tab0);
50
+
51
+ cGridBag row0 = new cGridBag();
52
+ cGridBag row1 = new cGridBag();
53
+ cGridBag row2 = new cGridBag();
54
+ cGridBag row3 = new cGridBag();
55
+ cGridBag row4 = new cGridBag();
56
+ cGridBag row5 = new cGridBag();
57
+ cGridBag row6 = new cGridBag();
58
+
59
+ AddSkyboxButton("default", "rgb", row0);
60
+ //AddSkyboxButton("default", "cornell", row0);
61
+ AddSkyboxButton("penguins", "dust", row0);
62
+ AddSkyboxButton("penguins", "tropic", row0);
63
+ AddSkyboxButton("penguins", "yonder", row0);
64
+
65
+ AddSkyboxButton("default", "uffizi", row1);
66
+ AddSkyboxButton("bridge", "Bridge", row1);
67
+ AddSkyboxButton("bridge", "Bridge2", row1);
68
+ AddSkyboxButton("urban", "GamlaStan2", row1);
69
+
70
+ AddSkyboxButton("urban", "Parliament", row2);
71
+ AddSkyboxButton("urban", "Roundabout", row2);
72
+ AddSkyboxButton("urban", "SaintLazarusChurch", row2);
73
+ AddSkyboxButton("urban", "SaintLazarusChurch2", row2);
74
+
75
+ AddSkyboxButton("urban", "SaintLazarusChurch3", row3);
76
+ AddSkyboxButton("urban", "UnionSquare", row3);
77
+ AddSkyboxButton("urban", "Medborgarplatsen", row3);
78
+ AddSkyboxButton("park", "BerzeliiPark", row3);
79
+
80
+ AddSkyboxButton("park", "Buddha", row4);
81
+ AddSkyboxButton("park", "CNTower2", row4);
82
+ AddSkyboxButton("park", "NiagaraFalls1", row4);
83
+ AddSkyboxButton("park", "NiagaraFalls3", row4);
84
+
85
+ AddSkyboxButton("park", "Park", row5);
86
+ AddSkyboxButton("park", "Pond", row5);
87
+ AddSkyboxButton("park", "Skansen", row5);
88
+ AddSkyboxButton("park", "Skansen2", row5);
89
+
90
+ AddSkyboxButton("park", "Skansen3", row6);
91
+ AddSkyboxButton("park", "Skansen4", row6);
92
+ AddSkyboxButton("park", "Skansen5", row6);
93
+ AddSkyboxButton("persson", "VancouverConventionCentre", row6);
94
+
95
+ tab0.add(row0);
96
+ tab0.add(row1);
97
+ tab0.add(row2);
98
+ tab0.add(row3);
99
+ tab0.add(row4);
100
+ tab0.add(row5);
101
+ tab0.add(row6);
102
+
103
+ for (int i=5; --i>=0;)
104
+ {
105
+ //oe.toolboxPanel.Return();
106
+ //tab0.add(new cGridBag());
107
+ }
108
+ }
109
+
110
+ public void AddSkyboxTab1(JTabbedPane skyboxpanel)
111
+ {
112
+ cGridBag tab0 = new cGridBag().setVertical(true);
113
+
114
+ tab0.setName("Nature");
115
+ skyboxpanel.add(tab0);
116
+
117
+ cGridBag row0 = new cGridBag();
118
+ cGridBag row1 = new cGridBag();
119
+ cGridBag row2 = new cGridBag();
120
+ cGridBag row3 = new cGridBag();
121
+ cGridBag row4 = new cGridBag();
122
+ cGridBag row5 = new cGridBag();
123
+ cGridBag row6 = new cGridBag();
124
+
125
+ AddSkyboxButton("beach", "HeartInTheSand", row0);
126
+ AddSkyboxButton("beach", "LarnacaBeach", row0);
127
+ AddSkyboxButton("beach", "PalmTrees", row0);
128
+ AddSkyboxButton("beach", "Tenerife", row0);
129
+
130
+ AddSkyboxButton("beach", "Tenerife2", row1);
131
+ AddSkyboxButton("beach", "Tenerife3", row1);
132
+ AddSkyboxButton("field", "FishPond", row1);
133
+ AddSkyboxButton("field", "Footballfield", row1);
134
+
135
+ AddSkyboxButton("field", "Meadow", row2);
136
+ AddSkyboxButton("field", "Sorsele", row2);
137
+ AddSkyboxButton("field", "Sorsele2", row2);
138
+ AddSkyboxButton("field", "Sorsele3", row2);
139
+
140
+ AddSkyboxButton("forest", "Brudslojan", row3);
141
+ AddSkyboxButton("forest", "Langholmen2", row3);
142
+ AddSkyboxButton("forest", "Plants", row3);
143
+ AddSkyboxButton("mountain", "Maskonaive", row3);
144
+
145
+ AddSkyboxButton("mountain", "Maskonaive2", row4);
146
+ AddSkyboxButton("mountain", "Maskonaive3", row4);
147
+ AddSkyboxButton("mountain", "Teide", row4);
148
+ AddSkyboxButton("park", "Tantolunden4", row4);
149
+
150
+ AddSkyboxButton("park", "Stairs", row5);
151
+ AddSkyboxButton("default", "skycube", row6);
152
+ AddSkyboxButton("rocky", "Langholmen", row5);
153
+ AddSkyboxButton("rocky", "Skinnarviksberget", row5);
154
+
155
+ AddSkyboxButton("rocky", "Tantolunden6", row5);
156
+ AddSkyboxButton("default", "CloudyHills", row6);
157
+ AddSkyboxButton("daz", "Autumn", row6);
158
+ AddSkyboxButton("daz", "MountainTrail", row6);
159
+ /*
160
+Autumn
161
+Greenlands
162
+MountainTrail
163
+Oasis
164
+TheRock
165
+TopOfTheWorld
166
+Winter
167
+ */
168
+
169
+ tab0.add(row0);
170
+ tab0.add(row1);
171
+ tab0.add(row2);
172
+ tab0.add(row3);
173
+ tab0.add(row4);
174
+ tab0.add(row5);
175
+ tab0.add(row6);
176
+
177
+ for (int i=5; --i>=0;)
178
+ {
179
+ //oe.toolboxPanel.Return();
180
+ //tab0.add(new cGridBag());
181
+ }
182
+ }
183
+
184
+ public void AddSkyboxTab2(JTabbedPane skyboxpanel)
185
+ {
186
+ cGridBag tab0 = new cGridBag().setVertical(true);
187
+
188
+ tab0.setName("Night");
189
+ skyboxpanel.add(tab0);
190
+
191
+ cGridBag row0 = new cGridBag();
192
+ cGridBag row1 = new cGridBag();
193
+ cGridBag row2 = new cGridBag();
194
+ cGridBag row3 = new cGridBag();
195
+ cGridBag row4 = new cGridBag();
196
+ cGridBag row5 = new cGridBag();
197
+ cGridBag row6 = new cGridBag();
198
+
199
+ AddSkyboxButton("night", "NightPath", row0);
200
+ AddSkyboxButton("night", "PondNight", row0);
201
+ AddSkyboxButton("night", "Powerlines", row0);
202
+ AddSkyboxButton("night", "SwedishRoyalCastle", row0);
203
+
204
+ AddSkyboxButton("urban", "CNTower", row1);
205
+ AddSkyboxButton("bridge", "ArstaBridge", row1);
206
+ AddSkyboxButton("rocky", "Riddarfjarden", row1);
207
+ AddSkyboxButton("penguins", "sleepyhollow", row1);
208
+
209
+ AddSkyboxButton("penguins", "kenon_star", row2);
210
+ AddSkyboxButton("persson", "corona", row2);
211
+ AddSkyboxButton("persson", "spaceskybox", row2);
212
+ AddSkyboxButton("indoors", "Vasa", row2);
213
+
214
+ AddSkyboxButton("winter", "Backyard", row3);
215
+ AddSkyboxButton("winter", "Creek", row3);
216
+ AddSkyboxButton("winter", "FootballField3", row3);
217
+ AddSkyboxButton("winter", "Forest", row3);
218
+
219
+ AddSkyboxButton("winter", "HornstullsStrand2", row4);
220
+ AddSkyboxButton("winter", "House", row4);
221
+ AddSkyboxButton("winter", "IceLake", row4);
222
+ AddSkyboxButton("winter", "IceRiver", row4);
223
+
224
+ AddSkyboxButton("winter", "Park3", row5);
225
+ AddSkyboxButton("winter", "PondWinter", row5);
226
+ AddSkyboxButton("winter", "Tantolunden5", row5);
227
+ AddSkyboxButton("winter", "Vindelalven", row5);
228
+
229
+ AddSkyboxButton("daz", "TheRock", row6);
230
+ AddSkyboxButton("daz", "TopOfTheWorld", row6);
231
+ AddSkyboxButton("daz", "Winter", row6);
232
+ AddSkyboxButton("mountain", "Ryfjallet", row6);
233
+
234
+ tab0.add(row0);
235
+ tab0.add(row1);
236
+ tab0.add(row2);
237
+ tab0.add(row3);
238
+ tab0.add(row4);
239
+ tab0.add(row5);
240
+ tab0.add(row6);
241
+
242
+ for (int i=5; --i>=0;)
243
+ {
244
+ //oe.toolboxPanel.Return();
245
+ //tab0.add(new cGridBag());
246
+ }
247
+ }
248
+
249
+ public void AddSkyboxTab3(JTabbedPane skyboxpanel)
250
+ {
251
+ cGridBag tab0 = new cGridBag().setVertical(true);
252
+
253
+ tab0.setName("Others");
254
+ skyboxpanel.add(tab0);
255
+
256
+ cGridBag row0 = new cGridBag();
257
+ cGridBag row1 = new cGridBag();
258
+ cGridBag row2 = new cGridBag();
259
+ cGridBag row3 = new cGridBag();
260
+ cGridBag row4 = new cGridBag();
261
+ cGridBag row5 = new cGridBag();
262
+ cGridBag row6 = new cGridBag();
263
+
264
+ AddSkyboxButton("mayhem", "afterrain", row0);
265
+ AddSkyboxButton("mayhem", "aqua4", row0);
266
+ AddSkyboxButton("mayhem", "aqua9", row0);
267
+ AddSkyboxButton("mayhem", "flame", row0);
268
+
269
+ AddSkyboxButton("mayhem", "h2s", row1);
270
+ AddSkyboxButton("mayhem", "prehistoric", row1);
271
+ AddSkyboxButton("mayhem", "scorched", row1);
272
+ AddSkyboxButton("penguins", "desertdawn", row1);
273
+
274
+ AddSkyboxButton("persson", "Citadella", row2);
275
+ AddSkyboxButton("persson", "Citadella2", row2);
276
+ AddSkyboxButton("persson", "clouds1", row2);
277
+ AddSkyboxButton("penguins", "wrath", row2);
278
+
279
+ AddSkyboxButton("persson", "FishermansBastion", row3);
280
+ AddSkyboxButton("persson", "HeroesSquare", row3);
281
+ AddSkyboxButton("indoors", "DallasW", row3);
282
+ AddSkyboxButton("indoors", "MarriottMadisonWest", row3);
283
+
284
+ AddSkyboxButton("persson", "LancellottiChapel", row4);
285
+ AddSkyboxButton("persson", "PereaBeach1", row4);
286
+ AddSkyboxButton("persson", "PereaBeach2", row4);
287
+ AddSkyboxButton("persson", "redeclipse", row4);
288
+
289
+ AddSkyboxButton("daz", "Greenlands", row5);
290
+ AddSkyboxButton("daz", "Oasis", row5);
291
+ AddSkyboxButton("elyvisions", "arch3", row5);
292
+ AddSkyboxButton("elyvisions", "calm_sea", row5);
293
+
294
+ AddSkyboxButton("elyvisions", "rainbow", row6);
295
+ AddSkyboxButton("elyvisions", "distant_sunset", row6);
296
+ AddSkyboxButton("elyvisions", "heaven", row6);
297
+ AddSkyboxButton("elyvisions", "hot", row6);
298
+
299
+ tab0.add(row0);
300
+ tab0.add(row1);
301
+ tab0.add(row2);
302
+ tab0.add(row3);
303
+ tab0.add(row4);
304
+ tab0.add(row5);
305
+ tab0.add(row6);
306
+
307
+ for (int i=5; --i>=0;)
308
+ {
309
+ //oe.toolboxPanel.Return();
310
+ //tab0.add(new cGridBag());
311
+ }
312
+ }
313
+
314
+ public void ChangeSkybox(String name)
315
+ {
316
+ //cameraView.envyoff = false;
317
+ group.skyboxname = name;
318
+ group.skyboxext = "jpg";
319
+ cameraView.repaint();
320
+ }
321
+
26322 //ObjEditor objEditor;
27323 public void closeUI2()
28324 {
....@@ -60,9 +356,9 @@
60356 this.copy = this.group = group;
61357 //selectees = this.group.selectees;
62358
63
- if (copy.versions == null)
359
+ if (copy.versionlist == null)
64360 {
65
- copy.versions = new byte[100][];
361
+ copy.versionlist = new Object3D[100];
66362 copy.versionindex = -1;
67363 }
68364
....@@ -87,9 +383,9 @@
87383
88384 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
89385
90
- if (copy.versions == null)
386
+ if (copy.versionlist == null)
91387 {
92
- copy.versions = new byte[100][];
388
+ copy.versionlist = new Object3D[100];
93389 copy.versionindex = -1;
94390
95391 Save(true);
....@@ -608,7 +904,7 @@
608904 */
609905 cGridBag copyOptionsPanel = new cGridBag();
610906
611
- copyOptionsPanel.preferredHeight = 1;
907
+ copyOptionsPanel.preferredHeight = 2;
612908
613909 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
614910
....@@ -635,32 +931,36 @@
635931 restoreCameraButton.setToolTipText("Restore viewpoint");
636932 restoreCameraButton.addActionListener(this);
637933
638
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
639
- saveButton.setToolTipText("New version");
640
- saveButton.addActionListener(this);
934
+ copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
935
+ saveVersionButton.setToolTipText("Duplicate current version");
936
+ saveVersionButton.addActionListener(this);
641937
642
- copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
643
- undoButton.setToolTipText("Previous version");
644
- undoButton.addActionListener(this);
645
- undoButton.setEnabled(false);
938
+ copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
939
+ deleteVersionButton.setToolTipText("Delete current version");
940
+ deleteVersionButton.addActionListener(this);
941
+
942
+ copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
943
+ previousVersionButton.setToolTipText("Previous version");
944
+ previousVersionButton.addActionListener(this);
945
+ previousVersionButton.setEnabled(false);
646946
647947 cGridBag updown = new cGridBag().setVertical(true);
648948 updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
649
- restoreButton.setToolTipText("Restore current");
949
+ restoreButton.setToolTipText("Undo (restore current version)");
650950 restoreButton.addActionListener(this);
651
- restoreButton.setEnabled(false);
951
+ //restoreButton.setEnabled(false);
652952
653953 updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
- replaceButton.setToolTipText("Replace current");
954
+ replaceButton.setToolTipText("Save (replace current version)");
655955 replaceButton.addActionListener(this);
656
- replaceButton.setEnabled(false);
956
+ //replaceButton.setEnabled(false);
657957
658958 copyOptionsPanel.add(updown);
659959
660
- copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
661
- redoButton.setToolTipText("Next version");
662
- redoButton.addActionListener(this);
663
- redoButton.setEnabled(false);
960
+ copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
961
+ nextVersionButton.setToolTipText("Next version");
962
+ nextVersionButton.addActionListener(this);
963
+ nextVersionButton.setEnabled(false);
664964
665965 oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
666966 liveCB.setToolTipText("Enable animation");
....@@ -688,25 +988,25 @@
688988 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
689989 snapobjectButton.addActionListener(this);
690990 snapobjectButton.setToolTipText("Snap Object");
991
+
992
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
993
+ fourButton.addActionListener(this);
994
+ fourButton.setToolTipText("Show control panel only");
691995 }
692996
693997 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
694998
695
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
696
- fourButton.addActionListener(this);
697
- fourButton.setToolTipText("Show left panel only");
698
-
699
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700
- twoButton.setToolTipText("Show right view only");
999
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1000
+ twoButton.setToolTipText("Show 3D view only");
7011001 twoButton.addActionListener(this);
7021002 this.fullscreenLayout = twoButton;
7031003
704
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
705
- sixButton.setToolTipText("Show left and right");
1004
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1005
+ threeButton.setToolTipText("Show controls and 3D view");
1006
+ threeButton.addActionListener(this);
1007
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1008
+ sixButton.setToolTipText("Show 3D view and controls");
7061009 sixButton.addActionListener(this);
707
-// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
708
-// threeButton.setToolTipText("2-column layout right");
709
-// threeButton.addActionListener(this);
7101010 // oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7111011 // sevenButton.setToolTipText("3-column layout");
7121012 // sevenButton.addActionListener(this);
....@@ -722,28 +1022,30 @@
7221022 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
7231023 //clearButton.addActionListener(this);
7241024
1025
+ cGridBag row1 = new cGridBag();
1026
+
7251027 // INSERT
726
- oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1028
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7271029 gridButton.setToolTipText("Create grid");
7281030 gridButton.addActionListener(this);
7291031
730
- oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1032
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7311033 boxButton.setToolTipText("Create box");
7321034 boxButton.addActionListener(this);
7331035
734
- oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1036
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7351037 sphereButton.setToolTipText("Create sphere");
7361038 sphereButton.addActionListener(this);
7371039
738
- oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1040
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7391041 coneButton.setToolTipText("Create cone");
7401042 coneButton.addActionListener(this);
7411043
742
- oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1044
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7431045 torusButton.setToolTipText("Create torus");
7441046 torusButton.addActionListener(this);
7451047
746
- oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1048
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7471049 superButton.setToolTipText("Create superellipsoid");
7481050 superButton.addActionListener(this);
7491051
....@@ -754,51 +1056,57 @@
7541056 kleinButton.addActionListener(this);
7551057 }
7561058
757
- oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1059
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7581060 particlesButton.setToolTipText("Create particle system");
7591061 particlesButton.addActionListener(this);
7601062
761
- oe.toolboxPanel.Return();
1063
+ oe.toolboxPanel.add(row1);
7621064
763
- oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1065
+ cGridBag row2 = new cGridBag();
1066
+
1067
+ row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7641068 groupButton.setToolTipText("Create group");
7651069 groupButton.addActionListener(this);
7661070
767
- oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1071
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7681072 compositeButton.setToolTipText("Create composite");
7691073 compositeButton.addActionListener(this);
7701074
771
- oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7721076 switchButton.setToolTipText("Create item switcher");
7731077 switchButton.addActionListener(this);
7741078
775
- oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1079
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7761080 loopButton.setToolTipText("Create loop");
7771081 loopButton.addActionListener(this);
7781082
779
- oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1083
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7801084 textureButton.setToolTipText("Create texture");
7811085 textureButton.addActionListener(this);
7821086
783
- oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1087
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7841088 overlayButton.setToolTipText("Create overlay");
7851089 overlayButton.addActionListener(this);
7861090
787
- oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1091
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
7881092 lightButton.setToolTipText("Create light");
7891093 lightButton.addActionListener(this);
7901094
791
- for (int i=6; --i>=0;)
792
- {
793
- oe.toolboxPanel.Return();
794
- oe.toolboxPanel.add(new cGridBag());
795
- oe.toolboxPanel.add(new cGridBag());
796
- oe.toolboxPanel.add(new cGridBag());
797
- oe.toolboxPanel.add(new cGridBag());
798
- oe.toolboxPanel.add(new cGridBag());
799
- oe.toolboxPanel.add(new cGridBag());
800
- oe.toolboxPanel.add(new cGridBag());
801
- }
1095
+ oe.toolboxPanel.add(row2);
1096
+
1097
+ // ENVYMAPS
1098
+ cGridBag skyboxpane = new cGridBag();
1099
+ skyboxpane.preferredHeight = 100;
1100
+
1101
+ oe.toolboxPanel.add(skyboxpane);
1102
+
1103
+ JTabbedPane skyboxpanel = new JTabbedPane();
1104
+ skyboxpane.add(skyboxpanel);
1105
+
1106
+ AddSkyboxTab0(skyboxpanel);
1107
+ AddSkyboxTab1(skyboxpanel);
1108
+ AddSkyboxTab2(skyboxpanel);
1109
+ AddSkyboxTab3(skyboxpanel);
8021110
8031111 // EDIT panel
8041112 editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -806,14 +1114,14 @@
8061114 editButton.addActionListener(this);
8071115
8081116 editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
809
- uneditButton.setToolTipText("Remove selection controls");
1117
+ uneditButton.setToolTipText("Unpin and remove selection controls");
8101118 uneditButton.addActionListener(this);
8111119
8121120 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
8131121 allParamsButton.setToolTipText("Show all controle");
8141122 allParamsButton.addActionListener(this);
8151123
816
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1124
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
8171125 clearPanelButton.setToolTipText("Clear edit panel");
8181126 clearPanelButton.addActionListener(this);
8191127
....@@ -858,8 +1166,8 @@
8581166 versionSlider = (cNumberSlider)sliderPane.getComponent(1);
8591167 sliderPane.preferredHeight = 1;
8601168
861
-// mainPanel.setDividerLocation(0.5); //1.0);
862
-// mainPanel.setResizeWeight(0.5);
1169
+// mainPanel.setDividerLocation(0.1); //1.0);
1170
+ mainPanel.setResizeWeight(0.4);
8631171
8641172 //jList.addListSelectionListener(this);
8651173 oe.jTree.addTreeSelectionListener(this);
....@@ -867,7 +1175,7 @@
8671175 //jTree.setEditable(true);
8681176 oe.jTree.setDragEnabled(true);
8691177 //jTree.setPreferredSize(new Dimension(10,10));
870
- jSP.setPreferredSize(new Dimension(100,200));
1178
+ //jSP.setPreferredSize(new Dimension(100,200));
8711179
8721180 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
8731181
....@@ -879,7 +1187,7 @@
8791187 dgr.addDragGestureListener(this);
8801188 }catch(Exception e) {}
8811189 */
882
- radio.layout = sixButton; // sevenButton;
1190
+ radio.layout = threeButton; // sixButton;
8831191 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8841192 }
8851193
....@@ -930,9 +1238,12 @@
9301238 smoothCB.setToolTipText("Snapping delay");
9311239 smoothCB.addItemListener(this);
9321240
933
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
934
- slowCB.setToolTipText("Smooth interpolation");
935
- slowCB.addItemListener(this);
1241
+// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
1242
+// slowCB.setToolTipText("Smooth interpolation");
1243
+// slowCB.addItemListener(this);
1244
+ panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints);
1245
+ minshaderCB.setToolTipText("Minimal fast shader");
1246
+ minshaderCB.addItemListener(this);
9361247
9371248 // constraints.gridy += 1;
9381249 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
....@@ -1021,7 +1332,7 @@
10211332 }
10221333
10231334 radioButton.SetObject(obj);
1024
- radioButton.layout = sixButton; // sevenButton;
1335
+ radioButton.layout = threeButton; // sixButton;
10251336 radioButton.SetCamera(cameraView.renderCamera, false);
10261337 radioButton.addActionListener(this);
10271338 radioPanel.add(radioButton);
....@@ -1046,6 +1357,8 @@
10461357 cCheckBox localCB;
10471358 cCheckBox crowdCB;
10481359 cCheckBox smoothCB;
1360
+ cCheckBox minshaderCB;
1361
+
10491362 cToggleButton fastCB;
10501363 cCheckBox slowCB;
10511364 cCheckBox boxCB;
....@@ -1116,6 +1429,12 @@
11161429 {
11171430 cameraView.ToggleInertia();
11181431 cameraView.repaint();
1432
+ }
1433
+ else if(e.getSource() == minshaderCB)
1434
+ {
1435
+ Globals.MINSHADER ^= true;
1436
+ cameraView.programInitialized = false;
1437
+ cameraView.repaint();
11191438 }
11201439 else if(e.getSource() == localCB)
11211440 {
....@@ -2139,6 +2458,23 @@
21392458 {
21402459 makeSomething(new Light());
21412460 } else
2461
+// if (source == skybox1Button ||
2462
+// source == skybox2Button ||
2463
+// source == skybox3Button ||
2464
+// source == skybox4Button ||
2465
+// source == skybox5Button ||
2466
+// source == skybox6Button ||
2467
+// source == skybox7Button ||
2468
+// source == skybox11Button ||
2469
+// source == skybox12Button ||
2470
+// source == skybox13Button ||
2471
+// source == skybox14Button ||
2472
+// source == skybox15Button ||
2473
+// source == skybox16Button ||
2474
+// source == skybox17Button)
2475
+// {
2476
+// ChangeSkybox(source);
2477
+// } else
21422478 if (source == csgItem)
21432479 {
21442480 group(new CSG());
....@@ -2224,7 +2560,7 @@
22242560 if (source == computeAOItem)
22252561 {
22262562 Globals.drawMode = CameraPane.OCCLUSION;
2227
- Globals.theRenderer.repaint();
2563
+ cameraView.repaint();
22282564 } else
22292565 if (source == recompileItem)
22302566 {
....@@ -2239,7 +2575,7 @@
22392575 if (source == invariantsItem)
22402576 {
22412577 System.out.println("Invariants:");
2242
- Grafreed.grafreeD.universe.invariants();
2578
+ Grafreed.grafreed.universe.invariants();
22432579 } else
22442580 if (source == memoryItem)
22452581 {
....@@ -2270,33 +2606,40 @@
22702606 {
22712607 ToggleFullScreen();
22722608 } else
2273
- if (source == undoButton)
2609
+ if (source == previousVersionButton)
22742610 {
22752611 // Go to previous version
22762612 //if (!Undo())
22772613 //java.awt.Toolkit.getDefaultToolkit().beep();
2278
- Undo();
2614
+ PreviousVersion();
22792615 } else
22802616 if (source == restoreButton)
22812617 {
22822618 // Restore current version
22832619 Restore();
2620
+ //restoreButton.setEnabled(false);
22842621 } else
22852622 if (source == replaceButton)
22862623 {
22872624 // Overwrite current version
22882625 Replace();
2626
+ //replaceButton.setEnabled(false);
22892627 } else
2290
- if (source == redoButton)
2628
+ if (source == nextVersionButton)
22912629 {
22922630 // Go to next version
2293
- Redo();
2631
+ NextVersion();
22942632 } else
2295
- if (source == saveButton)
2633
+ if (source == saveVersionButton)
22962634 {
22972635 // Save a new version
22982636 if (!Save(true))
22992637 java.awt.Toolkit.getDefaultToolkit().beep();
2638
+ } else
2639
+ if (source == deleteVersionButton)
2640
+ {
2641
+ // Delete a new version
2642
+ DeleteVersion();
23002643 } else
23012644 if (source == oneStepButton)
23022645 {
....@@ -2351,11 +2694,11 @@
23512694 } else
23522695 if (source == undoItem)
23532696 {
2354
- Undo();
2697
+ PreviousVersion();
23552698 } else
23562699 if (source == redoItem)
23572700 {
2358
- Redo();
2701
+ NextVersion();
23592702 } else
23602703 if (source == duplicateItem)
23612704 {
....@@ -3300,8 +3643,8 @@
33003643 // centralPanel.setVisible(true);
33013644 // XYZPanel.setVisible(true);
33023645 bigThree.ClearUI();
3646
+ bigThree.add(scenePanel);
33033647 bigThree.add(centralPanel);
3304
- bigThree.add(XYZPanel);
33053648 bigThree.FlushUI();
33063649
33073650 cameraView.requestFocusInWindow();
....@@ -3381,8 +3724,8 @@
33813724 // centralPanel.setVisible(true);
33823725 // XYZPanel.setVisible(false);
33833726 bigThree.ClearUI();
3384
- bigThree.add(scenePanel);
33853727 bigThree.add(centralPanel);
3728
+ bigThree.add(scenePanel);
33863729 bigThree.FlushUI();
33873730
33883731 cameraView.requestFocusInWindow();
....@@ -3488,10 +3831,10 @@
34883831 {
34893832 Object3D child = (Object3D)e.nextElement();
34903833 if(child.editWindow != null)
3491
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
34923834 child.pinned = false;
34933835 child.CloseUI();
34943836 listUI.remove(child);
3837
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
34953838
34963839 //child.editWindow = null; // ???????????
34973840 }
....@@ -3510,6 +3853,7 @@
35103853 obj.CloseUI();
35113854 }
35123855 listUI.clear();
3856
+ SetPinStates(group.selection.size() > 0);
35133857 refreshContents(true);
35143858 } else
35153859 if (source == allParamsButton)
....@@ -3596,6 +3940,7 @@
35963940 radio.layout.doClick();
35973941
35983942 ClearUnpinned();
3943
+
35993944 //Grafreed.Assert(group != null);
36003945 //Grafreed.Assert(group.selection != null);
36013946 SetPinStates(group.selection == null || group.selection.size() > 0);
....@@ -3612,11 +3957,13 @@
36123957 } else if (event.getSource() == editCameraItem)
36133958 {
36143959 cameraView.ProtectCamera();
3960
+ cameraView.requestFocusInWindow();
36153961 cameraView.repaint();
36163962 return;
36173963 } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
36183964 {
36193965 cameraView.RevertCamera();
3966
+ cameraView.requestFocusInWindow();
36203967 cameraView.repaint();
36213968 return;
36223969 // } else if (event.getSource() == textureButton)
....@@ -4749,9 +5096,7 @@
47495096
47505097 freezemodel = false;
47515098 }
4752
-
4753
- boolean flashIt = true;
4754
-
5099
+
47555100 public void valueChanged(TreeSelectionEvent e)
47565101 //public boolean handleEvent(Event event)
47575102 {
....@@ -4826,6 +5171,8 @@
48265171 uneditButton.setEnabled(enabled);
48275172 unselectButton.setEnabled(enabled);
48285173 flashSelectionButton.setEnabled(enabled);
5174
+
5175
+ clearPanelButton.setEnabled(!listUI.isEmpty());
48295176 }
48305177
48315178 void refreshContents(boolean cp)
....@@ -5666,7 +6013,6 @@
56666013
56676014 cButton restoreCameraButton;
56686015
5669
- cButton saveButton;
56706016 cButton oneStepButton;
56716017
56726018 cButton groupButton;
....@@ -5676,6 +6022,22 @@
56766022 cButton loopButton;
56776023 cButton textureButton;
56786024
6025
+ cButton skybox1Button;
6026
+ cButton skybox2Button;
6027
+ cButton skybox3Button;
6028
+ cButton skybox4Button;
6029
+ cButton skybox5Button;
6030
+ cButton skybox6Button;
6031
+ cButton skybox7Button;
6032
+
6033
+ cButton skybox11Button;
6034
+ cButton skybox12Button;
6035
+ cButton skybox13Button;
6036
+ cButton skybox14Button;
6037
+ cButton skybox15Button;
6038
+ cButton skybox16Button;
6039
+ cButton skybox17Button;
6040
+
56796041 cButton gridButton;
56806042 cButton boxButton;
56816043 cButton sphereButton;