SurfaceRef: which surface of a shape decides its value at a point, and the container protocol that names one inside a shape holding several.
More...
|
| template<class T , class S > |
| uint32_t | EBGeometry::SurfaceDetail::numPartsOf (const S &a_shape) |
| | How many parts a shape has: its getNumParts(), 1 for a shape without parts.
|
| |
| template<class T , class S > |
| uint32_t | EBGeometry::SurfaceDetail::numSurfacesOf (const S &a_shape) |
| | How many surfaces a shape holds: a container's getNumSurfaces(), 1 for any other shape.
|
| |
| template<class T , class S > |
| SurfaceRef< T > | EBGeometry::SurfaceDetail::closestSurfaceOf (const S &a_shape, const Vec3T< T > &a_point) noexcept |
| | The surface of a shape that decides its value at a point: a container's closestSurface(), surface 0 at the point itself for any other shape.
|
| |
| template<class T , class S > |
| SurfaceRef< T > | EBGeometry::closestSurface (const S &a_shape, const Vec3T< T > &a_point) noexcept |
| | The surface of any shape that decides its value at a point: a container's closestSurface() (a tape, a BVH union, a sphere cloud), and for any other shape surface 0 with its part (see hasParts). For code templated on a shape. Callable on a device.
|
| |
|
| template<class S , class T > |
| constexpr bool | EBGeometry::hasSurfaces = SurfaceDetail::HasSurfaces<S, T>::value |
| | Whether a shape holds several surfaces: it has uint32_t getNumSurfaces() const (host) and SurfaceRef<T> closestSurface(const Vec3T<T>&) const (host and device), which name its members.
|
| |
| template<class S , class T > |
| constexpr bool | EBGeometry::hasParts = SurfaceDetail::HasParts<S, T>::value |
| | Whether a shape has several parts: it has uint32_t getNumParts() const (host) and uint32_t closestPart(const Vec3T<T>&) const (host and device), which reads the part from its own formula at a point in its frame: the term that decides the value there (a box's face, a cylinder's side or cap, a mesh's face). A part belongs to the shape, never to a composition of it: a face a difference cuts into two pieces is one part. A shape without them has one part, 0.
|
| |
SurfaceRef: which surface of a shape decides its value at a point, and the container protocol that names one inside a shape holding several.
- Author
- Robert Marskar
template<class T , class S >
| SurfaceRef< T > EBGeometry::SurfaceDetail::closestSurfaceOf |
( |
const S & |
a_shape, |
|
|
const Vec3T< T > & |
a_point |
|
) |
| |
|
inlinenoexcept |
The surface of a shape that decides its value at a point: a container's closestSurface(), surface 0 at the point itself for any other shape.
Internal helper; not part of the public API. Out of line on a device, like the ray helpers: a container's closestSurface() is a traversal, and inlined at each call site it would be copied into every drill of every type.
- Template Parameters
-
| T | Floating-point precision. |
| S | Shape type. |
- Parameters
-
| [in] | a_shape | The shape. |
| [in] | a_point | The point, in the shape's frame. |
- Returns
- The surface.