Revision bbc58eff
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/library/mesh/MeshSphere.java | ||
---|---|---|
199 | 199 |
{ |
200 | 200 |
double quotX = (double)column/level; |
201 | 201 |
double quotY = (double)row /level; |
202 |
double quotZ; |
|
202 | 203 |
|
203 |
double lonPoint = midLongitude(lonV1,lonV2, (quotX+0.5*quotY) ); |
|
204 |
double latPoint = midLatitude(latV12,latV3, quotY); |
|
204 |
if( latV12*latV3 < 0.0 ) // equatorial triangle |
|
205 |
{ |
|
206 |
quotZ = quotX + 0.5*quotY; |
|
207 |
} |
|
208 |
else // polar triangle |
|
209 |
{ |
|
210 |
quotZ = (quotY==1.0 ? 0.0 : quotX / (1.0-quotY)); |
|
211 |
} |
|
212 |
|
|
213 |
double lonPoint = midLongitude(lonV1, lonV2, quotZ ); |
|
214 |
double latPoint = midLatitude(latV12, latV3, quotY ); |
|
205 | 215 |
|
206 | 216 |
//android.util.Log.e("sphere", "newVertex: long:"+lonPoint+" lat:"+latPoint+" column="+column+" row="+row); |
207 | 217 |
|
Also available in: Unified diff
Further fix for the Sphere. Now hopefully only the texture mapping is wrong.