Package org.lwjgl.util.glu

Examples of org.lwjgl.util.glu.Sphere


    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    glEnable(GL_LIGHT0);
    glEnable(GL_LIGHTING);

    sphere = new Sphere();

    if ( "PB".equalsIgnoreCase(args[0]) ) {
      backgroundLoader = new BackgroundLoader() {
        Drawable getDrawable() throws LWJGLException {
          return new Pbuffer(2, 2, new PixelFormat(8, 24, 0), Display.getDrawable());
View Full Code Here


    vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f);
    vectorBuffer.clear();
    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    sphere = new Sphere();
  }
View Full Code Here

    vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f);
    vectorBuffer.clear();
    glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer);

    sphere = new Sphere();
  }
View Full Code Here

  public PaddleGO(Paddle paddle, Material material, GraphicsObjectsManager goManager) {
    super(material, goManager);
    this.paddle = paddle;

    c = new Cylinder();
    sphere = new Sphere();
  }
View Full Code Here

  public Star(float radius, float density) {
    super(Physics.getSphereVolume(radius) * density);
    this.radius = radius;
    this.tensor = Physics.getSphereInertialTensor(mass, radius);
    sphere = new Sphere();
    sphere.setDrawStyle(GLU.GLU_FILL);
    sphere.setNormals(GLU.GLU_SMOOTH);
    sphere.setTextureFlag(true);
  }
View Full Code Here

  public Planet(float radius, float density) {
    super(Physics.getSphereVolume(radius) * density);
    this.radius = radius;
    this.tensor = Physics.getSphereInertialTensor(mass, radius);
    sphere = new Sphere();
    sphere.setDrawStyle(GLU.GLU_FILL);
    sphere.setNormals(GLU.GLU_SMOOTH);
    sphere.setTextureFlag(true);
  }
View Full Code Here

    this.rotZ = rotZ;
    this.hCenter = hCenter;
    this.vCenter = vCenter;

    cylinder = new Cylinder();
    sphere = new Sphere();
  }
View Full Code Here

  private int displayList;

  public SolidBallGO(Ball ball, Material material, GraphicsObjectsManager goManager) {
    super(ball, material, goManager);

    Sphere sphere = new Sphere();

    float radius = ball.getRadius();

    // use more polygons for larger balls
    int res = (int) (7 + 15.0f * radius);

    // create display list
    displayList = GL11.glGenLists(1);
    GL11.glNewList(displayList, GL11.GL_COMPILE);

    sphere.draw(radius, res, res);

    GL11.glEndList();
  }
View Full Code Here

     * @param secondaryColor if non-null, the RGBA used to render occluded sections of the sphere
     * @param radius
     */
    public GLUSphere(Vector3 origin, Color mainColor, Color secondaryColor, float radius) {
        super(origin, mainColor, secondaryColor);
        sphere = new Sphere();
        setGLUQuadric(sphere);
        setRadius(radius);
        setSlices(DEFAULT_SLICES);
        setStacks(DEFAULT_STACKS);
    }
View Full Code Here

    public static void renderSphereGeometry() {
        if (displayListSphere == -1) {
            displayListSphere = glGenLists(1);

            Sphere sphere = new Sphere();

            glNewList(displayListSphere, GL11.GL_COMPILE);

            sphere.draw(1, 8, 8);

            glEndList();
        }

        glCallList(displayListSphere);
View Full Code Here

TOP

Related Classes of org.lwjgl.util.glu.Sphere

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.