Esempio n. 1
0
 public static Envelope3D of(final GamaShape s) {
   Envelope3D env = of(s.getInnerGeometry());
   if (s.hasAttribute(IShape.DEPTH_ATTRIBUTE)) {
     // Note: A.G 27/03/14 If I put center.setZ(center.z + d ) it gives the issue 898 (that was
     // introduces by
     // revision 9047);
     // Double d = (Double) s.getAttribute(IShape.DEPTH_ATTRIBUTE);
     GamaPoint center = env.centre();
     center.setZ(center.z);
     env.expandToInclude(center);
   }
   return env;
 }
Esempio n. 2
0
 /** Compares the specified object with this envelope for equality. */
 @Override
 public boolean equals(final Object other) {
   if (!(other instanceof Envelope3D)) {
     return false;
   }
   Envelope3D otherEnvelope = (Envelope3D) other;
   if (isNull()) {
     return otherEnvelope.isNull();
   }
   if (super.equals(other) && minz == otherEnvelope.getMinZ() && maxz == otherEnvelope.getMaxZ()) {
     return true;
   }
   return false;
 }
Esempio n. 3
0
 public static Envelope3D of(final Coordinate p) {
   Envelope3D env = new Envelope3D();
   env.init(p);
   return env;
   // return of(p.getInnerGeometry());
 }
Esempio n. 4
0
 public static Envelope3D of(final Envelope e) {
   Envelope3D env = new Envelope3D();
   env.init(e);
   return env;
 }