/** * Create a WireSphere from a BoundingSphere * * @param bsph * BoundingSphere used to create the WireSphere * */ public void fromBoundingSphere(BoundingSphere bsph) { updatePositions(bsph.getRadius()); } }
public WireSphere(float radius) { updatePositions(radius); ShortBuffer ib = BufferUtils.createShortBuffer(samples * 2 * 2 + zSamples * samples * 2 /*+ 3 * 2*/); setBuffer(Type.Index, 2, ib); // ib.put(new byte[]{ // (byte) 0, (byte) 1, // (byte) 2, (byte) 3, // (byte) 4, (byte) 5, // }); // int curNum = 3 * 2; int curNum = 0; for (int j = 0; j < 2 + zSamples; j++) { for (int i = curNum; i < curNum + samples - 1; i++) { ib.put((short) i).put((short) (i + 1)); } ib.put((short) (curNum + samples - 1)).put((short) curNum); curNum += samples; } setMode(Mode.Lines); updateBound(); updateCounts(); }
/** * Create a WireSphere from a BoundingSphere * * @param bsph * BoundingSphere used to create the WireSphere * */ public void fromBoundingSphere(BoundingSphere bsph) { updatePositions(bsph.getRadius()); } }
/** * Create a WireSphere from a BoundingSphere * * @param bsph * BoundingSphere used to create the WireSphere * */ public void fromBoundingSphere(BoundingSphere bsph) { updatePositions(bsph.getRadius()); } }
public WireSphere(float radius) { updatePositions(radius); ShortBuffer ib = BufferUtils.createShortBuffer(samples * 2 * 2 + zSamples * samples * 2 /*+ 3 * 2*/); setBuffer(Type.Index, 2, ib); // ib.put(new byte[]{ // (byte) 0, (byte) 1, // (byte) 2, (byte) 3, // (byte) 4, (byte) 5, // }); // int curNum = 3 * 2; int curNum = 0; for (int j = 0; j < 2 + zSamples; j++) { for (int i = curNum; i < curNum + samples - 1; i++) { ib.put((short) i).put((short) (i + 1)); } ib.put((short) (curNum + samples - 1)).put((short) curNum); curNum += samples; } setMode(Mode.Lines); updateBound(); updateCounts(); }
public WireSphere(float radius) { updatePositions(radius); ShortBuffer ib = BufferUtils.createShortBuffer(samples * 2 * 2 + zSamples * samples * 2 /*+ 3 * 2*/); setBuffer(Type.Index, 2, ib); // ib.put(new byte[]{ // (byte) 0, (byte) 1, // (byte) 2, (byte) 3, // (byte) 4, (byte) 5, // }); // int curNum = 3 * 2; int curNum = 0; for (int j = 0; j < 2 + zSamples; j++) { for (int i = curNum; i < curNum + samples - 1; i++) { ib.put((short) i).put((short) (i + 1)); } ib.put((short) (curNum + samples - 1)).put((short) curNum); curNum += samples; } setMode(Mode.Lines); updateBound(); updateCounts(); }