MeshLib C Docs
Loading...
Searching...
No Matches
MRCone3.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector3.h>
4#include <MRCMisc/exports.h>
5
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_Line3d MR_Line3d; // Defined in `#include <MRCMesh/MRLine.h>`.
13typedef struct MR_Line3f MR_Line3f; // Defined in `#include <MRCMesh/MRLine.h>`.
14
15
16// Base class for cone parameterization
19typedef struct MR_Cone3f MR_Cone3f;
20
21// Base class for cone parameterization
24typedef struct MR_Cone3d MR_Cone3d;
25
26// the combination of the apex of the cone and the direction of its main axis in space.
31MRC_API const MR_Line3f *MR_Cone3f_Get_axis(const MR_Cone3f *_this);
32
33// the combination of the apex of the cone and the direction of its main axis in space.
39MRC_API void MR_Cone3f_Set_axis(MR_Cone3f *_this, const MR_Line3f *value);
40
41// the combination of the apex of the cone and the direction of its main axis in space.
47
48// cone angle, main axis vs side
53MRC_API const float *MR_Cone3f_Get_angle(const MR_Cone3f *_this);
54
55// cone angle, main axis vs side
59MRC_API void MR_Cone3f_Set_angle(MR_Cone3f *_this, float value);
60
61// cone angle, main axis vs side
67
68// cone height
73MRC_API const float *MR_Cone3f_Get_height(const MR_Cone3f *_this);
74
75// cone height
79MRC_API void MR_Cone3f_Set_height(MR_Cone3f *_this, float value);
80
81// cone height
87
91
95MRC_API MR_Cone3f *MR_Cone3f_DefaultConstructArray(size_t num_elems);
96
99MRC_API const MR_Cone3f *MR_Cone3f_OffsetPtr(const MR_Cone3f *ptr, ptrdiff_t i);
100
104
110
111// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
112// inAngle -- cone angle, main axis vs side
113// inHeight -- cone inHeight
114// main axis direction could be non normalized.
119MRC_API MR_Cone3f *MR_Cone3f_Construct(const MR_Line3f *inAxis, float inAngle, float inHeight);
120
122MRC_API void MR_Cone3f_Destroy(const MR_Cone3f *_this);
123
125MRC_API void MR_Cone3f_DestroyArray(const MR_Cone3f *_this);
126
134
135// now we use an apex as center of the cone.
140
141// now we use an apex as center of the cone.
145MRC_API const MR_Vector3f *MR_Cone3f_center(const MR_Cone3f *_this);
146
147// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
152
153// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
157MRC_API const MR_Vector3f *MR_Cone3f_direction(const MR_Cone3f *_this);
158
159// return cone apex position
164
165// return cone apex position
169MRC_API const MR_Vector3f *MR_Cone3f_apex(const MR_Cone3f *_this);
170
174MRC_API MR_Vector3f MR_Cone3f_projectPoint(const MR_Cone3f *_this, const MR_Vector3f *point);
175
176// the combination of the apex of the cone and the direction of its main axis in space.
181MRC_API const MR_Line3d *MR_Cone3d_Get_axis(const MR_Cone3d *_this);
182
183// the combination of the apex of the cone and the direction of its main axis in space.
189MRC_API void MR_Cone3d_Set_axis(MR_Cone3d *_this, const MR_Line3d *value);
190
191// the combination of the apex of the cone and the direction of its main axis in space.
197
198// cone angle, main axis vs side
203MRC_API const double *MR_Cone3d_Get_angle(const MR_Cone3d *_this);
204
205// cone angle, main axis vs side
209MRC_API void MR_Cone3d_Set_angle(MR_Cone3d *_this, double value);
210
211// cone angle, main axis vs side
216MRC_API double *MR_Cone3d_GetMutable_angle(MR_Cone3d *_this);
217
218// cone height
223MRC_API const double *MR_Cone3d_Get_height(const MR_Cone3d *_this);
224
225// cone height
229MRC_API void MR_Cone3d_Set_height(MR_Cone3d *_this, double value);
230
231// cone height
237
241
246
249MRC_API const MR_Cone3d *MR_Cone3d_OffsetPtr(const MR_Cone3d *ptr, ptrdiff_t i);
250
254
260
261// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
262// inAngle -- cone angle, main axis vs side
263// inHeight -- cone inHeight
264// main axis direction could be non normalized.
269MRC_API MR_Cone3d *MR_Cone3d_Construct(const MR_Line3d *inAxis, double inAngle, double inHeight);
270
272MRC_API void MR_Cone3d_Destroy(const MR_Cone3d *_this);
273
275MRC_API void MR_Cone3d_DestroyArray(const MR_Cone3d *_this);
276
284
285// now we use an apex as center of the cone.
290
291// now we use an apex as center of the cone.
295MRC_API const MR_Vector3d *MR_Cone3d_center(const MR_Cone3d *_this);
296
297// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
302
303// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
307MRC_API const MR_Vector3d *MR_Cone3d_direction(const MR_Cone3d *_this);
308
309// return cone apex position
314
315// return cone apex position
319MRC_API const MR_Vector3d *MR_Cone3d_apex(const MR_Cone3d *_this);
320
324MRC_API MR_Vector3d MR_Cone3d_projectPoint(const MR_Cone3d *_this, const MR_Vector3d *point);
325
326#ifdef __cplusplus
327} // extern "C"
328#endif
struct MR_Line3d MR_Line3d
Definition MRBestFit.h:16
struct MR_Line3f MR_Line3f
Definition MRBestFit.h:17
MRC_API const MR_Vector3f * MR_Cone3f_apex(const MR_Cone3f *_this)
MRC_API const MR_Vector3f * MR_Cone3f_direction(const MR_Cone3f *_this)
MRC_API void MR_Cone3f_DestroyArray(const MR_Cone3f *_this)
Destroys a heap-allocated array of MR_Cone3f. Does nothing if the pointer is null.
MRC_API void MR_Cone3f_Set_axis(MR_Cone3f *_this, const MR_Line3f *value)
MRC_API void MR_Cone3d_Set_axis(MR_Cone3d *_this, const MR_Line3d *value)
MRC_API const MR_Vector3d * MR_Cone3d_center(const MR_Cone3d *_this)
MRC_API MR_Cone3d * MR_Cone3d_Construct(const MR_Line3d *inAxis, double inAngle, double inHeight)
MRC_API void MR_Cone3f_Set_height(MR_Cone3f *_this, float value)
MRC_API void MR_Cone3d_Set_height(MR_Cone3d *_this, double value)
MRC_API MR_Cone3f * MR_Cone3f_Construct(const MR_Line3f *inAxis, float inAngle, float inHeight)
MRC_API const MR_Cone3d * MR_Cone3d_OffsetPtr(const MR_Cone3d *ptr, ptrdiff_t i)
MRC_API MR_Cone3d * MR_Cone3d_AssignFromAnother(MR_Cone3d *_this, const MR_Cone3d *_other)
MRC_API float * MR_Cone3f_GetMutable_height(MR_Cone3f *_this)
MRC_API MR_Cone3d * MR_Cone3d_DefaultConstruct(void)
MRC_API const MR_Vector3f * MR_Cone3f_center(const MR_Cone3f *_this)
MRC_API const double * MR_Cone3d_Get_angle(const MR_Cone3d *_this)
MRC_API const MR_Cone3f * MR_Cone3f_OffsetPtr(const MR_Cone3f *ptr, ptrdiff_t i)
MRC_API MR_Line3f * MR_Cone3f_GetMutable_axis(MR_Cone3f *_this)
MRC_API float * MR_Cone3f_GetMutable_angle(MR_Cone3f *_this)
struct MR_Cone3d MR_Cone3d
Definition MRCone3.h:24
MRC_API void MR_Cone3d_Set_angle(MR_Cone3d *_this, double value)
MRC_API const float * MR_Cone3f_Get_height(const MR_Cone3f *_this)
MRC_API void MR_Cone3f_Destroy(const MR_Cone3f *_this)
Destroys a heap-allocated instance of MR_Cone3f. Does nothing if the pointer is null.
MRC_API MR_Vector3f * MR_Cone3f_apex_mut(MR_Cone3f *_this)
MRC_API MR_Cone3f * MR_Cone3f_DefaultConstruct(void)
MRC_API void MR_Cone3d_Destroy(const MR_Cone3d *_this)
Destroys a heap-allocated instance of MR_Cone3d. Does nothing if the pointer is null.
MRC_API MR_Vector3d MR_Cone3d_projectPoint(const MR_Cone3d *_this, const MR_Vector3d *point)
MRC_API const MR_Vector3d * MR_Cone3d_direction(const MR_Cone3d *_this)
MRC_API double * MR_Cone3d_GetMutable_height(MR_Cone3d *_this)
MRC_API MR_Cone3f * MR_Cone3f_OffsetMutablePtr(MR_Cone3f *ptr, ptrdiff_t i)
struct MR_Cone3f MR_Cone3f
Definition MRCone3.h:19
MRC_API MR_Vector3d * MR_Cone3d_apex_mut(MR_Cone3d *_this)
MRC_API MR_Cone3f * MR_Cone3f_ConstructFromAnother(const MR_Cone3f *_other)
MRC_API MR_Cone3d * MR_Cone3d_OffsetMutablePtr(MR_Cone3d *ptr, ptrdiff_t i)
MRC_API MR_Cone3f * MR_Cone3f_AssignFromAnother(MR_Cone3f *_this, const MR_Cone3f *_other)
MRC_API const MR_Line3d * MR_Cone3d_Get_axis(const MR_Cone3d *_this)
MRC_API double * MR_Cone3d_GetMutable_angle(MR_Cone3d *_this)
MRC_API MR_Vector3f * MR_Cone3f_direction_mut(MR_Cone3f *_this)
MRC_API MR_Vector3f MR_Cone3f_projectPoint(const MR_Cone3f *_this, const MR_Vector3f *point)
MRC_API MR_Vector3d * MR_Cone3d_center_mut(MR_Cone3d *_this)
MRC_API MR_Cone3d * MR_Cone3d_DefaultConstructArray(size_t num_elems)
MRC_API const float * MR_Cone3f_Get_angle(const MR_Cone3f *_this)
MRC_API void MR_Cone3d_DestroyArray(const MR_Cone3d *_this)
Destroys a heap-allocated array of MR_Cone3d. Does nothing if the pointer is null.
MRC_API MR_Cone3d * MR_Cone3d_ConstructFromAnother(const MR_Cone3d *_other)
MRC_API MR_Cone3f * MR_Cone3f_DefaultConstructArray(size_t num_elems)
MRC_API MR_Line3d * MR_Cone3d_GetMutable_axis(MR_Cone3d *_this)
MRC_API const MR_Line3f * MR_Cone3f_Get_axis(const MR_Cone3f *_this)
MRC_API const double * MR_Cone3d_Get_height(const MR_Cone3d *_this)
MRC_API void MR_Cone3f_Set_angle(MR_Cone3f *_this, float value)
MRC_API MR_Vector3f * MR_Cone3f_center_mut(MR_Cone3f *_this)
MRC_API const MR_Vector3d * MR_Cone3d_apex(const MR_Cone3d *_this)
MRC_API MR_Vector3d * MR_Cone3d_direction_mut(MR_Cone3d *_this)
Generated from class MR::Vector3d.
Definition MRVector3.h:55
Generated from class MR::Vector3f.
Definition MRVector3.h:47