Project

General

Profile

« Previous | Next » 

Revision 1561a74f

Added by Leszek Koltunski over 2 years ago

Progress

View differences:

src/main/java/org/distorted/objectlib/helpers/FactoryCubit.java
52 52
  private static final float[] mQuat3  = new float[4];
53 53
  private static final float[] mQuat4  = new float[4];
54 54

  
55
  private static class StickerCoords
55
  public static class StickerCoords
56 56
    {
57 57
    float[] vertices;
58
    float scale;
58 59
    boolean outer;
59 60
    }
60 61

  
......
257 258
    int len = vert3D.length;
258 259
    StickerCoords sInfo = new StickerCoords();
259 260
    sInfo.outer = isOuter;
261
    sInfo.scale = info.scale;
260 262
    sInfo.vertices = new float[2*len];
261 263

  
262 264
    for( int vertex=0; vertex<len; vertex++ )
......
775 777

  
776 778
      if( info.outer )  ret++;
777 779

  
778
      String ver = info.outer+" { ";
780
      String ver = (info.outer?"OUTER":"INNER")+" scale: "+info.scale+" { ";
779 781
      int len = info.vertices.length/2;
780 782

  
781 783
      for(int i =0; i<len; i++)
......
910 912
      }
911 913
    }
912 914

  
915
///////////////////////////////////////////////////////////////////////////////////////////////////
916

  
917
  public float[][] getOuterStickerCoords()
918
    {
919
    int index=0,num=0,len = mStickerCoords.size();
920

  
921
    for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
922

  
923
    if( num>0 )
924
      {
925
      float[][] coords = new float[num][];
926

  
927
      for(int i=0; i<len; i++)
928
        {
929
        StickerCoords sticker = mStickerCoords.get(i);
930
        if( sticker.outer ) coords[index++] = sticker.vertices;
931
        }
932

  
933
      return coords;
934
      }
935

  
936
    return null;
937
    }
938

  
939
///////////////////////////////////////////////////////////////////////////////////////////////////
940

  
941
  public float[] getOuterStickerScales()
942
    {
943
    int index=0,num=0,len = mStickerCoords.size();
944

  
945
    for(int i=0; i<len; i++) if( mStickerCoords.get(i).outer ) num++;
946

  
947
    if( num>0 )
948
      {
949
      float[] scales = new float[num];
950

  
951
      for(int i=0; i<len; i++)
952
        {
953
        StickerCoords sticker = mStickerCoords.get(i);
954
        if( sticker.outer ) scales[index++] = sticker.scale;
955
        }
956

  
957
      return scales;
958
      }
959

  
960
    return null;
961
    }
962

  
913 963
///////////////////////////////////////////////////////////////////////////////////////////////////
914 964

  
915 965
  public MeshBase createRoundedSolid(final ObjectShape shape, int meshState)

Also available in: Unified diff