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
23typedef struct MR_Dipole MR_Dipole;
24
29MRC_API const MR_Vector3f *MR_Dipole_Get_pos(const MR_Dipole *_this);
30
35MRC_API void MR_Dipole_Set_pos(MR_Dipole *_this, MR_Vector3f value);
36
42
47MRC_API const float *MR_Dipole_Get_area(const MR_Dipole *_this);
48
52MRC_API void MR_Dipole_Set_area(MR_Dipole *_this, float value);
53
58MRC_API float *MR_Dipole_GetMutable_area(MR_Dipole *_this);
59
64MRC_API const MR_Vector3f *MR_Dipole_Get_dirArea(const MR_Dipole *_this);
65
70MRC_API void MR_Dipole_Set_dirArea(MR_Dipole *_this, MR_Vector3f value);
71
77
78// maximum squared distance from pos to any corner of the bounding box
83MRC_API const float *MR_Dipole_Get_rr(const MR_Dipole *_this);
84
85// maximum squared distance from pos to any corner of the bounding box
89MRC_API void MR_Dipole_Set_rr(MR_Dipole *_this, float value);
90
91// maximum squared distance from pos to any corner of the bounding box
96MRC_API float *MR_Dipole_GetMutable_rr(MR_Dipole *_this);
97
101
106
112MRC_API MR_Dipole *MR_Dipole_ConstructFrom(MR_Vector3f pos, float area, MR_Vector3f dirArea, float rr);
113
116MRC_API const MR_Dipole *MR_Dipole_OffsetPtr(const MR_Dipole *ptr, ptrdiff_t i);
117
121
127
129MRC_API void MR_Dipole_Destroy(const MR_Dipole *_this);
130
132MRC_API void MR_Dipole_DestroyArray(const MR_Dipole *_this);
133
141
148MRC_API bool MR_Dipole_addIfGoodApprox(const MR_Dipole *_this, const MR_Vector3f *q, float betaSq, float *addTo);
149
155MRC_API void MR_calcDipoles_3(MR_Dipoles *dipoles, const MR_AABBTree *tree, const MR_Mesh *mesh);
156
161MRC_API MR_Dipoles *MR_calcDipoles_2(const MR_AABBTree *tree, const MR_Mesh *mesh);
162
172MRC_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);
173
174#ifdef __cplusplus
175} // extern "C"
176#endif
struct MR_AABBTree MR_AABBTree
Definition MRAABBTree.h:32
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MRC_API MR_Dipole * MR_Dipole_OffsetMutablePtr(MR_Dipole *ptr, ptrdiff_t i)
struct MR_Dipole MR_Dipole
Definition MRDipole.h:23
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)
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)
Definition MRId.h:45
Generated from class MR::Vector3f.
Definition MRVector3.h:47