-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSuperball.java
52 lines (45 loc) · 1.07 KB
/
Superball.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import org.lwjgl.*;
import org.lwjgl.opengl.*;
import java.util.*;
import java.lang.Math;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import java.lang.Math;
public class Superball extends Particle {
public Superball(){
super();
bounce = 0.95f;
r = 3;
type = "Superball";
}
public Superball(float xl, float yl) {
super(xl,yl);
bounce = 0.95f;
r = 3;
type = "Superball";
}
public Superball(float xloc, float yloc, float xvel, float yvel, float xacc, double yacc,
boolean contactx, boolean contacty, boolean settled){
this.xloc = xloc;
this.yloc = yloc;
this.xvel = xvel;
this.yvel = yvel;
this.xacc = xacc;
this.yacc = yacc;
this.contactx = contactx;
this.contacty = contacty;
this.settled = settled;
bounce = 0.95f;
r = 3;
type = "Superball";
}
public void display(){
GL11.glColor3f(1.0f, 0.2f, 0.4f);
super.display();
}
}