![]() |
Project
|
Public Member Functions | |
| void | buildBVH () |
| Build the BVH over the surfaces' cover boxes, widened by kBVHBoxTolerance and rounded outward to float. | |
| size_t | surfaceOfPrimitive (size_t primitive) const |
| The surface a BVH leaf primitive belongs to. | |
| void | collectSafetyAnchors () |
| Subsample the display vertices, which lie on their patches, as safety anchors. | |
| double | anchorSeedDistanceSq (const Vec3 &point) const |
| template<typename SurfaceVisitor > | |
| void | visitRayCandidates (const Vec3 &rayOrigin, const Vec3 &rayDirection, SurfaceVisitor &&visitor) const |
| template<bool wantEntering> | |
| double | nearestCrossing (const Vec3 &rayOrigin, const Vec3 &rayDirection, double stepmax) const |
| template<bool wantEntering> | |
| double | nearestCrossingLoop (const Vec3 &rayOrigin, const Vec3 &rayDirection, double stepmax) const |
| Same query without the BVH: visit every surface. Oracle and baseline for nearestCrossing. | |
| bool | parityAlong (const Vec3 &point, const Vec3 &direction, bool useBVH, bool *ambiguous=nullptr) const |
| Parity of the ray's crossings with the surface set, through the BVH or the loop; ambiguous reports a trim-band tie-break. | |
| bool | containsByVote (const Vec3 &point, bool useBVH, bool *allTiedOnBoundary=nullptr) const |
| template<typename SurfaceVisitor > | |
| bool | visitPointCandidates (const Vec3 &point, SurfaceVisitor &&visitor) const |
| Visit every surface whose widened leaf box holds the point, until the visitor returns true. | |
| double | nearestPatchDistanceSqLoop (const Vec3 &point, size_t *closestIndex) const |
| The brute-force nearest patch and its index; the lowest index wins an exact tie, which ComputeNormal relies on. | |
| template<bool TrackIndex> | |
| double | nearestPatchDistanceSq (const Vec3 &point, size_t *closestIndex) const |
| bool | refuseIfDefined (const O2BVHSurfaceSolid &owner, const char *method) const |
| True, after reporting it for method of owner, if the shape is defined and takes no more surfaces. | |
| bool | commit (std::unique_ptr< BoundedSurface > surface, BVHSurfaceRecord record, std::vector< BVHSurfaceRecord > &records) |
| Append a built surface, and to records the record that rebuilds it. | |
Public Attributes | |
| std::vector< std::unique_ptr< BoundedSurface > > | surfaces |
| std::vector< Vec3 > | displayVertices |
| std::vector< std::array< int, 3 > > | displayTriangles |
| std::vector< int > | displayTriangleSurface |
| The surface each display triangle came from, parallel to displayTriangles; see GetPointsOnSegments. | |
| ClosureReport | closure |
| std::vector< RimReport > | rimReports |
| bool | defined = false |
| std::unique_ptr< BVH > | bvh |
| std::vector< int > | leafSurface |
| The surface of each BVH leaf primitive, in leaf order. | |
| bool | reliable = false |
| GetNavigationReliability() is Reliable; set by CloseShape. | |
| std::vector< Vec3 > | safetyAnchors |
| A few on-patch display vertices, seeding the nearest-patch traversal's upper bound; see anchorSeedDistanceSq. | |
Definition at line 429 of file O2BVHSurfaceSolid.cxx.
|
inline |
The squared distance to the nearest safety anchor, inflated by a hair: an upper bound on the exact answer. It prunes only nodes that cannot win, so the value and index stay the loop's; infinity without anchors.
Definition at line 513 of file O2BVHSurfaceSolid.cxx.
|
inline |
Build the BVH over the surfaces' cover boxes, widened by kBVHBoxTolerance and rounded outward to float.
Definition at line 449 of file O2BVHSurfaceSolid.cxx.
|
inline |
Subsample the display vertices, which lie on their patches, as safety anchors.
Definition at line 498 of file O2BVHSurfaceSolid.cxx.
|
inline |
Append a built surface, and to records the record that rebuilds it.
Definition at line 839 of file O2BVHSurfaceSolid.cxx.
|
inline |
Containment by majority vote over reshootDirections() for a solid that is not a closed 2-manifold; stops at a majority. allTiedOnBoundary reports that no direction's parity rested on the geometry alone.
Definition at line 657 of file O2BVHSurfaceSolid.cxx.
|
inline |
Distance to the nearest entering (wantEntering) or exiting crossing within stepmax, else Big. The ray bound shrinks to the best candidate, rounded up past kBVHBoxTolerance, so no nearer hit is cut.
Definition at line 555 of file O2BVHSurfaceSolid.cxx.
|
inline |
Same query without the BVH: visit every surface. Oracle and baseline for nearestCrossing.
Definition at line 618 of file O2BVHSurfaceSolid.cxx.
|
inline |
Same answer as nearestPatchDistanceSqLoop through the BVH: an ordered descent with a running best. Box and patch distances both err downward, so Safety can only be too small; TrackIndex keeps ties for ComputeNormal.
Definition at line 743 of file O2BVHSurfaceSolid.cxx.
|
inline |
The brute-force nearest patch and its index; the lowest index wins an exact tie, which ComputeNormal relies on.
Definition at line 723 of file O2BVHSurfaceSolid.cxx.
|
inline |
Parity of the ray's crossings with the surface set, through the BVH or the loop; ambiguous reports a trim-band tie-break.
Definition at line 633 of file O2BVHSurfaceSolid.cxx.
|
inline |
True, after reporting it for method of owner, if the shape is defined and takes no more surfaces.
Definition at line 829 of file O2BVHSurfaceSolid.cxx.
|
inline |
The surface a BVH leaf primitive belongs to.
Definition at line 492 of file O2BVHSurfaceSolid.cxx.
|
inline |
Visit every surface whose widened leaf box holds the point, until the visitor returns true.
Definition at line 688 of file O2BVHSurfaceSolid.cxx.
|
inline |
Visit every surface one of whose cover-box leaves is traversed by the (unbounded) ray, each exactly once however many of its boxes the ray crosses.
Definition at line 530 of file O2BVHSurfaceSolid.cxx.
| std::unique_ptr<BVH> o2::cad::O2BVHSurfaceSolid::Impl::bvh |
acceleration structure over the sub-patch cover boxes (built in CloseShape)
Definition at line 440 of file O2BVHSurfaceSolid.cxx.
| ClosureReport o2::cad::O2BVHSurfaceSolid::Impl::closure |
Definition at line 435 of file O2BVHSurfaceSolid.cxx.
| bool o2::cad::O2BVHSurfaceSolid::Impl::defined = false |
Definition at line 439 of file O2BVHSurfaceSolid.cxx.
| std::vector<std::array<int, 3> > o2::cad::O2BVHSurfaceSolid::Impl::displayTriangles |
Definition at line 432 of file O2BVHSurfaceSolid.cxx.
| std::vector<int> o2::cad::O2BVHSurfaceSolid::Impl::displayTriangleSurface |
The surface each display triangle came from, parallel to displayTriangles; see GetPointsOnSegments.
Definition at line 434 of file O2BVHSurfaceSolid.cxx.
| std::vector<Vec3> o2::cad::O2BVHSurfaceSolid::Impl::displayVertices |
Definition at line 431 of file O2BVHSurfaceSolid.cxx.
| std::vector<int> o2::cad::O2BVHSurfaceSolid::Impl::leafSurface |
The surface of each BVH leaf primitive, in leaf order.
Definition at line 442 of file O2BVHSurfaceSolid.cxx.
| bool o2::cad::O2BVHSurfaceSolid::Impl::reliable = false |
GetNavigationReliability() is Reliable; set by CloseShape.
Definition at line 444 of file O2BVHSurfaceSolid.cxx.
| std::vector<RimReport> o2::cad::O2BVHSurfaceSolid::Impl::rimReports |
closure.rimRecords in the public form, built once by CloseShape so the accessor can hand out a reference. The two are the same data; only the state enum and the Vec3 differ in type.
Definition at line 438 of file O2BVHSurfaceSolid.cxx.
| std::vector<Vec3> o2::cad::O2BVHSurfaceSolid::Impl::safetyAnchors |
A few on-patch display vertices, seeding the nearest-patch traversal's upper bound; see anchorSeedDistanceSq.
Definition at line 446 of file O2BVHSurfaceSolid.cxx.
| std::vector<std::unique_ptr<BoundedSurface> > o2::cad::O2BVHSurfaceSolid::Impl::surfaces |
Definition at line 430 of file O2BVHSurfaceSolid.cxx.