simulariumio/filters/transform_spatial_axes_filter.py
def _transform_coordinate(
        self, position: np.ndarray, set_direction: bool = True
    ) -> np.ndarray:
        """
        Transform an +X+Y+Z coordinate according to axes_mapping
        """
        result = np.zeros_like(position)
        for d in range(len(self.axes_mapping)):
            axis = self.axes_mapping[d]
            if "x" in axis:
                result[d] = position[0]
            if "y" in axis:
                result[d] = position[1]
            if "z" in axis:
                result[d] = position[2]
            if set_direction and "-" in axis:
                result[d] *= -1.0
        return result

        Transform an +X+Y+Z coordinate according to axes_mapping
        
Transform an +X+Y+Z coordinate according to axes_mapping
Transform an + X + Y + Z coordinate according to axes_mapping
def _transform_coordinate(
        self, position: np.ndarray, set_direction: bool = True
    ) -> np.ndarray:
        result = np.zeros_like(position)
        for d in range(len(self.axes_mapping)):
            axis = self.axes_mapping[d]
            if "x" in axis:
                result[d] = position[0]
            if "y" in axis:
                result[d] = position[1]
            if "z" in axis:
                result[d] = position[2]
            if set_direction and "-" in axis:
                result[d] *= -1.0
        return result
def _transform_coordinate ( self , position : np . ndarray , set_direction : bool = True ) -> np . ndarray : result = np . zeros_like ( position ) for d in range ( len ( self . axes_mapping ) ) : axis = self . axes_mapping [ d ] if "x" in axis : result [ d ] = position [ 0 ] if "y" in axis : result [ d ] = position [ 1 ] if "z" in axis : result [ d ] = position [ 2 ] if set_direction and "-" in axis : result [ d ] *= - 1.0 return result
Transform an +X+Y+Z coordinate according to axes_mapping
Transform an + X + Y + Z coordinate according to axes_mapping
"""
        Transform an +X+Y+Z coordinate according to axes_mapping
        """
self
position
np.ndarray
set_direction
bool