Project

General

Profile

« Previous | Next » 

Revision 41c8d4d8

Added by Leszek Koltunski over 2 years ago

Make Helicopter standard size (cube size=3, i.e. equal to numLayers so that DIST2D and DIST3D are standard)

View differences:

src/main/java/org/distorted/objects/MovementHelicopter.java
25 25

  
26 26
class MovementHelicopter extends Movement
27 27
{
28
  static final float DIST3D = 1.0f/6;
29
  static final float DIST2D = 1.0f/6;
28
  static final float DIST3D = 0.5f;
29
  static final float DIST2D = 0.5f;
30 30

  
31 31
  static final Static3D[] FACE_AXIS = new Static3D[]
32 32
         {
src/main/java/org/distorted/objects/TwistyHelicopter.java
146 146

  
147 147
  float getScreenRatio()
148 148
    {
149
    return 1.6f;
149
    return 0.5f;
150 150
    }
151 151

  
152 152
///////////////////////////////////////////////////////////////////////////////////////////////////
......
189 189

  
190 190
  float[][] getCuts(int size)
191 191
    {
192
    float[] cut = new float[] { -SQ2/4, +SQ2/4 };
192
    float[] cut = new float[] { -3*SQ2/4, +3*SQ2/4 };
193 193
    return new float[][] { cut,cut,cut,cut,cut,cut };
194 194
    }
195 195

  
......
206 206
    {
207 207
    if( mCenters==null )
208 208
      {
209
      float DIST_CORNER = 0.50f;
210
      float DIST_CENTER = 0.50f;
209
      float DIST_CORNER = 1.50f;
210
      float DIST_CENTER = 1.50f;
211 211
      float XY_CENTER = DIST_CORNER/3;
212 212

  
213 213
      mCenters = new float[][]
......
266 266
      {
267 267
      double[][] vertices = new double[][]
268 268
          {
269
            {-0.50f, 0.00f, 0.00f},
270
            { 0.00f,-0.50f, 0.00f},
271
            { 0.00f, 0.00f,-0.50f},
272
            {-0.25f,-0.25f,-0.25f},
269
            {-1.50f, 0.00f, 0.00f},
270
            { 0.00f,-1.50f, 0.00f},
271
            { 0.00f, 0.00f,-1.50f},
272
            {-0.75f,-0.75f,-0.75f},
273 273
            { 0.00f, 0.00f, 0.00f}
274 274
          };
275 275

  
......
285 285

  
286 286
      float[][] bands     = new float[][] { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,5} };
287 287
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
288
      float[][] corners   = new float[][] { {0.08f,0.15f}, {0.08f,0.20f} };
289
      int[] cornerIndices = new int[] { 1,1,1,0,0 };
290
      float[][] centers   = new float[][] { {-0.25f, -0.25f, -0.25f} };
288
      float[][] corners   = new float[][] { {0.08f,0.20f} };
289
      int[] cornerIndices = new int[] { 0,0,0,0,0 };
290
      float[][] centers   = new float[][] { {-0.75f, -0.75f, -0.75f} };
291 291
      int[] centerIndices = new int[] { 0,0,0,-1,0 };
292 292
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
293 293
      }
294 294
    else
295 295
      {
296
      float E = 0.1666666f;
297

  
298 296
      double[][] vertices = new double[][]
299 297
          {
300
            { 0.00f +E, 0.00f +E, 0.00f },
301
            {-0.50f +E, 0.00f +E, 0.00f },
302
            { 0.00f +E,-0.50f +E, 0.00f },
303
            {-0.25f +E,-0.25f +E,-0.25f },
298
            { 0.50f, 0.50f, 0.00f },
299
            {-1.00f, 0.50f, 0.00f },
300
            { 0.50f,-1.00f, 0.00f },
301
            {-0.25f,-0.25f,-0.75f },
304 302
          };
305 303

  
306 304
      int[][] vert_indices = new int[][]
......
313 311

  
314 312
      float[][] bands     = new float[][] { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,3} };
315 313
      int[] bandIndices   = new int[] { 0,1,1,1 };
316
      float[][] corners   = new float[][] { {0.06f,0.15f}, {0.06f,0.20f} };
317
      int[] cornerIndices = new int[] { 0,1,1,-1 };
318
      float[][] centers   = new float[][] { {-1.0f/12, -1.0f/12, -1.0f/4} };
314
      float[][] corners   = new float[][] { {0.06f,0.20f} };
315
      int[] cornerIndices = new int[] { 0,0,0,-1 };
316
      float[][] centers   = new float[][] { {-0.25f, -0.25f, -0.75f} };
319 317
      int[] centerIndices = new int[] { 0,0,0,-1 };
320 318
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
321 319
      }

Also available in: Unified diff