wx.Point2D¶Point2DDouble represents a point in a 2D (Cartesian) coordinate system, with additional vector operations available.
Class Hierarchy¶
Inheritance diagram for class Point2D:
Methods Summary¶Initializes to zero the x and y members. |
|
Get() . (x,y) |
|
Returns the cross product, where the products of the Y values of this point and |
|
Returns the distance between this point and |
|
Returns the squared distance between this point and |
|
Returns the dot (i.e., scalar) product, where the products of the X and Y values of this point and |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns an immutable representation of the |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the principal value of the arc tangent of the Y and X values, expressed in degrees. |
|
Returns the hypotenuse, where the X and Y coordinates of the point represent the lengths of the base and height sides of a right triangle. |
|
Sets the vector length to 1.0, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle). |
|
Repositions the X and Y coordinates based on the provided angle’s degrees. |
|
Sets the vector length to |
|
Returns the reflection (i.e., negation) of this point. |
|
Returns the reflection (i.e., negation) of this point. |
|
Returns the reflection (i.e., negation) of this point. |
|
Returns the reflection (i.e., negation) of this point. |
|
Returns the reflection (i.e., negation) of this point. |
Properties Summary¶See |
|
See |
|
See |
|
See |
|
See |
|
A public C++ attribute of type Double . X coordinate of this point. |
|
A public C++ attribute of type Double . Y coordinate of this point. |
Class API¶Possible constructors:
Point2DDouble() -> None
Point2DDouble(x, y) -> None
Point2DDouble(pt) -> None
Point2DDouble(pt) -> None
Point2DDouble represents a point in a 2D (Cartesian) coordinate
system, with additional vector operations available.
__init__ (self)
Initializes to zero the x and y members.
None
__init__ (self, x, y)
Initializes the point with the given coordinates.
x (wx.Double)
y (wx.Double)
None
__init__ (self, pt)
Initializes the point from another point.
pt (Point2DDouble)
None
__init__ (self, pt)
Initializes the point from another point.
pt (wx.Point)
None
Get() . (x,y)
Return the x and y properties as a tuple.
Any
Returns the cross product, where the products of the Y values of this point and are subtracted from the X products.
This represents another vector that is at right angles to both points.
vec (Point2DDouble)
float
Returns the distance between this point and pt .
pt (Point2DDouble)
float
Returns the squared distance between this point and pt .
pt (Point2DDouble)
float
Returns the dot (i.e., scalar) product, where the products of the X and Y values of this point and are added.
vec (Point2DDouble)
float
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns an immutable representation of the wx.Point2D object, based on namedtuple.
This new object is hashable and can be used as a dictionary key,
be added to sets, etc. It can be converted back into a real wx.Point2D
with a simple statement like this: obj = wx.Point2D(imObj).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the principal value of the arc tangent of the Y and X values, expressed in degrees.
float
Returns the hypotenuse, where the X and Y coordinates of the point represent the lengths of the base and height sides of a right triangle.
float
Sets the vector length to 1.0, preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
None
Repositions the X and Y coordinates based on the provided angle’s degrees.
degrees (wx.Double)
None
Sets the vector length to length , preserving the right angle and altering the X and Y values (which represent the base and height sides of a right triangle).
length (wx.Double)
None
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
pt (Point2DDouble)
bool
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
pt (Point2DDouble)
Point2DDouble
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
Point2DDouble
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
pt (Point2DDouble)
Point2DDouble
Returns the reflection (i.e., negation) of this point.
For example, (2, 4) on a Cartesian coordinate system will become (-2, -4).
pt (Point2DDouble)
bool
See GetRounded
See GetVectorAngle and SetVectorAngle
See GetVectorLength and SetVectorLength
A public C++ attribute of type Double . X coordinate of this point.
A public C++ attribute of type Double . Y coordinate of this point.