Project

General

Profile

« Previous | Next » 

Revision a4d59c0b

Added by Leszek Koltunski over 5 years ago

Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).

View differences:

src/main/java/org/distorted/examples/earth/EarthRenderer.java
187 187

  
188 188
      float factor = xW>xH ? mLevel*xH : mLevel*xW;
189 189

  
190
      mMove.set( (mScrWidth-factor*mObjWidth)/2 , (mScrHeight-factor*mObjHeight)/2 , 0);
190
      mMove.set( (mScrWidth-factor*mObjWidth)/2 , (mScrHeight-factor*mObjHeight)/2 , -factor*mObjDepth );
191 191
      mScaleFactor.set(factor,factor,factor);
192 192
      }
193 193

  
......
205 205
      double cosLAT = Math.cos(latitude);
206 206

  
207 207
      float x = (float)(sinLON*cosLAT)/2.0f;
208
      float y = (float)        sinLAT /2.0f;
208
      float y = (float)       -sinLAT /2.0f;
209 209
      float z = (float)(cosLON*cosLAT)/2.0f;
210 210

  
211 211
      Static3D center = new Static3D( (0.5f+x)*mObjWidth, (0.5f+y)*mObjHeight, (0.5f+z)*mObjDepth);

Also available in: Unified diff