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
18typedef struct MR_Cone3f MR_Cone3f;
19
20// Base class for cone parameterization
22typedef struct MR_Cone3d MR_Cone3d;
23
24// the combination of the apex of the cone and the direction of its main axis in space.
29
30// the combination of the apex of the cone and the direction of its main axis in space.
34MRC_API void MR_Cone3f_Set_axis(MR_Cone3f *_this, const MR_Line3f *value);
35
36// the combination of the apex of the cone and the direction of its main axis in space.
41
42// cone angle, main axis vs side
46MRC_API const float *MR_Cone3f_Get_angle(const MR_Cone3f *_this);
47
48// cone angle, main axis vs side
51MRC_API void MR_Cone3f_Set_angle(MR_Cone3f *_this, float value);
52
53// cone angle, main axis vs side
58
59// cone height
63MRC_API const float *MR_Cone3f_Get_height(const MR_Cone3f *_this);
64
65// cone height
68MRC_API void MR_Cone3f_Set_height(MR_Cone3f *_this, float value);
69
70// cone height
75
79
84
86MRC_API const MR_Cone3f *MR_Cone3f_OffsetPtr(const MR_Cone3f *ptr, ptrdiff_t i);
87
90
95
96// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
97// inAngle -- cone angle, main axis vs side
98// inHeight -- cone inHeight
99// main axis direction could be non normalized.
103MRC_API MR_Cone3f *MR_Cone3f_Construct(const MR_Line3f *inAxis, float inAngle, float inHeight);
104
107
110
116
117// now we use an apex as center of the cone.
122
123// now we use an apex as center of the cone.
128
129// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
134
135// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
140
141// return cone apex position
146
147// return cone apex position
152
157
158// the combination of the apex of the cone and the direction of its main axis in space.
163
164// the combination of the apex of the cone and the direction of its main axis in space.
169
170// the combination of the apex of the cone and the direction of its main axis in space.
175
176// cone angle, main axis vs side
180MRC_API const double *MR_Cone3d_Get_angle(const MR_Cone3d *_this);
181
182// cone angle, main axis vs side
185MRC_API void MR_Cone3d_Set_angle(MR_Cone3d *_this, double value);
186
187// cone angle, main axis vs side
192
193// cone height
197MRC_API const double *MR_Cone3d_Get_height(const MR_Cone3d *_this);
198
199// cone height
202MRC_API void MR_Cone3d_Set_height(MR_Cone3d *_this, double value);
203
204// cone height
209
213
218
220MRC_API const MR_Cone3d *MR_Cone3d_OffsetPtr(const MR_Cone3d *ptr, ptrdiff_t i);
221
224
229
230// inAxis -- apex position and main axis direction. For any cone point dot( point , direction ) >=0
231// inAngle -- cone angle, main axis vs side
232// inHeight -- cone inHeight
233// main axis direction could be non normalized.
237MRC_API MR_Cone3d *MR_Cone3d_Construct(const MR_Line3d *inAxis, double inAngle, double inHeight);
238
241
244
250
251// now we use an apex as center of the cone.
256
257// now we use an apex as center of the cone.
262
263// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
268
269// main axis direction. It could be non normalized. For any cone point dot( point , direction ) >=0
274
275// return cone apex position
280
281// return cone apex position
286
291
292#ifdef __cplusplus
293} // extern "C"
294#endif
struct MR_Line3d MR_Line3d
Definition MRBestFit.h:17
struct MR_Line3f MR_Line3f
Definition MRBestFit.h:18
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
Generated from class MR::Cone3d.
Definition MRCone3.h:22
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
Generated from class MR::Cone3f.
Definition MRCone3.h:18
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:60
Definition MRVector3.h:51