Normand Briere
2019-05-01 504890a7b930ab6b853c49de825ae848e0535339
Control pane
28 files modified
940 ■■■■■ changed files
BezierEditor.java 12 ●●●● patch | view | raw | blame | history
BiparamEditor.java 30 ●●●● patch | view | raw | blame | history
Blob.java 1 ●●●● patch | view | raw | blame | history
BlobEditor.java 101 ●●●● patch | view | raw | blame | history
BoundaryRep.java 1 ●●●● patch | view | raw | blame | history
CSGEditor.java 2 ●●● patch | view | raw | blame | history
CameraPane.java 5 ●●●●● patch | view | raw | blame | history
Composite.java 2 ●●●●● patch | view | raw | blame | history
ConeEditor.java 57 ●●●●● patch | view | raw | blame | history
GenericJoint.java 7 ●●●●● patch | view | raw | blame | history
ImplicitTiler.java 1 ●●●● patch | view | raw | blame | history
KleinEditor.java 12 ●●●●● patch | view | raw | blame | history
LA.java 1 ●●●● patch | view | raw | blame | history
LatheEditor.java 17 ●●●● patch | view | raw | blame | history
Mocap.java 1 ●●●● patch | view | raw | blame | history
MocapEditor.java 12 ●●●● patch | view | raw | blame | history
MorphEditor.java 4 ●●●● patch | view | raw | blame | history
ObjEditor.java 203 ●●●● patch | view | raw | blame | history
Object3D.java 1 ●●●● patch | view | raw | blame | history
ParticleEditor.java 127 ●●●●● patch | view | raw | blame | history
PhysicsEditor.java 1 ●●●● patch | view | raw | blame | history
PointFlowEditor.java 12 ●●●● patch | view | raw | blame | history
RandomEditor.java 19 ●●●●● patch | view | raw | blame | history
SuperEditor.java 69 ●●●● patch | view | raw | blame | history
SwitchEditor.java 8 ●●●● patch | view | raw | blame | history
TorusEditor.java 19 ●●●●● patch | view | raw | blame | history
cSpring.java 10 ●●●●● patch | view | raw | blame | history
cSpringEditor.java 205 ●●●●● patch | view | raw | blame | history
BezierEditor.java
....@@ -30,15 +30,9 @@
3030 {
3131 super.SetupUI2(oe);
3232
33
- oe.ctrlPanel.add(depthLabel = new JLabel("Depth"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
34
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
35
- oe.aConstraints.gridx += 1;
36
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
37
- oe.ctrlPanel.add(depthField = new NumberSlider(0, 5), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
38
- oe.aConstraints.gridy += 1;
39
- oe.aConstraints.gridwidth = 1;
40
- oe.aConstraints.fill = 0;
41
- oe.aConstraints.gridx -= 1;
33
+ oe.ctrlPanel.add(depthLabel = new JLabel("Depth")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
34
+ oe.ctrlPanel.Return();
35
+ oe.ctrlPanel.add(depthField = new NumberSlider(0, 5)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
4236
4337 depthField.setInteger(bezier.GetDepth());
4438 depthField.addChangeListener(this);
BiparamEditor.java
....@@ -67,11 +67,14 @@
6767 oe.aConstraints.gridwidth = 1;
6868 */
6969 super.SetupUI2(oe);
70
-
71
- uDivsField = AddSlider(oe.ctrlPanel, "U #", biparam.minUDivs, 250+biparam.minUDivs, biparam.uDivs);
72
- Return();
73
- vDivsField = AddSlider(oe.ctrlPanel, "V #", biparam.minVDivs, (int)(500/3.14)+biparam.minVDivs, biparam.vDivs);
74
- Return();
70
+
71
+ uvPanel = new cGridBag().setVertical(true);
72
+
73
+ uDivsField = (cNumberSlider)AddSlider(uvPanel, "U #", biparam.minUDivs, 250+biparam.minUDivs, biparam.uDivs).getComponent(1);
74
+ vDivsField = (cNumberSlider)AddSlider(uvPanel, "V #", biparam.minVDivs, (int)(500/3.1416)+biparam.minVDivs, biparam.vDivs).getComponent(1);
75
+
76
+ oe.ctrlPanel.add(uvPanel);
77
+ oe.ctrlPanel.Return();
7578 // oe.aConstraints.gridwidth = 1;
7679 // oe.aConstraints.fill = GridBagConstraints.VERTICAL;
7780 // oe.ctrlPanel.add(uDivsLabel = new JLabel("U #"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
....@@ -98,17 +101,11 @@
98101 // oe.aConstraints.gridwidth = 1;
99102 if (biparam instanceof Cone) // ends)
100103 {
101
- oe.aConstraints.gridy += 1;
102
- oe.aConstraints.gridwidth = 3;
103
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
104
- oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", biparam.endcaps), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
104
+ oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", biparam.endcaps)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
105105 optionCB.addItemListener(this);
106
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
107
- oe.aConstraints.gridwidth = 1;
106
+oe.ctrlPanel.Return();
108107 //endcaps.setState(!biparam.endcaps);
109108 }
110
- oe.aConstraints.gridy += 1;
111
- oe.aConstraints.gridx = 0;
112109 }
113110
114111 void Clear()
....@@ -246,8 +243,9 @@
246243 // oe.ctrlPanel.remove(uDivsLabel);
247244 // oe.ctrlPanel.remove(vDivsLabel);
248245 // //oe.ctrlPanel.repaint();
249
- Remove(uDivsField);
250
- Remove(vDivsField);
246
+// Remove(uDivsField);
247
+// Remove(vDivsField);
248
+ oe.ctrlPanel.remove(uvPanel);
251249
252250 super.closeUI();
253251 }
....@@ -269,6 +267,8 @@
269267 cNumberSlider vDivsField;
270268 JCheckBox optionCB;
271269
270
+ cGridBag uvPanel;
271
+
272272 ObjectUI parent;
273273
274274 //ObjEditor objEditor;
Blob.java
....@@ -82,6 +82,7 @@
8282
8383 void retile()
8484 {
85
+ new Exception().printStackTrace();
8586 System.exit(0);
8687 ClearList();
8788 bRep = (new ImplicitTiler(this, ImplicitTiler.SURFACEID, true, true, true, cellSize, cellSize, tolerance, true)).bRep;
BlobEditor.java
....@@ -43,61 +43,56 @@
4343 {
4444 super.SetupUI2(oe);
4545
46
- oe.ctrlPanel.add(thresholdLabel = new JLabel("Threshold"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
47
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
48
- oe.aConstraints.gridx += 1;
49
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
50
- oe.ctrlPanel.add(thresholdField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
51
- thresholdField.addActionListener(this);
52
- oe.aConstraints.gridwidth = 1;
53
- thresholdField.setFloat(blob.threshold);
54
- oe.aConstraints.fill = 0;
55
- oe.aConstraints.gridx = 0;
56
- oe.aConstraints.gridy += 1;
57
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
58
- oe.ctrlPanel.add(newButton = new JButton("New Ball"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
59
- newButton.addActionListener(this);
60
- oe.aConstraints.gridx += 2;
61
- oe.ctrlPanel.add(deleteButton = new JButton("Delete Ball"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
62
- deleteButton.addActionListener(this);
63
- oe.aConstraints.gridwidth = 1;
64
- oe.aConstraints.gridx = 0;
65
- oe.aConstraints.gridy += 1;
66
- oe.ctrlPanel.add(strengthLabel = new JLabel("Strength"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
67
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
68
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
69
- oe.aConstraints.gridx += 1;
70
- oe.ctrlPanel.add(strengthField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
71
- strengthField.addActionListener(this);
72
- oe.aConstraints.gridwidth = 1;
73
- toCompFields();
74
- oe.aConstraints.fill = 0;
75
- oe.aConstraints.gridx = 0;
76
- oe.aConstraints.gridy += 1;
77
-
78
- oe.ctrlPanel.add(sizeLabel = new JLabel("Depth"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
79
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
80
- oe.aConstraints.gridx += 1;
81
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
82
- oe.ctrlPanel.add(sizeField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
83
- sizeField.addActionListener(this);
84
- oe.aConstraints.gridwidth = 1;
85
- sizeField.setFloat(blob.cellSize);
86
- oe.aConstraints.gridy += 1;
87
- oe.aConstraints.fill = 0;
88
- oe.aConstraints.gridx = 0;
46
+ oe.ctrlPanel.add(thresholdLabel = new JLabel("Threshold:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
8947
90
- oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
91
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
92
- oe.aConstraints.gridx += 1;
93
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
94
- oe.ctrlPanel.add(tolField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
48
+ oe.ctrlPanel.Return();
49
+
50
+ oe.ctrlPanel.add(thresholdField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
51
+ thresholdField.addActionListener(this);
52
+ thresholdField.setFloat(blob.threshold);
53
+
54
+ oe.ctrlPanel.Return();
55
+
56
+ oe.ctrlPanel.add(newButton = new JButton("New Ball")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
57
+ newButton.addActionListener(this);
58
+ oe.ctrlPanel.Return();
59
+
60
+ oe.ctrlPanel.add(deleteButton = new JButton("Delete Ball")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
61
+ deleteButton.addActionListener(this);
62
+ oe.ctrlPanel.Return();
63
+
64
+ /*
65
+ oe.ctrlPanel.add(strengthLabel = new JLabel("Strength:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
66
+
67
+ oe.ctrlPanel.Return();
68
+
69
+ oe.ctrlPanel.add(strengthField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
70
+ strengthField.addActionListener(this);
71
+
72
+ oe.ctrlPanel.Return();
73
+ */
74
+
75
+ toCompFields();
76
+
77
+ oe.ctrlPanel.add(sizeLabel = new JLabel("Depth:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
78
+
79
+ oe.ctrlPanel.Return();
80
+
81
+ oe.ctrlPanel.add(sizeField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
82
+ sizeField.addActionListener(this);
83
+ sizeField.setFloat(blob.cellSize);
84
+
85
+ oe.ctrlPanel.Return();
86
+
87
+ oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
88
+
89
+ oe.ctrlPanel.Return();
90
+
91
+ oe.ctrlPanel.add(tolField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
9592 tolField.addActionListener(this);
96
- oe.aConstraints.gridwidth = 1;
97
- tolField.setFloat(blob.tolerance);
98
- oe.aConstraints.gridy += 1;
99
- oe.aConstraints.fill = 0;
100
- oe.aConstraints.gridx = 0;
93
+ tolField.setFloat(blob.tolerance);
94
+
95
+ oe.ctrlPanel.Return();
10196 }
10297
10398 public void closeUI()
BoundaryRep.java
....@@ -6354,6 +6354,7 @@
63546354
63556355 void InitWeights()
63566356 {
6357
+ new Exception().printStackTrace();
63576358 System.exit(0);
63586359 int n = 0;
63596360 int b = 0;
CSGEditor.java
....@@ -92,7 +92,7 @@
9292 //oe.aConstraints.gridy += 1;
9393 oe.aConstraints.gridx += 1;
9494
95
- Return();
95
+ oe.ctrlPanel.Return();
9696
9797 list = new Vector();
9898 list.add("Smooth");
CameraPane.java
....@@ -4208,6 +4208,7 @@
42084208
42094209 com.sun.opengl.util.texture.Texture CompressTexture2(String name)
42104210 {
4211
+ new Exception().printStackTrace();
42114212 System.exit(0);
42124213 com.sun.opengl.util.texture.Texture texture = null;
42134214
....@@ -13946,6 +13947,7 @@
1394613947
1394713948 public void run()
1394813949 {
13950
+ new Exception().printStackTrace();
1394913951 System.exit(0);
1395013952 for (;;)
1395113953 {
....@@ -15144,6 +15146,7 @@
1514415146
1514515147 void SelectParent()
1514615148 {
15149
+ new Exception().printStackTrace();
1514715150 System.exit(0);
1514815151 Composite group = (Composite) object;
1514915152 java.util.Vector selectees = new java.util.Vector(group.selection);
....@@ -15167,6 +15170,7 @@
1516715170
1516815171 void SelectChildren()
1516915172 {
15173
+ new Exception().printStackTrace();
1517015174 System.exit(0);
1517115175 /*
1517215176 Composite group = (Composite) object;
....@@ -16280,6 +16284,7 @@
1628016284 {
1628116285 if (!selection)
1628216286 {
16287
+ new Exception().printStackTrace();
1628316288 System.exit(0);
1628416289 return;
1628516290 }
Composite.java
....@@ -205,6 +205,7 @@
205205
206206 boolean HasLoops()
207207 {
208
+ new Exception().printStackTrace();
208209 System.exit(0);
209210 if (blockloop)
210211 {
....@@ -348,6 +349,7 @@
348349
349350 void getBounds0(cVector minima, cVector maxima, boolean xform)
350351 {
352
+ new Exception().printStackTrace();
351353 System.exit(0);
352354 minima.x = minima.y = minima.z = 1E10;
353355 maxima.x = maxima.y = maxima.z = -1E10;
ConeEditor.java
....@@ -8,6 +8,8 @@
88 import javax.swing.*;
99 import javax.swing.event.*;
1010
11
+import grafeme.ui.*;
12
+
1113 class ConeEditor extends BiparamEditor implements ChangeListener, ObjectUI
1214 {
1315
....@@ -49,7 +51,6 @@
4951 {
5052 super.SetupUI2(oe);
5153
52
- oe.aConstraints.fill = 0;
5354 /*
5455 ctrlPanel.add(baseLabel = new JLabel("Base"), aConstraints);
5556 aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -58,19 +59,15 @@
5859 ctrlPanel.add(baseField = new NumberField(), aConstraints);
5960 baseField.setVector(cone.base);
6061 baseField.addActionListener(this);
61
- aConstraints.fill = 0;
62
- aConstraints.gridy += 1;
63
- aConstraints.gridx -= 1;
6462 */
65
- oe.aConstraints.gridwidth = 1;
66
- oe.ctrlPanel.add(baseRadLabel = new JLabel("Top"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
67
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
68
- oe.aConstraints.gridx += 1;
69
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
70
- oe.ctrlPanel.add(baseRadField = new NumberSlider(0.001,10,1), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
63
+ topPanel = new cGridBag();
64
+ topPanel.add(baseRadLabel = new JLabel("Top")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
65
+ topPanel.add(baseRadField = new cNumberSlider(this, 0.001,10,1)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
7166 baseRadField.setFloat(cone.baseRadius);
72
- baseRadField.addChangeListener(this);
73
- /*
67
+
68
+ oe.ctrlPanel.add(topPanel);
69
+ oe.ctrlPanel.Return();
70
+ /*
7471 aConstraints.fill = 0;
7572 aConstraints.gridx -= 1;
7673 aConstraints.gridy += 1;
....@@ -83,21 +80,13 @@
8380 apexField.setVector(cone.apex);
8481 apexField.addActionListener(this);
8582 */
86
- oe.aConstraints.fill = 0;
87
- oe.aConstraints.gridx -= 1;
88
- oe.aConstraints.gridy += 1;
89
- oe.aConstraints.gridwidth = 1;
90
- oe.ctrlPanel.add(apexRadLabel = new JLabel("Base"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
91
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
92
- oe.aConstraints.gridx += 1;
93
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
94
- oe.ctrlPanel.add(apexRadField = new NumberSlider(0.001,10,1), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
95
- oe.aConstraints.gridwidth = 1;
96
- oe.aConstraints.gridx -= 1;
97
- oe.aConstraints.fill = 0;
83
+ basePanel = new cGridBag();
84
+ basePanel.add(apexRadLabel = new JLabel("Base")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
85
+ basePanel.add(apexRadField = new cNumberSlider(this, 0.001,10,1)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
9886 apexRadField.setFloat(cone.apexRadius);
99
- apexRadField.addChangeListener(this);
100
- oe.aConstraints.gridy += 1;
87
+
88
+ oe.ctrlPanel.add(basePanel);
89
+ oe.ctrlPanel.Return();
10190 }
10291
10392 public void closeUI()
....@@ -106,10 +95,12 @@
10695
10796 apexRadField.removeChangeListener(this);
10897 baseRadField.removeChangeListener(this);
109
- oe.ctrlPanel.remove(apexRadField);
110
- oe.ctrlPanel.remove(baseRadField);
111
- oe.ctrlPanel.remove(apexRadLabel);
112
- oe.ctrlPanel.remove(baseRadLabel);
98
+// oe.ctrlPanel.remove(apexRadField);
99
+// oe.ctrlPanel.remove(baseRadField);
100
+// oe.ctrlPanel.remove(apexRadLabel);
101
+// oe.ctrlPanel.remove(baseRadLabel);
102
+ oe.ctrlPanel.remove(topPanel);
103
+ oe.ctrlPanel.remove(basePanel);
113104 //oe.ctrlPanel.repaint();
114105
115106 super.closeUI();
....@@ -192,9 +183,11 @@
192183 JLabel apexRadLabel;
193184 //NumberField baseField;
194185 //NumberField apexField;
195
- NumberSlider baseRadField;
196
- NumberSlider apexRadField;
186
+ cNumberSlider baseRadField;
187
+ cNumberSlider apexRadField;
197188
189
+ cGridBag topPanel;
190
+ cGridBag basePanel;
198191 //BiparamEditor objEditor;
199192 }
200193
GenericJoint.java
....@@ -873,6 +873,7 @@
873873
874874 if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE)
875875 {
876
+ new Exception().printStackTrace();
876877 System.exit(0);
877878 CompoundShape compoundShape = (CompoundShape) shape;
878879 Transform childTrans = transformsPool.get();
....@@ -903,6 +904,7 @@
903904 {
904905 case BOX_SHAPE_PROXYTYPE:
905906 {
907
+ new Exception().printStackTrace();
906908 System.exit(0);
907909 BoxShape boxShape = (BoxShape) shape;
908910 Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get());
....@@ -914,6 +916,7 @@
914916 }
915917 case SPHERE_SHAPE_PROXYTYPE:
916918 {
919
+ new Exception().printStackTrace();
917920 System.exit(0);
918921 SphereShape sphereShape = (SphereShape) shape;
919922 float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin
....@@ -960,6 +963,7 @@
960963
961964 case STATIC_PLANE_PROXYTYPE:
962965 {
966
+ new Exception().printStackTrace();
963967 System.exit(0);
964968 StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape;
965969 float planeConst = staticPlaneShape.getPlaneConstant();
....@@ -1006,6 +1010,7 @@
10061010
10071011 case CYLINDER_SHAPE_PROXYTYPE:
10081012 {
1013
+ new Exception().printStackTrace();
10091014 System.exit(0);
10101015 CylinderShape cylinder = (CylinderShape) shape;
10111016 int upAxis = cylinder.getUpAxis();
....@@ -1358,6 +1363,7 @@
13581363 // for polyhedral shapes
13591364 if (shape.isPolyhedral())
13601365 {
1366
+ new Exception().printStackTrace();
13611367 System.exit(0);
13621368 PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape;
13631369
....@@ -1427,6 +1433,7 @@
14271433 if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE)
14281434 // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
14291435 {
1436
+ new Exception().printStackTrace();
14301437 System.exit(0);
14311438 ConcaveShape concaveMesh = (ConcaveShape) shape;
14321439 //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30));
ImplicitTiler.java
....@@ -365,6 +365,7 @@
365365
366366 void subdivide(double x[], double y[], double z[], int dimension)
367367 {
368
+ new Exception().printStackTrace();
368369 System.exit(0);
369370 boolean out[] = new boolean[2];
370371 implicit.boxInside(x, y, z, out);
KleinEditor.java
....@@ -38,8 +38,9 @@
3838 {
3939 super.SetupUI2(oe);
4040
41
- radiusField = AddSlider(oe.ctrlPanel, "Radius:", 0, 20.0, klein.radius, 1);
42
- Return();
41
+ radiusPanel = AddSlider(oe.ctrlPanel, "Radius:", 0, 20.0, klein.radius, 1);
42
+ this.radiusField = (cNumberSlider)radiusPanel.getComponent(1);
43
+ oe.ctrlPanel.Return();
4344 }
4445
4546 void Clear()
....@@ -97,6 +98,8 @@
9798
9899 Klein klein;
99100 cNumberSlider radiusField;
101
+
102
+ cGridBag radiusPanel;
100103
101104 public ObjEditor GetEditor()
102105 {
....@@ -111,8 +114,9 @@
111114
112115 public void closeUI()
113116 {
114
- Remove(radiusField);
115
-
117
+ //Remove(radiusField);
118
+
119
+ objEditor.ctrlPanel.remove(radiusPanel);
116120 super.closeUI();
117121 }
118122
LA.java
....@@ -160,6 +160,7 @@
160160
161161 static cVector xformDir(cVector v, double mat[][])
162162 {
163
+ new Exception().printStackTrace();
163164 System.exit(0);
164165 cVector temp = new cVector();
165166 xformDir(v, mat, temp);
LatheEditor.java
....@@ -37,15 +37,16 @@
3737 {
3838 super.SetupUI2(oe);
3939
40
- oe.ctrlPanel.add(typeLabel = new JLabel("Spline Type"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
41
- oe.aConstraints.gridx += 1;
42
- //aConstraints.fill = GridBagConstraints.HORIZONTAL;
43
- //aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
44
- oe.ctrlPanel.add(typeMenu = new JComboBox(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
40
+ oe.ctrlPanel.add(typeLabel = new JLabel("Spline Type:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
41
+
42
+ oe.ctrlPanel.Return();
43
+
44
+ oe.ctrlPanel.add(typeMenu = new JComboBox()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
4545 typeMenu.addActionListener(this);
46
- oe.aConstraints.gridx = 0;
47
- oe.aConstraints.gridy += 1;
48
- typeMenu.addItem("Linear");
46
+
47
+ oe.ctrlPanel.Return();
48
+
49
+ typeMenu.addItem("Linear");
4950 typeMenu.addItem("Quadratic");
5051 typeMenu.addItem("Cubic");
5152 //typeMenu.select(spline.type - 1);
Mocap.java
....@@ -3496,6 +3496,7 @@
34963496 // filters out bad input data
34973497 void FilterAnimData()
34983498 {
3499
+ new Exception().printStackTrace();
34993500 System.exit(0);
35003501
35013502 float[] data; // = bvh.animation.getBoneData(0);
MocapEditor.java
....@@ -70,12 +70,12 @@
7070 */
7171 super.SetupUI2(oe);
7272
73
- frameField = AddSlider(oe.ctrlPanel, "Frame:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.frame);
74
- Return();
75
- firstField = AddSlider(oe.ctrlPanel, "First:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.firstframe);
76
- Return();
77
- lastField = AddSlider(oe.ctrlPanel, "Last:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.lastframe);
78
- Return();
73
+ frameField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Frame:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.frame).getComponent(1);
74
+ oe.ctrlPanel.Return();
75
+ firstField = (cNumberSlider)AddSlider(oe.ctrlPanel, "First:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.firstframe).getComponent(1);
76
+ oe.ctrlPanel.Return();
77
+ lastField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Last:", 0, mocap.bvh.animation.getNumFrames()-1, mocap.lastframe).getComponent(1);
78
+ oe.ctrlPanel.Return();
7979
8080 // oe.aConstraints.gridx = 0;
8181 // oe.aConstraints.gridwidth = 1;
MorphEditor.java
....@@ -70,8 +70,8 @@
7070
7171 for (int i=0; i<morphnode.morphobject.Size(); i++)
7272 {
73
- morphField[i] = AddSlider(oe.ctrlPanel, morphnode.morphobject.get(i).name, 0, 2.0, morphnode.morphweights[i], 1);
74
- Return();
73
+ morphField[i] = (cNumberSlider)AddSlider(oe.ctrlPanel, morphnode.morphobject.get(i).name, 0, 2.0, morphnode.morphweights[i], 1).getComponent(1);
74
+ oe.ctrlPanel.Return();
7575 }
7676 }
7777
ObjEditor.java
....@@ -138,34 +138,40 @@
138138 public void closeUI()
139139 {
140140 //new Exception().printStackTrace();
141
- System.out.println("this = " + this);
142
- System.out.println("objEditor = " + objEditor);
141
+// System.out.println("this = " + this);
142
+// System.out.println("objEditor = " + objEditor);
143143 //nameField.removeActionListener(this);
144
- objEditor.ctrlPanel.remove(nameField);
144
+// objEditor.ctrlPanel.remove(nameField);
145145
146146 if (!GroupEditor.allparams)
147147 return;
148148
149
- objEditor.ctrlPanel.remove(liveCB);
150
- objEditor.ctrlPanel.remove(hideCB);
151
- objEditor.ctrlPanel.remove(markCB);
152
-
153
- objEditor.ctrlPanel.remove(randomCB);
154
- objEditor.ctrlPanel.remove(speedupCB);
155
- objEditor.ctrlPanel.remove(rewindCB);
156
-
157
- objEditor.ctrlPanel.remove(resetButton);
158
- objEditor.ctrlPanel.remove(stepButton);
159
-// objEditor.ctrlPanel.remove(stepAllButton);
160
-// objEditor.ctrlPanel.remove(resetAllButton);
161
- objEditor.ctrlPanel.remove(link2masterCB);
162
- //objEditor.ctrlPanel.remove(flipVCB);
163
- //objEditor.ctrlPanel.remove(texresMenu);
164
- objEditor.ctrlPanel.remove(slowerButton);
165
- objEditor.ctrlPanel.remove(fasterButton);
166
- objEditor.ctrlPanel.remove(remarkButton);
149
+// objEditor.ctrlPanel.remove(liveCB);
150
+// objEditor.ctrlPanel.remove(hideCB);
151
+// objEditor.ctrlPanel.remove(markCB);
152
+//
153
+// objEditor.ctrlPanel.remove(randomCB);
154
+// objEditor.ctrlPanel.remove(speedupCB);
155
+// objEditor.ctrlPanel.remove(rewindCB);
156
+//
157
+// objEditor.ctrlPanel.remove(resetButton);
158
+// objEditor.ctrlPanel.remove(stepButton);
159
+//// objEditor.ctrlPanel.remove(stepAllButton);
160
+//// objEditor.ctrlPanel.remove(resetAllButton);
161
+// objEditor.ctrlPanel.remove(link2masterCB);
162
+// //objEditor.ctrlPanel.remove(flipVCB);
163
+// //objEditor.ctrlPanel.remove(texresMenu);
164
+// objEditor.ctrlPanel.remove(slowerButton);
165
+// objEditor.ctrlPanel.remove(fasterButton);
166
+// objEditor.ctrlPanel.remove(remarkButton);
167167
168
- Remove(normalpushField);
168
+ objEditor.ctrlPanel.remove(namePanel);
169
+ objEditor.ctrlPanel.remove(setupPanel);
170
+ objEditor.ctrlPanel.remove(commandsPanel);
171
+ objEditor.ctrlPanel.remove(pushPanel);
172
+ //objEditor.ctrlPanel.remove(fillPanel);
173
+
174
+ //Remove(normalpushField);
169175 }
170176
171177 public ObjEditor GetEditor()
....@@ -355,7 +361,7 @@
355361 toolbarPanel.setName("Toolbar");
356362 treePanel = new JPanel();
357363 treePanel.setName("Tree");
358
- ctrlPanel = new cGridBag(); // new GridBagLayout());
364
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
359365 ctrlPanel.setName("Edit");
360366 materialPanel = new cGridBag().setVertical(true);
361367 materialPanel.setName("Material");
....@@ -386,7 +392,7 @@
386392 //mainPanel.setLayout(new GridBagLayout());
387393 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
388394 treePanel.setLayout(new GridBagLayout());
389
- ctrlPanel.setLayout(new GridBagLayout());
395
+ //ctrlPanel.setLayout(new GridBagLayout());
390396 //materialPanel.setLayout(new GridBagLayout());
391397
392398 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
....@@ -767,54 +773,44 @@
767773 JButton slowerButton;
768774 JButton fasterButton;
769775 JButton remarkButton;
776
+
777
+ cGridBag namePanel;
778
+ cGridBag setupPanel;
779
+ cGridBag commandsPanel;
780
+ cGridBag pushPanel;
781
+ cGridBag fillPanel;
770782
771
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
783
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
772784 {
773785 JCheckBox cb;
774786
775
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
776
- oe.aConstraints.gridwidth = 1; // 3;
777
-// oe.aConstraints.weightx = 1;
778
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
779
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
787
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
780788 cb.addItemListener(this);
781
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
782
- oe.aConstraints.gridwidth = 1;
783
- oe.aConstraints.gridx += 1;
784789
785790 return cb;
786791 }
787792
788
- cButton AddButton(ObjEditor oe, String label)
793
+ cButton AddButton(cGridBag panel, String label)
789794 {
790795 cButton cb;
791796
792
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
793
- oe.aConstraints.gridwidth = 1;
794
-// oe.aConstraints.weightx = 1;
795
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
796
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797798 cb.addActionListener(this);
798
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
799
- oe.aConstraints.gridwidth = 1;
800
- oe.aConstraints.gridx += 1;
801799
802800 return cb;
803801 }
804802
805
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
803
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
806804 {
807805 JComboBox combo;
808806
809
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
810
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
811
- oe.aConstraints.gridx += 1;
807
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812808 combo.addActionListener(this);
813809
814810 return combo;
815811 }
816812
817
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow)
813
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
818814 {
819815 cGridBag control = new cGridBag();
820816
....@@ -826,12 +822,12 @@
826822 control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
827823 combo.setFloat(current);
828824
829
- ctrlPanel.add(control);
825
+ panel.add(control);
830826
831
- return combo;
827
+ return control;
832828 }
833829
834
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current)
830
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
835831 {
836832 cGridBag control = new cGridBag();
837833
....@@ -839,25 +835,21 @@
839835
840836 JLabel jlabel = new JLabel(label);
841837 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
842
- ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
843
- ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
838
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
839
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
844840 combo.setInteger(current);
845841
846
- ctrlPanel.add(control);
842
+ panel.add(control);
847843
848
- return combo;
844
+ return control;
849845 }
850846
851847 JTextArea AddText(cGridBag ctrlPanel, String name)
852848 {
853849 JTextArea text;
854850
855
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
856
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
857851 ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
858852 text.addCaretListener(this);
859
- aConstraints.gridx += 1;
860
- aConstraints.gridwidth = 1;
861853
862854 return text;
863855 }
....@@ -896,7 +888,7 @@
896888
897889 /*
898890 */
899
- void Return() // ObjEditor oe)
891
+ void Return0() // ObjEditor oe)
900892 {
901893 aConstraints.gridy += 1;
902894 aConstraints.gridx = 0;
....@@ -955,33 +947,52 @@
955947 // oe.aConstraints.weighty = 0;
956948 // oe.aConstraints.gridx = 0;
957949 // oe.aConstraints.gridy = 0;
958
- SetupName(oe);
950
+ //SetupName(oe);
951
+
952
+ namePanel = new cGridBag();
953
+
954
+ nameField = AddText(namePanel, copy.GetName());
955
+ namePanel.add(nameField);
956
+ oe.ctrlPanel.add(namePanel);
957
+
958
+ oe.ctrlPanel.Return();
959959
960960 if (!GroupEditor.allparams)
961961 return;
962962
963
- liveCB = AddCheckBox(oe, "Live", copy.live);
964
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
965
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
963
+ setupPanel = new cGridBag().setVertical(false);
964
+
965
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
966
+ link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
967
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
966968 // Return();
967
- markCB = AddCheckBox(oe, "Mark", copy.marked);
968
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
969
- randomCB = AddCheckBox(oe, "Rand", copy.random);
970
- Return();
971
- resetButton = AddButton(oe, "Reset");
972
- stepButton = AddButton(oe, "Step");
969
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
970
+ rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind);
971
+ randomCB = AddCheckBox(setupPanel, "Rand", copy.random);
972
+
973
+ oe.ctrlPanel.add(setupPanel);
974
+ oe.ctrlPanel.Return();
975
+
976
+ commandsPanel = new cGridBag().setVertical(false);
977
+
978
+ resetButton = AddButton(commandsPanel, "Reset");
979
+ stepButton = AddButton(commandsPanel, "Step");
973980 // resetAllButton = AddButton(oe, "Reset All");
974981 // stepAllButton = AddButton(oe, "Step All");
975
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
982
+ speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup);
976983 // Return();
977
- slowerButton = AddButton(oe, "Slow");
978
- fasterButton = AddButton(oe, "Fast");
979
- remarkButton = AddButton(oe, "Rem");
984
+ slowerButton = AddButton(commandsPanel, "Slow");
985
+ fasterButton = AddButton(commandsPanel, "Fast");
986
+ remarkButton = AddButton(commandsPanel, "Remark");
980987
981
- //Return();
988
+ oe.ctrlPanel.add(commandsPanel);
989
+ oe.ctrlPanel.Return();
982990
983
- //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
991
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
992
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
984993 //Return();
994
+
995
+ oe.ctrlPanel.Return();
985996
986997 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
987998 // ObjEditor.aConstraints.gridx += 1;
....@@ -1076,7 +1087,7 @@
10761087 oe.aConstraints.gridwidth = 1;
10771088 /**/
10781089 nameField = AddText(oe.ctrlPanel, copy.GetName());
1079
- Return();
1090
+ oe.ctrlPanel.Return();
10801091
10811092 //ctrlPanel.add(textureButton = new Button("Texture..."));
10821093 //textureButton.setEnabled(false);
....@@ -1253,10 +1264,11 @@
12531264 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12541265 //tmp.setName("Edit");
12551266 objectPanel.add(materialPanel);
1256
- JPanel north = new JPanel(new BorderLayout());
1257
- north.setName("Edit");
1258
- north.add(ctrlPanel, BorderLayout.NORTH);
1259
- objectPanel.add(north);
1267
+// JPanel north = new JPanel(new BorderLayout());
1268
+// north.setName("Edit");
1269
+// north.add(ctrlPanel, BorderLayout.NORTH);
1270
+// objectPanel.add(north);
1271
+ objectPanel.add(ctrlPanel);
12601272 objectPanel.add(infoPanel);
12611273
12621274 /*
....@@ -1415,7 +1427,7 @@
14151427 ctrlPanel.removeAll();
14161428 }
14171429
1418
- void SetupMaterial(cGridBag ctrlPanel)
1430
+ void SetupMaterial(cGridBag panel)
14191431 {
14201432 /*
14211433 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
....@@ -1435,7 +1447,7 @@
14351447 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14361448 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14371449
1438
- ctrlPanel.add(editBar);
1450
+ panel.add(editBar);
14391451
14401452 /**/
14411453 //aConstraints.weighty = 0;
....@@ -1484,9 +1496,9 @@
14841496 shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
14851497 colorSection.add(shadowbias);
14861498
1487
- ctrlPanel.add(new JSeparator());
1499
+ panel.add(new JSeparator());
14881500
1489
- ctrlPanel.add(colorSection);
1501
+ panel.add(colorSection);
14901502
14911503 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14921504
....@@ -1534,9 +1546,9 @@
15341546 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15351547 diffuseSection.add(fakedepth);
15361548
1537
- ctrlPanel.add(new JSeparator());
1549
+ panel.add(new JSeparator());
15381550
1539
- ctrlPanel.add(diffuseSection);
1551
+ panel.add(diffuseSection);
15401552
15411553 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15421554
....@@ -1572,7 +1584,7 @@
15721584 velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15731585 specularSection.add(velvet);
15741586
1575
- shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1);
1587
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
15761588 //Return();
15771589 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
15781590 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -1585,9 +1597,9 @@
15851597 // aConstraints.gridwidth = 1;
15861598
15871599
1588
- ctrlPanel.add(new JSeparator());
1600
+ panel.add(new JSeparator());
15891601
1590
- ctrlPanel.add(specularSection);
1602
+ panel.add(specularSection);
15911603
15921604 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15931605
....@@ -1617,9 +1629,9 @@
16171629 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16181630 globalSection.add(opacity);
16191631
1620
- ctrlPanel.add(new JSeparator());
1632
+ panel.add(new JSeparator());
16211633
1622
- ctrlPanel.add(globalSection);
1634
+ panel.add(globalSection);
16231635
16241636 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16251637
....@@ -1661,9 +1673,9 @@
16611673 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
16621674 textureSection.add(opacityPower);
16631675
1664
- ctrlPanel.add(new JSeparator());
1676
+ panel.add(new JSeparator());
16651677
1666
- ctrlPanel.add(textureSection);
1678
+ panel.add(textureSection);
16671679
16681680 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16691681
....@@ -2482,6 +2494,7 @@
24822494 }
24832495 if (input == null)
24842496 {
2497
+ new Exception().printStackTrace();
24852498 System.exit(0);
24862499 }
24872500
....@@ -3211,6 +3224,7 @@
32113224 callee.refreshContents();
32123225 } else
32133226 {
3227
+ new Exception().printStackTrace();
32143228 System.exit(0);
32153229 }
32163230 }
....@@ -3421,6 +3435,7 @@
34213435 || e.getSource() == apertureField
34223436 || e.getSource() == shadowblurField)
34233437 {
3438
+ new Exception().printStackTrace();
34243439 System.exit(0);
34253440 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34263441 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -4392,8 +4407,8 @@
43924407 //MenuItem normalLensItem;
43934408 MenuItem editCameraItem;
43944409 MenuItem revertCameraItem;
4395
- CheckboxMenuItem toggleLiveItem;
43964410 MenuItem stepItem;
4411
+ CheckboxMenuItem toggleLiveItem;
43974412 CheckboxMenuItem toggleFullScreenItem;
43984413 CheckboxMenuItem toggleTimelineItem;
43994414 CheckboxMenuItem toggleRenderItem;
Object3D.java
....@@ -2300,6 +2300,7 @@
23002300 {
23012301 if (newWindow)
23022302 {
2303
+ new Exception().printStackTrace();
23032304 System.exit(0);
23042305 if (parent != null)
23052306 {
ParticleEditor.java
....@@ -70,6 +70,8 @@
7070 oe.aConstraints.gridwidth = 1;
7171 */
7272 super.SetupUI2(oe);
73
+
74
+ particlesPanel = AddSlider(oe.ctrlPanel, "Particles", 0, 1000, particlesystem.numParticles);
7375
7476 // oe.aConstraints.gridx = 0;
7577 // oe.aConstraints.gridwidth = 1;
....@@ -82,32 +84,44 @@
8284 //
8385 // frameField.setFloat(particlesystem.initialVelocity);
8486
85
- particlesField = AddSlider(oe.ctrlPanel, "Particles", 0, 1000, particlesystem.numParticles); //, 1);
86
- Return();
87
- velocityField = AddSlider(oe.ctrlPanel, "Speed", 0, 10, particlesystem.initialVelocity, 1);
88
- Return();
89
- timestepField = AddSlider(oe.ctrlPanel, "Timestep", 0.001f, 1, particlesystem.controller.timestep, 1);
90
- Return();
91
- delayField = AddSlider(oe.ctrlPanel, "Delay", 0, 10, particlesystem.creationdelay, 1);
92
- Return();
93
- angleminField = AddSlider(oe.ctrlPanel, "Angle min", 0, (float)Math.PI, particlesystem.minimumAngle, 1);
94
- Return();
95
- anglemaxField = AddSlider(oe.ctrlPanel, "Angle max", 0, (float)Math.PI, particlesystem.maximumAngle, 1);
96
- Return();
97
- sizeminField = AddSlider(oe.ctrlPanel, "Size min", 0, 10, particlesystem.minimumSize, 1);
98
- Return();
99
- sizemaxField = AddSlider(oe.ctrlPanel, "Size max", 0, 10, particlesystem.maximumSize, 1);
100
- Return();
101
- lifeminField = AddSlider(oe.ctrlPanel, "Life min", 0, 100, particlesystem.minimumLifeTime, 1);
102
- Return();
103
- lifemaxField = AddSlider(oe.ctrlPanel, "Life max", 0, 100, particlesystem.maximumLifeTime, 1);
104
- Return();
105
- densityField = AddSlider(oe.ctrlPanel, "Density", 0, 1, particlesystem.density, 1);
106
- Return();
107
- gravityField = AddSlider(oe.ctrlPanel, "Gravity", 0, 1, -particlesystem.controller.gvector.y, 1);
108
- Return();
109
- standbyField = AddSlider(oe.ctrlPanel, "Standby", 0, 1, particlesystem.standby, 1);
110
- Return();
87
+ particlesField = (cNumberSlider)particlesPanel.getComponent(1); //, 1);
88
+ oe.ctrlPanel.Return();
89
+ speedPanel = AddSlider(oe.ctrlPanel, "Speed", 0, 10, particlesystem.initialVelocity, 1);
90
+ speedField = (cNumberSlider)speedPanel.getComponent(1);
91
+ oe.ctrlPanel.Return();
92
+ timestepPanel = AddSlider(oe.ctrlPanel, "Timestep", 0.001f, 1, particlesystem.controller.timestep, 1);
93
+ timestepField = (cNumberSlider)timestepPanel.getComponent(1);
94
+ oe.ctrlPanel.Return();
95
+ delayPanel = AddSlider(oe.ctrlPanel, "Delay", 0, 10, particlesystem.creationdelay, 1);
96
+ delayField = (cNumberSlider)delayPanel.getComponent(1);
97
+ oe.ctrlPanel.Return();
98
+ angleminPanel = AddSlider(oe.ctrlPanel, "Angle min", 0, (float)Math.PI, particlesystem.minimumAngle, 1);
99
+ angleminField = (cNumberSlider)angleminPanel.getComponent(1);
100
+ oe.ctrlPanel.Return();
101
+ anglemaxPanel = AddSlider(oe.ctrlPanel, "Angle max", 0, (float)Math.PI, particlesystem.maximumAngle, 1);
102
+ anglemaxField = (cNumberSlider)anglemaxPanel.getComponent(1);
103
+ oe.ctrlPanel.Return();
104
+ sizeminPanel = AddSlider(oe.ctrlPanel, "Size min", 0, 10, particlesystem.minimumSize, 1);
105
+ sizeminField = (cNumberSlider)sizeminPanel.getComponent(1);
106
+ oe.ctrlPanel.Return();
107
+ sizemaxPanel = AddSlider(oe.ctrlPanel, "Size max", 0, 10, particlesystem.maximumSize, 1);
108
+ sizemaxField = (cNumberSlider)sizemaxPanel.getComponent(1);
109
+ oe.ctrlPanel.Return();
110
+ lifeminPanel = AddSlider(oe.ctrlPanel, "Life min", 0, 100, particlesystem.minimumLifeTime, 1);
111
+ lifeminField = (cNumberSlider)lifeminPanel.getComponent(1);
112
+ oe.ctrlPanel.Return();
113
+ lifemaxPanel = AddSlider(oe.ctrlPanel, "Life max", 0, 100, particlesystem.maximumLifeTime, 1);
114
+ lifemaxField = (cNumberSlider)lifemaxPanel.getComponent(1);
115
+ oe.ctrlPanel.Return();
116
+ densityPanel = AddSlider(oe.ctrlPanel, "Density", 0, 1, particlesystem.density, 1);
117
+ densityField = (cNumberSlider)densityPanel.getComponent(1);
118
+ oe.ctrlPanel.Return();
119
+ gravityPanel = AddSlider(oe.ctrlPanel, "Gravity", 0, 1, -particlesystem.controller.gvector.y, 1);
120
+ gravityField = (cNumberSlider)gravityPanel.getComponent(1);
121
+ oe.ctrlPanel.Return();
122
+ standbyPanel = AddSlider(oe.ctrlPanel, "Standby", 0, 1, particlesystem.standby, 1);
123
+ standbyField = (cNumberSlider)standbyPanel.getComponent(1);
124
+ oe.ctrlPanel.Return();
111125
112126 // oe.aConstraints.gridy += 1;
113127 // oe.aConstraints.gridx = 0;
....@@ -177,7 +191,7 @@
177191 {
178192 //System.out.println("Biparam :: stateChanged");
179193 if (e.getSource() == particlesField ||
180
- e.getSource() == velocityField ||
194
+ e.getSource() == speedField ||
181195 e.getSource() == delayField ||
182196 e.getSource() == timestepField ||
183197 e.getSource() == angleminField ||
....@@ -204,7 +218,7 @@
204218 {
205219 // System.out.println("Biparam :: Refresh");
206220 new Exception().printStackTrace();
207
- particlesystem.initialVelocity = (float) velocityField.getFloat(); // biparam.minUDivs, 99);
221
+ particlesystem.initialVelocity = (float) speedField.getFloat(); // biparam.minUDivs, 99);
208222 particlesystem.controller.timestep = (float) timestepField.getFloat();
209223
210224 refreshContents();
....@@ -232,7 +246,7 @@
232246 //System.out.println("Biparam :: applySelf");
233247 //super.applySelf();
234248 particlesystem.numParticles = particlesField.getInteger(); // biparam.minUDivs, 99);
235
- particlesystem.initialVelocity = (float) velocityField.getFloat(); // biparam.minUDivs, 99);
249
+ particlesystem.initialVelocity = (float) speedField.getFloat(); // biparam.minUDivs, 99);
236250 particlesystem.controller.timestep = (float) timestepField.getFloat();
237251 particlesystem.creationdelay = (float) delayField.getFloat();
238252 particlesystem.minimumSize = (float) sizeminField.getFloat();
....@@ -253,19 +267,32 @@
253267
254268 public void closeUI()
255269 {
256
- Remove(particlesField);
257
- Remove(velocityField);
258
- Remove(timestepField);
259
- Remove(delayField);
260
- Remove(sizeminField);
261
- Remove(sizemaxField);
262
- Remove(angleminField);
263
- Remove(anglemaxField);
264
- Remove(lifeminField);
265
- Remove(lifemaxField);
266
- Remove(densityField);
267
- Remove(gravityField);
268
- Remove(standbyField);
270
+// Remove(particlesField);
271
+// Remove(speedField);
272
+// Remove(timestepField);
273
+// Remove(delayField);
274
+// Remove(sizeminField);
275
+// Remove(sizemaxField);
276
+// Remove(angleminField);
277
+// Remove(anglemaxField);
278
+// Remove(lifeminField);
279
+// Remove(lifemaxField);
280
+// Remove(densityField);
281
+// Remove(gravityField);
282
+// Remove(standbyField);
283
+ objEditor.ctrlPanel.remove(particlesPanel);
284
+ objEditor.ctrlPanel.remove(speedPanel);
285
+ objEditor.ctrlPanel.remove(timestepPanel);
286
+ objEditor.ctrlPanel.remove(delayPanel);
287
+ objEditor.ctrlPanel.remove(sizeminPanel);
288
+ objEditor.ctrlPanel.remove(sizemaxPanel);
289
+ objEditor.ctrlPanel.remove(angleminPanel);
290
+ objEditor.ctrlPanel.remove(anglemaxPanel);
291
+ objEditor.ctrlPanel.remove(lifeminPanel);
292
+ objEditor.ctrlPanel.remove(lifemaxPanel);
293
+ objEditor.ctrlPanel.remove(densityPanel);
294
+ objEditor.ctrlPanel.remove(gravityPanel);
295
+ objEditor.ctrlPanel.remove(standbyPanel);
269296
270297 // ObjEditor oe = objEditor;
271298
....@@ -292,7 +319,7 @@
292319 ParticleSystem particlesystem;
293320
294321 cNumberSlider particlesField;
295
- cNumberSlider velocityField;
322
+ cNumberSlider speedField;
296323 cNumberSlider timestepField;
297324 cNumberSlider delayField;
298325 cNumberSlider sizeminField;
....@@ -305,6 +332,20 @@
305332 cNumberSlider gravityField;
306333 cNumberSlider standbyField;
307334
335
+ cGridBag particlesPanel;
336
+ cGridBag speedPanel;
337
+ cGridBag timestepPanel;
338
+ cGridBag delayPanel;
339
+ cGridBag sizeminPanel;
340
+ cGridBag sizemaxPanel;
341
+ cGridBag angleminPanel;
342
+ cGridBag anglemaxPanel;
343
+ cGridBag lifeminPanel;
344
+ cGridBag lifemaxPanel;
345
+ cGridBag densityPanel;
346
+ cGridBag gravityPanel;
347
+ cGridBag standbyPanel;
348
+
308349 ObjectUI parent;
309350 //ObjEditor objEditor;
310351 }
PhysicsEditor.java
....@@ -190,6 +190,7 @@
190190
191191 void Refresh()
192192 {
193
+ new Exception().printStackTrace();
193194 System.exit(0);
194195 System.out.println("Biparam :: Refresh");
195196 physicsnode.gravity = (float)gravityField.getFloat(); // biparam.minUDivs, 99);
PointFlowEditor.java
....@@ -82,8 +82,8 @@
8282 //
8383 // frameField.setFloat(particlesystem.initialVelocity);
8484
85
- resizefactorField = AddSlider(oe.ctrlPanel, "Resize factor", 0, 2, particlesystem.resizefactor, 1);
86
- Return();
85
+ resizefactorField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Resize factor", 0, 2, particlesystem.resizefactor, 1).getComponent(1);
86
+ oe.ctrlPanel.Return();
8787 // velocityField = AddSlider(oe.ctrlPanel, "Speed", 0, 10, particlesystem.initialVelocity, 1);
8888 // Return();
8989 // timestepField = AddSlider(oe.ctrlPanel, "Timestep", 0.001f, 1, particlesystem.controller.timestep, 1);
....@@ -94,10 +94,10 @@
9494 // Return();
9595 // anglemaxField = AddSlider(oe.ctrlPanel, "Angle max", 0, (float)Math.PI, particlesystem.maximumAngle, 1);
9696 // Return();
97
- sizeminField = AddSlider(oe.ctrlPanel, "Size min", 0, 0.01, particlesystem.minimumSize, 1);
98
- Return();
99
- sizemaxField = AddSlider(oe.ctrlPanel, "Size max", 0, 0.01, particlesystem.maximumSize, 1);
100
- Return();
97
+ sizeminField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Size min", 0, 0.01, particlesystem.minimumSize, 1).getComponent(1);
98
+ oe.ctrlPanel.Return();
99
+ sizemaxField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Size max", 0, 0.01, particlesystem.maximumSize, 1).getComponent(1);
100
+ oe.ctrlPanel.Return();
101101 // lifeminField = AddSlider(oe.ctrlPanel, "Life min", 0, 100, particlesystem.minimumLifeTime, 1);
102102 // Return();
103103 // lifemaxField = AddSlider(oe.ctrlPanel, "Life max", 0, 100, particlesystem.maximumLifeTime, 1);
RandomEditor.java
....@@ -9,6 +9,7 @@
99 class RandomEditor extends ObjEditor implements //ItemListener,
1010 ChangeListener, ObjectUI, ActionListener
1111 {
12
+ cGridBag childPanel;
1213 RandomEditor(RandomNode inBP, GroupEditor callee)
1314 {
1415 super(inBP,callee);
....@@ -59,10 +60,11 @@
5960 void SetupUI2(ObjEditor oe)
6061 {
6162 super.SetupUI2(oe);
63
+ childPanel = AddSlider(oe.ctrlPanel, "Child: ", 0, switchnode.Size()-1, switchnode.rnd);
6264
63
- frameField = AddSlider(oe.ctrlPanel, "Child: ", 0, switchnode.Size()-1, switchnode.rnd);
64
- Return();
65
- }
65
+ childField = (cNumberSlider)childPanel.getComponent(1);
66
+ oe.ctrlPanel.Return();
67
+ }
6668
6769 void Clear()
6870 {
....@@ -75,7 +77,7 @@
7577 public void stateChanged(ChangeEvent e)
7678 {
7779 //System.out.println("Biparam :: stateChanged");
78
- if (e.getSource() == frameField)
80
+ if (e.getSource() == childField)
7981 {
8082 //System.out.println("#U = " + biparam.uDivs);
8183 //System.out.println("#V = " + biparam.vDivs);
....@@ -92,7 +94,7 @@
9294
9395 void Refresh()
9496 {
95
- switchnode.rnd = frameField.getInteger();
97
+ switchnode.rnd = childField.getInteger();
9698
9799 refreshContents();
98100 }
....@@ -100,7 +102,7 @@
100102 /**/
101103 public void applySelf()
102104 {
103
- switchnode.rnd = frameField.getInteger();
105
+ switchnode.rnd = childField.getInteger();
104106 }
105107 /**/
106108
....@@ -108,7 +110,8 @@
108110 {
109111 ObjEditor oe = objEditor;
110112
111
- Remove(frameField);
113
+ //Remove(childField);
114
+ oe.ctrlPanel.remove(this.childPanel);
112115
113116 super.closeUI();
114117 }
....@@ -124,7 +127,7 @@
124127 }
125128
126129 RandomNode switchnode;
127
- cNumberSlider frameField;
130
+ cNumberSlider childField;
128131
129132 ObjectUI parent;
130133
SuperEditor.java
....@@ -8,6 +8,8 @@
88 import javax.swing.*;
99 import javax.swing.event.*;
1010
11
+import grafeme.ui.*;
12
+
1113 class SuperEditor extends BiparamEditor implements ChangeListener, ObjectUI // ActionListener
1214 {
1315 /*
....@@ -46,38 +48,29 @@
4648 void SetupUI2(ObjEditor oe)
4749 {
4850 super.SetupUI2(oe);
49
- ObjEditor.aConstraints.gridwidth = 1;
50
- oe.ctrlPanel.add(northLabel = new JLabel("XY Exp"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
51
- ObjEditor.aConstraints.fill = GridBagConstraints.HORIZONTAL;
52
- ObjEditor.aConstraints.gridx += 1;
53
- ObjEditor.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
54
- oe.ctrlPanel.add(northField = new NumberSlider(0.0001,20,-1), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
55
- ObjEditor.aConstraints.gridx = 0;
56
- ObjEditor.aConstraints.gridy += 1;
57
- ObjEditor.aConstraints.gridwidth = 1;
58
- ObjEditor.aConstraints.fill = GridBagConstraints.NONE;
59
- oe.ctrlPanel.add(eastLabel = new JLabel("Z Exp"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
60
- ObjEditor.aConstraints.gridx += 1;
61
- ObjEditor.aConstraints.fill = GridBagConstraints.HORIZONTAL;
62
- ObjEditor.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
63
- oe.ctrlPanel.add(eastField = new NumberSlider(0.0001,20,-1), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
64
- ObjEditor.aConstraints.gridx = 0;
65
- ObjEditor.aConstraints.gridy += 1;
66
- ObjEditor.aConstraints.gridwidth = 1;
67
- ObjEditor.aConstraints.gridwidth = 3;
68
-// ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
69
- oe.ctrlPanel.add(optionCB = new JCheckBox("Reverse", (superE.radius<0)), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
51
+
52
+ northPanel = new cGridBag();
53
+
54
+ northPanel.add(northLabel = new JLabel("XY Exp")); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
55
+ northPanel.add(northField = new cNumberSlider(this, 0.0001,20,-1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
56
+ oe.ctrlPanel.add(northPanel);
57
+
58
+ oe.ctrlPanel.Return();
59
+ eastPanel = new cGridBag();
60
+ eastPanel.add(eastLabel = new JLabel("Z Exp")); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
61
+ eastPanel.add(eastField = new cNumberSlider(this, 0.0001,20,-1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
62
+ oe.ctrlPanel.add(eastPanel);
63
+
64
+ oe.ctrlPanel.Return();
65
+ // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
66
+ oe.ctrlPanel.add(optionCB = new JCheckBox("Reverse", (superE.radius<0))); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2);
7067 optionCB.addItemListener(this);
71
-// ObjEditor.aConstraints.anchor = GridBagConstraints.EAST;
72
- ObjEditor.aConstraints.gridwidth = 1;
73
- ObjEditor.aConstraints.gridx = 0;
74
- ObjEditor.aConstraints.gridy += 1;
75
- northField.setFloat(superE.north);
68
+
69
+ oe.ctrlPanel.Return();
70
+
71
+ northField.setFloat(superE.north);
7672 eastField.setFloat(superE.east);
77
- northField.addChangeListener(this);
78
- eastField.addChangeListener(this);
79
- ObjEditor.aConstraints.fill = GridBagConstraints.NONE;
80
- }
73
+ }
8174
8275 public void closeUI()
8376 {
....@@ -87,10 +80,12 @@
8780 eastField.removeChangeListener(this);
8881 optionCB.removeItemListener(this);
8982 oe.ctrlPanel.remove(optionCB);
90
- oe.ctrlPanel.remove(northField);
91
- oe.ctrlPanel.remove(eastField);
92
- oe.ctrlPanel.remove(northLabel);
93
- oe.ctrlPanel.remove(eastLabel);
83
+ oe.ctrlPanel.remove(northPanel);
84
+ oe.ctrlPanel.remove(eastPanel);
85
+// oe.ctrlPanel.remove(northField);
86
+// oe.ctrlPanel.remove(eastField);
87
+// oe.ctrlPanel.remove(northLabel);
88
+// oe.ctrlPanel.remove(eastLabel);
9489 //oe.ctrlPanel.repaint();
9590
9691 super.closeUI();
....@@ -184,9 +179,11 @@
184179 Superellipsoid superE;
185180 JLabel northLabel;
186181 JLabel eastLabel;
187
- NumberSlider northField;
188
- NumberSlider eastField;
182
+ cNumberSlider northField;
183
+ cNumberSlider eastField;
189184
185
+ cGridBag northPanel;
186
+ cGridBag eastPanel;
190187 //BiparamEditor objEditor;
191188 }
192189
SwitchEditor.java
....@@ -81,11 +81,11 @@
8181 //
8282 // frameField.setInteger(frameselect.child);
8383
84
- frameField = AddSlider(oe.ctrlPanel, "Child: ", 0, switchnode.getNumFrames()-1, switchnode.child);
85
- Return();
84
+ frameField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Child: ", 0, switchnode.getNumFrames()-1, switchnode.child).getComponent(1);
85
+ oe.ctrlPanel.Return();
8686
87
- speedField = AddSlider(oe.ctrlPanel, "Damp: ", 0, 500, switchnode.speed);
88
- Return();
87
+ speedField = (cNumberSlider)AddSlider(oe.ctrlPanel, "Damp: ", 0, 500, switchnode.speed).getComponent(1);
88
+ oe.ctrlPanel.Return();
8989
9090 // oe.aConstraints.gridy += 1;
9191 //
TorusEditor.java
....@@ -39,10 +39,13 @@
3939 {
4040 super.SetupUI2(oe);
4141
42
- majorField = AddSlider(oe.ctrlPanel, "Major Rad:", 0, 10.0, torus.major, 1);
43
- Return();
44
- minorField = AddSlider(oe.ctrlPanel, "Minor Rad:", 0, 10.0, torus.minor, 1);
45
- Return();
42
+ majorPanel = AddSlider(oe.ctrlPanel, "Major Rad:", 0, 10.0, torus.major, 1);
43
+ majorField = (cNumberSlider)majorPanel.getComponent(1);
44
+ oe.ctrlPanel.Return();
45
+
46
+ minorPanel = AddSlider(oe.ctrlPanel, "Minor Rad:", 0, 10.0, torus.minor, 1);
47
+ minorField = (cNumberSlider)minorPanel.getComponent(1);
48
+ oe.ctrlPanel.Return();
4649 // oe.ctrlPanel.add(majorLabel = new JLabel("Major Rad"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
4750 // oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
4851 // oe.aConstraints.gridx += 1;
....@@ -79,8 +82,10 @@
7982 // oe.ctrlPanel.remove(majorLabel);
8083 // oe.ctrlPanel.remove(minorLabel);
8184 // //oe.ctrlPanel.repaint();
82
- Remove(majorField);
83
- Remove(minorField);
85
+// Remove(majorField);
86
+// Remove(minorField);
87
+ oe.ctrlPanel.remove(majorPanel);
88
+ oe.ctrlPanel.remove(minorPanel);
8489
8590 super.closeUI();
8691 }
....@@ -159,5 +164,7 @@
159164 cNumberSlider majorField;
160165 cNumberSlider minorField;
161166
167
+ cGridBag majorPanel;
168
+ cGridBag minorPanel;
162169 //BiparamEditor objEditor;
163170 }
cSpring.java
....@@ -1208,7 +1208,10 @@
12081208 }
12091209
12101210 if (edges.size()%2 != 0)
1211
+ {
1212
+ new Exception().printStackTrace();
12111213 System.exit(0);
1214
+ }
12121215 }
12131216
12141217 // if (clearsprings)
....@@ -1516,7 +1519,10 @@
15161519 second = springs.get((i+1)%springs.size());
15171520
15181521 if (first == second)
1522
+ {
1523
+ new Exception().printStackTrace();
15191524 System.exit(0);
1525
+ }
15201526
15211527 temp.set(first.GetOther(this).position);
15221528 temp.sub(position);
....@@ -1646,7 +1652,10 @@
16461652 Spring second = springs.get((i+1)%springs.size());
16471653
16481654 if (first == second)
1655
+ {
1656
+ new Exception().printStackTrace();
16491657 System.exit(0);
1658
+ }
16501659
16511660 temp.set(first.GetOther(this).position);
16521661 temp.sub(position);
....@@ -3289,6 +3298,7 @@
32893298
32903299 if (N2.mass == Float.MAX_VALUE)
32913300 {
3301
+ new Exception().printStackTrace();
32923302 System.exit(0);
32933303 magnitude *= solidity; // * K;
32943304
cSpringEditor.java
....@@ -8,7 +8,6 @@
88
99 class cSpringEditor extends ObjEditor implements ItemListener, ChangeListener, ObjectUI, ActionListener
1010 {
11
-
1211 cSpringEditor(cSpring inBP, GroupEditor callee)
1312 {
1413 super(inBP, callee);
....@@ -53,17 +52,19 @@
5352 {
5453 super.SetupUI2(oe);
5554
55
+ firstrowPanel = new cGridBag();
56
+
5657 //// oe.ctrlPanel.add(animate = new JCheckBox("Live", spring.live), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
5758 //// ObjEditor.aConstraints.gridx += 1;
58
- freezeButton = AddButton(oe, "Freeze");
59
+ freezeButton = AddButton(firstrowPanel, "Freeze");
5960 // oe.ctrlPanel.add(freezeButton = new cButton("Freeze"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6061 // ObjEditor.aConstraints.gridx += 1;
6162 //// oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6263 //// ObjEditor.aConstraints.gridx += 1;
63
- avoiderButton = AddButton(oe, "Avoid");
64
+ avoiderButton = AddButton(firstrowPanel, "Avoid");
6465 // oe.ctrlPanel.add(avoiderButton = new cButton("Avoid"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6566 // ObjEditor.aConstraints.gridx += 1;
66
- autofreeze = AddCheckBox(oe, "Blow", spring.IsAutoFreeze());
67
+ autofreeze = AddCheckBox(firstrowPanel, "Blow", spring.IsAutoFreeze());
6768 // oe.ctrlPanel.add(autofreeze = new JCheckBox("Blow", spring.IsAutoFreeze()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6869 // ObjEditor.aConstraints.gridx += 1;
6970 // Return();
....@@ -71,17 +72,20 @@
7172 // ObjEditor.aConstraints.gridx = 0;
7273 //// oe.ctrlPanel.add(resetButton = new cButton("Reset"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7374 //// ObjEditor.aConstraints.gridx += 1;
74
- fastnormals = AddCheckBox(oe, "Fast", spring.IsFastNormals());
75
+ fastnormals = AddCheckBox(firstrowPanel, "Fast", spring.IsFastNormals());
7576 // oe.ctrlPanel.add(fastnormals = new JCheckBox("Fast", spring.IsFastNormals()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7677 // ObjEditor.aConstraints.gridx += 1;
77
- springs = AddCheckBox(oe, "Show", spring.showsprings);
78
+ springs = AddCheckBox(firstrowPanel, "Show", spring.showsprings);
7879 // oe.ctrlPanel.add(springs = new JCheckBox("Springs", spring.showsprings), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7980 // ObjEditor.aConstraints.gridx += 1;
80
- info = AddCheckBox(oe, "Info", spring.ShowInfo());
81
+ info = AddCheckBox(firstrowPanel, "Info", spring.ShowInfo());
8182 // oe.ctrlPanel.add(info = new JCheckBox("Info", spring.ShowInfo()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
82
- Return();
83
+ oe.ctrlPanel.add(firstrowPanel);
84
+ oe.ctrlPanel.Return();
8385 // ObjEditor.aConstraints.gridy += 1;
8486 // ObjEditor.aConstraints.gridx = 0;
87
+
88
+ stiffnessPanel = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
8589
8690 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
8791 // ObjEditor.aConstraints.gridwidth = 1;
....@@ -96,8 +100,9 @@
96100 // ObjEditor.aConstraints.gridwidth = 1;
97101 // //ObjEditor.aConstraints.fill = 0;
98102 // ObjEditor.aConstraints.gridx -= 1;
99
- stiffnessField = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
100
- Return();
103
+ stiffnessField = (cNumberSlider)stiffnessPanel.getComponent(1);
104
+ oe.ctrlPanel.Return();
105
+ massPanel = AddSlider(oe.ctrlPanel, "Mass:", 0, 20.0, Math.log(spring.M+1), 1);
101106
102107 // oe.ctrlPanel.add(massLabel = new JLabel("Mass"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
103108 // massLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -109,8 +114,9 @@
109114 // ObjEditor.aConstraints.gridwidth = 1;
110115 // //ObjEditor.aConstraints.fill = 0;
111116 // ObjEditor.aConstraints.gridx -= 1;
112
- massField = AddSlider(oe.ctrlPanel, "Mass:", 0, 20.0, Math.log(spring.M+1), 1);
113
- Return();
117
+ massField = (cNumberSlider)massPanel.getComponent(1);
118
+ oe.ctrlPanel.Return();
119
+ gravityPanel = AddSlider(oe.ctrlPanel, "Gravity:", 0, 20.0, Math.log(spring.G.acceleration+1), 1);
114120
115121 // oe.ctrlPanel.add(gravityLabel = new JLabel("Gravity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
116122 // gravityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -122,8 +128,9 @@
122128 // ObjEditor.aConstraints.gridwidth = 1;
123129 // //ObjEditor.aConstraints.fill = 0;
124130 // ObjEditor.aConstraints.gridx -= 1;
125
- gravityField = AddSlider(oe.ctrlPanel, "Gravity:", 0, 20.0, Math.log(spring.G.acceleration+1), 1);
126
- Return();
131
+ gravityField = (cNumberSlider)gravityPanel.getComponent(1);
132
+ oe.ctrlPanel.Return();
133
+ normalPanel = AddSlider(oe.ctrlPanel, "Normal:", 0, 20.0, Math.log(spring.normalpush+1), 1);
127134
128135 // oe.ctrlPanel.add(normalLabel = new JLabel("Normal"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
129136 // normalLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -135,8 +142,9 @@
135142 // ObjEditor.aConstraints.gridwidth = 1;
136143 // //ObjEditor.aConstraints.fill = 0;
137144 // ObjEditor.aConstraints.gridx -= 1;
138
- normalField = AddSlider(oe.ctrlPanel, "Normal:", 0, 20.0, Math.log(spring.normalpush+1), 1);
139
- Return();
145
+ normalField = (cNumberSlider)normalPanel.getComponent(1);
146
+ oe.ctrlPanel.Return();
147
+ restlengthPanel = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
140148
141149 /**/
142150 // oe.ctrlPanel.add(thicknessLabel = new JLabel("Restlength"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -149,8 +157,9 @@
149157 // ObjEditor.aConstraints.gridwidth = 1;
150158 // //ObjEditor.aConstraints.fill = 0;
151159 // ObjEditor.aConstraints.gridx -= 1;
152
- restlengthField = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
153
- Return();
160
+ restlengthField = (cNumberSlider)restlengthPanel.getComponent(1);
161
+ oe.ctrlPanel.Return();
162
+ distortionPanel = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
154163
155164 // oe.ctrlPanel.add(distortionLabel = new JLabel("Distortion"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
156165 // distortionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -162,9 +171,10 @@
162171 // ObjEditor.aConstraints.gridwidth = 1;
163172 // //ObjEditor.aConstraints.fill = 0;
164173 // ObjEditor.aConstraints.gridx -= 1;
165
- distortionField = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
166
- Return();
174
+ distortionField = (cNumberSlider)distortionPanel.getComponent(1);
175
+ oe.ctrlPanel.Return();
167176 /**/
177
+ limitPanel = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
168178
169179 // oe.ctrlPanel.add(limitLabel = new JLabel("Limit"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
170180 // limitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -176,8 +186,9 @@
176186 // ObjEditor.aConstraints.gridwidth = 1;
177187 // //ObjEditor.aConstraints.fill = 0;
178188 // ObjEditor.aConstraints.gridx -= 1;
179
- limitField = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
180
- Return();
189
+ limitField = (cNumberSlider)limitPanel.getComponent(1);
190
+ oe.ctrlPanel.Return();
191
+ viscosityPanel = AddSlider(oe.ctrlPanel, "Viscosity:", 0, 20.0, Math.log(spring.W.wind+1), 1);
181192
182193 // oe.ctrlPanel.add(viscosityLabel = new JLabel("Viscosity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
183194 // viscosityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -189,8 +200,9 @@
189200 // ObjEditor.aConstraints.gridwidth = 1;
190201 // //ObjEditor.aConstraints.fill = 0;
191202 // ObjEditor.aConstraints.gridx -= 1;
192
- viscosityField = AddSlider(oe.ctrlPanel, "Viscosity:", 0, 20.0, Math.log(spring.W.wind+1), 1);
193
- Return();
203
+ viscosityField = (cNumberSlider)viscosityPanel.getComponent(1);
204
+ oe.ctrlPanel.Return();
205
+ fluidspeedPanel = AddSlider(oe.ctrlPanel, "Speed:", 0, 20.0, Math.log(spring.W.speed+1), 1);
194206
195207 // oe.ctrlPanel.add(fluidspeedLabel = new JLabel("Speed"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
196208 // fluidspeedLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -202,8 +214,9 @@
202214 // ObjEditor.aConstraints.gridwidth = 1;
203215 // //ObjEditor.aConstraints.fill = 0;
204216 // ObjEditor.aConstraints.gridx -= 1;
205
- fluidspeedField = AddSlider(oe.ctrlPanel, "Speed:", 0, 20.0, Math.log(spring.W.speed+1), 1);
206
- Return();
217
+ fluidspeedField = (cNumberSlider)fluidspeedPanel.getComponent(1);
218
+ oe.ctrlPanel.Return();
219
+ liftPanel = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
207220
208221 // oe.ctrlPanel.add(liftLabel = new JLabel("Lift"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
209222 // liftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -215,8 +228,9 @@
215228 // ObjEditor.aConstraints.gridwidth = 1;
216229 // //ObjEditor.aConstraints.fill = 0;
217230 // ObjEditor.aConstraints.gridx -= 1;
218
- liftField = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
219
- Return();
231
+ liftField = (cNumberSlider)liftPanel.getComponent(1);
232
+ oe.ctrlPanel.Return();
233
+ frictionPanel = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
220234
221235 // oe.ctrlPanel.add(frictionLabel = new JLabel("Friction"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
222236 // frictionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -228,8 +242,9 @@
228242 // ObjEditor.aConstraints.gridwidth = 1;
229243 // //ObjEditor.aConstraints.fill = 0;
230244 // ObjEditor.aConstraints.gridx -= 1;
231
- frictionField = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
232
- Return();
245
+ frictionField = (cNumberSlider)frictionPanel.getComponent(1);
246
+ oe.ctrlPanel.Return();
247
+ timestepPanel = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
233248
234249 // oe.ctrlPanel.add(timestepLabel = new JLabel("Timestep"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
235250 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -241,8 +256,9 @@
241256 // ObjEditor.aConstraints.gridwidth = 1;
242257 // //ObjEditor.aConstraints.fill = 0;
243258 // ObjEditor.aConstraints.gridx -= 1;
244
- timestepField = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
245
- Return();
259
+ timestepField = (cNumberSlider)timestepPanel.getComponent(1);
260
+ oe.ctrlPanel.Return();
261
+ poseslownessPanel = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
246262
247263 // oe.ctrlPanel.add(poseslownessLabel = new JLabel("Slowness"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
248264 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -254,8 +270,9 @@
254270 // ObjEditor.aConstraints.gridwidth = 1;
255271 // //ObjEditor.aConstraints.fill = 0;
256272 // ObjEditor.aConstraints.gridx -= 1;
257
- poseslownessField = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
258
- Return();
273
+ poseslownessField = (cNumberSlider)poseslownessPanel.getComponent(1);
274
+ oe.ctrlPanel.Return();
275
+ dampingPanel = AddSlider(oe.ctrlPanel, "Damping:", 0, 20.0, -Math.log(spring.damping)*10, 1);
259276
260277 // oe.ctrlPanel.add(dampingLabel = new JLabel("Damping"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
261278 // dampingLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -267,8 +284,9 @@
267284 // ObjEditor.aConstraints.gridwidth = 1;
268285 // //ObjEditor.aConstraints.fill = 0;
269286 // ObjEditor.aConstraints.gridx -= 1;
270
- dampingField = AddSlider(oe.ctrlPanel, "Damping:", 0, 20.0, -Math.log(spring.damping)*10, 1);
271
- Return();
287
+ dampingField = (cNumberSlider)dampingPanel.getComponent(1);
288
+ oe.ctrlPanel.Return();
289
+ solidityPanel = AddSlider(oe.ctrlPanel, "Solidity:", 0, 20.0, Math.log(spring.solidity+1), 1);
272290
273291 // oe.ctrlPanel.add(solidityLabel = new JLabel("Solidity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
274292 // solidityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -280,8 +298,8 @@
280298 // ObjEditor.aConstraints.gridwidth = 1;
281299 // //ObjEditor.aConstraints.fill = 0;
282300 // ObjEditor.aConstraints.gridx -= 1;
283
- solidityField = AddSlider(oe.ctrlPanel, "Solidity:", 0, 20.0, Math.log(spring.solidity+1), 1);
284
- Return();
301
+ solidityField = (cNumberSlider)solidityPanel.getComponent(1);
302
+ oe.ctrlPanel.Return();
285303
286304 //System.out.println("K = " + spring.K + "; G = " + spring.G.acceleration + "; H = " + spring.H + "; V = " + spring.W.wind);
287305
....@@ -316,52 +334,61 @@
316334 // solidityField.setFloat(Math.log(spring.solidity+1));
317335 // solidityField.addChangeListener(this);
318336
337
+ secondrowPanel = new cGridBag();
338
+
319339 // ObjEditor.aConstraints.gridwidth = 1;
320340 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
321341 // oe.ctrlPanel.add(revertButton = new cButton("Revert"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
322342 // ObjEditor.aConstraints.gridx += 1;
323
- revertButton = AddButton(oe, "Revert");
343
+ revertButton = AddButton(secondrowPanel, "Revert");
324344 // oe.ctrlPanel.add(epsequal = new JCheckBox("Eps", spring.IsEpsEqual()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
325345 // ObjEditor.aConstraints.gridx += 1;
326
- epsequal = AddCheckBox(oe, "Eps", spring.IsEpsEqual());
346
+ epsequal = AddCheckBox(secondrowPanel, "Eps", spring.IsEpsEqual());
327347 // oe.ctrlPanel.add(linkUV = new JCheckBox("link UV", spring.IsLinkUV()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
328348 // ObjEditor.aConstraints.gridy += 1;
329349 // ObjEditor.aConstraints.gridx = 0;
330
- linkUV = AddCheckBox(oe, "UV", spring.IsLinkUV());
350
+ linkUV = AddCheckBox(secondrowPanel, "UV", spring.IsLinkUV());
331351 // oe.ctrlPanel.add(poseCB = new JCheckBox("Change:", spring.IsPoseMesh()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
332352 // ObjEditor.aConstraints.gridx += 1;
333
- poseCB = AddCheckBox(oe, "Loop", spring.IsPoseMesh());
353
+ poseCB = AddCheckBox(secondrowPanel, "Loop", spring.IsPoseMesh());
334354 // oe.ctrlPanel.add(poseButton = new cButton("Pose"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
335355 // ObjEditor.aConstraints.gridy += 1;
336356 // ObjEditor.aConstraints.gridx = 0;
337
- poseButton = AddButton(oe, "Pose");
338
- Return();
339
-
340
- poseField = AddSlider(oe.ctrlPanel, "Pose:", 0, spring.posegroup==null?0:spring.posegroup.size()-1, spring.poseid);
341
- Return();
357
+ poseButton = AddButton(secondrowPanel, "Pose");
342358
359
+ oe.ctrlPanel.add(secondrowPanel);
360
+ oe.ctrlPanel.Return();
361
+
362
+ posePanel = AddSlider(oe.ctrlPanel, "Pose:", 0, spring.posegroup==null?0:spring.posegroup.size()-1, spring.poseid);
363
+
364
+ poseField = (cNumberSlider)posePanel.getComponent(1);
365
+ oe.ctrlPanel.Return();
366
+
367
+ thirdrowPanel = new cGridBag();
368
+
343369 // oe.ctrlPanel.add(solid = new JCheckBox("Solid", spring.IsSolid()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
344370 // ObjEditor.aConstraints.gridx += 1;
345
- solid = AddCheckBox(oe, "3D", spring.IsSolid());
371
+ solid = AddCheckBox(thirdrowPanel, "3D", spring.IsSolid());
346372 // oe.ctrlPanel.add(soft = new JCheckBox("Soft", spring.IsSoft()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
347373 // ObjEditor.aConstraints.gridy += 1;
348374 // ObjEditor.aConstraints.gridx = 0;
349
- soft = AddCheckBox(oe, "Soft", spring.IsSoft());
375
+ soft = AddCheckBox(thirdrowPanel, "Soft", spring.IsSoft());
350376 // oe.ctrlPanel.add(fold = new JCheckBox("Fold", spring.IsFold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
351377 // ObjEditor.aConstraints.gridx += 1;
352
- fold = AddCheckBox(oe, "Fold", spring.IsFold());
378
+ fold = AddCheckBox(thirdrowPanel, "Fold", spring.IsFold());
353379 // oe.ctrlPanel.add(unfold = new JCheckBox("Unfold", spring.IsUnfold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
354380 // ObjEditor.aConstraints.gridx += 1;
355
- unfold = AddCheckBox(oe, "Unf", spring.IsUnfold());
381
+ unfold = AddCheckBox(thirdrowPanel, "Unf", spring.IsUnfold());
356382 // oe.ctrlPanel.add(normalizeCounts = new JCheckBox("Counts", spring.IsNormalize()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
357383 // ObjEditor.aConstraints.gridx += 1;
358384 // ObjEditor.aConstraints.gridy += 1;
359385 // ObjEditor.aConstraints.gridx = 0;
360
- normalizeCounts = AddCheckBox(oe, "Cnt", spring.IsNormalize());
386
+ normalizeCounts = AddCheckBox(thirdrowPanel, "Cnt", spring.IsNormalize());
361387 // Invariants?... oe.ctrlPanel.add(updatehandles = new JCheckBox("Update handles", spring.IsUpdateHandles()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
362388 // ObjEditor.aConstraints.gridx += 1;
363389
364
- Return();
390
+ oe.ctrlPanel.add(thirdrowPanel);
391
+ oe.ctrlPanel.Return();
365392 // oe.ctrlPanel.add(freezeButton = new cButton(" Freeze "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
366393 // ObjEditor.aConstraints.gridx += 1;
367394 // oe.ctrlPanel.add(stepButton = new cButton(" Step "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -595,21 +622,40 @@
595622 {
596623 ObjEditor oe = objEditor;
597624
598
- Remove(stiffnessField);
599
- Remove(massField);
600
- Remove(gravityField);
601
- Remove(normalField);
602
- Remove(limitField);
603
- Remove(restlengthField);
604
- Remove(distortionField);
605
- Remove(viscosityField);
606
- Remove(fluidspeedField);
607
- Remove(liftField);
608
- Remove(frictionField);
609
- Remove(timestepField);
610
- Remove(poseslownessField);
611
- Remove(dampingField);
612
- Remove(solidityField);
625
+// Remove(stiffnessField);
626
+// Remove(massField);
627
+// Remove(gravityField);
628
+// Remove(normalField);
629
+// Remove(limitField);
630
+// Remove(restlengthField);
631
+// Remove(distortionField);
632
+// Remove(viscosityField);
633
+// Remove(fluidspeedField);
634
+// Remove(liftField);
635
+// Remove(frictionField);
636
+// Remove(timestepField);
637
+// Remove(poseslownessField);
638
+// Remove(dampingField);
639
+// Remove(solidityField);
640
+ objEditor.ctrlPanel.remove(firstrowPanel);
641
+ objEditor.ctrlPanel.remove(secondrowPanel);
642
+ objEditor.ctrlPanel.remove(thirdrowPanel);
643
+ objEditor.ctrlPanel.remove(stiffnessPanel);
644
+ objEditor.ctrlPanel.remove(massPanel);
645
+ objEditor.ctrlPanel.remove(gravityPanel);
646
+ objEditor.ctrlPanel.remove(normalPanel);
647
+ objEditor.ctrlPanel.remove(limitPanel);
648
+ objEditor.ctrlPanel.remove(restlengthPanel);
649
+ objEditor.ctrlPanel.remove(distortionPanel);
650
+ objEditor.ctrlPanel.remove(viscosityPanel);
651
+ objEditor.ctrlPanel.remove(fluidspeedPanel);
652
+ objEditor.ctrlPanel.remove(liftPanel);
653
+ objEditor.ctrlPanel.remove(frictionPanel);
654
+ objEditor.ctrlPanel.remove(timestepPanel);
655
+ objEditor.ctrlPanel.remove(poseslownessPanel);
656
+ objEditor.ctrlPanel.remove(dampingPanel);
657
+ objEditor.ctrlPanel.remove(solidityPanel);
658
+ objEditor.ctrlPanel.remove(posePanel);
613659 // stiffnessField.removeChangeListener(this);
614660 // massField.removeChangeListener(this);
615661 // gravityField.removeChangeListener(this);
....@@ -754,10 +800,8 @@
754800 cNumberSlider massField;
755801 cNumberSlider gravityField;
756802 cNumberSlider normalField;
757
- cNumberSlider mgravityField;
758803 cNumberSlider fluidspeedField;
759804 cNumberSlider viscosityField;
760
- cNumberSlider floorField;
761805 cNumberSlider limitField;
762806 cNumberSlider restlengthField;
763807 cNumberSlider distortionField;
....@@ -770,6 +814,27 @@
770814
771815 cNumberSlider poseField;
772816
817
+ cGridBag firstrowPanel;
818
+ cGridBag secondrowPanel;
819
+ cGridBag thirdrowPanel;
820
+
821
+ cGridBag stiffnessPanel;
822
+ cGridBag massPanel;
823
+ cGridBag gravityPanel;
824
+ cGridBag normalPanel;
825
+ cGridBag fluidspeedPanel;
826
+ cGridBag viscosityPanel;
827
+ cGridBag limitPanel;
828
+ cGridBag restlengthPanel;
829
+ cGridBag distortionPanel;
830
+ cGridBag dampingPanel;
831
+ cGridBag frictionPanel;
832
+ cGridBag liftPanel;
833
+ cGridBag poseslownessPanel;
834
+ cGridBag solidityPanel;
835
+ cGridBag timestepPanel;
836
+ cGridBag posePanel;
837
+
773838 // JCheckBox animate;
774839 JCheckBox thick;
775840 JCheckBox single;