|
| | OccludedInstanceSampler (const scene::SimpleScene< Scalar, Index, 3 > &scene, const OccludedInstanceSamplerOptions &options={}, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder=[](Index, Index) { return true;}) |
| | Build the ray caster and per-instance precomputation.
|
| |
|
| OccludedInstanceSampler (OccludedInstanceSampler &&) noexcept |
| |
|
OccludedInstanceSampler & | operator= (OccludedInstanceSampler &&) noexcept |
| |
|
void | run_batch (uint64_t num_rays) |
| | Run a batch distributing num_rays across instances not yet decided.
|
| |
|
bool | is_visible (Index mesh_index, Index instance_index) const |
| | Whether the instance is currently kept: visibility_measure(mesh, instance) >= threshold.
|
| |
|
double | visibility_measure (Index mesh_index, Index instance_index) const |
| | The instance's visibility measure mean_visibility * (area / R)^size_influence, where mean_visibility is the estimated cosine-weighted escaped fraction in [0, 1].
|
| |
|
uint64_t | num_rays_cast (Index mesh_index, Index instance_index) const |
| | Rays cast so far for the instance.
|
| |
|
Index | num_instances () const |
| | Total number of instances across all meshes.
|
| |
| Index | num_retired () const |
| | Number of instances confidently above the keep threshold and retired from sampling.
|
| |
|
std::pair< Index, uint64_t > | progress () const |
| | Aggregate (number of currently-visible instances, total rays cast) for progress reporting without rescanning the scene's (mesh_index, instance_index) address space.
|
| |
template<typename
Scalar, typename Index>
class lagrange::raycasting::internal::OccludedInstanceSampler< Scalar, Index >
Stateful algorithm for finding occluded instances in a scene.
Each call to run_batch distributes rays over instances not yet decided, progressively improving the result. Per-instance results are addressed by (mesh_index, instance_index).
- Note
- Only 3D scenes are supported.
- Template Parameters
-
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |