|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectimagescience.mesh.Cylinder
public class Cylinder
Triangular mesh of a cylinder in 3D.
Constructor Summary | |
---|---|
Cylinder(int lod,
boolean cap)
Constructs the mesh of a unit cylinder at the given level of detail. |
Method Summary | |
---|---|
java.util.Vector<javax.vecmath.Point3f> |
render(javax.vecmath.Point3f p0,
float r0,
javax.vecmath.Point3f p1,
float r1)
Returns a copy of the cylinder mesh with given base and end position and correponding radii. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cylinder(int lod, boolean cap)
lod
- The level of detail. At minimum level 0
the cylinder has 16 faces.cap
- Determines whether the cylinder is capped (closed) or open.
java.lang.IllegalArgumentException
- If lod
is less than 0
.Method Detail |
---|
public java.util.Vector<javax.vecmath.Point3f> render(javax.vecmath.Point3f p0, float r0, javax.vecmath.Point3f p1, float r1)
p0
- The center position of the cylinder base.r0
- The radius of the cylinder base.p1
- The center position of the cylinder end.r1
- The radius of the cylinder end.
Vector<Point3f>
object containing the triangles of the cylinder mesh. Each vector element is one vertex of the mesh and each successive three elements constitute one triangle. For memory efficiency, vertices are shared between adjacent triangles. That is, the corresponding Point3f
elements are handles of the same object.
java.lang.IllegalArgumentException
- If r0
or r1
is less than 0
.
|
ImageScience 3.0.0 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) Erik Meijering. Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.
IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER. THE COPYRIGHT HOLDER IS FREE TO MAKE VERSIONS OF THE SOFTWARE AVAILABLE FOR A FEE OR COMMERCIALLY ONLY.
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND CORRESPONDING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.