Project
Loading...
Searching...
No Matches
o2::cad::surface::BoundedSurface Class Referenceabstract

Abstract analytic surface patch: one support surface plus its trim, with the kernels the navigation needs. More...

#include <BoundedSurface.h>

Inherited by o2::cad::surface::ConicalBoundedSurface, o2::cad::surface::CurvedPlanarBoundedSurface, o2::cad::surface::CylindricalBoundedSurface, o2::cad::surface::DummyBoundedSurface, o2::cad::surface::PlanarBoundedSurface, o2::cad::surface::SphericalBoundedSurface, and o2::cad::surface::TorusBoundedSurface.

Classes

struct  BoundaryEdgeRef
 

Public Types

using CoverBox = std::pair< Vec3, Vec3 >
 One axis-aligned cover box of the sub-patch BVH, as a (lower corner, upper corner) pair.
 

Public Member Functions

virtual ~BoundedSurface ()=default
 
virtual void conservativeBounds (Vec3 &lower, Vec3 &upper) const =0
 Accumulate a conservative axis-aligned bounding box of the trimmed patch.
 
virtual void appendCoverBoxes (std::vector< CoverBox > &boxes) const
 
virtual bool containsPointOnSurface (const Vec3 &point) const =0
 True if the 3D point lies on the trimmed patch within tolerance.
 
virtual void appendIntersections (const Vec3 &rayOrigin, const Vec3 &rayDirection, double minDistance, double maxDistance, std::vector< RayHit > &hits) const =0
 Append every hit of the ray with the trimmed patch in [minDistance, maxDistance], with the outward normal; no tangential grazes.
 
virtual double distanceSqToPatch (const Vec3 &point) const =0
 Squared distance from a 3D point to the trimmed patch (used for Safety).
 
virtual Vec3 normalAt (const Vec3 &point) const =0
 Outward-oriented normal at (or nearest to) the given point.
 
virtual void parametricMetric (const Vec2 &uv, double &gUU, double &gUV, double &gVV) const =0
 The first fundamental form at uv, turning parametric displacements into 3D lengths; it varies over the domain and gUU vanishes at poles.
 
double parametricLengthSqAt (const Vec2 &uv, const Vec2 &delta) const
 The 3D length squared spanned by a parametric displacement delta starting at uv.
 
virtual double capacityContribution () const =0
 Signed divergence-theorem contribution to the enclosed volume.
 
virtual bool capacityIsExact () const =0
 Whether capacityContribution() is analytically exact for this surface.
 
virtual void appendDisplayMesh (std::vector< Vec3 > &vertices, std::vector< std::array< int, 3 > > &triangles) const =0
 Append this patch's visualization triangulation (navigation must never depend on it).
 
virtual void appendDirectedEdges (std::vector< std::pair< Vec3, Vec3 > > &edges) const =0
 Append the 3D directed boundary edges of the patch, for solid-closure validation.
 
virtual void appendRims (std::vector< SurfaceRim > &rims) const
 Append the trim boundary as rims, one polyline per loop; the default chains appendDirectedEdges().
 
Boundary edge identity (sidecar v3): the source edges bounding this face; empty means not stated
void setBoundaryEdges (std::vector< BoundaryEdgeRef > refs)
 
const std::vector< BoundaryEdgeRef > & boundaryEdges () const
 
virtual bool sampleTrimCurve (size_t index, std::vector< Vec3 > &samples) const
 Sample trim curve index into 3D, in construction order; false when this face has no such curve.
 

Protected Attributes

std::vector< BoundaryEdgeRefmBoundaryEdges
 

Detailed Description

Abstract analytic surface patch: one support surface plus its trim, with the kernels the navigation needs.

Definition at line 2481 of file BoundedSurface.h.

Member Typedef Documentation

◆ CoverBox

One axis-aligned cover box of the sub-patch BVH, as a (lower corner, upper corner) pair.

Definition at line 2512 of file BoundedSurface.h.

