Packages

package geom

I chose the package name to not clash with "geometry" that may be use in other libraries This package contains Basic geometry. A number of implementation Value classes of the Int and Double product classes defined in ostrat. 2d graphical objects for generalised use. They are of particular use for the generic canvas based classes defined in pCanv but can be used in any display framework and for printing.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. geom
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class Angle extends AnyVal with AngleLike

    Angle value class.

    Angle value class. Its particularly important not to use this class to represent Latitudes as the Angle class has a normal range +- 180 degrees, while Latitudes have a normal range +- 90 degrees.

  2. trait AngleLike extends Any

    Base trait for Angle, Latitude and Longitude.

    Base trait for Angle, Latitude and Longitude. Not sure if this is a good idea.

  3. case class Arc(xStart: Double, yStart: Double, xCen: Double, yCen: Double, xEnd: Double, yEnd: Double, zOrder: Int = 0) extends ArcLike with Product with Serializable

    Currently the Arc class doesn't define direction of the Arc.

    Currently the Arc class doesn't define direction of the Arc. I think this needs modification.

  4. case class ArcDraw(xStart: Double, yStart: Double, xCen: Double, yCen: Double, xEnd: Double, yEnd: Double, lineWidth: Double, colour: Colour, zOrder: Int) extends PaintElem with ArcLike with Product with Serializable

    A functional paint element to Draw an Arc.

    A functional paint element to Draw an Arc. Defined by the arc, the line width, the colour and the zOrder.

  5. trait ArcLike extends CurveLike

    Super trait to Arc and ArcDraw and Arc fill which has not been implemented yet.

  6. class Bezier extends BezierLike

    Cubic bezier curve.

  7. case class BezierDraw(xStart: Double, yStart: Double, xC1: Double, yC1: Double, xC2: Double, yC2: Double, xEnd: Double, yEnd: Double, lineWidth: Double, colour: Colour, zOrder: Int = 0) extends PaintElem with BezierLike with Product with Serializable

    Functional class for Drawing a cubic Bezier curve.

  8. trait BezierLike extends CurveLike

    Super trait for a (cubic) Bezier and BezierDraw

  9. case class BoundingRect(minX: Double, maxX: Double, minY: Double, maxY: Double) extends Product with Serializable

    An intermediate class for describing the vertical / horisontal bounding rectangle for a Polygon or Shape.

    An intermediate class for describing the vertical / horisontal bounding rectangle for a Polygon or Shape. Defined by 4 Double values.

  10. type CanvO = GraphicElem

    Hopefully this existential syntax baggage will be gone in dotty

  11. trait CurveEndingDist extends AnyRef

    A base trait for CurveSegDist and CurveDist and their associated GraphicElemsDist (these haven't been implemented yet).

  12. trait CurveLike extends CurveSegLike

    Sub traits include Line, LineDraw, Arc, ArcDraw, Bezier, BezierDraw

  13. trait CurveLikePaintElem extends CurveLike with PaintElem
  14. case class CurveSeg(iMatch: Double, xC1: Double, yC1: Double, xUses: Double, yUses: Double, xEnd: Double, yEnd: Double) extends ProdDbl7 with CurveSegLike with Product with Serializable

    A CurveSeg can be a line segment or an arc segment or a bezier segment.

    A CurveSeg can be a line segment or an arc segment or a bezier segment. It takes its start point from the pEnd of the previous segment. There is no CurveSeg companion object as the LineSeg, ArcSeg and BezierSeg all have their own factory object apply methods.

  15. class CurveSegDist extends ProdDbl7 with CurveEndingDist
  16. final class CurveSegDists extends AnyVal with ArrProdDbl7[CurveSegDist]
  17. trait CurveSegLike extends Transer

    The base trait for CurveSeg and Curve and their associated GraphicElems

  18. final class DPolygon extends AnyVal with ArrProdDbl2[Dist2]
  19. case class DashedLineDraw(xStart: Double, yStart: Double, xEnd: Double, yEnd: Double, lineWidth: Double, colour: Colour, dashArr: Array[Double]) extends CurveLikePaintElem with Product with Serializable
  20. case class DisplayRowGraphicSubject(margin: Double, subjs: Arr[GraphicSubject]) extends Product with Serializable

    Creates a row of GraphicSubject.

    Creates a row of GraphicSubject. Not sure about the usefulness of this specific class, or its implementation

  21. final class Dist extends AnyVal with Ordered[Dist]

    Distance in metres

  22. class Dist2 extends ProdDbl2

    2 dimensional vector using metres as units rather than pure numbers.

  23. final class Dist2s extends AnyVal with ArrProdDbl2[Dist2]
  24. final class Dist3 extends ProdDbl3

    3 dimensional vector using metres as units rather than pure numbers.

  25. final class Dist3s extends AnyVal with ArrProdDbl3[Dist3]

    Collection class for Dist3s.

    Collection class for Dist3s. Not clear if this a Polygon equivalent or a Vec3s equivalent

  26. implicit class DistImplicit extends AnyRef
  27. implicit class DoubleImplicit extends AnyRef
  28. class DoubleImplicitGeom extends AnyRef
  29. case class GlobedAll(d2s: Dist2s) extends GlobedArea with Product with Serializable
  30. sealed trait GlobedArea extends AnyRef

    represents a polygon on a globe's (eg the Earth) surface.

    represents a polygon on a globe's (eg the Earth) surface. If all the points are visible returns a straight line polygon. If none are visible it returns a none, the polygon is over the horizon. If some are visible inserts curves along horizon.

  31. case class GlobedSome(segs: CurveSegDists) extends GlobedArea with Product with Serializable
  32. trait GraphicActive extends AnyRef

    The base trait for all objects that can have mouse / touch pad interaction.

  33. trait GraphicElem extends Transer

    The base trait for all objects on a canvas / panel.

    The base trait for all objects on a canvas / panel. The objects are re-composed for each frame. The Canvas objects must be re-composed each time there is a change within the application state or the user view of that application state.

  34. type GraphicElems = ArraySeq[GraphicElem]
  35. trait GraphicSubject extends GraphicElem with GraphicActive

    This is an active visual canvas object.

    This is an active visual canvas object. A pointable polygon / shape with visual, that also knows how much display space it needs and preferred margin space. Not sure about the name. not sure if the trait is useful.

  36. class IntGeomImplicit extends AnyRef
  37. class LatLong extends LatLongBase with ProdDbl2

    longitude and latitude measured in radians for the earth.

    longitude and latitude measured in radians for the earth. "ll" and "LL" will be used as an abbreviation for LatLong in method names.

  38. trait LatLongBase extends AnyRef
  39. case class LatLongLine(latStart: Double, longStart: Double, lat2: Double, long2: Double) extends Product with Serializable
  40. final class LatLongs extends AnyVal with ArrProdDbl2[LatLong]
  41. final class Latitude extends AnyVal with AngleLike
  42. class Line2 extends ProdDbl4 with CurveLike

    In geometry this is a line segment.

    In geometry this is a line segment. But in this library a seg refers to shape segemnt with out its start (pt1) point

  43. final class Line2s extends AnyVal with ArrProdDbl4[Line2] with Transer

    Array[Double based collection class for Line2s

  44. case class Line3(xStart: Double, yStart: Double, zStart: Double, xEnd: Double, yEnd: Double, zEnd: Double) extends ProdDbl6 with Product with Serializable

    In geometry this is a 3 dimensional line segment.

    In geometry this is a 3 dimensional line segment. A straight line between two points.

  45. class LineDist2 extends AnyRef

    A 2 dimensional line segment measured in metres.

    A 2 dimensional line segment measured in metres. A straight line between two points on a 2 dimensional flat surface.

  46. class LineDist3 extends ProdDbl6

    3 dimensional line segment measured in metres.

    3 dimensional line segment measured in metres. A straight line between two points in 3d.

  47. case class LineDraw(xStart: Double, yStart: Double, xEnd: Double, yEnd: Double, width: Double, colour: Colour) extends CurveLikePaintElem with Product with Serializable
  48. final class LinePath extends AnyVal with ArrProdDbl2[Vec2] with Transer with Vec2sLike

    Array[Double] based collection class for a LinePath.

    Array[Double] based collection class for a LinePath. Conversion to and from the Vec2s class and Polygon class should not entail a runtime cost.

  49. case class LinePathDraw(path: LinePath, lineWidth: Double, colour: Colour = Black) extends PaintElem with Product with Serializable
  50. case class LinesDraw(lines: Line2s, lineWidth: Double, colour: Colour = Black) extends PaintElem with Product with Serializable

    I think its to better to use the mame lineWidth consistently.

  51. final case class Longitude(radians: Double) extends AnyVal with AngleLike with Product with Serializable
  52. implicit class OptionGeomImplicit[A] extends AnyRef
  53. trait PaintElem extends GraphicElem
  54. case class PolyActive(poly: Polygon, evObj: AnyRef) extends GraphicElem with PolyActiveTr with Product with Serializable

    A pointable polygon without visual

  55. trait PolyActiveTr extends GraphicActive

    An active transparent pointable polygon

  56. case class PolyDraw(poly: Polygon, lineWidth: Double, colour: Colour = Black) extends PolyElem with Product with Serializable

    Immutable Graphic element that defines and draws a Polygon.

  57. trait PolyElem extends PaintElem
  58. case class PolyFill(poly: Polygon, colour: Colour) extends PolyElem with Product with Serializable

    Immutable Graphic element that defines and fills a Polygon.

  59. case class PolyFillDraw(poly: Polygon, fillColour: Colour, lineWidth: Double, lineColour: Colour = Black) extends PolyElem with Product with Serializable

    Immutable Graphic element that defines, fills and draws a Polygon.

  60. case class PolyFillDrawText(poly: Polygon, fillColour: Colour, str: String, fontSize: Int = 24, lineWidth: Double = 2, lineColour: Colour = Black) extends PolyElem with Product with Serializable
  61. case class PolyFillText(poly: Polygon, fillColour: Colour, str: String, fontSize: Int = 24, textColour: Colour = Black) extends PolyElem with Product with Serializable
  62. case class PolySubj(cen: Vec2, poly: Polygon, evObj: AnyRef, elems: Arr[PaintElem]) extends GraphicSubject with PolyActiveTr with Product with Serializable
  63. final class Polygon extends AnyVal with Transer with Vec2sLike

    A Polygon is encoded as a sequence of plain 2 dimension (mathematical) vectors.

    A Polygon is encoded as a sequence of plain 2 dimension (mathematical) vectors. Minimum length 3.. Clockwise is the default

  64. trait RectGeom extends AnyRef

    This trait may need new name and modification

  65. trait RectMap extends AnyRef

    Dubious trait.

    Dubious trait. Only known sub trait is TileGrid, used by pGrid.RectGui

  66. trait RectMapToDist extends RectMap
  67. class Rectangle extends AnyRef
  68. class RectangleDims extends AnyRef
  69. type SSet[A] = SortedSet[A]
  70. final class Shape extends AnyVal with ArrProdDbl7[CurveSeg] with Transer

    Shape is an Array[Double] based collection for a sequence of CurveSegs, similar to a Polygon which is an Array[Double based collection of just LineSegs.

    Shape is an Array[Double] based collection for a sequence of CurveSegs, similar to a Polygon which is an Array[Double based collection of just LineSegs. It Uses 6 Doubles for each CurveSeg. The first Double of each curveSeg is set to Negative Infinity for a LineSeg positive infinity for an ArcSeg, but represents the x component of the first control point for a BezierSeg.

  71. case class ShapeActive(shape: Shape, evObj: AnyRef, zOrder: Int = 0) extends GraphicElem with ShapeActiveTr with Product with Serializable

    A pointable shape without visual

  72. trait ShapeActiveTr extends GraphicActive

    A pointable shape

  73. case class ShapeCentred(cen: Vec2, segs: Shape) extends Transer with Product with Serializable

    So there is a lack of clarity over whether the segs are relative to the cen, and if the cen is needed at all.

  74. case class ShapeDraw(segs: Shape, lineWidth: Double, colour: Colour = Black, zOrder: Int = 0) extends ShapeElem with Product with Serializable
  75. trait ShapeElem extends PaintElem
  76. case class ShapeFill(segs: Shape, colour: Colour, zOrder: Int = 0) extends ShapeElem with Product with Serializable
  77. case class ShapeFillDraw(segs: Shape, fillColour: Colour, lineWidth: Double, lineColour: Colour = Black, zOrder: Int = 0) extends ShapeElem with Product with Serializable
  78. case class ShapeSubj(cen: Vec2, shape: Shape, evObj: AnyRef, elems: Arr[PaintElem]) extends GraphicSubject with ShapeActiveTr with Product with Serializable
  79. implicit class StringImplictGeom extends AnyRef
  80. sealed trait TextAlign extends AnyRef
  81. case class TextGraphic(str: String, fontSize: Int = 24, posn: Vec2 = Vec2Z, colour: Colour = Black, align: TextAlign = CenAlign, zOrder: Int = 0) extends PaintElem with Product with Serializable

    A Graphical display of Text.

    A Graphical display of Text.

    posn

    The point to orient from. By default this Vec2 defines the centre but from right or left depending on alignment.

  82. case class TextOutline(posn: Vec2, str: String, fontSize: Int, colour: Colour, lineWidth: Double, align: TextAlign = CenAlign, zOrder: Int = 0) extends PaintElem with Product with Serializable
  83. trait Trans[T] extends AnyRef

    The typeclass trait for transforming an object in 2d geometry.

  84. trait TransDist[T] extends AnyRef

    The typeclass trait for transforming an object in 2d geometry.

  85. trait TransDistExtension[T] extends TransGenExtension[T]

    The object can be transformed in 2 dimensional Distance space.

    The object can be transformed in 2 dimensional Distance space. Leaf classes must implement the single method fTrans(f: Dist2 => Dist2): T The related trait TranExtension does the same for trans(f: Vec2 => Vec2): T.

  86. trait TransDister extends Any

    Trait for objects that can be transformed in 2 dimensional distance space.

  87. class TransExtension[T] extends TransGenExtension[T]

    Extension methods for an object that can transform itself in 2d geometry via the function f: Vec2 => Vec2.

    Extension methods for an object that can transform itself in 2d geometry via the function f: Vec2 => Vec2. There is an implicit conversion of any object that has a Trans instance. Trans instances are founded on objects that inherit the Transer trait. Eg Polygon inherits from Transer. There is a Trans[Polygon]instance and a Trans[List[Polygon]] instance. The TransDistExtension class provides similar extension methods for objects that can perform the Dist2 => Dist2 transformation.

  88. trait TransGenExtension[T] extends Any

    This is the base trait for TransExtension[T] and TransDistExtension.

    This is the base trait for TransExtension[T] and TransDistExtension. An object that can transform itself in a 2d geometry. This is a key trait, the object can be transformed in 2 dimensional space. Leaf classes must implement the single method fTrans(f: VT => VT): T.

  89. trait Transer extends Any

    An object that can transform itself in 2d geometry.

    An object that can transform itself in 2d geometry. This is a key trait, the object can be transformed in 2 dimensional space. Leaf classes must implement the single method fTrans(f: Vec2 => Vec2): T. The related trait TransDistable does the same for fTrans(f: Dist2 => Dist2): T.

  90. trait UnFilled extends AnyRef
  91. trait UnScaled extends Transer

    A Geometrical object or shape that has not been scaled.

    A Geometrical object or shape that has not been scaled. That has its iconic scale. An object centred on x = , y = 0, all the object is between x = +- 0.5 and y = +- 0.5

  92. trait UnScaledGraphicElem extends GraphicElem

    This is a display object that has a fixed size and alignment.

    This is a display object that has a fixed size and alignment. The object itself should not scale or rotate. Hence transformations are applied to its reference point. This is for objects on a map as opposed to objects that are part of the map.

  93. trait UnScaledPolygon extends UnScaled

    This is not a Polygon but should fTrans to Polygon.

  94. trait UnScaledPolygonYMirror extends UnScaledPolygon
  95. case class UnScaledShape(referenceVec: Vec2, relShape: Shape, evObj: AnyRef, elems: Arr[PaintElem], zOrder: Int = 0) extends UnScaledGraphicElem with ShapeActiveTr with Product with Serializable

    This is a shape that has a fixed size and alignment.

    This is a shape that has a fixed size and alignment. Hence transformations are applied to its reference point.

  96. trait Val1Vec2s[Val1T] extends ValsVec2s
  97. trait Val2Vec2s[Val1T, Val2T] extends ValsVec2s
  98. trait Val3Vec2s[Val1T, Val2T, Val3T] extends ValsVec2s
  99. trait ValsVec2s extends Any

    Not sure how useful these classes are in the immediate as when used in a collection they will box, undermining the benefits of using an Array

  100. final class Vec2 extends ProdDbl2

    A 2 dimensional vector, can be used to represent 2 dimensional points and translations of 2 dimensional points.

    A 2 dimensional vector, can be used to represent 2 dimensional points and translations of 2 dimensional points. Thanks to Rene Descarte this was a great idea.

  101. final class Vec2s extends AnyVal with Transer with Vec2sLike

    Array[Double] based collection class for Vec2s.

    Array[Double] based collection class for Vec2s. Use Polygon or LinePath to represent those structures. Conversion to and from Polygon class and LinePath class should not entail a runtime cost.

  102. final class Vec2sBuff extends AnyVal with BuffProdDbl2[Vec2]
  103. trait Vec2sLike extends ArrProdDbl2[Vec2]

    Not sure the helpfulness of this trait.

  104. final class Vec3 extends ProdDbl3

    A 3 dimensional vector, can be used to represent 3 dimensional points and translations of 3 dimensional points.

    A 3 dimensional vector, can be used to represent 3 dimensional points and translations of 3 dimensional points. Right-handed coordinate system is the default

Value Members

  1. val Dist2Z: Dist2

    Dist2(0.km, 0.km) constant

  2. val EarthAvDiameter: Dist
  3. val EarthAvRadius: Dist
  4. val EarthEquatorialRadius: Dist
  5. val EarthPolarRadius: Dist
  6. val LatLong0: LatLong
  7. val LongD: Double
  8. implicit def TransToExtension[T](value: T)(implicit ev: Trans[T]): TransExtension[T]
  9. val Vec2Z: Vec2

    Vec2(x = 0, y = 0) constant

  10. val cos30: Double
  11. def deg0: Angle

    0 degrees or 0 radians

  12. val deg120: Angle

    120 degrees anti-clockwise or + 2 * Pi/3 radians

  13. val deg135: Angle

    135 degrees anti-clockwise or + 3 * Pi/4 radians

  14. val deg150: Angle

    150 degrees anti-clockwise or + 5 * Pi/6 radians

  15. def deg180: Angle

    180 degrees or Pi radians

  16. val deg30: Angle

    30 degrees anti-clockwise or + Pi/6 radians

  17. val deg36: Angle

    36 degrees anti-clockwise or + Pi/5 radians

  18. val deg45: Angle

    45 degrees anti-clockwise or + Pi/4 radians

  19. val deg60: Angle

    60 degrees anti-clockwise or + Pi/3 radians

  20. val deg72: Angle

    72 degrees anti-clockwise or + Pi2/5 radians

  21. val deg90: Angle

    90 degrees anti-clockwise or + Pi/2 radians

  22. implicit def doubleToImplicitGeom(thisDouble: Double): DoubleImplicitGeom
  23. implicit def intToImplicitGeom(thisInt: Int): IntGeomImplicit
  24. implicit def noScaleTransExtension[T <: UnScaled](value: T)(implicit ev: Trans[geom.noScaleTransExtension.T.TranserT]): TransExtension[geom.noScaleTransExtension.T.TranserT]
  25. object Angle

    Angle Companion object.

  26. object Arc extends Serializable

    The companion object for the Arc class.

  27. object ArcDraw extends Serializable

    The companion object for the ArcDraw class

  28. object ArcSeg

    This provides factory methods to create an ArcSeg.

    This provides factory methods to create an ArcSeg. There is no independent ArcSeg class. This is one of 3 factory objects to CurveSeg.

  29. object ArcSegDist
  30. object Arrow
  31. object Bezier
  32. object BezierDraw extends Serializable

    Companion object for the BezierDraw class.

  33. object BezierSeg

    This provides factory methods to create a BezierSeg.

    This provides factory methods to create a BezierSeg. There is no independent BezierSeg class. This is one of 3 factory objects to CurveSeg.

  34. object CenAlign extends TextAlign with Product with Serializable
  35. object Circle

    This object provides factory methods for circles.

  36. object CurveSegDists extends ProdDbl7sCompanion[CurveSegDist, CurveSegDists]
  37. object DPolygon extends ProdDbl2sCompanion[Dist2, DPolygon]

    The companion object for DPolygon.

    The companion object for DPolygon. Provides an implicit builder.

  38. object DashedLineDraw extends Serializable
  39. object Diamond
  40. object Dist
  41. object Dist2
  42. object Dist2s extends ProdDbl2sCompanion[Dist2, Dist2s]
  43. object Dist3

    Companion object for the Dist3 class.

  44. object Dist3s
  45. object Equilateral
  46. object GlobedNone extends GlobedArea with Product with Serializable
  47. object GraphicActive
  48. object HLine
  49. object LatLong
  50. object LatLongLine extends Serializable
  51. object LatLongs extends ProdDbl2sCompanion[LatLong, LatLongs]
  52. object Latitude
  53. object LeftAlign extends TextAlign with Product with Serializable
  54. object Line2

    Companion object for the Line2 class

  55. object Line2s extends ProdDbl4sCompanion[Line2, Line2s]

    Companion object for the Lines class

  56. object Line3 extends Serializable
  57. object LineDist2
  58. object LineDist3
  59. object LineDraw extends Serializable
  60. object LinePath extends ProdDbl2sCompanion[Vec2, LinePath]
  61. object LineSeg

    This provides factory methods to create a LineSeg.

    This provides factory methods to create a LineSeg. There is no independent LineSeg class. This is one of 3 factory objects to CurveSeg.

  62. object LineSegDist
  63. object LinesDraw extends Serializable
  64. object Longitude extends Serializable
  65. object PolyDraw extends Serializable
  66. object PolyFill extends Serializable
  67. object PolyFillDraw extends Serializable
  68. object PolyFillDrawText extends Serializable
  69. object PolySubj extends Serializable
  70. object Polygon
  71. object Rectangle

    This perhaps should be changed to Rectangle.

    This perhaps should be changed to Rectangle. Some methods need renaming or possibly even deleting

  72. object RightAlign extends TextAlign with Product with Serializable
  73. object Shape extends ProdDbl7sCompanion[CurveSeg, Shape]
  74. object ShapeSubj extends Serializable
  75. object Square extends UnScaledPolygon

    Factory object for squares.

    Factory object for squares. There is no companion Square class.

  76. object Star5
  77. object TextGraphic extends Serializable
  78. object TextGraphicCen

    Not sure if this is a good object to have.

  79. object Trans

    The companion object for the Trans[T] typeclass, containing instances for common classes.

  80. object TransDist

    The companion object for the TransDist typeclass, containing instances for common classes.

  81. object TransDister

    The companion object for Transer.

  82. object Trapezium

    Probably worth keeping

  83. object TrapezoidIsosceles
  84. object Triangle
  85. object UnScaledShape extends Serializable
  86. object VLine
  87. object Vec2
  88. object Vec2s extends ProdDbl2sCompanion[Vec2, Vec2s]
  89. object Vec3

Inherited from AnyRef

Inherited from Any

Ungrouped