Camera.model_transform_matrix#
- property Camera.model_transform_matrix: NumpyArray[float][source]#
Return or set the camera’s model transformation matrix.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> import numpy as np
>>> pl = pv.Plotter()
>>> pl.camera.model_transform_matrix
array([[1., 0., 0., 0.],
[0., 1., 0., 0.],
[0., 0., 1., 0.],
[0., 0., 0., 1.]])
>>> pl.camera.model_transform_matrix = np.array(
... [
... [1.0, 0.0, 0.0, 0.0],
... [0.0, 1.0, 0.0, 0.0],
... [0.0, 0.0, 1.0, 0.0],
... [0.0, 0.0, 0.0, 0.5],
... ]
... )
>>> pl.camera.model_transform_matrix
array([[1. , 0. , 0. , 0. ],
[0. , 1. , 0. , 0. ],
[0. , 0. , 1. , 0. ],
[0. , 0. , 0. , 0.5]])
Used In#
API Examples
Camera.copy(1 use)