ModellingMatrixControl
- class HPS.ModellingMatrixControl : public HPS.Control
The ModellingMatrixControl class is a smart pointer that is tied to a database object. This control gives you access to a segment’s modelling matrix. You can set an entire matrix or individual elements. Additionally, this class provides a small set of utility methods for all the basic transformations, as well as getting the matrix adjoint and determinant. Elements of modelling matrices are in row-major order.
Public Functions
- HPS.ModellingMatrixControl Adjoint ()
Replaces this matrix with it’s matrix adjoint. The adjoint is similar to the inverse but is always guaranteed to exist, even for singular matrices.
- Return
A reference to this object.
- HPS.ModellingMatrixControl Concatenate (HPS.MatrixKit in_kit)
Replaces this matrix with the matrix product of itself multiplied by another matrix.
- Param in_kit
the right side operand of the matrix multiplication.
- Return
A reference to this object.
- override void Dispose ()
- HPS.ModellingMatrixControl Invert ()
Replaces this matrix with it’s matrix inverse. If this matrix is singular (determinant = 0), it will be unchanged.
- Return
A reference to this object.
- ModellingMatrixControl (HPS.ModellingMatrixControl in_that)
Initializes a control tied to the same object as in_that.
- ModellingMatrixControl (HPS.ReferenceKey in_ref)
Initializes a control tied to the geometry reference in_ref.
- ModellingMatrixControl (HPS.SegmentKey in_seg)
Initializes a control tied to the segment in_seg.
- HPS.ModellingMatrixControl Normalize ()
Divides this matrix by its determinant. If this matrix is singular (determinant = 0), it will be unchanged.
- Return
A reference to this object.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- HPS.ModellingMatrixControl Rotate (float in_x, float in_y, float in_z)
Concatenates a rotation matrix to this matrix with rotation around the primary axes.
- Param in_x
The number of degrees to rotate around the x-axis.
- Param in_y
The number of degrees to rotate around the y-axis.
- Param in_z
The number of degrees to rotate around the z-axis.
- Return
A reference to this object.
- HPS.ModellingMatrixControl RotateOffAxis (HPS.Vector in_vector, float in_theta)
Concatenates a rotation matrix to this matrix with rotation around an arbitrary vector.
- Param in_vector
The vector to rotate around.
- Param in_theta
the number of degrees to rotate around the specified vector
- Return
A reference to this object.
- HPS.ModellingMatrixControl Scale (float in_x, float in_y, float in_z)
Concatenates a scale matrix to this matrix that represents a uniform scaling of the scene.
- Param in_x
The scale multiplier along the x-axis.
- Param in_y
The scale multiplier along the y-axis.
- Param in_z
The scale multiplier along the z-axis.
- Return
A reference to this object.
- HPS.ModellingMatrixControl Set (HPS.MatrixKit in_matrix)
Copies all settings from the source MatrixKit into this object.
- Param in_matrix
The source MatrixKit to copy.
- HPS.ModellingMatrixControl SetElement (ulong in_ordinal_zero_to_fifteen, float in_value)
Sets a single matrix element, indexed as a linear array in row-major order.
- Param in_ordinal_zero_to_fifteen
The offset into the matrix. Valid range is [0, 15].
- Param in_value
The matrix element.
- Return
A reference to this object.
- HPS.ModellingMatrixControl SetElement (ulong in_row, ulong in_column, float in_value)
Sets a single matrix element.
- Param in_row
The row index. Valid range is [0, 3].
- Param in_column
The column index. Valid range is [0, 3].
- Param in_value
The matrix element.
- Return
A reference to this object.
- HPS.ModellingMatrixControl SetElements (float[] in_values)
Sets some or all elements in the matrix from an array, starting with the first element.
- Param in_values
An array of float values in row-major order that should replace the values in the matrix.
- Return
A reference to this object.
- bool Show (out HPS.MatrixKit out_matrix)
Copies all settings from this control into the given MatrixKit.
- Param out_matrix
The MatrixKit to populate with the contents of this object.
- bool ShowAdjoint (out HPS.MatrixKit out_matrix)
Computes the matrix adjoint of this matrix. The adjoint is similar to the inverse but is always guaranteed to exist, even for singular matrices.
- Param out_matrix
The matrix adjoint of this matrix.
- Return
true if the setting is valid, false otherwise.
- bool ShowDeterminant (out float out_determinant)
Computes the matrix determinant of this matrix.
- Param out_determinant
The matrix determinant.
- Return
true if the setting is valid, false otherwise.
- bool ShowElement (ulong in_ordinal_zero_to_fifteen, out float out_value)
Shows a single matrix element, indexed as a linear array in row-major order.
- Param in_ordinal_zero_to_fifteen
The offset into the matrix. Valid range is [0, 15].
- Param out_value
The matrix element.
- Return
true if the setting is valid, false otherwise.
- bool ShowElement (ulong in_row, ulong in_column, out float out_value)
Shows a single matrix element.
- Param in_row
The row index. Valid range is [0, 3].
- Param in_column
The column index. Valid range is [0, 3].
- Param out_value
The matrix element.
- Return
true if the setting is valid, false otherwise.
- bool ShowElements (out float[] out_matrix)
Shows all elements of this matrix as an array.
- Param out_matrix
The contents of the matrix arranged as a linear array in row-major order.
- Return
true if the setting is valid, false otherwise.
- bool ShowInverse (out HPS.MatrixKit out_matrix)
Computes the matrix inverse of this matrix. Fails if this matrix is singular (determinant = 0).
- Param out_matrix
The matrix inverse of this matrix.
- Return
true if the setting is valid, false otherwise.
- HPS.ModellingMatrixControl Translate (float in_x, float in_y, float in_z)
Concatenates a translation matrix to this matrix that moves geometry.
- Param in_x
The number of units to translate along the x-axis.
- Param in_y
The number of units to translate along the y-axis.
- Param in_z
The number of units to translate along the z-axis.
- Return
A reference to this object.
- HPS.ModellingMatrixControl Translate (HPS.Vector in_translation)
Concatenates a translation matrix to this matrix that moves geometry.
- Param in_translation
A vector distance to translate by.
- Return
A reference to this object.
- HPS.ModellingMatrixControl UnsetEverything ()
Removes all settings from this object.
- Return
A reference to this object.