PyANGKernel.GKPoint¶
- class GKPoint¶
Synopsis¶
Methods¶
def
__init__()def
areEqual()def
areEqual2D()def
betweenPoints()def
distance2D()def
distance3D()def
isNaN()def
lDist()def
length()def
lerp()def
line2DPtp()def
normalized()def
__ne__()def
__mul__()def
__imul__()def
__add__()def
__iadd__()def
__sub__()def
__isub__()def
__div__()def
__lt__()def
__le__()def
operator=()def
__eq__()def
__gt__()def
__ge__()def
operator[]()def
reset()def
rotate2D()def
rotate2DThis()def
set()def
toString()
Static functions¶
def
fromString()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
This 3d point can contain the (x, y, z) coordinates of a point. It can be used to contain a 2d point as most of the methods have a default z value asigned to 0.
- PyANGKernel.GKPoint.x¶
- PyANGKernel.GKPoint.y¶
- PyANGKernel.GKPoint.z¶
- PyANGKernel.GKPoint.zero¶
- __init__()¶
- __init__(v)
- Parameters:
v –
GKVector
- __init__(ax, ay[, az=0.0f])
- Parameters:
ax – float
ay – float
az – float
Returns true if “this” point is different from “c” (first parameter) after multiplying the coordinates by a factor (second parameter) and comparing each one as integers
Returns true if both points are close enough taking into account the epsilon (in m) provided as second parameter. All x, y, and z are taken into account.
Returns true if both points are close enough taking into account the epsilon (in m) provided as second parameter. Only the 2D coordinates of the points (x and y) are taken into account
- betweenPoints(p1, p2, epsilon)¶
Supposing that all three points pertain to the same line, returns true if this is located between p1 and p2; false otherwise. The epsilon is the distance in m allowed for distorsion
Given segment ab and this point, computes closest point on ab and returns it. Also returns t for the position of d, d(t) = a + t*(b - a)
Distance between “this” point and point “c” without use Z coordinate.
Distance between “this” point and point “c”.
A point is created from a string having the format x,y,z x, y and z coordinates can have different sizes
Returns the angle that the segment defined by this point and “point” makes with the horitzontal. Between GKPI and -GKPI
Returns the angle that the segment defined by this point and “point” makes with the horitzontal. Between GKPI and -GKPI
Returns the angle that the line defined by this point and “point” makes with the horitzontal. Between GKPI/2 and -GKPI/2
Returns the angle that the line defined by this point and “point” makes with the vertical. Between GKPI/2 and -GKPI/2
NaN detector
Finds a point p in the line defined by this and p2, at distance “distance” from this going to p2
Length
Lerp: returns (1-f)this + pf
Given a second point, returns the Line in 2 dimensions that goes by them. If the line is vertical, it is codified with slope = DBL_MA and coef = x constant
- lineCrossProduct(aLinePoint, aXIncrement, aYIncrement)¶
- minDistanceToLine(aLinePoint1, aLinePoint2)¶
Unit vector pointing in the same direction
Operator that returns true if the two compared points are different. This operator returns false if the points are equal.
Dot product
- __mul__(c)
- Parameters:
c – float
- Return type:
Operator that adds one point to another.
Operator that adds one vector to a point.
- __add__(c)
- Parameters:
c – float
- Return type:
Operator that adds one point to another.
Negative operator
Operator that subtracts one point to another.
Operator that subtracts one vector to a point.
- __sub__(c)
- Parameters:
c – float
- Return type:
Operator that subtracts one point to another.
Operator that divides a scalar to all point components
Assignment from vector.
- operator=(l)
- Parameters:
l – .std.arraydouble,3
- Return type:
Assignment from vector.
Operator that returns true if the two compared points are equal. This operator returns false if the points are different.
Fills the point ‘res’ that is on the line that goes to point ‘p’ at distance ‘d’ If the value returnen is ‘false’ then an error occourred and ‘res’ is not filled
- reset()¶
Rotates this point, given a center and an angle in radians. The rotated point is returned and this one is not modified
Rotates this point, given a center and an angle in radians, modifying it.
- set(ax, ay[, az=0.0f])¶
- Parameters:
ax – float
ay – float
az – float
Sets the (x, y, z) coordinates of the point.
Returns a QString having the format x,y,z
- translateAtAngleByDistance(aAngle, aDistance)¶
- Parameters:
aAngle – float
aDistance – float
Translates this point at an angle to a given distance