GeomConverter/src/org/lcsim/geometry/segmentation
diff -u -r1.1 -r1.2
--- CartesianGridXY.java 15 Sep 2009 00:57:52 -0000 1.1
+++ CartesianGridXY.java 15 Sep 2009 19:55:31 -0000 1.2
@@ -36,6 +36,8 @@
private double[] globalPosition =
{ 0, 0, 0 };
+ private boolean needsCompute = true;
+
List<Integer> geomFields;
public CartesianGridXY(Element node) throws DataConversionException
@@ -148,6 +150,11 @@
public double[] getPosition()
{
+ if (needsCompute)
+ {
+ computePosition();
+ needsCompute = false;
+ }
return globalPosition;
}
@@ -184,7 +191,7 @@
public void setID(long id)
{
super.setID(id);
- computePosition();
+ needsCompute = true;
}
public void setIDDescription(IDDescriptor id)
GeomConverter/src/org/lcsim/geometry/segmentation
diff -u -r1.11 -r1.12
--- SegmentationBase.java 15 Sep 2009 00:56:22 -0000 1.11
+++ SegmentationBase.java 15 Sep 2009 19:55:31 -0000 1.12
@@ -123,5 +123,5 @@
public long getID()
{
return this.getDecoder().getID();
- }
+ }
}