Constructor & Destructor Documentation

◆ ~BoundedSurface()

virtual o2::cad::surface::BoundedSurface::~BoundedSurface ( )
virtualdefault

Member Function Documentation

◆ appendCoverBoxes()

virtual void o2::cad::surface::BoundedSurface::appendCoverBoxes ( std::vector< CoverBox > &  boxes) const
inlinevirtual

Append cover boxes whose union holds the trimmed patch and every point that can realise distanceSqToPatch. Spheres and tori realise on their whole surface, so they cover it all; the default is conservativeBounds().

Reimplemented in o2::cad::surface::CylindricalBoundedSurface, o2::cad::surface::SphericalBoundedSurface, o2::cad::surface::ConicalBoundedSurface, and o2::cad::surface::TorusBoundedSurface.

Definition at line 2516 of file BoundedSurface.h.

◆ appendDirectedEdges()

virtual void o2::cad::surface::BoundedSurface::appendDirectedEdges ( std::vector< std::pair< Vec3, Vec3 > > &  edges) const
pure virtual

◆ appendDisplayMesh()

virtual void o2::cad::surface::BoundedSurface::appendDisplayMesh ( std::vector< Vec3 > &  vertices,
std::vector< std::array< int, 3 > > &  triangles 
) const
pure virtual

◆ appendIntersections()

virtual void o2::cad::surface::BoundedSurface::appendIntersections ( const Vec3 rayOrigin,
const Vec3 rayDirection,
double  minDistance,
double  maxDistance,
std::vector< RayHit > &  hits 
) const
pure virtual

◆ appendRims()

virtual void o2::cad::surface::BoundedSurface::appendRims ( std::vector< SurfaceRim > &  rims) const
inlinevirtual

Append the trim boundary as rims, one polyline per loop; the default chains appendDirectedEdges().

Definition at line 2565 of file BoundedSurface.h.

◆ boundaryEdges()

const std::vector< BoundaryEdgeRef > & o2::cad::surface::BoundedSurface::boundaryEdges ( ) const
inline

Definition at line 2497 of file BoundedSurface.h.

◆ capacityContribution()

virtual double o2::cad::surface::BoundedSurface::capacityContribution ( ) const
pure virtual

◆ capacityIsExact()

◆ conservativeBounds()

virtual void o2::cad::surface::BoundedSurface::conservativeBounds ( Vec3 lower,
Vec3 upper 
) const
pure virtual

◆ containsPointOnSurface()

virtual bool o2::cad::surface::BoundedSurface::containsPointOnSurface ( const Vec3 point) const
pure virtual

◆ distanceSqToPatch()

virtual double o2::cad::surface::BoundedSurface::distanceSqToPatch ( const Vec3 point) const
pure virtual

◆ normalAt()

◆ parametricLengthSqAt()

double o2::cad::surface::BoundedSurface::parametricLengthSqAt ( const Vec2 uv,
const Vec2 delta 
) const
inline

The 3D length squared spanned by a parametric displacement delta starting at uv.

Definition at line 2542 of file BoundedSurface.h.

◆ parametricMetric()

virtual void o2::cad::surface::BoundedSurface::parametricMetric ( const Vec2 uv,
double &  gUU,
double &  gUV,
double &  gVV 
) const
pure virtual

◆ sampleTrimCurve()

virtual bool o2::cad::surface::BoundedSurface::sampleTrimCurve ( size_t  index,
std::vector< Vec3 > &  samples 
) const
inlinevirtual

◆ setBoundaryEdges()

void o2::cad::surface::BoundedSurface::setBoundaryEdges ( std::vector< BoundaryEdgeRef refs)
inline

Definition at line 2496 of file BoundedSurface.h.

Member Data Documentation

◆ mBoundaryEdges

std::vector<BoundaryEdgeRef> o2::cad::surface::BoundedSurface::mBoundaryEdges
protected

Definition at line 2573 of file BoundedSurface.h.


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