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
-
trait PointDbl2trait PointDblNtrait Pointtrait Vec2Liketrait ApproxDbltrait Equalstrait TellElemDbl2trait Dbl2Elemtrait DblNElemtrait ValueNElemtrait SpecialTtrait TellDbl2trait PersistNFixedtrait Persist1Plus[Double]trait PersistNtrait TellNtrait Telltrait Persistclass Objecttrait Matchableclass AnyShow all
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
The mid point or average of this and the operand Pt2. The mid point between this point and the operand second point.
The mid point or average of this and the operand Pt2. The mid point between this point and the operand second point.
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)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
- 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
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 TextFixed and a line segment with an arrow head at the end. The arrow pointing from the TextFixed 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 TextFixed and a line segment with an arrow head at the end. The arrow pointing from the TextFixed 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
The type of the object to be persisted.
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:
- TellElemDbl2
Attributes
- Definition Classes
- Inherited from:
- TellElemDbl2
Utility method to append this as an element to an ArrayBuffer[Double]. End users should rarely need to use this method.
Attributes
- Inherited from:
- Dbl2Elem
The dot product of this and the operand vector.
x <= 0 && y <= 0
x >= 0 && y <= 0
x >= 0 && y >= 0
1st parameter name.
2nd parameter name.
Number of parameter constituents of this class.
Number of parameter constituents of this class.
Attributes
- Definition Classes
- Inherited from:
- Persist2
The optional default value for parameter 1.
The optional default value for parameter 1.
Attributes
- Definition Classes
- Inherited from:
- Tell2Plused
The optional default value for parameter 2.
The optional default value for parameter 2.
Attributes
- Definition Classes
- Inherited from:
- Tell2Plused
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:
- Tell
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:
- Tell
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:
- Tell
Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by show method on Show type class instances.
Element 1 of this Tell2+ element product.
Element 2 of this Tell2+ element product.
Attributes
- Inherited from:
- TellN
This property determines if the type can be used with Multiple syntax.
This property determines if the type can be used with Multiple syntax.
MyObj * 7
. for describing sequences succinctly. This is not desirable for some types such as numerical and mathematical vector types as this could be confusing 3 * 4 should resolve to an Int of value 12, not a Multiple(3, 4).
Attributes
- Inherited from:
- Persist