pyvista.Prop3D.transform#
- Prop3D.transform(
- trans: pyvista.TransformLike,
- multiply_mode: Literal['pre', 'post'] = 'post',
- *,
- inplace: bool = False,
Apply a transformation to this object’s
user_matrix.Note
This applies a transformation by modifying the
user_matrix. This differs from methods likerotate_x(),rotate_y(),rotate_z(), androtation_from()which apply a transformation indirectly by modifying theorientation. See theProp3Dclass description for more information about how this class is transformed.Added in version 0.45.
- Parameters:
- trans
TransformLike Transformation matrix as a 3x3 or 4x4 array, vtkMatrix3x3 or vtkMatrix4x4, vtkTransform, or a SciPy
Rotationinstance. If the input is 3x3, the array is padded using a 4x4 identity matrix.- multiply_mode‘pre’ | ‘post’, default: ‘post’
Multiplication mode to use.
'pre': pre-multiplytranswith theuser_matrix, i.e.user_matrix @ trans. The transformation is applied before the current user-matrix.'post': post-multiplytranswith theuser_matrix, i.e.trans @ user_matrix. The transformation is applied after the current user-matrix.
- inplacebool, default:
False When
True, modifies the prop inplace. Otherwise, a copy is returned.
- trans
- Returns:
Prop3DTransformed prop.
See also
pyvista.TransformDescribe linear transformations via a 4x4 matrix.
pyvista.DataObjectFilters.transformApply a transformation to a mesh.