- NOTE add integrator related module, no changes to other module and integrator have not added into the pipeline, for the current pipeline can't work, so the integrator haven't been fully tested
- 1. apply bbox of chain to speed up intersection finding
- 2. Replace ray-based inside-test with connectivity-driven approach using
precomputed chain group map. Two chains are considered co-located in the
domain if they are mutually connected (bidirectional membership in
chain_group_map).
- Implement robust surface area and volume computation for polymesh_t
- Support arbitrary polygonal faces (triangles, quads, etc.) via fan triangulation
- Add vector math utilities: cross, dot, norm, and signed volume
- Validate algorithm correctness using unit cube test case
- Ensure right-hand rule compliance for accurate volume sign
Test: Added test case with unit cube (8 vertices, 6 quads)
Expected: area = 6.0, volume = 1.0 → actual results match
- Simplified and unified constructors for `integrator_t` to improve usability and maintainability.
- Enhanced `find_v_intersections_at_u` with robust handling of vertical edges and improved numerical stability.
- Refactored `is_point_inside_domain` to reuse existing intersection logic, eliminating code duplication.
- Adjusted interface to align with revised expectations around `parametric_plane_t`, which previously caused inconsistencies.
- Extended design to support multi-face integration (previously limited to single face); volume-related logic temporarily commented out for clarity.
This version is compilable, but not yet runnable due to nullptr issues in primitive_process during object creation. Integration framework is now structurally ready for multi-surface extension once initialization is fixed.
Instead of relying on object identity or raw transform parameters, the hasher
now uses intrinsic geometric properties to determine cylinder equivalence.
The hash is computed from:
- G = R^T * R : encodes the cylinder's cross-sectional metric and axis direction
- v = R * d : encodes the axial offset in the radial plane
where R is the top-left 2x3 submatrix of the world_to_local linear part,
and d is its translation vector. This ensures that two cylinder faces
with the same shape, orientation, and central axis (even if parameterized
differently) produce the same hash.