•
|
CENPyOlpVector(x: float, y: float, z: float)
|
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Create new vector object
Note that object will be deleted automatically by python at the end of current callback scope.
[Example]
myNewVector = CENPyOlpVector(1, 2.22, -3.333)
•
|
SetXYZ(x: float, y: float, z: float)
|
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Set coordinates.
[Example]
myNewVector.SetXYZ(-1, 2.2, 3)
|
|
tuple (x coordinate, y coordinate, z coordinate) in meters
|
Get coordinates as tuple .
[Example]
myVectorCoordinates = myNewVector.GetXYZ()
Get x coordinate.
[Example]
myVectorXCoord = myNewVector.GetX()
Get y coordinate.
[Example]
myVectorYCoord = myNewVector.GetY()
Get z coordinate.
[Example]
myVectorZCoord = myNewVector.GetZ()
|
|
new x coordinate in meters
|
Set x coordinate.
[Example]
myNewVector.SetX(0.1)
|
|
new y coordinate in meters
|
Set y coordinate.
[Example]
myNewVector.SetY(-0.2)
|
|
new z coordinate in meters
|
Set z coordinate.
[Example]
myNewVector.SetZ(-0.003)
Normalize vector.
[Example]
myNewVector.Normalize()
Transform vector.
[Example]
myNewVector.Transform(myMat)
Compute angle between this and another vector.
[Example]
rotAxisZ = CENPyOlpVector(0, 0, 1)
rotAxisXZ = CENPyOlpVector(1, 0, 1)
axisAngle = rotAxisZ.Angle(rotAxisXZ)
logOperator.LogDebug(str(axisAngle))
Invert vector.
[Example]
myNewVector.Invert()
|