Skip to content

Commit

Permalink
#194 Added more side methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich2 committed Aug 12, 2022
1 parent 7b5f742 commit 2a93d4d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Geom/src/curves/LineSegArr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package ostrat; package geom
import collection.mutable.ArrayBuffer

/** Compact immutable Array[Double] based collection class for [[LineSeg]]s. LineSeg is the library's term for a mathematical straight line segment, but what in
* common parlance is often just referred to as a line. */
/** Compact immutable Array[Double] based collection class for [[LineSeg]]s. [[LineSeg]] is the library's term for a mathematical straight line
* segment, but what in common parlance is often just referred to as a line. */
class LineSegArr(val unsafeArray: Array[Double]) extends Dbl4Arr[LineSeg] with AffinePreserve
{ type ThisT = LineSegArr
def unsafeFromArray(array: Array[Double]): LineSegArr = new LineSegArr(array)
Expand Down
4 changes: 3 additions & 1 deletion Tiling/src/prid/phex/HProjectionFlat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ final case class HProjectionFlat(gridSys: HGridSys, panel: Panel) extends HSysPr
var cPScale: Double = 10
var focus: Vec2 = Vec2(0, 0)
override def sides: LineSegArr = gridSys.sideLines.slate(-focus).scale(cPScale)
def sidesDraw(lineWidth: Double = 2, colour: Colour = Colour.Black): LinesDraw = sides.draw(lineWidth, colour)
override def innerSides: LineSegArr = gridSys.innerSideLines.slate(-focus).scale(cPScale)
override def outerSides: LineSegArr = gridSys.outerSideLines.slate(-focus).scale(cPScale)


def frame: GraphicElems = ???
def zoomIn: PolygonCompound = clickButton("+") { _ =>
Expand Down
5 changes: 5 additions & 0 deletions Tiling/src/prid/phex/HSysProjection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ trait HSysProjection
{ type GridT <: HGridSys
def gridSys: GridT
def sides: LineSegArr
def innerSides: LineSegArr
def outerSides: LineSegArr
def sidesDraw(lineWidth: Double = 2, colour: Colour = Colour.Black): LinesDraw = sides.draw(lineWidth, colour)
def innerSidesDraw(lineWidth: Double = 2, colour: Colour = Colour.Black): LinesDraw = innerSides.draw(lineWidth, colour)
def outerSidesDraw(lineWidth: Double = 2, colour: Colour = Colour.Black): LinesDraw = outerSides.draw(lineWidth, colour)
def panel: Panel
}
4 changes: 2 additions & 2 deletions Tiling/src/prid/phex/HSysScen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trait HSysScen
trait HSysTurnScen extends HSysScen with GridTurnScen

trait HGridScen extends HSysScen
{ /** This gives the structure of the hex grid system. It contains no data about the elements of the grid. But it allows the scenario to create and operate
* on flat arrays of data. */
{ /** This gives the structure of the hex grid system. It contains no data about the elements of the grid. But it allows the scenario to create and
* operate on flat arrays of data. */
implicit override def gridSys: HGrid
}

0 comments on commit 2a93d4d

Please sign in to comment.