|
Celeritas 0.7.0-dev.245+develop.a7be925e
|
Access data about a single implementation volume. More...
#include <VolumeView.hh>
Public Types | |
| using | ParamsRef = NativeCRef< OrangeParamsData > |
| Type aliases. | |
Public Member Functions | |
| VolumeView (ParamsRef const ¶ms, SimpleUnitRecord const &unit_record, LocalVolumeId id) | |
| Construct with reference to persistent data. | |
| FaceId::size_type | num_faces () const |
| Number of surfaces bounding this volume. | |
| LocalSurfaceId | get_surface (FaceId id) const |
| Get the surface ID for a single face. | |
| FaceId | find_face (LocalSurfaceId id) const |
| Find the face ID of a surface. | |
| LdgSpan< LocalSurfaceId const > | faces () const |
| Get all the surface IDs corresponding to the faces of this volume. | |
| LdgSpan< logic_int const > | logic () const |
| Get logic definition. | |
| logic_int | max_intersections () const |
| Get the maximum number of surface intersections. | |
| bool | internal_surfaces () const |
| Whether the volume has internal surface crossings. | |
| bool | implicit_vol () const |
| Whether the volume is an "implicit complement". | |
| bool | simple_safety () const |
| Whether the safety distance can be calculated with the simple algorithm. | |
| bool | simple_intersection () const |
| Whether the intersection is the closest interior surface. | |
Access data about a single implementation volume.
A volume is a CSG tree of surfaces. The sorted, unique surface IDs comprising the volume are "faces" and can be indexed as part of this volume using the FaceId.
Each surface defines an "inside" space and "outside" space that correspond to "negative" and "positive" values of the quadric expression's evaluation. Left of a plane is negative, for example, and evaluates to "false" or "inside" or "negative". The CSG tree is encoded into a vector of Reverse Polish Notation-type operations (push, negate, and, or) that is evaluated at tracking time to determine whether a particle is inside the volume. The encoded set of operations is the logic accessor.
|
inline |
Find the face ID of a surface.
This is an O(log(num_faces)) operation.
|
inline |
Get the surface ID for a single face.
This is an O(1) operation.