/** * Calculates a minimum bounding sphere for the set of points. The algorithm * was originally found in C++ at * <p><a href="http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1"> * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1</a><br><strong>broken link</strong></p> * <p>and translated to java by Cep21</p> * * @param points * The points to calculate the minimum bounds from. */ public void calcWelzl(FloatBuffer points) { if (center == null) { center = new Vector3f(); } FloatBuffer buf = BufferUtils.createFloatBuffer(points.limit()); points.rewind(); buf.put(points); buf.flip(); recurseMini(buf, buf.limit() / 3, 0, 0); }
BufferUtils.setInBuffer(tempB, points, j - 1 + ap); recurseMini(points, i, b + 1, ap + 1);
/** * Calculates a minimum bounding sphere for the set of points. The algorithm * was originally found in C++ at * <p><a href="http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1"> * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1</a><br><strong>broken link</strong></p> * <p>and translated to java by Cep21</p> * * @param points * The points to calculate the minimum bounds from. */ public void calcWelzl(FloatBuffer points) { if (center == null) { center = new Vector3f(); } FloatBuffer buf = BufferUtils.createFloatBuffer(points.limit()); points.rewind(); buf.put(points); buf.flip(); recurseMini(buf, buf.limit() / 3, 0, 0); }
/** * Calculates a minimum bounding sphere for the set of points. The algorithm * was originally found in C++ at * <p><a href="http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1"> * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-SmallestEnclosingSpheres&forum=cotd&id=-1</a><br><strong>broken link</strong></p> * <p>and translated to java by Cep21</p> * * @param points * The points to calculate the minimum bounds from. */ public void calcWelzl(FloatBuffer points) { if (center == null) { center = new Vector3f(); } FloatBuffer buf = BufferUtils.createFloatBuffer(points.limit()); points.rewind(); buf.put(points); buf.flip(); recurseMini(buf, buf.limit() / 3, 0, 0); }
BufferUtils.setInBuffer(tempB, points, j - 1 + ap); recurseMini(points, i, b + 1, ap + 1);
BufferUtils.setInBuffer(tempB, points, j - 1 + ap); recurseMini(points, i, b + 1, ap + 1);