voxcity.simulator_gpu.solar.raytracing.RayTracer

class voxcity.simulator_gpu.solar.raytracing.RayTracer(domain)

GPU-accelerated ray tracer for radiation calculations.

Traces rays through the voxel domain to compute: - Shadow factors (direct sunlight blocking) - Sky view factors (visible sky fraction) - Canopy sink factors (absorption by vegetation)

domain
nx
ny
nz
dx
dy
dz
max_dist
ext_coef = 0.6
compute_direct_shadows(surf_pos: ti.template(), surf_dir: ti.template(), sun_dir: ti.types.vector(3, ti.f32), is_solid: ti.template(), n_surf: taichi.i32, shadow_factor: ti.template())

Compute shadow factors for all surfaces.

shadow_factor = 0 means fully sunlit shadow_factor = 1 means fully shaded

compute_direct_with_canopy(surf_pos: ti.template(), surf_dir: ti.template(), sun_dir: ti.types.vector(3, ti.f32), is_solid: ti.template(), lad: ti.template(), n_surf: taichi.i32, shadow_factor: ti.template(), canopy_transmissivity: ti.template())

Compute shadow factors including canopy absorption.