pyvista.Transform.identity

pyvista.Transform.identity#

Transform.identity() Transform[source]#

Set the transformation to the identity transformation.

This can be used to “reset” the transform.

Examples

Concatenate an arbitrary transformation.

>>> import pyvista as pv
>>> transform = pv.Transform().scale(2.0)
>>> transform.matrix
array([[2., 0., 0., 0.],
       [0., 2., 0., 0.],
       [0., 0., 2., 0.],
       [0., 0., 0., 1.]])

Reset the transformation to the identity matrix.

>>> _ = transform.identity()
>>> transform.matrix
array([[1., 0., 0., 0.],
       [0., 1., 0., 0.],
       [0., 0., 1., 0.],
       [0., 0., 0., 1.]])