Skip to content

Commit

Permalink
#194 Created HSysProjectionEarth.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich2 committed Aug 12, 2022
1 parent a03fd51 commit 297831a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Tiling/src/egrid/EGridSys.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* Copyright 2018-22 Richard Oliver. Licensed under Apache Licence version 2.0. */
package ostrat; package egrid
import geom._, pglobe._, prid._, phex._, pEarth._
import geom._, pgui._, pglobe._, prid._, phex._, pEarth._

trait EGridSys extends HGridSys
{ /** The length of one column coordinate delta */
{
override def projection: Panel => HSysProjection = HSysProjectionEarth(this, _)

/** The length of one column coordinate delta */
def cScale: Length

/** hex coordinate to latiutde and longitude. */
Expand Down
14 changes: 14 additions & 0 deletions Tiling/src/egrid/HSysProjectionEarth.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* Copyright 2018-22 Richard Oliver. Licensed under Apache Licence version 2.0. */
package ostrat; package egrid
import geom._, prid._, phex._, pgui._

case class HSysProjectionEarth(gridSys: EGridSys, panel: Panel) extends HSysProjection
{
override type GridT = EGridSys

override def sides: LineSegArr = ???

override def innerSides: LineSegArr = ???

override def outerSides: LineSegArr = ???
}
2 changes: 1 addition & 1 deletion Tiling/src/prid/phex/HGridSys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import geom._, reflect.ClassTag, pgui._, Colour.Black
/** System of hex tile grids. Can be a single [[HGrid]] or a system of multiple hex tile grids. */
trait HGridSys extends Any with TGridSys
{
def projection: Panel => HSysProjection = HProjectionFlat(this, _)
def projection: Panel => HSysProjection = HSysProjectionFlat(this, _)

final override lazy val numTiles: Int =
{ var i = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package ostrat; package prid; package phex
import geom._, pgui._

final case class HProjectionFlat(gridSys: HGridSys, panel: Panel) extends HSysProjection
final case class HSysProjectionFlat(gridSys: HGridSys, panel: Panel) extends HSysProjection
{ type GridT = HGridSys

var cPScale: Double = 10
Expand Down

0 comments on commit 297831a

Please sign in to comment.