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 ) );
int FaceId
Definition MRDotNet/MRMeshFwd.h:53
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRAABBTree.h:16
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
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
struct MRMESH_CLASS Dipole
Definition MRMesh/MRMeshFwd.h:384
float rr
Definition MRDipole.h:15
Vector3f dirArea
Definition MRDipole.h:14
bool addIfGoodApprox(const Vector3f &q, float betaSq, float &addTo) const
Definition MRDipole.h:18
float area
Definition MRDipole.h:13
Vector3f pos
Definition MRDipole.h:12
Definition MRMesh/MRMesh.h:23