Class: RGeo::Cartesian::GeometryGraph
- Inherits:
-
PlanarGraph
- Object
- PlanarGraph
- RGeo::Cartesian::GeometryGraph
- Defined in:
- lib/rgeo/cartesian/planar_graph.rb
Overview
GeometryGraph is a PlanarGraph that is built by adding geometries instead of edges. The GeometryGraph will hold a reference to an arbitrary HalfEdge on the interior of the geometry for every boundary in the geometry. For example, a polygon will have a reference to a HalfEdge for its exterior shell and one for every hole.
Defined Under Namespace
Classes: GeomEdge
Instance Attribute Summary collapse
-
#geom_edges ⇒ Object
readonly
Returns the value of attribute geom_edges.
-
#parent_geometry ⇒ Object
readonly
Returns the value of attribute parent_geometry.
Attributes inherited from PlanarGraph
Instance Method Summary collapse
-
#initialize(geom) ⇒ GeometryGraph
constructor
A new instance of GeometryGraph.
Methods inherited from PlanarGraph
Constructor Details
#initialize(geom) ⇒ GeometryGraph
Returns a new instance of GeometryGraph.
261 262 263 264 265 266 |
# File 'lib/rgeo/cartesian/planar_graph.rb', line 261 def initialize(geom) super() @parent_geometry = geom @geom_edges = [] add_geometry(geom) end |
Instance Attribute Details
#geom_edges ⇒ Object (readonly)
Returns the value of attribute geom_edges.
267 268 269 |
# File 'lib/rgeo/cartesian/planar_graph.rb', line 267 def geom_edges @geom_edges end |
#parent_geometry ⇒ Object (readonly)
Returns the value of attribute parent_geometry.
267 268 269 |
# File 'lib/rgeo/cartesian/planar_graph.rb', line 267 def parent_geometry @parent_geometry end |