MeshLib C Docs
Loading...
Searching...
No Matches
MRDipole.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_AABBTree MR_AABBTree; // Defined in `#include <MRCMesh/MRAABBTree.h>`.
15typedef struct MR_Dipoles MR_Dipoles; // Defined in `#include <MRCMesh/MRVector.h>`.
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17
18
22typedef struct MR_Dipole MR_Dipole;
23
28
32
37
41MRC_API const float *MR_Dipole_Get_area(const MR_Dipole *_this);
42
45MRC_API void MR_Dipole_Set_area(MR_Dipole *_this, float value);
46
51
56
60
65
66// maximum squared distance from pos to any corner of the bounding box
70MRC_API const float *MR_Dipole_Get_rr(const MR_Dipole *_this);
71
72// maximum squared distance from pos to any corner of the bounding box
75MRC_API void MR_Dipole_Set_rr(MR_Dipole *_this, float value);
76
77// maximum squared distance from pos to any corner of the bounding box
82
86
91
95
97MRC_API const MR_Dipole *MR_Dipole_OffsetPtr(const MR_Dipole *ptr, ptrdiff_t i);
98
101
106
109
112
118
125MRC_API bool MR_Dipole_addIfGoodApprox(const MR_Dipole *_this, const MR_Vector3f *q, float betaSq, float *addTo);
126
132MRC_API void MR_calcDipoles_3(MR_Dipoles *dipoles, const MR_AABBTree *tree, const MR_Mesh *mesh);
133
139
149MRC_API float MR_calcFastWindingNumber(const MR_Dipoles *dipoles, const MR_AABBTree *tree, const MR_Mesh *mesh, const MR_Vector3f *q, float beta, MR_FaceId skipFace);
150
151#ifdef __cplusplus
152} // extern "C"
153#endif
struct MR_AABBTree MR_AABBTree
Definition MRAABBTree.h:23
struct MR_Mesh MR_Mesh
Definition MRCtm.h:13
MRC_API MR_Dipole * MR_Dipole_OffsetMutablePtr(MR_Dipole *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_Dipole MR_Dipole
Definition MRDipole.h:22
MRC_API float * MR_Dipole_GetMutable_area(MR_Dipole *_this)
MRC_API MR_Vector3f * MR_Dipole_GetMutable_dirArea(MR_Dipole *_this)
MRC_API MR_Dipole * MR_Dipole_DefaultConstructArray(size_t num_elems)
MRC_API MR_Dipole * MR_Dipole_ConstructFromAnother(const MR_Dipole *_other)
struct MR_Dipoles MR_Dipoles
Definition MRDipole.h:15
MRC_API MR_Dipole * MR_Dipole_AssignFromAnother(MR_Dipole *_this, const MR_Dipole *_other)
MRC_API const float * MR_Dipole_Get_rr(const MR_Dipole *_this)
MRC_API void MR_Dipole_Set_pos(MR_Dipole *_this, MR_Vector3f value)
MRC_API MR_Dipoles * MR_calcDipoles_2(const MR_AABBTree *tree, const MR_Mesh *mesh)
MRC_API const MR_Vector3f * MR_Dipole_Get_dirArea(const MR_Dipole *_this)
MRC_API void MR_Dipole_Set_area(MR_Dipole *_this, float value)
MRC_API const MR_Dipole * MR_Dipole_OffsetPtr(const MR_Dipole *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_Dipole_DestroyArray(const MR_Dipole *_this)
Destroys a heap-allocated array of MR_Dipole. Does nothing if the pointer is null.
MRC_API void MR_Dipole_Set_dirArea(MR_Dipole *_this, MR_Vector3f value)
MRC_API void MR_Dipole_Set_rr(MR_Dipole *_this, float value)
MRC_API MR_Vector3f * MR_Dipole_GetMutable_pos(MR_Dipole *_this)
MRC_API void MR_Dipole_Destroy(const MR_Dipole *_this)
Destroys a heap-allocated instance of MR_Dipole. Does nothing if the pointer is null.
MRC_API bool MR_Dipole_addIfGoodApprox(const MR_Dipole *_this, const MR_Vector3f *q, float betaSq, float *addTo)
MRC_API void MR_calcDipoles_3(MR_Dipoles *dipoles, const MR_AABBTree *tree, const MR_Mesh *mesh)
MRC_API const MR_Vector3f * MR_Dipole_Get_pos(const MR_Dipole *_this)
MRC_API float * MR_Dipole_GetMutable_rr(MR_Dipole *_this)
MRC_API MR_Dipole * MR_Dipole_ConstructFrom(MR_Vector3f pos, float area, MR_Vector3f dirArea, float rr)
MRC_API MR_Dipole * MR_Dipole_DefaultConstruct(void)
MRC_API float MR_calcFastWindingNumber(const MR_Dipoles *dipoles, const MR_AABBTree *tree, const MR_Mesh *mesh, const MR_Vector3f *q, float beta, MR_FaceId skipFace)
MRC_API const float * MR_Dipole_Get_area(const MR_Dipole *_this)
#define MRC_API
Definition exports.h:11
Definition MRId.h:46
Definition MRVector3.h:51