18 [[nodiscard]]
bool addIfGoodApprox(
const Vector3f& q,
float betaSq,
float& addTo )
const
20 const auto dp = pos - q;
21 const auto dd = dp.lengthSq();
22 if ( dd <= betaSq * rr )
24 if (
const auto d = std::sqrt( dd ); d > 0 )
25 addTo +=
dot( dp, dirArea ) / ( d * dd );
30static_assert(
sizeof( Dipole ) == 8 *
sizeof(
float ) );
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRAABBTree.h:16
Definition MRMesh/MRMesh.h:23
Definition MRCameraOrientationPlugin.h:8
MRMESH_API float calcFastWindingNumber(const Dipoles &dipoles, const AABBTree &tree, const Mesh &mesh, const Vector3f &q, float beta, FaceId skipFace)
MRMESH_API void calcDipoles(Dipoles &dipoles, const AABBTree &tree, const Mesh &mesh)
calculates dipoles for given mesh and AABB-tree
float dot(Vector3f a, Vector3f b)