Project

General

Profile

« Previous | Next » 

Revision 3d590d8d

Added by Leszek Koltunski almost 8 years ago

Minor stuff

View differences:

src/main/java/org/distorted/library/DistortedBitmap.java
78 78
     if( ysize<1   ) ysize=  1;
79 79
     if( ysize>256 ) ysize=256;
80 80
     
81
     mSizeX= width;
82
     mSizeY= height;
83
     mSizeZ= 1;
84 81
     mGrid = DistortedGridFactory.getGrid(xsize,ysize);
85
     initializeData();
82
     initializeData(width,height,1);
86 83
     }
87 84

  
88 85
///////////////////////////////////////////////////////////////////////////////////////////////////   
src/main/java/org/distorted/library/DistortedCubes.java
96 96
       }
97 97
     }
98 98
     
99
   mSizeX= cubeSize*Cs;
100
   mSizeY= cubeSize*Rs;
101
   mSizeZ= frontOnly ? 1 : cubeSize;
102 99
   mGrid = DistortedGridFactory.getGrid(cols,desc, frontOnly);
103
   initializeData();
100
   initializeData(cubeSize*Cs,cubeSize*Rs,frontOnly ? 1 : cubeSize);
104 101
   }
105 102

  
106 103
///////////////////////////////////////////////////////////////////////////////////////////////////
......
114 111
 */
115 112
 public DistortedCubes(int cols, int rows, int cubeSize, boolean frontOnly)
116 113
   {
117
   mSizeX= cubeSize*cols;
118
   mSizeY= cubeSize*rows;
119
   mSizeZ= frontOnly ? 1 : cubeSize;
120 114
   mGrid = DistortedGridFactory.getGrid(cols,rows, frontOnly);
121
   initializeData();
115
   initializeData(cubeSize*cols,cubeSize*rows,frontOnly ? 1 : cubeSize);
122 116
   }
123 117

  
124 118
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/library/DistortedObject.java
40 40
  {
41 41
  private static float[] mViewMatrix   = new float[16];
42 42
   
43
  protected EffectQueueMatrix    mM;
44
  protected EffectQueueFragment  mF;
45
  protected EffectQueueVertex    mV;
43
  private EffectQueueMatrix    mM;
44
  private EffectQueueFragment  mF;
45
  private EffectQueueVertex    mV;
46

  
47
  private boolean matrixCloned, vertexCloned, fragmentCloned;
48
  private long mID;
49
  private int mSizeX, mSizeY, mSizeZ; // in screen space
46 50

  
47
  protected boolean matrixCloned, vertexCloned, fragmentCloned;
48
 
49 51
  protected DistortedObjectGrid mGrid = null;
50
  protected long mID;
51
  protected int mSizeX, mSizeY, mSizeZ; // in screen space
52 52

  
53
  protected Bitmap[] mBmp= null; //
54
  int[] mTextureDataH;           // have to be shared among all the cloned Objects
55
  boolean[] mBitmapSet;          //
53
  private Bitmap[] mBmp= null; //
54
  int[] mTextureDataH;         // have to be shared among all the cloned Objects
55
  boolean[] mBitmapSet;        //
56 56

  
57 57
///////////////////////////////////////////////////////////////////////////////////////////////////
58 58
// We have to flip vertically every single Bitmap that we get fed with.
......
78 78

  
79 79
///////////////////////////////////////////////////////////////////////////////////////////////////
80 80

  
81
  protected void initializeData()
81
  protected void initializeData(int x, int y, int z)
82 82
    {
83
    mSizeX= x;
84
    mSizeY= y;
85
    mSizeZ= z;
86

  
83 87
    mID             = DistortedObjectList.add(this);
84 88
    mTextureDataH   = new int[1];
85 89
    mTextureDataH[0]= 0;
......
95 99
    
96 100
///////////////////////////////////////////////////////////////////////////////////////////////////
97 101
    
98
  protected void initializeEffectLists(DistortedObject d, int flags)
102
  private void initializeEffectLists(DistortedObject d, int flags)
99 103
    {
100 104
    if( (flags & Distorted.CLONE_MATRIX) != 0 )
101 105
      {
......
898 902
/**
899 903
 * Directional, sinusoidal wave effect.
900 904
 *
901
 * @param wave   see {@link DistortedObject#wave(Data5D,Data2D)}
905
 * @param wave   see {@link DistortedObject#wave(Data5D,Data3D)}
902 906
 * @param center 3-dimensional Data that, at any given time, returns the Center of the Effect.
903 907
 * @param region Region that masks the Effect.
904 908
 * @return       ID of the effect added, or -1 if we failed to add one.

Also available in: Unified diff