voxcity.simulator_gpu.visibility.SurfaceLandmarkVisibilityCalculator¶
- class voxcity.simulator_gpu.visibility.SurfaceLandmarkVisibilityCalculator(domain)¶
GPU-accelerated Surface Landmark Visibility calculator.
Computes visibility of landmarks from building surface faces using Taichi GPU acceleration.
This emulates voxcity.simulator.visibility.landmark.get_surface_landmark_visibility.
- domain¶
- nx¶
- ny¶
- nz¶
- dx¶
- dy¶
- dz¶
- meshsize¶
- set_landmarks_from_positions(positions: numpy.ndarray)¶
Set landmark positions directly.
- Parameters:
positions – Array of shape (n_landmarks, 3) with (x, y, z) coordinates in voxels
- set_landmarks_from_voxel_value(voxel_data: numpy.ndarray, landmark_value: int = -30)¶
Set landmark positions from voxel data based on a marker value.
- Parameters:
voxel_data – 3D voxel class array
landmark_value – Voxel value marking landmarks
- compute_surface_landmark_visibility(face_centers: numpy.ndarray, face_normals: numpy.ndarray, voxel_data: numpy.ndarray = None, landmark_value: int = -30, tree_k: float = 0.6, tree_lad: float = 1.0, boundary_epsilon: float = None) numpy.ndarray¶
Compute landmark visibility for building surface faces.
- Parameters:
face_centers – Array of face center positions (n_faces, 3) in world coords
face_normals – Array of face normal vectors (n_faces, 3)
voxel_data – 3D voxel class array with landmarks marked
landmark_value – Voxel value marking landmarks
tree_k – Tree extinction coefficient
tree_lad – Leaf area density
boundary_epsilon – Epsilon for boundary detection
- Returns:
1D array with 1.0 where any landmark is visible, 0.0 otherwise, nan for boundary