Matrix4x4

Inheritance diagram

Inheritance diagram of ORSModel.ors.Matrix4x4, ORSModel.ors.Unmanaged, ORSModel.ors.ORSBaseClass

Classes

Matrix4x4

class ORSModel.ors.Matrix4x4

Bases: Unmanaged

A wrapper to a 3D matrix.

asRotationMatrix(self, inputVector: ORSModel.ors.Vector3)

As rotation matrix from quaternion.

Parameters:

inputVector (ORSModel.ors.Vector3)

copy(self) → ORSModel.ors.Matrix4x4

Gets a copy.

Returns:

output (ORSModel.ors.Matrix4x4)

createFromPythonRepresentation(aPythonRepresentation: str) → ORSModel.ors.Matrix4x4

Create a ORS::Matrix from a python representation static method.

Parameters:

aPythonRepresentation (str) – aPythonRepresentation (an wstring)

Returns:

output (ORSModel.ors.Matrix4x4) – a Matrix4x4 (ORS::Matrix4x4)

getClassNameStatic() → str

getClassNameStatic

Returns:

output (str)

getInverted(self) → ORSModel.ors.Matrix4x4

Gets an inverted matrix.

Note

The receiver is not affected.

Returns:

output (ORSModel.ors.Matrix4x4) – an inverted matrix (an Matrix4x4)

getIsEqualTo(self, aMatrix4x4: ORSModel.ors.Matrix4x4) → bool

Checks for equality to another matrix.

Parameters:

aMatrix4x4 (ORSModel.ors.Matrix4x4) – a matrix (a Matrix4x4)

Returns:

output (bool) – TRUE if the matrices are equal, FALSE otherwise

getIsIdentity(self) → bool

Tests for identity.

Returns:

output (bool)

getMultiply(self, IMatrix: ORSModel.ors.Matrix4x4) → ORSModel.ors.Matrix4x4

Matrix4x4 product.

Parameters:

IMatrix (ORSModel.ors.Matrix4x4)

Returns:

output (ORSModel.ors.Matrix4x4)

getScale(self) → ORSModel.ors.Vector3
Returns:

output (ORSModel.ors.Vector3)

getTransformedBoundedPlane(self, inputBoundedPlane: ORSModel.ors.Rectangle) → ORSModel.ors.Rectangle

Applies a matrix transformation to a bounded plane.

Parameters:

inputBoundedPlane (ORSModel.ors.Rectangle)

Returns:

output (ORSModel.ors.Rectangle)

getTransformedBox(self, inputBox: ORSModel.ors.Box) → ORSModel.ors.Box

Applies a matrix transformation to a box.

Parameters:

inputBox (ORSModel.ors.Box)

Returns:

output (ORSModel.ors.Box)

getTransformedCoordinate(self, inputCoordinate: ORSModel.ors.Vector3) → ORSModel.ors.Vector3

Applies a matrix transformation to an augmented vector ([x, y, z, 1]).

Parameters:

inputCoordinate (ORSModel.ors.Vector3)

Returns:

output (ORSModel.ors.Vector3)

getTransformedLine(self, inputLine: ORSModel.ors.Line) → ORSModel.ors.Line

Applies a matrix transformation to a line.

Parameters:

inputLine (ORSModel.ors.Line)

Returns:

output (ORSModel.ors.Line)

getTransformedLineSegment(self, inputLineSegment: ORSModel.ors.LineSegment) → ORSModel.ors.LineSegment

Applies a matrix transformation to a line segment.

Parameters:

inputLineSegment (ORSModel.ors.LineSegment)

Returns:

output (ORSModel.ors.LineSegment)

getTransformedOrientedPlane(self, inputOrientedPlane: ORSModel.ors.OrientedPlane) → ORSModel.ors.OrientedPlane

Applies a matrix transformation to an oriented plane.

Parameters:

inputOrientedPlane (ORSModel.ors.OrientedPlane)

Returns:

output (ORSModel.ors.OrientedPlane)

getTransformedPlane(self, inputPlane: ORSModel.ors.Plane) → ORSModel.ors.Plane

Applies a matrix transformation to a plane.

Parameters:

inputPlane (ORSModel.ors.Plane)

Returns:

output (ORSModel.ors.Plane)

getTransformedVector(self, inputVector: ORSModel.ors.Vector3) → ORSModel.ors.Vector3

Applies a matrix transformation to an augmented vector ([x, y, z, 0]).

Parameters:

inputVector (ORSModel.ors.Vector3)

Returns:

output (ORSModel.ors.Vector3)

getTranslation(self) → ORSModel.ors.Vector3

Gets the translation vector.

Returns:

output (ORSModel.ors.Vector3)

getTransposed(self) → ORSModel.ors.Matrix4x4

Gets the transpose of the matrix.

Returns:

output (ORSModel.ors.Matrix4x4)

getValue(self, row: int, column: int) → float

Gets a value from the matrix.

Note

Row and column are both between 0 and 3.

Parameters:
  • row (int) – row (an int)

  • column (int) – column (an int)

Returns:

output (float) – a double

multiply(self, IMatrix: ORSModel.ors.Matrix4x4)

Multiplies the matrix by another matrix.

Note

The receiver is modified.

Parameters:

IMatrix (ORSModel.ors.Matrix4x4) – a matrix to multiply with (an Matrix4x4)

none() → Matrix4x4
Returns:

output (Matrix4x4)

setAsRotation(self, axisOfRotation: ORSModel.ors.Vector3, angleInRadian: float)

As rotation matrix from rotation axis and angle.

Parameters:
setScale(self, scaleVector: ORSModel.ors.Vector3)

Sets the scale vector.

Parameters:

scaleVector (ORSModel.ors.Vector3)

setTranslation(self, translation: ORSModel.ors.Vector3)

Sets the translation vector.

Parameters:

translation (ORSModel.ors.Vector3)

setValue(self, row: int, column: int, value: float)

Sets a value in the matrix.

Note

Row and column are both between 0 and 3.

Parameters:
  • row (int) – row (an int)

  • column (int) – column (an int)

  • value (float) – a double value

setValues(self, values: float)

Sets the matrix values from an array of doubles.

Note

The array of doubles should contain 16 double (4 rows X 4 colums).

Parameters:

values (float) – an array of 16 float values (a doublePtr)

setupAsIdentity(self)

Initializes the matrix.

Unmanaged

class ORSModel.ors.Unmanaged

Bases: ORSBaseClass

Abstract class for objects that are not managed by the core library. Unmanaged objects are transient objects.

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)

none() → Unmanaged
Returns:

output (Unmanaged)

ORSBaseClass

class ORSModel.ors.ORSBaseClass

An abstract class from which all objects issued from the ORS Core Library inherit.

isManaged(self) → bool
Returns:

output (bool)

isNone(self) → bool
Returns:

output (bool)