Project

General

Profile

« Previous | Next » 

Revision e3eab072

Added by Leszek Koltunski almost 7 years ago

Simplify Statics.

View differences:

src/main/java/org/distorted/examples/dynamic/DynamicSurfaceView.java
259 259
      for(int curr=0; curr<len; curr++)
260 260
        {      
261 261
        p1D = di1D.getPoint(curr);
262
        c.drawCircle(p1D.getX(), DynamicRenderer.texH/2 , mSize2, mPaint);
262
        c.drawCircle(p1D.get1(), DynamicRenderer.texH/2 , mSize2, mPaint);
263 263
        }   
264 264
      }
265 265
    
......
295 295
      for(int curr=0; curr<len; curr++)
296 296
        {      
297 297
        p2D = di2D.getPoint(curr);
298
        c.drawCircle(p2D.getX(),p2D.getY(), mSize2, mPaint);
298
        c.drawCircle(p2D.get1(),p2D.get2(), mSize2, mPaint);
299 299
        }
300 300
      }
301 301

  
......
331 331
      for(int curr=0; curr<len; curr++)
332 332
        {      
333 333
        p3D = di3D.getPoint(curr);
334
        c.drawCircle(p3D.getX(), currentDim==DIM_3DXY ? p3D.getY():p3D.getZ(), mSize2, mPaint);
334
        c.drawCircle(p3D.get1(), currentDim==DIM_3DXY ? p3D.get2():p3D.get3(), mSize2, mPaint);
335 335
        }   
336 336
      }
337 337
    
......
349 349
                     for(int g=0; g<len; g++)
350 350
                       {
351 351
                       p1D = di1D.getPoint(g);  
352
                       gx = p1D.getX();
352
                       gx = p1D.get1();
353 353
                                    
354 354
                       if( (x-gx)*(x-gx) < (mAvg*mAvg/100) )
355 355
                         {
......
375 375
                     for(int g=0; g<len; g++)
376 376
                       {
377 377
                       p2D = di2D.getPoint(g);  
378
                       gx = p2D.getX();
379
                       gy = p2D.getY();
378
                       gx = p2D.get1();
379
                       gy = p2D.get2();
380 380
                                    
381 381
                       if( (x-gx)*(x-gx) + (y-gy)*(y-gy) < (mAvg*mAvg/100) )
382 382
                         {
......
402 402
                     for(int g=0; g<len; g++)
403 403
                       {
404 404
                       p3D = di3D.getPoint(g);  
405
                       gx = p3D.getX();
406
                       gy = p3D.getY();
407
                       gz = p3D.getZ();
405
                       gx = p3D.get1();
406
                       gy = p3D.get2();
407
                       gz = p3D.get3();
408 408
                               
409 409
                     if( currentDim==DIM_3DXY )
410 410
                       {
......
473 473
                                                         break;
474 474
                                          case DIM_2D  : di2D.setPoint(moving, xDown, yDown);
475 475
                                                         break;
476
                                          case DIM_3DXY: di3D.setPoint(moving, xDown, yDown, (int)di3D.getPoint(moving).getZ());
476
                                          case DIM_3DXY: di3D.setPoint(moving, xDown, yDown, (int)di3D.getPoint(moving).get3());
477 477
                                                         break;
478
                                          case DIM_3DXZ: di3D.setPoint(moving, xDown, (int)di3D.getPoint(moving).getY(), yDown);
478
                                          case DIM_3DXZ: di3D.setPoint(moving, xDown, (int)di3D.getPoint(moving).get2(), yDown);
479 479
                                                         break;
480 480
                                          }
481 481
                                        }                           

Also available in: Unified diff