Thread.sleep(MathUtils.nextRandomInt(0, 2000)); } catch (final InterruptedException e) { running = false; final int x = MathUtils.nextRandomInt(0, side - 1); final int y = MathUtils.nextRandomInt(0, side - 1); final int radius = MathUtils.nextRandomInt(0, side / 10); * (MathUtils.nextRandomInt(0, 2) != 0 ? 1 : -1);
Thread.sleep(MathUtils.nextRandomInt(0, 2000)); } catch (final InterruptedException e) { running = false; final int x = MathUtils.nextRandomInt(0, side - 1); final int y = MathUtils.nextRandomInt(0, side - 1); final int radius = MathUtils.nextRandomInt(0, side / 10); * (MathUtils.nextRandomInt(0, 2) != 0 ? 1 : -1);
/** * Random vertex. * * @param store * the vector object to store the result in. if null, a new one is created. * * @return a random vertex from the vertices stored in this MeshData. null is returned if there are no vertices. */ public Vector3 randomVertex(final Vector3 store) { if (_vertexCoords == null) { return null; } Vector3 result = store; if (result == null) { result = new Vector3(); } final int i = MathUtils.nextRandomInt(0, getVertexCount() - 1); BufferUtils.populateFromBuffer(result, _vertexCoords.getBuffer(), i); return result; }
/** * Random vertex. * * @param store * the vector object to store the result in. if null, a new one is created. * * @return a random vertex from the vertices stored in this MeshData. null is returned if there are no vertices. */ public Vector3 randomVertex(final Vector3 store) { final FloatBufferData vertexCoords = getVertexCoords(); if (vertexCoords == null) { return null; } Vector3 result = store; if (result == null) { result = new Vector3(); } final int i = MathUtils.nextRandomInt(0, getVertexCount() - 1); BufferUtils.populateFromBuffer(result, vertexCoords.getBuffer(), i); return result; }
final int section = MathUtils.nextRandomInt(0, getSectionCount() - 1); final int primitiveIndex = MathUtils.nextRandomInt(0, getPrimitiveCount(section) - 1);
final int section = MathUtils.nextRandomInt(0, getSectionCount() - 1); final int primitiveIndex = MathUtils.nextRandomInt(0, getPrimitiveCount(section) - 1);