@Override public void write( ByteBuffer buffer, DataObjectInfo<BillBoard> object ) { writeHeader( buffer, object ); BillBoard bb = object.getData(); writeString( buffer, bb.getTextureID() ); float[] location = bb.getLocation(); buffer.putFloat( location[0] ); buffer.putFloat( location[1] ); buffer.putFloat( location[2] ); buffer.putFloat( bb.getWidth() ); buffer.putFloat( bb.getHeight() ); }
/** * @param ps * @param b * @param index * @throws SQLException */ private Envelope getEnvelope( BillBoard b ) { float[] location = b.getLocation(); float width = b.getWidth() * 0.5f; float height = b.getHeight(); return geomFac.createEnvelope( new double[] { location[0] - width, location[1] - width, location[2] }, new double[] { location[0] + width, location[1] + width, location[2] + height }, null ); }