A 2 dimensional point. Pt2s can be transformed through the 2D geometric transformations. If you wish to encode a relative position then use a Vec2 instead. Thanks to René Descartes for this. Vec2s can be added and subtracted from points. Points can not be added to points but they can be used to translate the point.
Attributes
- Companion:
- object
- Graph
- Supertypes
Members list
Type members
Types
The type of LineSegLike that this Point can start or ends.
Value members
Concrete methods
Subtracts the operand 2D point from this 2D point to get the relative Vector.
Subtracts the operand 2D point from this 2D point to get the relative Vector.
Attributes
Subtracts this 2D point from the operand 2D point and halves it to get the relative Vector divided by 2. This is a very common operation when calculating the distance along an axis and the distance to the centre point is required. Hence the specific method
Subtracts this 2D point from the operand 2D point and halves it to get the relative Vector divided by 2. This is a very common operation when calculating the distance along an axis and the distance to the centre point is required. Hence the specific method
Attributes
Subtracts this 2D point from the operand 2D point to get the relative Vector.
Subtracts this 2D point from the operand 2D point to get the relative Vector.
Attributes
Gives the anlge from the operand point to this point.
Gives the anlge from the operand point to this point.
Attributes
Line segment from this point to along the given angle for the given magnitude to point 2.
Line segment from this point to along the given angle for the given magnitude to point 2.
Attributes
Gives the anlge from the operand point to this point.
Gives the anlge from the operand point to this point.
Attributes
Gives the angle from this point to the operand point.
Gives the angle from this point to the operand point.
Attributes
Line segment from this point to along the given angle for the given magnitude to point 2.
Line segment from this point to along the given angle for the given magnitude to point 2.
Attributes
Gives the positive scalar distance between this and the operand Vec2.
Gives the positive scalar distance between this and the operand Vec2.
Attributes
Not sure about this method
Not sure about this method
Attributes
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that
objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int.
(o1.hashCode.equals(o2.hashCode)
).
Attributes
- that
the object to compare against this object for equality.
- Returns:
true
if the receiver object is equivalent to the argument;false
otherwise.- Definition Classes
- Equals -> Any
Reverses the y coordinate. Useful for translating between canvases where the y axis measures down and coordinate systems where y is up
Reverses the y coordinate. Useful for translating between canvases where the y axis measures down and coordinate systems where y is up
Attributes
The average of this and the operand Pt2. The mid point between this point and the operand second point.
The average of this and the operand Pt2. The mid point between this point and the operand second point.
Attributes
Reflects, mirrors along the Y axis by negating X.
Reflects, mirrors along the Y axis by negating X.
Attributes
Reflects ,mirrors along the X axis by negating Y.
Reflects ,mirrors along the X axis by negating Y.
Attributes
Changes the origin of the point to the new point. Subtracting the X and Y components of the operand point from this point.
Changes the origin of the point to the new point. Subtracting the X and Y components of the operand point from this point.
Attributes
Reflects or mirrors this Vec2 across a line, returning new Vec2.
Reflects or mirrors this Vec2 across a line, returning new Vec2.
Attributes
Reflects, mirrors this Vec2 across an XLine.
Reflects, mirrors this Vec2 across an XLine.
Attributes
Reflects, mirrors along the y = yOffset line that is parallel to the X axis.
Reflects, mirrors along the y = yOffset line that is parallel to the X axis.
Attributes
Reflects, mirrors this Vec2 across a YLine.
Reflects, mirrors this Vec2 across a YLine.
Attributes
Reflects, mirrors along the x = xOffset line, that is parallel to the Y axis by negating X.
Reflects, mirrors along the x = xOffset line, that is parallel to the Y axis by negating X.
Attributes
Rotates this vector through the given angle around the origin.
Rotates this vector through the given angle around the origin.
Attributes
Rotates the vector 180 degrees or Pi radians.
Rotates the vector 180 degrees or Pi radians.
Attributes
rotates the vector 90 degrees or Pi/2 radians, clockwise.
rotates the vector 90 degrees or Pi/2 radians, clockwise.
Attributes
rotates the vector 90 degrees or Pi/2 radians, anticlockwise.
rotates the vector 90 degrees or Pi/2 radians, anticlockwise.
Attributes
Rotates this vector through the given angle around the centre of rotation passed as the first parameter.
Rotates this vector through the given angle around the centre of rotation passed as the first parameter.
Attributes
2D geometric translation transformation on this Pt2 returns a Pt2.
2D geometric translation transformation on this Pt2 returns a Pt2.
Attributes
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing from the TextGraphic to this point. The alignment of the text is determined by the angle parameter. The method is not meant to cover all possible configurations for text arrows. These can easily be constructed from OpenStrat primitives, but to provide a quick default for rapid development.
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing from the TextGraphic to this point. The alignment of the text is determined by the angle parameter. The method is not meant to cover all possible configurations for text arrows. These can easily be constructed from OpenStrat primitives, but to provide a quick default for rapid development.
Attributes
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing away from the TextGraphic to this point. The arrow points towards the dirnPt parameter point. The alignment of the text is determined by the angle parameter.
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing away from the TextGraphic to this point. The arrow points towards the dirnPt parameter point. The alignment of the text is determined by the angle parameter.
Attributes
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing from the TextGraphic to this point. The arrow points towards the dirnPt parameter point. The alignment of the text is determined by the angle parameter.
Creates a TextGraphic and a line segment with an arrow head at the end. The arrow pointing from the TextGraphic to this point. The arrow points towards the dirnPt parameter point. The alignment of the text is determined by the angle parameter.
Attributes
The RSON type of T. This the only data that a ShowT instance requires, that can't be implemented through delegation to an object of type Show.
The RSON type of T. This the only data that a ShowT instance requires, that can't be implemented through delegation to an object of type Show.
Attributes
- Definition Classes
Changes the origin of the point to the new point. Subtracting the X and Y components of the operand point from this point.
Changes the origin of the point to the new point. Subtracting the X and Y components of the operand point from this point.
Attributes
2D geometric translation transofrmation on this Pt2 returns a Pt2.
2D geometric translation transofrmation on this Pt2 returns a Pt2.
Attributes
Inherited methods
Attributes
- Definition Classes
- Inherited from:
- ShowElemDbl2
Attributes
- Definition Classes
- Inherited from:
- ShowElemDbl2
Attributes
- Inherited from:
- Dbl2Elem
The dot product of this and the operand vector.
Attributes
- Inherited from:
- Vec2Like
1st parameter name.
2nd parameter name.
The optional default value for parameter 1.
The optional default value for parameter 2.
Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.
Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.
Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.
Attributes
- Inherited from:
- ShowN
Attributes
- Inherited from:
- ShowN
Show with decimal precision of 0 places.
Show with decimal precision of 1 place padding with a zero if necessary.
Show with decimal precision of 1 place padding with a zero if necessary.
Attributes
- Inherited from:
- ShowDec
Show with decimal precision of 2 places padding with zeros if necessary.
Show with decimal precision of 2 places padding with zeros if necessary.
Attributes
- Inherited from:
- ShowDec
Show with decimal precision of 3 places padding with zeros if necessary.
Show with decimal precision of 3 places padding with zeros if necessary.
Attributes
- Inherited from:
- ShowDec