Project

General

Profile

« Previous | Next » 

Revision 2289cab1

Added by Leszek Koltunski over 2 years ago

New 'IconMode' and some APIs to support it.

View differences:

src/main/java/org/distorted/objectlib/main/ObjectControl.java
80 80
    private static final Static4D mQuat= new Static4D(-0.25189602f,0.3546389f,0.009657208f,0.90038127f);
81 81
    private static final Static4D mTemp= new Static4D(0,0,0,1);
82 82

  
83
    private static boolean mForcedIconMode;
84

  
83 85
///////////////////////////////////////////////////////////////////////////////////////////////////
84 86
// cast the 3D axis we are currently rotating along (which is already casted to the surface of the
85 87
// currently touched face AND converted into a 4D vector - fourth 0) to a 2D in-screen-surface axis
......
504 506
      return mInterface;
505 507
      }
506 508

  
509
///////////////////////////////////////////////////////////////////////////////////////////////////
510

  
511
    public static void setIconMode()
512
      {
513
      mForcedIconMode = true;
514
      }
515

  
516
///////////////////////////////////////////////////////////////////////////////////////////////////
517

  
518
    public static boolean isInIconMode()
519
      {
520
      return mForcedIconMode;
521
      }
522

  
507 523
///////////////////////////////////////////////////////////////////////////////////////////////////
508 524
// PUBLIC API
509 525
///////////////////////////////////////////////////////////////////////////////////////////////////
......
511 527
    public ObjectControl(Activity act, ObjectLibInterface actioner)
512 528
      {
513 529
      mIsAutomatic = false;
530
      mForcedIconMode = false;
514 531

  
515 532
      mLastCubitColor = -1;
516 533
      mCurrRotSpeed   = 0.0f;
......
569 586
      BlockController.onResume();
570 587
      }
571 588

  
589
///////////////////////////////////////////////////////////////////////////////////////////////////
590

  
591
    public void rotateNow(Static4D quat)
592
      {
593
      mTemp.set(quat);
594
      mQuat.set(mTemp);
595
      }
596

  
572 597
///////////////////////////////////////////////////////////////////////////////////////////////////
573 598

  
574 599
    public void setQuat()

Also available in: Unified diff