Package org.lwjgl.util.vector

Examples of org.lwjgl.util.vector.Matrix4f.scale()


        lightModelView.flip();

        Matrix4f tempMatrix = new Matrix4f();
        tempMatrix.setIdentity();
        tempMatrix.translate(new Vector3f(0.5F, 0.5F, 0.5F));
        tempMatrix.scale(new Vector3f(0.5F, 0.5F, 0.5F));
        Matrix4f.mul(tempMatrix, lightProjectionTemp, textureMatrix);
        Matrix4f.mul(textureMatrix, lightModelViewTemp, tempMatrix);
        Matrix4f.transpose(tempMatrix, textureMatrix);
    }
View Full Code Here


  public Matrix4f getModelMatrix() {
    Matrix4f mat4 = new Matrix4f();
    mat4.setIdentity();
   
    mat4.translate(new Vector3f(this.position.x,this.position.y,this.position.z));
    mat4.scale(new Vector3f(this.scale.x,this.scale.y,this.scale.z));
    mat4.rotate((float)Math.toRadians(this.rotation.x), new Vector3f(1.0f, 0.0f, 0.0f));
    mat4.rotate((float)Math.toRadians(this.rotation.y), new Vector3f(0.0f, 1.0f, 0.0f));
    mat4.rotate((float)Math.toRadians(this.rotation.z), new Vector3f(0.0f, 0.0f, 1.0f));
   
    //FloatBuffer fl = BufferUtils.createFloatBuffer(16);
View Full Code Here

    //reset the matrix to identity, i.e. "no camera transform"
    view.setIdentity();
   
    //scale the view
    if (zoom != 1f) {
      view.scale(new Vector3f(zoom, zoom, 1f));
    }
   
    //pan the camera by translating the view matrix
    view.translate(new Vector2f(panX, panY));
   
View Full Code Here

  public Matrix4f getModelMatrix() {
    Matrix4f mat4 = new Matrix4f();
    mat4.setIdentity();
   
    mat4.translate(new Vector3f(0,0,0));
    mat4.scale(new Vector3f(1,1,1));
   
    return mat4;
  }
 
  public void drawBoundingBox(){
View Full Code Here

  public Matrix4f getModelMatrix() {
    Matrix4f mat4 = new Matrix4f();
    mat4.setIdentity();
   
    mat4.translate(new Vector3f(0,0,0));
    mat4.scale(new Vector3f(1,1,1));
   
    return mat4;
  }
 
  public void draw(int currentCellx, int currentCellz, float camRotY){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.