Rectangle

ostrat.geom.Rectangle
See theRectangle companion trait
object Rectangle

Companion object for the Rectangle trait. Contains Rectangle.RectangleImp the implementation class for non specialised rectangles. It also contains various factory methods that delegate to the Rectangle.RectangleImp class.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rectangle.type

Members list

Type members

Classlikes

final class RectangleImp(val arrayUnsafe: Array[Double]) extends Rectangle

A rectangle class that has position and may not be aligned to the X and Y axes.

A rectangle class that has position and may not be aligned to the X and Y axes.

Attributes

Companion
object
Supertypes
trait Rectangle
trait Polygon4Plus
trait Polygon3Plus
trait Polygon
trait PolygonLike[Pt2]
trait Pt2SeqSpec
trait SeqSpecDbl2[Pt2]
trait SeqSpecDblN[Pt2]
trait SeqSpec[Pt2]
trait Pt2SeqLike
trait SeqLikeDbl2[Pt2]
trait SeqLikeDblN[Pt2]
trait SpecialT
trait PointSeqLike[Pt2]
trait SeqLike[Pt2]
trait Approx[Double]
trait Equals
trait ShapeCentred
trait CentredElem
trait WithCentre
trait Shape
trait BoundedElem
trait Fillable
trait Drawable
trait GeomElem
class Object
trait Matchable
class Any
Show all
object RectangleImp

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def apply(width: Double, height: Double, rotation: AngleVec, cen: Pt2): Rectangle

apply factory method for rectangle takes the width, height, rotation from alignment with the axes and a centre point. the default value for the the centre point is the origin.

apply factory method for rectangle takes the width, height, rotation from alignment with the axes and a centre point. the default value for the the centre point is the origin.

Attributes

def axis1(sd4Cen: Pt2, sd2Cen: Pt2, height: Double): Rectangle

Creates a Rectangle from axis 1. The default for axis 1 is the left right axis.

Creates a Rectangle from axis 1. The default for axis 1 is the left right axis.

Attributes

def curvedCorners(width: Double, height: Double, radius: Double, cen: Pt2): ShapeGenOld
def curvedCornersCentred(width: Double, height: Double, radius: Double, posn: Pt2): PolyCurveCentred
def curvedGoldenRatio(height: Double, radius: Double, posn: Pt2): ShapeGenOld
def fromAxis(centreLine: LineSeg, height: Double): PolygonGen
def fromAxisRatio(centreLine: LineSeg, ratio: Double): PolygonGen
def unsafeVecsCen(rtVec: Vec2, upVec: Vec2, cen: Pt2): Array[Double]

Creates Rectangle from 2 vectors and centre point. The 2 vectors are the half axies from the centre point to th e right and to the top.

Creates Rectangle from 2 vectors and centre point. The 2 vectors are the half axies from the centre point to th e right and to the top.

Attributes

def vecsCen(rtVec: Vec2, upVec: Vec2, cen: Pt2): Rectangle

Implicits