public void getTriangle(int index, Vector3f v1, Vector3f v2, Vector3f v3) {
        VertexBuffer pb = getBuffer(Type.Position);
        IndexBuffer ib = getIndicesAsList();
        if (pb != null && pb.getFormat() == Format.Float && pb.getNumComponents() == 3) {
            FloatBuffer fpb = (FloatBuffer) pb.getData();

            // acquire triangle's vertex indices
            int vertIndex = index * 3;
            int vert1 = ib.get(vertIndex);
            int vert2 = ib.get(vertIndex + 1);
            int vert3 = ib.get(vertIndex + 2);

            BufferUtils.populateFromBuffer(v1, fpb, vert1);
            BufferUtils.populateFromBuffer(v2, fpb, vert2);
            BufferUtils.populateFromBuffer(v3, fpb, vert3);
        } else {
            throw new UnsupportedOperationException("Position buffer not set or "
                    + " has incompatible format");
        }
    }
Gets the triangle vertex positions at the given triangle index
and stores them into the v1, v2, v3 arguments.

@param index The index of the triangle.
Should be between 0 and {@link #getTriangleCount()}.

@param v1 Vector to contain first vertex position
@param v2 Vector to contain second vertex position
@param v3 Vector to contain third vertex position
jme3-core/src/main/java/com/jme3/scene/Mesh.java