Here you can find the source of swap(final float[] pVertices, final int pVertexStride, final int pVertexIndexA, final int pVertexIndexB)
public static void swap(final float[] pVertices, final int pVertexStride, final int pVertexIndexA, final int pVertexIndexB)
//package com.java2s; //License from project: Apache License public class Main { public static void swap(final float[] pVertices, final int pVertexStride, final int pVertexIndexA, final int pVertexIndexB) { final int vertexOffsetA = pVertexIndexA * pVertexStride; final int vertexOffsetB = pVertexIndexB * pVertexStride; for (int i = pVertexStride - 1; i >= 0; i--) { final float tmp = pVertices[vertexOffsetA + i]; pVertices[vertexOffsetA + i] = pVertices[vertexOffsetB + i]; pVertices[vertexOffsetB + i] = tmp; }//from w w w . ja v a2 s. c o m } }