pyvista.Transform.apply_to_actor

pyvista.Transform.apply_to_actor#

Transform.apply_to_actor(
actor: Prop3D,
/,
mode: Literal['pre-multiply', 'post-multiply', 'replace'] = 'post-multiply',
*,
copy: bool = True,
inverse: bool = False,
) Prop3D[source]#

Apply the current transformation matrix to an actor.

This is equivalent to apply(actor, mode). See apply() for details and examples.

Parameters:
actorProp3D

Actor to apply the transformation to.

mode‘pre-multiply’, ‘post-multiply’, ‘replace’, default: ‘post-multiply’

Mode for transforming the actor:

  • 'pre-multiply' pre-multiplies this transform with the actor’s user_matrix.

  • 'post-multiply' post-multiplies this transform with the actor’s user-matrix.

  • 'replace' replaces the actor’s user-matrix with this transform’s matrix.

By default, 'post-multiply' mode is used.

inversebool, default: False

Apply the transformation using the inverse_matrix instead of the matrix.

copybool, default: True

Return a copy of the input with the transformation applied. Set this to False to transform the input directly and return it.

Returns:
Prop3D

Transformed actor.

See also

apply

Apply this transformation to any input.

apply_to_points

Apply this transformation to points.

apply_to_vectors

Apply this transformation to vectors.

apply_to_dataset

Apply this transformation to a dataset.

pyvista.Prop3D.transform

Transform an actor.