Skip to content

v0.2.50..v0.2.51 changeset Element.h

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/elements/Element.h b/hoot-core/src/main/cpp/hoot/core/elements/Element.h
index 3d3a68a..f22117c 100644
--- a/hoot-core/src/main/cpp/hoot/core/elements/Element.h
+++ b/hoot-core/src/main/cpp/hoot/core/elements/Element.h
@@ -92,6 +92,8 @@ public:
    */
   virtual geos::geom::Envelope* getEnvelope(
     const std::shared_ptr<const ElementProvider>& ep) const = 0;
+  virtual const geos::geom::Envelope& getEnvelopeInternal(
+    const std::shared_ptr<const ElementProvider>& ep) const = 0;
 
   long getId() const { return _getElementData().getId(); }
   void setId(long id) { _getElementData().setId(id); }
@@ -194,6 +196,11 @@ protected:
 
   void _postGeometryChange();
   void _preGeometryChange();
+
+  /**
+   * This envelope may be cached, but it also may not be exact.
+   */
+  mutable geos::geom::Envelope _cachedEnvelope;
 };
 
 typedef std::shared_ptr<Element> ElementPtr;
Clone this wiki locally