Package com.ngt.jopenmetaverse.shared.sim.rendering.math

Examples of com.ngt.jopenmetaverse.shared.sim.rendering.math.FloatMatrix4x4


     float[] resultingMatrixData = updateView();
     resultingMatrixBuffer = ByteBuffer.allocateDirect(resultingMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     resultingMatrixBuffer.put(resultingMatrixData);
     resultingMatrixBuffer.position(0);

     FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
     normalMatrix = normalMatrix.transpose();
     float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
     normalMatrixBuffer = ByteBuffer.allocateDirect(normalMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     normalMatrixBuffer.put(normalMatrixData);
     normalMatrixBuffer.position(0);

     //        initVertexBuffer(tmpIntBuffer);
View Full Code Here


    GL20.glUniform3f(uAmbientColorUniform, ambientColorRed, ambientColorGreen, ambientColorBlue);   
    GL20.glUniform3f(uDirectionalColorUniform, directionalColorRed, directionalColorGreen, directionalColorBlue)

    //Normal matrix to adjust the directional light depending upon rotation
    //TODO need to handle the rotation
    FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
    normalMatrix = normalMatrix.transpose();
    float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
    normalMatrixBuffer.position(0);
    normalMatrixBuffer.put(normalMatrixData);
    normalMatrixBuffer.position(0);

    GL20.glUniformMatrix4(normalMatrixUniform, false, normalMatrixBuffer);
View Full Code Here

     float[] resultingMatrixData = updateView();
     resultingMatrixBuffer = ByteBuffer.allocateDirect(resultingMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     resultingMatrixBuffer.put(resultingMatrixData);
     resultingMatrixBuffer.position(0);

     FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
     normalMatrix = normalMatrix.transpose();
     float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
     normalMatrixBuffer = ByteBuffer.allocateDirect(normalMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     normalMatrixBuffer.put(normalMatrixData);
     normalMatrixBuffer.position(0);

     checkErrors("After Initializing BUffers");
View Full Code Here

        flatLightDirection[2]);   
    GL20.glUniform3f(uAmbientColorUniform, ambientColorRed, ambientColorGreen, ambientColorBlue);   
    GL20.glUniform3f(uDirectionalColorUniform, directionalColorRed, directionalColorGreen, directionalColorBlue)

    //Normal matrix to adjust the directional light depending upon rotation
    FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
    normalMatrix = normalMatrix.transpose();
    float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
    normalMatrixBuffer.position(0);
    normalMatrixBuffer.put(normalMatrixData);
    normalMatrixBuffer.position(0);

    GL20.glUniformMatrix4(normalMatrixUniform, false, normalMatrixBuffer);
View Full Code Here

     float[] resultingMatrixData = updateView();
     resultingMatrixBuffer = ByteBuffer.allocateDirect(resultingMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     resultingMatrixBuffer.put(resultingMatrixData);
     resultingMatrixBuffer.position(0);

     FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
     normalMatrix = normalMatrix.transpose();
     float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
     normalMatrixBuffer = ByteBuffer.allocateDirect(normalMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     normalMatrixBuffer.put(normalMatrixData);
     normalMatrixBuffer.position(0);

     //        initVertexBuffer(tmpIntBuffer);
View Full Code Here

        flatLightDirection[2]);   
    GL20.glUniform3f(uAmbientColorUniform, ambientColorRed, ambientColorGreen, ambientColorBlue);   
    GL20.glUniform3f(uDirectionalColorUniform, directionalColorRed, directionalColorGreen, directionalColorBlue)

    //Normal matrix to adjust the directional light depending upon rotation
    FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
    normalMatrix = normalMatrix.transpose();
    float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
    normalMatrixBuffer.position(0);
    normalMatrixBuffer.put(normalMatrixData);
    normalMatrixBuffer.position(0);

    GL20.glUniformMatrix4(normalMatrixUniform, false, normalMatrixBuffer);
View Full Code Here

     float[] resultingMatrixData = updateView();
     resultingMatrixBuffer = ByteBuffer.allocateDirect(resultingMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     resultingMatrixBuffer.put(resultingMatrixData);
     resultingMatrixBuffer.position(0);

     FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
     normalMatrix = normalMatrix.transpose();
     float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
     normalMatrixBuffer = ByteBuffer.allocateDirect(normalMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
     normalMatrixBuffer.put(normalMatrixData);
     normalMatrixBuffer.position(0);

     //        initVertexBuffer(tmpIntBuffer);
View Full Code Here

                    flatLightDirection[2]);   
        GL20.glUniform3f(uAmbientColorUniform, ambientColorRed, ambientColorGreen, ambientColorBlue);   
        GL20.glUniform3f(uDirectionalColorUniform, directionalColorRed, directionalColorGreen, directionalColorBlue)
   
        //Normal matrix to adjust the directional light depending upon rotation
         FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
             normalMatrix = normalMatrix.transpose();
             float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
        resultingMatrixBuffer.position(0);
        resultingMatrixBuffer.put(normalMatrixData);
        resultingMatrixBuffer.position(0);
            
             GL20.glUniformMatrix4(normalMatrixUniform, false, resultingMatrixBuffer);
View Full Code Here

        float[] resultingMatrixData = updateView();
      resultingMatrixBuffer = ByteBuffer.allocateDirect(resultingMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
    resultingMatrixBuffer.put(resultingMatrixData);
    resultingMatrixBuffer.position(0);
       
    FloatMatrix4x4 normalMatrix = ((FloatMatrix4x4)rotationMatrix).inverse();
        normalMatrix = normalMatrix.transpose();
    float[] normalMatrixData = normalMatrix.getColumnWiseFlatData();
    normalMatrixBuffer = ByteBuffer.allocateDirect(normalMatrixData.length*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
    normalMatrixBuffer.put(normalMatrixData);
    normalMatrixBuffer.position(0);
   
        initVertexBuffer(tmpIntBuffer);
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.rendering.math.FloatMatrix4x4

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.