125 theta =
new MutatingValue(-360f * ((
float) Math.random() * 30f + 1f), 360f * ((
float) Math.random() * 30f + 1f), 30f + 70f * (
float) Math.random());
126 radius =
new MutatingValue(0, 10f + 15f * (
float) Math.random(), 3f + 7f * (
float) Math.random());
152 float warpRateMult) {
153 this.verticesWide = verticesWide;
154 this.verticesTall = verticesTall;
156 vertices =
new WSVertex[verticesWide][verticesTall];
157 for (
int i = 0; i < verticesWide; i++) {
158 for (
int j = 0; j < verticesTall; j++) {
159 vertices[i][j] =
new WSVertex();
161 vertices[i][j].radius.set(minWarpRadius, maxWarpRadius);
162 vertices[i][j].radius.rate *= warpRateMult;
163 vertices[i][j].theta.rate *= warpRateMult;
193 GL11.glColor4ub((
byte) color.getRed(), (
byte) color.getGreen(),
194 (
byte) color.getBlue(), (
byte)(color.getAlpha() * sprite.
getAlphaMult()));
197 GL11.glTranslatef(xOff, yOff, 0);
199 GL11.glEnable(GL11.GL_TEXTURE_2D);
201 GL11.glDisable(GL11.GL_BLEND);
209 float cw = w / (float) (verticesWide - 1);
210 float ch = h / (float) (verticesTall- 1);
211 float ctw = tw / (float) (verticesWide - 1);
212 float cth = th / (float) (verticesTall- 1);
214 for (
float i = 0; i < verticesWide - 1; i++) {
216 GL11.glBegin(GL11.GL_QUAD_STRIP);
218 for (
float j = 0; j < verticesTall; j++) {
221 float x2 = cw * (i + 1f);
226 float tx2 = ctw * (i + 1f);
229 if (i != 0 && i != verticesWide - 1 && j != 0 && j != verticesTall - 1) {
230 float theta = (float) Math.toRadians(vertices[(
int)i][(
int)j].theta.getValue());
231 float radius = vertices[(int)i][(
int)j].radius.getValue();
232 float sin = (float) Math.sin(theta);
233 float cos = (float) Math.cos(theta);
240 if (i + 1 != 0 && i + 1 != verticesWide - 1 && j != 0 && j != verticesTall - 1) {
241 float theta = (float) Math.toRadians(vertices[(
int)i + 1][(
int)j].theta.getValue());
242 float radius = vertices[(int)i + 1][(
int)j].radius.getValue();
243 float sin = (float) Math.sin(theta);
244 float cos = (float) Math.cos(theta);
251 GL11.glTexCoord2f(tx1, ty1);
252 GL11.glVertex2f(x1, y1);
254 GL11.glTexCoord2f(tx2, ty2);
255 GL11.glVertex2f(x2, y2);