INNER CODE UNIT · Python

Actor

fury-gl/fury · fury/actor/core.py:32

class Actor:
    """Base Actor class for making APIs user-friendly."""

    def rotate(self, rotation):
        """
        Rotate the actor by the given rotation.

        Parameters
        ----------
        rotation : tuple
            Rotation angles (in degrees) around the x, y, and z axes.
        """
        rotation = np.asarray(rotation, dtype=np.float32)
        if rotation.shape != (3,):
            raise ValueError("Rotation must contain three angles (degrees).")

        quaternion = self._euler_to_quaternion(np.radians(rotation))
        rotate(quaternion, actor=self)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…