Project

General

Profile

« Previous | Next » 

Revision 57ef6378

Added by Leszek Koltunski over 2 years ago

Float vertices - scratchbook

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyRex.java
267 267
    if( variant==0 )
268 268
      {
269 269
      float G = (1-REX_D)*SQ2/2;
270
      double[][] vertices ={{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0}};
270
      float[][] vertices ={{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0}};
271 271
      int[][] vertIndexes = { {0,1,2,3},{3,2,1,0} };
272 272
      float[][] centers= new float[][] { {0.0f,0.0f,-G} };
273 273
      float[][] corners= new float[][] { {0.03f,0.30f} };
......
280 280
    else if( variant==1 )
281 281
      {
282 282
      float G = 3*REX_D;
283
      double[][] vertices= { { -G, 0, 0 },{ 0, -G, 0 },{ +G, 0, 0 },{ 0,+G,0 } };
283
      float[][] vertices= { { -G, 0, 0 },{ 0, -G, 0 },{ +G, 0, 0 },{ 0,+G,0 } };
284 284
      int[][] vertIndexes= { {0,1,2,3},{3,2,1,0} };
285 285
      int[] indices= {-1,-1,-1,-1};
286 286
      int[] bandIndices= new int[] { 0,1 };
......
293 293
      float E = 1.5f - 3*REX_D;
294 294
      float F = 1.5f;
295 295
      float G = (float)Math.sqrt(E*E+F*F);
296
      double[][] vertices = { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
296
      float[][] vertices = { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
297 297
      int[][] vertIndexes = { {0,1,2}, {0,2,3}, {0,3,1}, {1,3,2} };
298 298
      float[][] centers= new float[][] { {0.0f,-1.5f,-1.5f} };
299 299
      float[][] corners= new float[][] { {0.06f,0.20f} };

Also available in: Unified diff