21namespace WEMBoundingSphereHierarchy {
37 bool isValid()
const {
return _bsh !=
nullptr; }
63 WEMBoundingSphereHierarchy::TreeElement* _bsh;
66 int _usedTriangleCount;
This class constructs a bounding sphere hierarchy of all non-empty triangles (i.e.
Result getNearestTriangle(const Vector3 &p) const
Get the nearest triangle point of the WEM relative to p.
~WEMNearestPointOnSurface()
WEMNearestPointOnSurface(WEM *wem)
WEM must solely consist of WEMTrianglePatches, otherwise isValid returns false.
bool isValid() const
Return if the given WEM only had triangle patches.
This represents a WEMPatch consisting of triangles only.
Defines the mesh component: triangle.
A WEM comprises a number of WEMPatches.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Result structure for getNearestTriangle:
WEMTrianglePatch * patch
The patch containing the nearest triangle, may be nullptr if the WEM was empty.
WEMTriangle * triangle
The nearest triangle containing the nearest point, may be nullptr if the WEM was empty.