.. | .. |
---|
52 | 52 | perspective = true; |
---|
53 | 53 | break; |
---|
54 | 54 | case 1: // '\001' |
---|
55 | | - location = LA.newVector(4, 0, 0); |
---|
| 55 | + location = LA.newVector(0, 0, 4); // Needed for translation direction |
---|
56 | 56 | perspective = false; |
---|
57 | 57 | break; |
---|
58 | 58 | case 2: // '\002' |
---|
.. | .. |
---|
63 | 63 | //LA.matXRotate(fromScreen, LA.toRadians(90)); |
---|
64 | 64 | break; |
---|
65 | 65 | case 3: // '\003' |
---|
66 | | - location = LA.newVector(0, 0, 4); |
---|
| 66 | + location = LA.newVector(4, 0, 0); // Needed for translation direction |
---|
67 | 67 | //LA.matZRotate(toScreen, LA.toRadians(-90)); |
---|
68 | 68 | //LA.matXRotate(toScreen, LA.toRadians(-90)); |
---|
69 | 69 | //LA.matXRotate(fromScreen, LA.toRadians(90)); |
---|
.. | .. |
---|
476 | 476 | cVector location; |
---|
477 | 477 | cVector lookAt; |
---|
478 | 478 | cVector direction; |
---|
479 | | - double toScreen[][]; |
---|
480 | | - double fromScreen[][]; |
---|
| 479 | + double[][] toScreen; |
---|
| 480 | + double[][] fromScreen; |
---|
481 | 481 | boolean perspective; |
---|
482 | 482 | int hAspect = 0; // Free camera |
---|
483 | 483 | int vAspect; |
---|
.. | .. |
---|
24 | 24 | int flags; |
---|
25 | 25 | Rectangle bounds; |
---|
26 | 26 | Camera camera; |
---|
27 | | - double toScreen[][]; |
---|
| 27 | + double[][] toScreen; |
---|
28 | 28 | iCameraPane pane; |
---|
29 | 29 | Graphics g; |
---|
30 | 30 | int DX, DY; |
---|
.. | .. |
---|
32 | 32 | |
---|
33 | 33 | double scale; // Distance from clicked point to origin |
---|
34 | 34 | |
---|
35 | | - static double matbuffer[][] = new double[4][4]; |
---|
| 35 | + static double[][] matbuffer = new double[4][4]; |
---|
36 | 36 | } |
---|
.. | .. |
---|
11 | 11 | { |
---|
12 | 12 | } |
---|
13 | 13 | |
---|
14 | | - double pv[]; |
---|
15 | | - double qv[]; |
---|
16 | | - double rv[]; |
---|
17 | | - double sv[]; |
---|
18 | | - double norm[]; |
---|
| 14 | + double[] pv; |
---|
| 15 | + double[] qv; |
---|
| 16 | + double[] rv; |
---|
| 17 | + double[] sv; |
---|
| 18 | + double[] norm; |
---|
19 | 19 | int nGood; |
---|
20 | 20 | int nBad; |
---|
21 | 21 | } |
---|
.. | .. |
---|
1367 | 1367 | double cellSize2; |
---|
1368 | 1368 | double tolerance; |
---|
1369 | 1369 | BoundaryRep bRep; |
---|
1370 | | - int nCells[]; |
---|
| 1370 | + int[] nCells; |
---|
1371 | 1371 | cVector minima; |
---|
1372 | 1372 | cVector maxima; |
---|
1373 | 1373 | static Vertex[] triangle = new Vertex[4]; |
---|
.. | .. |
---|
193 | 193 | |
---|
194 | 194 | MorphNode morphnode; |
---|
195 | 195 | |
---|
196 | | - //JLabel morphLabel[]; |
---|
197 | | - cNumberSlider morphField[]; |
---|
| 196 | + //JLabel[] morphLabel; |
---|
| 197 | + cNumberSlider[] morphField; |
---|
198 | 198 | |
---|
199 | 199 | ObjectUI parent; |
---|
200 | 200 | |
---|
.. | .. |
---|
7 | 7 | Object3D morphobject; |
---|
8 | 8 | |
---|
9 | 9 | // MORPH weights |
---|
10 | | - double morphweights[]; |
---|
| 10 | + double[] morphweights; |
---|
11 | 11 | |
---|
12 | 12 | MorphNode(Object3D object) |
---|
13 | 13 | { |
---|
.. | .. |
---|
990 | 990 | object.ExtractBigData(Grafreed.grafreed.universe.versiontable); |
---|
991 | 991 | // if (copy == client) |
---|
992 | 992 | |
---|
| 993 | + assert(!object.HasBigData()); |
---|
| 994 | + |
---|
993 | 995 | Object3D versions[] = object.versionlist; |
---|
994 | 996 | java.util.Hashtable<java.util.UUID, Object3D> versiontable = object.versiontable; // if Grafreed.grafreed.universe |
---|
995 | 997 | object.versionlist = null; |
---|
.. | .. |
---|
1000 | 1002 | |
---|
1001 | 1003 | //byte[] compress = Compress(copy); |
---|
1002 | 1004 | Object3D compress = (Object3D)Grafreed.clone(object); |
---|
| 1005 | + |
---|
| 1006 | + assert(!compress.HasBigData()); |
---|
1003 | 1007 | |
---|
1004 | 1008 | object.parent = parent; |
---|
1005 | 1009 | |
---|
.. | .. |
---|
2004 | 2008 | |
---|
2005 | 2009 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
2006 | 2010 | |
---|
2007 | | - frame.setSize(1280, 860); |
---|
| 2011 | + frame.setSize(1280, 900); |
---|
2008 | 2012 | |
---|
2009 | 2013 | cameraView.requestFocusInWindow(); |
---|
2010 | 2014 | |
---|
.. | .. |
---|
4485 | 4489 | public boolean Save(boolean user) |
---|
4486 | 4490 | { |
---|
4487 | 4491 | System.err.println("Save"); |
---|
4488 | | - Replace(); |
---|
| 4492 | + //Replace(); |
---|
4489 | 4493 | |
---|
4490 | 4494 | if (copy.versionlist == null) |
---|
4491 | 4495 | { |
---|
.. | .. |
---|
4594 | 4598 | { |
---|
4595 | 4599 | Object3D obj = (Object3D)Grafreed.clone(changed.versionlist[copy.versionindex]); |
---|
4596 | 4600 | |
---|
| 4601 | + assert(!obj.HasBigData()); |
---|
| 4602 | + |
---|
4597 | 4603 | boolean temp = CameraPane.SWITCH; |
---|
4598 | 4604 | CameraPane.SWITCH = false; |
---|
4599 | 4605 | |
---|
.. | .. |
---|
33 | 33 | String skyboxname; |
---|
34 | 34 | String skyboxext; |
---|
35 | 35 | |
---|
36 | | - Object3D versionlist[]; |
---|
| 36 | + Object3D[] versionlist; |
---|
37 | 37 | int versionindex = -1; |
---|
38 | 38 | |
---|
39 | 39 | java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
.. | .. |
---|
190 | 190 | } |
---|
191 | 191 | } |
---|
192 | 192 | |
---|
| 193 | + boolean HasBigData() |
---|
| 194 | + { |
---|
| 195 | + if (blockloop) |
---|
| 196 | + return false; |
---|
| 197 | + |
---|
| 198 | + if (bRep != null) |
---|
| 199 | + { |
---|
| 200 | + return true; |
---|
| 201 | + } |
---|
| 202 | + |
---|
| 203 | + blockloop = true; |
---|
| 204 | + |
---|
| 205 | + for (int i = 0; i < Size(); i++) |
---|
| 206 | + { |
---|
| 207 | + Object3D child = (Object3D) get(i); |
---|
| 208 | + if (child == null) |
---|
| 209 | + continue; |
---|
| 210 | + if (child.HasBigData()) |
---|
| 211 | + { |
---|
| 212 | + blockloop = false; |
---|
| 213 | + return true; |
---|
| 214 | + } |
---|
| 215 | + } |
---|
| 216 | + |
---|
| 217 | + blockloop = false; |
---|
| 218 | + return false; |
---|
| 219 | + } |
---|
| 220 | + |
---|
193 | 221 | void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
194 | 222 | { |
---|
| 223 | + if (blockloop) |
---|
| 224 | + return; |
---|
| 225 | + |
---|
195 | 226 | Object3D o; |
---|
196 | 227 | |
---|
197 | 228 | boolean isnew = false; |
---|
.. | .. |
---|
215 | 246 | hashtable.put(GetUUID(), o); |
---|
216 | 247 | } |
---|
217 | 248 | |
---|
218 | | - if (!blockloop) |
---|
| 249 | + //if (!blockloop) |
---|
219 | 250 | { |
---|
220 | 251 | blockloop = true; |
---|
221 | 252 | |
---|
.. | .. |
---|
227 | 258 | blockloop = false; |
---|
228 | 259 | } |
---|
229 | 260 | |
---|
230 | | - if (isnew) |
---|
| 261 | + //if (isnew) |
---|
231 | 262 | ExtractBigData(o); |
---|
232 | 263 | } |
---|
233 | 264 | |
---|
.. | .. |
---|
338 | 369 | |
---|
339 | 370 | void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
340 | 371 | { |
---|
| 372 | + if (blockloop) |
---|
| 373 | + return; |
---|
| 374 | + |
---|
341 | 375 | if (!hashtable.containsKey(GetUUID())) |
---|
342 | 376 | return; |
---|
343 | 377 | |
---|
344 | 378 | Object3D o = hashtable.get(GetUUID()); |
---|
345 | 379 | |
---|
346 | 380 | RestoreBigData(o); |
---|
347 | | - |
---|
348 | | - if (blockloop) |
---|
349 | | - return; |
---|
350 | 381 | |
---|
351 | 382 | blockloop = true; |
---|
352 | 383 | |
---|
.. | .. |
---|
363 | 394 | void RestoreBigData(Object3D o) |
---|
364 | 395 | { |
---|
365 | 396 | //System.err.println("RestoreBigData : " + this + " <-- " + o); |
---|
| 397 | + Grafreed.Assert(this.bRep == null); |
---|
366 | 398 | |
---|
367 | 399 | this.bRep = o.bRep; |
---|
368 | 400 | if (this.support != null && o.transientrep != null) |
---|
.. | .. |
---|
136 | 136 | { |
---|
137 | 137 | return; |
---|
138 | 138 | } |
---|
139 | | - Vector2f sharedTextureData[]; |
---|
| 139 | + Vector2f[] sharedTextureData; |
---|
140 | 140 | |
---|
141 | 141 | // setup texture coords |
---|
142 | 142 | switch (getParticleType()) |
---|
.. | .. |
---|
132 | 132 | protected Vector3f upVector; |
---|
133 | 133 | protected Vector3f leftVector; |
---|
134 | 134 | protected Vector3f invScale; |
---|
135 | | - protected Particle particles[]; |
---|
| 135 | + protected Particle[] particles; |
---|
136 | 136 | |
---|
137 | 137 | // protected Vector3f particleSpeed; |
---|
138 | 138 | protected int releaseRate; // particles per second |
---|
.. | .. |
---|
131 | 131 | |
---|
132 | 132 | private JFrame frame; |
---|
133 | 133 | private int numLabels; |
---|
134 | | - private JLabel labels[]; |
---|
| 134 | + private JLabel[] labels; |
---|
135 | 135 | private JProgressBar progressBar; |
---|
136 | 136 | private static final int INSET = 20; |
---|
137 | 137 | private static final int SEPARATOR = 5; |
---|
.. | .. |
---|
11 | 11 | { |
---|
12 | 12 | static final long serialVersionUID = -2918094393566350403L; |
---|
13 | 13 | |
---|
14 | | - //private double _data2[][]; // first index: bones, second index: frames |
---|
| 14 | + //private double[][] _data2; // first index: bones, second index: frames |
---|
15 | 15 | //transient |
---|
16 | 16 | public |
---|
17 | | - float _data[][]; // first index: bones, second index: frames |
---|
| 17 | + float[][] _data; // first index: bones, second index: frames |
---|
18 | 18 | public |
---|
19 | 19 | float scale; // may 2014: scale for position |
---|
20 | 20 | private int _numFrames; |
---|