Project

General

Profile

« Previous | Next » 

Revision 3d2493ea

Added by Leszek Koltunski over 2 years ago

Simplify coloring internal stickers

View differences:

src/main/java/org/distorted/objectlib/helpers/FactoryCubit.java
854 854

  
855 855
///////////////////////////////////////////////////////////////////////////////////////////////////
856 856

  
857
  public float[] getStickerScales(boolean all)
857
  public float[] getStickerScales()
858 858
    {
859 859
    int index=0,num=0,len = mStickerCoords.size();
860 860

  
861
    if( !all )
862
      {
863
      for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
864
      }
865
    else
866
      {
867
      num = len;
868
      }
861
    for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
869 862

  
870 863
    if( num>0 )
871 864
      {
......
874 867
      for(int i=0; i<len; i++)
875 868
        {
876 869
        StickerCoords sticker = mStickerCoords.get(i);
877
        if( all || sticker.outer ) scales[index++] = sticker.scale;
870
        if( sticker.outer ) scales[index++] = sticker.scale;
878 871
        }
879 872

  
880 873
      return scales;
......
885 878

  
886 879
///////////////////////////////////////////////////////////////////////////////////////////////////
887 880

  
888
  public float[][] getStickerCoords(boolean all)
881
  public float[][] getStickerCoords()
889 882
    {
890 883
    int index=0,num=0,len = mStickerCoords.size();
891 884

  
892
    if( !all )
893
      {
894
      for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
895
      }
896
    else
897
      {
898
      num = len;
899
      }
885
    for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
900 886

  
901 887
    if( num>0 )
902 888
      {
......
905 891
      for(int i=0; i<len; i++)
906 892
        {
907 893
        StickerCoords sticker = mStickerCoords.get(i);
908
        if( all || sticker.outer ) coords[index++] = sticker.vertices;
894
        if( sticker.outer ) coords[index++] = sticker.vertices;
909 895
        }
910 896

  
911 897
      return coords;

Also available in: Unified diff