PyANGKernel.GKVector¶
- class GKVector¶
Synopsis¶
Methods¶
def
__init__()def
angle()def
crossProduct()def
dotProduct()def
fullAngle()def
getLength()def
getX()def
getY()def
getZ()def
normalize()def
normalized()def
__mul__()def
__imul__()def
__add__()def
__iadd__()def
__sub__()def
__isub__()def
rotate()def
set()def
setX()def
setY()def
setZ()
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¶
It can be used to contain a 2d vector as most of the methods for points have a default z value assigned to 0.
- __init__()¶
Constructs a 3D vector using an initial and end points that will be used to calculate its coordinates.
- __init__(ax, ay[, az=0.0])
- Parameters:
ax – float
ay – float
az – float
Constructs a 3D vector setting the x, y and z coordinates.
It returns the smallest angle between “this” and “v2” vectors in radians
It returns the angle this vector makes with the horizontal in radians between - GKPI and GKPI. Note: The horizontal is interpreted as the vector (1.0, 0.0)
Returns the resulting vector of calculating the cross (vector) product between this vector and v2
Returns the dot (scalar) product between to vectors
It returns the angle between “this” and “v2” vectors in radians (0 - 2PI)
Gets the vector length calculated using the points or coordinates defined for the vector.
Gets the x coordinate of this vector.
Gets the y coordinate of this vector.
Gets the z coordinate of this vector.
- normalize()¶
Normalizes this vector changing its length to 1.0 meter and normalizing the x,y and z coordinates
Returns a normalized version of this vector
Devuelve un objeto diferente.
Rotates the vector an angle ‘angle’ in radians taking ‘center’ as the center of rotation
Sets the origin and destination point of this vector, used to indicate the vector’s direction.
- set(ax, ay[, az=0.0])
- Parameters:
ax – float
ay – float
az – float
Sets the x, y and z coordinates of this vector.
- setX(_x)¶
- Parameters:
_x – float
Sets the x coordinate of this vector
- setY(_y)¶
- Parameters:
_y – float
Sets the y coordinate of this vector
- setZ(_z)¶
- Parameters:
_z – float
Sets the z coordinate of this vector