Project

General

Profile

« Previous | Next » 

Revision 044b5494

Added by Leszek Koltunski about 4 years ago

Move the Effects.setStretch to Meshbase.setStretch

View differences:

src/main/java/org/distorted/library/main/DistortedEffects.java
36 36
  private long mID;
37 37
  private EffectQueue[] mQueues;
38 38

  
39
  private int[] mStretchX, mStretchY, mStretchZ;
40

  
41 39
///////////////////////////////////////////////////////////////////////////////////////////////////
42 40
/**
43 41
 * @y.exclude
......
60 58
/**
61 59
 * Create empty effect queue.
62 60
 */
63
  public DistortedEffects(int stretchX, int stretchY, int stretchZ)
64
    {
65
    mStretchX = new int[1];
66
    mStretchY = new int[1];
67
    mStretchZ = new int[1];
68

  
69
    mStretchX[0] = stretchX;
70
    mStretchY[0] = stretchY;
71
    mStretchZ[0] = stretchZ;
72

  
73
    mID = ++mNextID;
74
    mQueues = new EffectQueue[EffectType.LENGTH];
75
    EffectQueue.allocateQueues(mQueues,null,0);
76
    }
77

  
78
///////////////////////////////////////////////////////////////////////////////////////////////////
79
/**
80
 * Temporary constructor.
81
 */
82
 public DistortedEffects(int dummy)
61
 public DistortedEffects()
83 62
    {
84
    mStretchX = new int[1];
85
    mStretchY = new int[1];
86
    mStretchZ = new int[1];
87

  
88
    mStretchX[0] = 1;
89
    mStretchY[0] = 1;
90
    mStretchZ[0] = 1;
91

  
92 63
    mID = ++mNextID;
93 64
    mQueues = new EffectQueue[EffectType.LENGTH];
94 65
    EffectQueue.allocateQueues(mQueues,null,0);
......
106 77
 */
107 78
  public DistortedEffects(DistortedEffects dc, int flags)
108 79
    {
109
    mStretchX = dc.mStretchX;
110
    mStretchY = dc.mStretchY;
111
    mStretchZ = dc.mStretchZ;
112

  
113 80
    mID = ++mNextID;
114 81
    mQueues = new EffectQueue[EffectType.LENGTH];
115 82
    EffectQueue.allocateQueues(mQueues,dc.getQueues(),flags);
116 83
    }
117 84

  
118
///////////////////////////////////////////////////////////////////////////////////////////////////
119
/**
120
 * Sets the stretch parameters. Coordinates of all vertices of any Mesh rendered with those Effects
121
 * will be first pre-multiplied by those.
122
 */
123
  public void setStretch(int sx, int sy, int sz)
124
    {
125
    mStretchX[0] = sx;
126
    mStretchY[0] = sy;
127
    mStretchZ[0] = sz;
128
    }
129

  
130
///////////////////////////////////////////////////////////////////////////////////////////////////
131
/**
132
 * X coordinates of all vertices of any Mesh rendered with those Effects will be first pre-multiplied
133
 * by this parameter.
134
 */
135
  public int getStartchX()
136
    {
137
    return mStretchX[0];
138
    }
139

  
140
///////////////////////////////////////////////////////////////////////////////////////////////////
141
/**
142
 * Y coordinates of all vertices of any Mesh rendered with those Effects will be first pre-multiplied
143
 * by this parameter.
144
 */
145
  public int getStartchY()
146
    {
147
    return mStretchY[0];
148
    }
149

  
150
///////////////////////////////////////////////////////////////////////////////////////////////////
151
/**
152
 * Z coordinates of all vertices of any Mesh rendered with those Effects will be first pre-multiplied
153
 * by this parameter.
154
 */
155
  public int getStartchZ()
156
    {
157
    return mStretchZ[0];
158
    }
159

  
160 85
///////////////////////////////////////////////////////////////////////////////////////////////////
161 86
/**
162 87
 * Returns unique ID of this instance.

Also available in: Unified diff