pyvista.Transform.reflection

pyvista.Transform.reflection#

property Transform.reflection: Literal[1, -1][source]#

Return the reflection component of the current transformation matrix as an integer.

1 is returned if there is no reflection, and -1 is returned if there is a reflection.

Examples

Create a transform and get its reflection.

>>> import pyvista as pv
>>> trans = pv.Transform()
>>> trans.reflection
1

Compose a reflection about the x-axis and get the reflection again.

>>> _ = trans.flip_x()
>>> trans.reflection
-1

Compose a second reflection and get the reflection again.

>>> _ = trans.flip_y()
>>> trans.reflection
1