Normand Briere
2019-09-18 f9325048496d7cdbcad233f8a6b84c88e79adcc2
Sphere.java
....@@ -13,8 +13,8 @@
1313 this(false);
1414
1515 radius = 0.05f;
16
- uDivs = 7;
17
- vDivs = 6;
16
+ uDivs = 11; // 7;
17
+ vDivs = 4; // 6;
1818
1919 center = new cVector();
2020 center.set(x, y, z);
....@@ -44,12 +44,12 @@
4444 inPnt = new cVector();
4545 name = "Sphere";
4646 //uDivs = vDivs = 16;
47
- uDivs = 8; // 19;
48
- vDivs = 8; // 18;
47
+ uDivs = 12; // 8; // 19;
48
+ vDivs = 6; // 8; // 18;
4949 minUDivs = 3;
5050 minVDivs = 2;
5151 //center = new cVector();
52
- radius = 1;
52
+ radius = 0.5;
5353 if (recalc)
5454 {
5555 retile();
....@@ -95,9 +95,9 @@
9595 return e;
9696 }
9797
98
- protected void deepCopySelf(Object3D other)
98
+ protected void deepCopyNode(Object3D other)
9999 {
100
- super.deepCopySelf(other);
100
+ super.deepCopyNode(other);
101101 Sphere e = (Sphere) other;
102102 if (center != null)
103103 {
....@@ -121,6 +121,16 @@
121121 buffer.append("}\n");
122122 }
123123
124
+ double uStretch()
125
+ {
126
+ return 2;
127
+ }
128
+
129
+ double vFlip(double v)
130
+ {
131
+ return 1-v;
132
+ }
133
+
124134 Vertex biparamFunction(double u, double v)
125135 {
126136 double uAng = LA.toRadians(u * 360);
....@@ -137,6 +147,8 @@
137147 LA.vecCopy(temp.norm, temp/*.pos*/);
138148 LA.vecNormalize(temp.norm);
139149
150
+ temp.y += radius;
151
+
140152 return temp;
141153 }
142154