voxcity.simulator_gpu.visibility.workspace.ViewWorkspace¶
- 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: int | None, 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.- key¶
- nx¶
- ny¶
- nz¶
- n_ray_dirs¶
- ray_dirs¶
- vi_map¶
- is_tree¶
- is_solid¶
- is_target¶
- is_allowed¶
- is_blocker¶
- is_walkable¶
- mask_field¶
- set_mask(mask_np) None¶
Set mask_field from a boolean numpy array, or reset to all-on.
- validate_voxel_data(voxel_data: numpy.ndarray) None¶
Raise
ValueErrorif voxel_data shape does not match this workspace.