Package java.nio

Examples of java.nio.FloatBuffer.limit()


            final float diffY = cachedParameter.getDiffY();
            final float offsetX = cachedParameter.getOffsetX();
            final float offsetY = cachedParameter.getOffsetY();

            final FloatBuffer destination = parameterObject.getTextureCoords();
            for (int i = 0; i < destination.limit(); i += 2) {
                destination.put(i, destination.get(i) * diffX + offsetX);
                destination.put(i + 1, destination.get(i + 1) * diffY + offsetY);
            }

            parameterObject.setAtlasIndex(cachedParameter.getAtlasIndex());
View Full Code Here


        parameterObject.setDiffY(diffY);
        parameterObject.setOffsetX(offsetX);
        parameterObject.setOffsetY(offsetY);

        final FloatBuffer destination = parameterObject.getTextureCoords();
        for (int i = 0; i < destination.limit(); i += 2) {
            destination.put(i, destination.get(i) * diffX + offsetX);
            destination.put(i + 1, destination.get(i + 1) * diffY + offsetY);
        }
    }

View Full Code Here

        cache.counts[i] = counts.get(i);

      FloatBuffer vertices = mesh.getVerticesBuffer();
      vertices.position(0);
      Cache lastCache = caches.get(caches.size - 1);
      vertices.limit(lastCache.offset + lastCache.maxCount);
    }

    currentCache = null;
    textures.clear();
    counts.clear();
View Full Code Here

    FloatBuffer buffer = asFloatBuffer(dst);

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, the limit
   * will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error checking is
View Full Code Here

        cache.counts[i] = counts.get(i);

      FloatBuffer vertices = mesh.getVerticesBuffer();
      vertices.position(0);
      Cache lastCache = caches.get(caches.size - 1);
      vertices.limit(lastCache.offset + lastCache.maxCount);
    }

    currentCache = null;
    textures.clear();
    counts.clear();
View Full Code Here

    if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or FloatBuffer");

    int oldPosition = buffer.position();
    buffer.put(src, srcOffset, numElements);
    buffer.position(oldPosition);
    buffer.limit(oldPosition + numElements);
  }

  /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's
   * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, the limit
   * will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error checking is
View Full Code Here

        cache.counts[i] = counts.get(i);

      FloatBuffer vertices = mesh.getVerticesBuffer();
      vertices.position(0);
      Cache lastCache = caches.get(caches.size - 1);
      vertices.limit(lastCache.offset + lastCache.maxCount);
    }

    currentCache = null;
    textures.clear();
    counts.clear();
View Full Code Here

            points.rewind();
           
            float[] pointsArr = ToolsBuffers.getFloatArray(points);
            buf.put(pointsArr);
            buf.flip();
            this.recurseMini(buf, buf.limit() / 3, 0, 0);
      }
     
      /**
       * Calculates a minimum bounding sphere for the set of points. The algorithm
       * was originally found at
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.