voxcity.simulator_gpu.visibility.workspace.ViewWorkspace ======================================================== .. py:class:: voxcity.simulator_gpu.visibility.workspace.ViewWorkspace(*, key: ViewWorkspaceKey, nx: int, ny: int, nz: int, n_azimuth: int, n_elevation: int, ray_sampling: str, n_rays: Optional[int], elevation_min_degrees: float, elevation_max_degrees: float) Pre-allocated Taichi fields for one visibility-ray configuration. Parameters are identical to the ray-configuration subset of ``ViewCalculator.__init__`` plus the grid dimensions. All fields are created once at construction time. The caller is responsible for reinitialising mask fields before each call to the GPU kernel. .. py:attribute:: key .. py:attribute:: nx .. py:attribute:: ny .. py:attribute:: nz .. py:attribute:: n_ray_dirs .. py:attribute:: ray_dirs .. py:attribute:: vi_map .. py:attribute:: is_tree .. py:attribute:: is_solid .. py:attribute:: is_target .. py:attribute:: is_allowed .. py:attribute:: is_blocker .. py:attribute:: is_walkable .. py:attribute:: mask_field .. py:method:: set_mask(mask_np) -> None Set mask_field from a boolean numpy array, or reset to all-on. .. py:method:: validate_voxel_data(voxel_data: numpy.ndarray) -> None Raise ``ValueError`` if *voxel_data* shape does not match this workspace.