def apply_transform(self, matrix):
        """
        Apply a transform to the current primitive (sets self.transform)

        Parameters
        -----------
        matrix: (4,4) float, homogenous transformation
        """
        matrix = np.asanyarray(matrix, order='C', dtype=np.float64)
        if matrix.shape != (4, 4):
            raise ValueError('Transformation matrix must be (4,4)!')

        if np.allclose(matrix, np.eye(4)):
            log.debug('apply_tranform received identity matrix')
            return

        new_transform = np.dot(matrix, self.primitive.transform)

        self.primitive.transform = new_transform
Apply a transform to the current primitive (sets self.transform)

        Parameters
        -----------
        matrix: (4,4) float, homogenous transformation