Package java.nio

Examples of java.nio.FloatBuffer.array()


    gl.glGetFloatv(GL.GL_PROJECTION_MATRIX, fbproj);

    gl.glGetFloatv(GL.GL_MODELVIEW_MATRIX, fbmodl);

    float proj[] = fbproj.array();
    float modl[] = fbmodl.array();

    // multiply modl*proj to get resulting view matrix

    clip[0] = modl[0] * proj[0] + modl[1] * proj[4] + modl[2] * proj[8]
        + modl[3] * proj[12];
 
View Full Code Here


        FloatBuffer wb = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData();

        ib.rewind();
        wb.rewind();

        float[] weights = wb.array();
        byte[] indices = ib.array();
        int idxWeights = 0;

        TempVars vars = TempVars.get();
View Full Code Here

        FloatBuffer wb = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData();

        ib.rewind();
        wb.rewind();

        float[] weights = wb.array();
        byte[] indices = ib.array();
        int idxWeights = 0;

        TempVars vars = TempVars.get();
View Full Code Here

    private HeightMap getHeightMapAt(Vector3f location) {
        AbstractHeightMap heightmap = null;
       
        FloatBuffer buffer = this.base.getBuffer(location.x * (this.quadSize - 1), location.z * (this.quadSize - 1), 0, this.quadSize);

        float[] arr = buffer.array();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] * this.heightScale;
        }
        heightmap = new FloatBufferHeightMap(buffer);
        heightmap.load();
View Full Code Here

      file.put(BINARY_TYPE, BYTEBUFFER);
    } else if (data instanceof FloatBuffer) {
      FloatBuffer bb = (FloatBuffer)data;
      float[] buf;
      if (bb.hasArray()) {
        buf = bb.array();
      } else {
        bb.rewind();
        buf = new float[bb.remaining()];
        bb.get(buf);
      }
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.