lima/box-newNormal: Implement a faster NormalKernel() for the box
Looking at the recent box changes, I noticed that zero-size normal vectors were returned for points away from the box surface, which is bad for Geant4 integration.
This commit implements a new algorithm for the box NormalKernel(), based on safeties.
- Details:
- new, faster, safety-based implementation for the box NormalKernel()
- always returns a normalized vector
- for points away from the surface, return normal to closest surface (based on safety) and valid=false
- for points on (or closest to) edges or vertices, return a vector based on the average of the normals from all closest surfaces.