import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.glu.GLU;
import org.lwjgl.opengl.glu.Sphere;

public class Paddle{

	public float locX;
	public float locY;
	public float locZ;
	public int w = 20;
	public int h = 20;
	
	public void setLocation(float angle,float delta, int r, float z)
	{
		locX = (float) (400+ r*Math.cos(angle+delta));
		locY = (float) (300+ r*Math.sin(angle+delta));
		locZ = z;
		//float theta = (float) ((float) (angle+delta)/3.1415926*180);
		//System.out.println(theta);
	}
	
	public void render()
	{
		/*GL11.glBegin(GL11.GL_QUADS);
		GL11.glVertex3f((int)( - w), (int)( + h), 0);
		GL11.glVertex3f((int)( - w), (int)( - h), 0);
		GL11.glVertex3f((int)( + w), (int)( - h), 0);
		GL11.glVertex3f((int)( + w), (int)( + h), 0);
	
		GL11.glVertex3f((int)( + w), (int)( + h), 0);
		GL11.glVertex3f((int)( + w), (int)( + h), -h);
		GL11.glVertex3f((int)( - w), (int)( + h), -h);
		GL11.glVertex3f((int)( - w), (int)( + h), 0);
		
		GL11.glVertex3f((int)( - w), (int)( + h), 0);
		GL11.glVertex3f((int)( - w), (int)( + h), -h);
		GL11.glVertex3f((int)( - w), (int)( - h), -h);
		GL11.glVertex3f((int)( - w), (int)( - h), 0);
	
		GL11.glVertex3f((int)( + w), (int)( - h), 0);
		GL11.glVertex3f((int)( + w), (int)( + h), 0);
		GL11.glVertex3f((int)( + w), (int)( + h), -h);
		GL11.glVertex3f((int)( + w), (int)( - h), -h);
	
		GL11.glVertex3f((int)( - w), (int)( - h), 0);
		GL11.glVertex3f((int)( - w), (int)( - h), -h);
		GL11.glVertex3f((int)( + w), (int)( - h), -h);
		GL11.glVertex3f((int)( + w), (int)( - h), 0);

		GL11.glVertex3f((int)( + w), (int)( + h), -h);
		GL11.glVertex3f((int)( + w), (int)( - h), -h);
		GL11.glVertex3f((int)( - w), (int)( - h), -h);
		GL11.glVertex3f((int)( - w), (int)( + h), -h);
		
		GL11.glEnd();*/
        Sphere s = new Sphere();       // an LWJGL class for drawing sphere
        s.setOrientation(GLU.GLU_OUTSIDE);  // normals point outwards
        s.setTextureFlag(true);           // generate texture coords
        s.draw(10, 12, 12);   
	}
}


