INNER CODE UNIT · Python
transform
fury-gl/fury · fury/actor/core.py:89
def transform(self, matrix):
"""
Apply a transformation matrix to the actor.
This transformation replaces any existing transformations.
Parameters
----------
matrix : ndarray, shape (4, 4)
Transformation matrix to be applied to the actor.
"""
if not isinstance(matrix, np.ndarray):
raise ValueError("Transformation matrix must be a numpy array.")
elif matrix.shape != (4, 4):
raise ValueError("Transformation matrix must be of shape (4, 4).")
self.local.matrix = matrix
@property