GeomConverter/src/org/lcsim/detector/solids
diff -N Polycone.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Polycone.java 11 Sep 2007 20:34:14 -0000 1.1
@@ -0,0 +1,80 @@
+package org.lcsim.detector.solids;
+
+import hep.physics.vec.Hep3Vector;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A port of Polycone that only maintains data members.
+ * No solid functionality for now.
+ *
+ * @author Jeremy McCormick <[log in to unmask]>
+ */
+public class Polycone extends AbstractSolid
+{
+ List<ZPlane> zplanes = new ArrayList<ZPlane>();
+
+ public Polycone(String name, List<ZPlane> zplanes)
+ {
+ super(name);
+ for (ZPlane zplane : zplanes)
+ {
+ this.zplanes.add(zplane);
+ }
+ }
+
+ public List<ZPlane> getZPlanes()
+ {
+ return zplanes;
+ }
+
+ public int getNumberOfZPlanes()
+ {
+ return zplanes.size();
+ }
+
+ public ZPlane getZPlane(int idx)
+ {
+ return zplanes.get(idx);
+ }
+
+ public static class ZPlane
+ {
+ double rmin, rmax, z;
+
+ public ZPlane(double rmin, double rmax, double z)
+ {
+ this.rmin = rmin;
+ this.rmax = rmax;
+ this.z = z;
+ }
+
+ public double getRMin()
+ {
+ return rmin;
+ }
+
+ public double getRMax()
+ {
+ return rmax;
+ }
+
+ public double getZ()
+ {
+ return z;
+ }
+ }
+
+ public double getCubicVolume()
+ {
+ if (true) throw new RuntimeException("not implemented");
+ return 0;
+ }
+
+ public Inside inside(Hep3Vector position)
+ {
+ if (true) throw new RuntimeException("not implemented");
+ return null;
+ }
+}
\ No newline at end of file