EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Attributes | Static Public Attributes | List of all members
EBGeometry::SurfaceRef< T > Struct Template Reference

The surface that decides a shape's value at a point, as closestSurface() reports it. More...

#include <EBGeometry_SurfaceRef.hpp>

Collaboration diagram for EBGeometry::SurfaceRef< T >:
Collaboration graph
[legend]

Public Attributes

uint32_t m_surface = None
 The surface, numbered within the shape that was asked (across the scene when that is a tape).
 
uint32_t m_leaf = None
 Set by a tape: the leaf the surface belongs to, as Tape::closestLeaf() numbers it.
 
SurfaceLabelId m_surfaceLabel
 Set by a tape: the surface's label, or none. A part labeled through face groups (SurfaceLabel(shape, FaceGroups)) has its group's label; any other the leaf's (Tape::getSurfaceLabel()).
 
uint32_t m_part = 0
 The part of the deepest shape reached, read from its own formula at the local point (see hasParts): a box's face, a cylinder's side or cap, a mesh's face; 0 for a shape with one part.
 
uint32_t m_ownerRegion = None
 Set by a tape's region queries: the owner, the region the surface is reported from at the queried point (for Tape::closestSurface(p, region), the region asked about; for a crossing along a ray, the region the ray leaves; for a piece, the later region, on top in the Overlay), or None. The normal points from the owner to the neighbor. Which side is in a subdomain is a question for the subdomains (Subdomains::role()), not a property of the surface.
 
uint32_t m_neighborRegion = None
 Set by a tape's region queries: the neighbor, the region across the surface from the owner at the queried point (for a crossing along a ray, the region the ray enters; 0 for the background), or None.
 
MaterialLabelId m_ownerMaterial
 Set with the sides: the owner's material (m_ownerRegion's MaterialLabel()), or none.
 
MaterialLabelId m_neighborMaterial
 Set with the sides: the neighbor's material (m_neighborRegion's), or none.
 
Vec3T< T > m_localPoint = Vec3T<T>::zeros()
 The point in the frame of the deepest shape reached: the primitive, or the container member, whose surface it is.
 

Static Public Attributes

static constexpr uint32_t None = 0xFFFFFFFFU
 No surface (an empty shape), no leaf or no label.
 

Detailed Description

template<class T>
struct EBGeometry::SurfaceRef< T >

The surface that decides a shape's value at a point, as closestSurface() reports it.

A shape holding several surfaces (a container: a tape, a BVH union, a sphere cloud, or a user's shape with getNumSurfaces() and closestSurface()) numbers them from 0 to getNumSurfaces() - 1, and names the one that decides, at any depth: a sphere of a cloud inside a union inside a tape. Every other shape is one surface, number 0. A tape numbers its surfaces across the whole scene: each leaf covers the range [Tape::getFirstSurface(leaf), + the leaf's getNumSurfaces()), in leaf order, so per-member data of a container is an array indexed by m_surface minus its leaf's first surface.

Template Parameters
TFloating-point precision.

The documentation for this struct was generated from the following file: