Here you can find the source of copy(final FloatBuffer source, final int fromPos, final FloatBuffer destination, final int toPos, final int length)
Parameter | Description |
---|---|
source | the buffer to copy from |
fromPos | the starting point to copy from |
destination | the buffer to copy to |
toPos | the starting point to copy to |
length | the number of floats to copy |
public static void copy(final FloatBuffer source, final int fromPos, final FloatBuffer destination, final int toPos, final int length)
//package com.java2s; /**//from w w w. ja va 2 s. c o m * Copyright (c) 2008-2012 Ardor Labs, Inc. * * This file is part of Ardor3D. * * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ import java.nio.FloatBuffer; public class Main { /** * Copies floats from one buffer to another. * * @param source * the buffer to copy from * @param fromPos * the starting point to copy from * @param destination * the buffer to copy to * @param toPos * the starting point to copy to * @param length * the number of floats to copy */ public static void copy(final FloatBuffer source, final int fromPos, final FloatBuffer destination, final int toPos, final int length) { final int oldLimit = source.limit(); source.position(fromPos); source.limit(fromPos + length); destination.position(toPos); destination.put(source); source.limit(oldLimit); } }