super(color, goManager);
ballGlowVShader = ShaderManager.getInstance().getShader("ballGlow.arbvp1");
ballGlowFShader = ShaderManager.getInstance().getShader("ballGlow.arbfp1");
pos2d = new Vector3f(x, y, z);
position = new Vector3f(x, y, z);
this.textDist = textDist;
tailDistance = new Vector3f(0.0f, 0.0f, 2.0f);
rotationMatrix = new Matrix4f();
state = State.NORMAL;
normalColor = new Color(1.0f, 0.9f, 0.7f);
this.hoverColor = hoverColor;
applyColor = new Color(0.3f, 1.0f, 0.0f);
discardColor = new Color(1.0f, 0.2f, 0.0f);
tailColor = normalColor;
float red = color.getR();
float green = color.getG();
float blue = color.getB();
// create head light
headLight = Lighting.addLight(position, 0.1f * red, 0.1f * green, 0.1f * blue, red, green, blue, red, green,
blue);
// create head display list
headDisplayList = GL11.glGenLists(1);
GL11.glNewList(headDisplayList, GL11.GL_COMPILE);
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex3f(-HEAD_RADIUS, -HEAD_RADIUS, 0.0f); // bottom left
GL11.glVertex3f(HEAD_RADIUS, -HEAD_RADIUS, 0.0f); // bottom right
GL11.glVertex3f(HEAD_RADIUS, HEAD_RADIUS, 0.0f); // top right
GL11.glVertex3f(-HEAD_RADIUS, HEAD_RADIUS, 0.0f); // top left
GL11.glEnd();
GL11.glEndList();
// create tail light
tailPosition = new Vector3f();
Vector3f.add(position, tailDistance, tailPosition);
tailLight = Lighting.addLight(tailPosition, ambientFactor * normalColor.getR(),
ambientFactor * normalColor.getG(), ambientFactor * normalColor.getB(),
diffuseFactor * normalColor.getR(), diffuseFactor * normalColor.getG(),