Quaternion¶
Inheritance diagram¶

Classes¶
Quaternion¶
- class ORSModel.ors.Quaternion(self, pythonRepresentation: str, isPythonRepresentation: bool)¶
Bases:
Unmanaged- Parameters:
pythonRepresentation (str) –
isPythonRepresentation (bool) –
Quaternion.__init__(self)
Quaternion.__init__(self, x: float, y: float, z: float, w: float)
- Parameters:
x (float) –
y (float) –
z (float) –
w (float) –
Quaternion.__init__(self, rotationMatrix: ORSModel.ors.Matrix4x4)
- Parameters:
rotationMatrix (ORSModel.ors.Matrix4x4) –
Quaternion.__init__(self, axis: ORSModel.ors.Vector3, angle: float)
- Parameters:
axis (ORSModel.ors.Vector3) –
angle (float) –
- add(self, aVector: ORSModel.ors.Quaternion)¶
Adds a vector to the receiver.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
- copy(self) ORSModel.ors.Quaternion¶
Returns a new vector identical to the receiver (a copy).
- Returns:
output (ORSModel.ors.Quaternion) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Quaternion¶
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Quaternion) –
- fromAxisAndAngle(self, axis: ORSModel.ors.Vector3, angle: float)¶
- Parameters:
axis (ORSModel.ors.Vector3) –
angle (float) –
- fromRotationMatrix(self, aRotationMatrix: ORSModel.ors.Matrix4x4)¶
- Parameters:
aRotationMatrix (ORSModel.ors.Matrix4x4) –
- getAdditionWith(self, aVector: ORSModel.ors.Quaternion) ORSModel.ors.Quaternion¶
Gets the result of adding a vector to the receiver.
Note
The receiver is not modified.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
- getAngle(self) float¶
- Returns:
output (float) –
- getAsRotationMatrix(self) ORSModel.ors.Matrix4x4¶
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getAxis(self) ORSModel.ors.Vector3¶
- Returns:
output (ORSModel.ors.Vector3) –
- getClassNameStatic() str¶
getClassNameStatic
- Returns:
output (str) –
- getConjugate(self) ORSModel.ors.Quaternion¶
- Returns:
output (ORSModel.ors.Quaternion) –
- getDirection(self) ORSModel.ors.Vector3¶
get direction of theQuaternion
- Returns:
output (ORSModel.ors.Vector3) – ORS::Vector3
- getDotProductWith(self, aQuaternion: ORSModel.ors.Quaternion) float¶
- Parameters:
aQuaternion (ORSModel.ors.Quaternion) –
- Returns:
output (float) –
- getIsEqualTo(self, aVector: ORSModel.ors.Quaternion) bool¶
- Parameters:
aVector (ORSModel.ors.Quaternion) –
- Returns:
output (bool) –
- getLength(self) float¶
Gets the vector’s length.
- Returns:
output (float) – the length (a double)
- getLinearInterpolationWith(self, point1: ORSModel.ors.Quaternion, normalizePosition: float) ORSModel.ors.Quaternion¶
Computes the lerp with another vector.
- Parameters:
point1 (ORSModel.ors.Quaternion) – a vector (an Vector3)
normalizePosition (float) – a interpolation factor [0,1](a double)
- Returns:
output (ORSModel.ors.Quaternion) – the lerp vector (an Vector3)
- getMultiply(self, aQuaternion: ORSModel.ors.Quaternion) ORSModel.ors.Quaternion¶
multyply the receiver with the givenQuaternion.
- Parameters:
aQuaternion (ORSModel.ors.Quaternion) – a double value
- Returns:
output (ORSModel.ors.Quaternion) –
- getNegated(self) ORSModel.ors.Quaternion¶
Gets the receiver negated in a new vector.
Note
The receiver is not modified.
- Returns:
output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
- getNormalized(self) ORSModel.ors.Quaternion¶
- Returns:
output (ORSModel.ors.Quaternion) –
- getOuterProduct(q1: ORSModel.ors.Quaternion, q2: ORSModel.ors.Quaternion) ORSModel.ors.Matrix4x4¶
- Parameters:
q1 (ORSModel.ors.Quaternion) –
q2 (ORSModel.ors.Quaternion) –
- Returns:
output (ORSModel.ors.Matrix4x4) –
- getScaledBy(self, scaleFactor: float) ORSModel.ors.Quaternion¶
Gets the result of sacling a vector to the receiver.
Note
The receiver is not modified.
- Parameters:
scaleFactor (float) – a scale a double
- Returns:
output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
- getSphericalInterpolationWith(self, point1: ORSModel.ors.Quaternion, normalizePosition: float) ORSModel.ors.Quaternion¶
Computes the slerp with another vector.
- Parameters:
point1 (ORSModel.ors.Quaternion) – a vector (an Vector3)
normalizePosition (float) – a interpolation factor [0,1](a double)
- Returns:
output (ORSModel.ors.Quaternion) – the lerp vector (an Vector3)
- getSubtractionFrom(self, aVector: ORSModel.ors.Quaternion) ORSModel.ors.Quaternion¶
Gets the result of subtracting a vector from the receiver.
Note
The receiver is not modified.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Quaternion) – the resulting vector (an Vector3)
- getUp(self) ORSModel.ors.Vector3¶
get direction of theQuaternion
- Returns:
output (ORSModel.ors.Vector3) – ORS::Vectoupr3
- getW(self) float¶
Gets the W value from the vector.
- Returns:
output (float) – a double
- getX(self) float¶
Gets the X value from the vector.
- Returns:
output (float) – a double
- getY(self) float¶
Gets the Y value from the vector.
- Returns:
output (float) – a double
- getZ(self) float¶
Gets the Z value from the vector.
- Returns:
output (float) – a double
- multiply(self, aQuaternion: ORSModel.ors.Quaternion)¶
multyply the receiver with the givenQuaternion.
- Parameters:
aQuaternion (ORSModel.ors.Quaternion) – a double value
- none() Quaternion¶
- Returns:
output (Quaternion) –
- normalize(self)¶
Normalizes the vector.
Note
A normalized vector has norm (length) 1.
- scale(self, scaleFactor: float)¶
Scales the vector.
- Parameters:
scaleFactor (float) – a scale factor (a double)
- setW(self, value: float)¶
Sets the Y value of the vector.
- Parameters:
value (float) – a double value
- setX(self, value: float)¶
Sets the X value of the vector.
- Parameters:
value (float) – a double value
- setXYZ(self, x: float, y: float, z: float)¶
Sets the 3 vector component.
Note
W is set to zero
- Parameters:
x (float) – the X component (a double)
y (float) – the Y component (a double)
z (float) – the Z component (a double)
- setY(self, value: float)¶
Sets the Y value of the vector.
- Parameters:
value (float) – a double value
- setZ(self, value: float)¶
Sets the Z value of the vector.
- Parameters:
value (float) – a double value
- subtract(self, aVector: ORSModel.ors.Quaternion)¶
Subtracts a vector from the receiver.
- Parameters:
aVector (ORSModel.ors.Quaternion) – a vector (an Vector3)
Unmanaged¶
- class ORSModel.ors.Unmanaged
Bases:
ORSBaseClass- atomicLoad(sFilename: str) Unmanaged
Creates an object from a file where an object was saved.
- Parameters:
sFilename (str) – path of the file to load
- Returns:
output (Unmanaged) – an unmanaged object, or none() if the load fails
- atomicSave(self, aFilename: str) int
Saves the object to a file.
- Parameters:
aFilename (str) – path of the file to save
- Returns:
output (int) – 0 if successful, otherwise an error code
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Unmanaged
Create aUnmanaged Object from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Unmanaged) –
- fromPythonRepresentation(self, aPythonRepresentation: str) bool
Create aUnmanaged object from a Python string representation.
- Parameters:
aPythonRepresentation (str) – a Python evaluable string representation (a string)
- Returns:
output (bool) – true if parsing worked, false otherwise (a bool)
- getClassName(self) str
Retrieves the class name of the core object wrapped by this Interface object.
- Returns:
output (str) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDataChecksum(self) str
- Returns:
output (str) –
- getIsInstanceOf(self, pProgId: str) bool
Queries the object to know if it is an instance of a certain class.
- Parameters:
pProgId (str) –
- Returns:
output (bool) –
- getPythonRepresentation(self) str
Gets a Python evaluable string representation.
- Returns:
output (str) –
- isNone(self) bool
Checks if the receiver is none.
- Returns:
output (bool) –
- isNotNone(self) bool
Checks if the receiver is not none.
- Returns:
output (bool) –
ORSBaseClass¶
- class ORSModel.ors.ORSBaseClass(self)
- getPythonTraceBack() List[str]
Set the python traceback for a call from python.
- Returns:
output (List[str]) –
- isManaged(self) bool
- Returns:
output (bool) –
- isNone(self) bool
- Returns:
output (bool) –
- setPythonTraceBack(tb: List[str])
Set the python traceback for a call from python.
- Parameters:
tb (List[str]) –