Project

General

Profile

« Previous | Next » 

Revision 568d4698

Added by Leszek Koltunski over 2 years ago

New API to objectlib to recreate an already displayed object (because the settings, like 'IconMode' might have changed) and using the new API in puzzle-creator.

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;
83
    private static boolean mForcedIconMode = false, mForcedCreateMesh = false;
84 84

  
85 85
///////////////////////////////////////////////////////////////////////////////////////////////////
86 86
// cast the 3D axis we are currently rotating along (which is already casted to the surface of the
......
508 508

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

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

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

  
518
    public static void setForcedMesh(boolean mode)
519
      {
520
      mForcedCreateMesh = mode;
514 521
      }
515 522

  
516 523
///////////////////////////////////////////////////////////////////////////////////////////////////
......
520 527
      return mForcedIconMode;
521 528
      }
522 529

  
530
///////////////////////////////////////////////////////////////////////////////////////////////////
531

  
532
    public static boolean isInCreateMesh()
533
      {
534
      return mForcedCreateMesh;
535
      }
536

  
523 537
///////////////////////////////////////////////////////////////////////////////////////////////////
524 538
// PUBLIC API
525 539
///////////////////////////////////////////////////////////////////////////////////////////////////
......
527 541
    public ObjectControl(Activity act, ObjectLibInterface actioner)
528 542
      {
529 543
      mIsAutomatic = false;
530
      mForcedIconMode = false;
531 544

  
532 545
      mLastCubitColor = -1;
533 546
      mCurrRotSpeed   = 0.0f;
......
696 709
      mPreRender.changeObject(object);
697 710
      }
698 711

  
712
///////////////////////////////////////////////////////////////////////////////////////////////////
713

  
714
    public void recreateObject()
715
      {
716
      mPreRender.recreateObject();
717
      }
718

  
699 719
///////////////////////////////////////////////////////////////////////////////////////////////////
700 720

  
701 721
    public void scrambleObject(int num)

Also available in: Unified diff