Package whitening.opengl.s.nehe.commons

Examples of whitening.opengl.s.nehe.commons.Tuple3f


  protected float anguloHorizontal;
  protected float anguloVertical;
  protected float velocidade;
 
  public Camera() {
    this.posicaoCamera = new Tuple3f();
    this.direcaoCamera = new Tuple3f();
   
    this.posicaoCamera.set(-257.0f, -257.0f, 0.0f);
   
    this.posicaoCamera.set(-1.8f, 333.5f, 100.75f);
    this.direcaoCamera.set(-0.0075f, -0.95f, -0.3f);
View Full Code Here


      anguloHorizontal += 360.0f;
    }
  }
 
  public void atualizarPerspectiva(GL gl) {
    Tuple3f v = new Tuple3f();
        float modelViewMatrix[] = new float[16];

        gl.glRotatef(anguloHorizontal, 0.0f, 1.0f, 0.0f);
        gl.glRotatef(anguloVertical, 1.0f, 0.0f, 0.0f);
       
        gl.glGetFloatv(GL.GL_MODELVIEW_MATRIX, modelViewMatrix, 0);
        direcaoCamera.set(modelViewMatrix[8], modelViewMatrix[9], -modelViewMatrix[10]);
       
        gl.glLoadIdentity();

        gl.glRotatef(anguloVertical, 1.0f, 0.0f, 0.0f);
        gl.glRotatef(anguloHorizontal, 0.0f, 1.0f, 0.0f);

        v.scale(velocidade, direcaoCamera);

        posicaoCamera.add(v);

        gl.glTranslatef(-posicaoCamera.getX(), -posicaoCamera.getY(), -posicaoCamera.getZ());
  }
View Full Code Here

TOP

Related Classes of whitening.opengl.s.nehe.commons.Tuple3f

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.