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

Members list

Concise view

Type members

Classlikes

final class RectangleImp(val unsafeArray: 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
Graph
Supertypes

Attributes

Companion:
class
Graph
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