/** * Instantiate the configured shape in Bullet. */ protected void createShape() { bbuf = BufferUtils.createByteBuffer(heightfieldData.length * 4); // fbuf = bbuf.asFloatBuffer();//FloatBuffer.wrap(heightfieldData); // fbuf.rewind(); // fbuf.put(heightfieldData); for (int i = 0; i < heightfieldData.length; i++) { float f = heightfieldData[i]; bbuf.putFloat(f); } // fbuf.rewind(); objectId = createShape(heightStickWidth, heightStickLength, bbuf, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); setScale(scale); setMargin(margin); }
protected void createShape() { bbuf = BufferUtils.createByteBuffer(heightfieldData.length * 4); // fbuf = bbuf.asFloatBuffer();//FloatBuffer.wrap(heightfieldData); // fbuf.rewind(); // fbuf.put(heightfieldData); for (int i = 0; i < heightfieldData.length; i++) { float f = heightfieldData[i]; bbuf.putFloat(f); } // fbuf.rewind(); objectId = createShape(heightStickWidth, heightStickLength, bbuf, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Created Shape {0}", Long.toHexString(objectId)); setScale(scale); setMargin(margin); }
protected void createShape() { bbuf = BufferUtils.createByteBuffer(heightfieldData.length * 4); // fbuf = bbuf.asFloatBuffer();//FloatBuffer.wrap(heightfieldData); // fbuf.rewind(); // fbuf.put(heightfieldData); for (int i = 0; i < heightfieldData.length; i++) { float f = heightfieldData[i]; bbuf.putFloat(f); } // fbuf.rewind(); objectId = createShape(heightStickWidth, heightStickLength, bbuf, heightScale, minHeight, maxHeight, upAxis, flipQuadEdges); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); setScale(scale); setMargin(margin); }