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.
31
32// the combination of the apex of the cone and the direction of its main axis in space.
36MRC_API void MR_Cone3f_Set_axis(MR_Cone3f *_this, const MR_Line3f *value);
37
38// the combination of the apex of the cone and the direction of its main axis in space.
43
44// cone angle, main axis vs side
48MRC_API const float *MR_Cone3f_Get_angle(const MR_Cone3f *_this);
49
50// cone angle, main axis vs side
53MRC_API void MR_Cone3f_Set_angle(MR_Cone3f *_this, float value);
54
55// cone angle, main axis vs side
60
61// cone height
65MRC_API const float *MR_Cone3f_Get_height(const MR_Cone3f *_this);
66
67// cone height
70MRC_API void MR_Cone3f_Set_height(MR_Cone3f *_this, float value);
71
72// cone height
77
81
86
88MRC_API const MR_Cone3f *MR_Cone3f_OffsetPtr(const MR_Cone3f *ptr, ptrdiff_t i);
89
92
97
98// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
99// inAngle -- cone angle, main axis vs side
100// inHeight -- cone inHeight
101// main axis direction could be non normalized.
105MRC_API MR_Cone3f *MR_Cone3f_Construct(const MR_Line3f *inAxis, float inAngle, float inHeight);
106
109
112
118
119// now we use an apex as center of the cone.
124
125// now we use an apex as center of the cone.
130
131// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
136
137// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
142
143// return cone apex position
148
149// return cone apex position
154
159
160// the combination of the apex of the cone and the direction of its main axis in space.
165
166// the combination of the apex of the cone and the direction of its main axis in space.
171
172// the combination of the apex of the cone and the direction of its main axis in space.
177
178// cone angle, main axis vs side
182MRC_API const double *MR_Cone3d_Get_angle(const MR_Cone3d *_this);
183
184// cone angle, main axis vs side
187MRC_API void MR_Cone3d_Set_angle(MR_Cone3d *_this, double value);
188
189// cone angle, main axis vs side
194
195// cone height
199MRC_API const double *MR_Cone3d_Get_height(const MR_Cone3d *_this);
200
201// cone height
204MRC_API void MR_Cone3d_Set_height(MR_Cone3d *_this, double value);
205
206// cone height
211
215
220
222MRC_API const MR_Cone3d *MR_Cone3d_OffsetPtr(const MR_Cone3d *ptr, ptrdiff_t i);
223
226
231
232// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
233// inAngle -- cone angle, main axis vs side
234// inHeight -- cone inHeight
235// main axis direction could be non normalized.
239MRC_API MR_Cone3d *MR_Cone3d_Construct(const MR_Line3d *inAxis, double inAngle, double inHeight);
240
243
246
252
253// now we use an apex as center of the cone.
258
259// now we use an apex as center of the cone.
264
265// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
270
271// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
276
277// return cone apex position
282
283// return cone apex position
288
293
294#ifdef __cplusplus
295} // extern "C"
296#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(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(const MR_Cone3d *_this)
MRC_API MR_Cone3d * MR_Cone3d_Construct(const MR_Line3d *inAxis, double inAngle, double inHeight)
MRC_API const MR_Vector3d * MR_Cone3d_direction_const(const MR_Cone3d *_this)
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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 MR_Vector3d * MR_Cone3d_direction(MR_Cone3d *_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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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 MR_Vector3f * MR_Cone3f_center_const(const MR_Cone3f *_this)
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 const MR_Vector3f * MR_Cone3f_direction_const(const 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 MR_Vector3d * MR_Cone3d_center(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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const MR_Vector3d * MR_Cone3d_apex_const(const MR_Cone3d *_this)
struct MR_Cone3f MR_Cone3f
Definition MRCone3.h:19
MRC_API MR_Cone3f * MR_Cone3f_ConstructFromAnother(const MR_Cone3f *_other)
MRC_API MR_Cone3d * MR_Cone3d_OffsetMutablePtr(MR_Cone3d *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 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_Vector3d * MR_Cone3d_apex(MR_Cone3d *_this)
MRC_API MR_Vector3f * MR_Cone3f_center(MR_Cone3f *_this)
MRC_API MR_Vector3f MR_Cone3f_projectPoint(const MR_Cone3f *_this, const MR_Vector3f *point)
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_Vector3f * MR_Cone3f_direction(MR_Cone3f *_this)
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_apex(MR_Cone3f *_this)
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:61
Definition MRVector3.h:52