The code responsible in Primitives.Java is a check at the top of the function call:Exception in thread "main" java.lang.IllegalArgumentException: Can only do full cylinders
at de.jreality.geometry.Primitives.closedCylinder(Primitives.java:484)
at de.jreality.geometry.Primitives.closedCylinder(Primitives.java:479)
at ...
Code: Select all
public static SceneGraphComponent closedCylinder(int n, double r, double R, double zmin, double zmax, double thetamax) {
if (Math.abs(thetamax - 2*Math.PI) > 10E-4)
throw new IllegalArgumentException("Can only do full cylinders");
Here's a patch if you're interested:
Code: Select all
Index: src-core/de/jreality/geometry/Primitives.java
===================================================================
--- src-core/de/jreality/geometry/Primitives.java (revision 5485)
+++ src-core/de/jreality/geometry/Primitives.java (working copy)
@@ -475,10 +475,17 @@
ifs.setGeometryAttributes(CommonAttributes.RMAN_PROXY_COMMAND, "Cylinder "+r+" "+zmin+" "+zmax+" "+180.0/Math.PI * thetamax);
return ifs;
}
+ public static SceneGraphComponent closedFullCylinder(int n, double r, double zmin, double zmax) {
+ return closedCylinder(n,r,r,zmin, zmax, 2*Math.PI);
+ }
+ public static SceneGraphComponent closedFullCylinder(int n, double r, double R, double zmin, double zmax) {
+ return closedCylinder(n,r,R,zmin,zmax,2*Math.PI);
+ }
+ /** @deprecated thetamax not implemented yet: Use closedFullCylinder */
public static SceneGraphComponent closedCylinder(int n, double r, double zmin, double zmax, double thetamax) {
return closedCylinder(n,r,r,zmin, zmax, thetamax);
}
-
+ /** @deprecated thetamax not implemented yet: Use closedFullCylinder */
public static SceneGraphComponent closedCylinder(int n, double r, double R, double zmin, double zmax, double thetamax) {
if (Math.abs(thetamax - 2*Math.PI) > 10E-4)
throw new IllegalArgumentException("Can only do full cylinders");