MeshLib C Docs
Loading...
Searching...
No Matches
MRVolumeIndexer.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/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_VoxelBitSet MR_VoxelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16
17
18typedef signed char MR_OutEdge;
19enum // MR_OutEdge
20{
29};
30
35
39
42
48
54
60
66
72
78
82
87
94
98
102
108
111
114
119
127
133
137
141
147
150
153
161
166
171
176
180
184
189
194
200
206
212
217
223
229
234
239
247
252
257
263MRC_API void MR_expandVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *expansion);
264
270MRC_API void MR_shrinkVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *shrinkage);
271
272#ifdef __cplusplus
273} // extern "C"
274#endif
struct MR_VoxelBitSet MR_VoxelBitSet
Definition MRBitSet.h:111
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_3(const MR_VolumeIndexer *_this, MR_VoxelId v, const MR_Vector3i *pos, MR_OutEdge toNei)
MRC_API MR_VoxelLocation * MR_VoxelLocation_ConstructFromAnother(const MR_VoxelLocation *_other)
MRC_API MR_VoxelLocation * MR_VoxelLocation_DefaultConstruct(void)
MRC_API bool MR_VolumeIndexer_areNeigbors_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId v0, MR_VoxelId v1)
@ MR_OutEdge_Count
Definition MRVolumeIndexer.h:28
@ MR_OutEdge_PlusZ
Definition MRVolumeIndexer.h:22
@ MR_OutEdge_MinusZ
Definition MRVolumeIndexer.h:23
@ MR_OutEdge_MinusX
Definition MRVolumeIndexer.h:27
@ MR_OutEdge_PlusY
Definition MRVolumeIndexer.h:24
@ MR_OutEdge_PlusX
Definition MRVolumeIndexer.h:26
@ MR_OutEdge_Invalid
Definition MRVolumeIndexer.h:21
@ MR_OutEdge_MinusY
Definition MRVolumeIndexer.h:25
MRC_API bool MR_VolumeIndexer_isBdVoxel(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_endId(const MR_VolumeIndexer *_this)
struct MR_VolumeIndexer MR_VolumeIndexer
Definition MRVolumeIndexer.h:38
MRC_API MR_VoxelLocation * MR_VoxelLocation_ConstructFrom(MR_VoxelId id, MR_Vector3i pos)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_Construct(const MR_Vector3i *dims)
MRC_API const MR_Vector3i * MR_VoxelLocation_Get_pos(const MR_VoxelLocation *_this)
MRC_API void MR_expandVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *expansion)
MRC_API void MR_VoxelLocation_Set_pos(MR_VoxelLocation *_this, MR_Vector3i value)
MRC_API const MR_VolumeIndexer * MR_VolumeIndexer_OffsetPtr(const MR_VolumeIndexer *ptr, ptrdiff_t i)
MRC_API void MR_VoxelLocation_DestroyArray(const MR_VoxelLocation *_this)
Destroys a heap-allocated array of MR_VoxelLocation. Does nothing if the pointer is null.
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_AssignFromAnother(MR_VolumeIndexer *_this, const MR_VolumeIndexer *_other)
MRC_API MR_VoxelLocation * MR_VoxelLocation_DefaultConstructArray(size_t num_elems)
MRC_API void MR_shrinkVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *shrinkage)
MRC_API const MR_VoxelId * MR_VoxelLocation_Get_id(const MR_VoxelLocation *_this)
MRC_API const MR_VoxelLocation * MR_VoxelLocation_OffsetPtr(const MR_VoxelLocation *ptr, ptrdiff_t i)
MRC_API const MR_Vector3i * MR_VolumeIndexer_dims(const MR_VolumeIndexer *_this)
MRC_API MR_VoxelLocation * MR_VolumeIndexer_getNeighbor_2_MR_VoxelLocation(const MR_VolumeIndexer *_this, const MR_VoxelLocation *loc, MR_OutEdge toNei)
MRC_API MR_uint64_t MR_VolumeIndexer_sizeXY(const MR_VolumeIndexer *_this)
struct MR_VoxelLocation MR_VoxelLocation
Definition MRVolumeIndexer.h:34
MRC_API bool MR_VoxelLocation_ConvertTo_bool(const MR_VoxelLocation *_this)
MRC_API void MR_VoxelLocation_Destroy(const MR_VoxelLocation *_this)
Destroys a heap-allocated instance of MR_VoxelLocation. Does nothing if the pointer is null.
MRC_API MR_VoxelLocation * MR_VoxelLocation_OffsetMutablePtr(MR_VoxelLocation *ptr, ptrdiff_t i)
MRC_API MR_OutEdge MR_opposite_MR_OutEdge(MR_OutEdge e)
Generated from function MR::opposite.
MRC_API MR_VoxelId MR_VolumeIndexer_getExistingNeighbor(const MR_VolumeIndexer *_this, MR_VoxelId v, MR_OutEdge toNei)
MRC_API bool MR_VolumeIndexer_areNeigbors_MR_Vector3i(const MR_VolumeIndexer *_this, const MR_Vector3i *pos0, const MR_Vector3i *pos1)
MRC_API void MR_VolumeIndexer_Destroy(const MR_VolumeIndexer *_this)
Destroys a heap-allocated instance of MR_VolumeIndexer. Does nothing if the pointer is null.
MRC_API bool MR_VolumeIndexer_isInDims(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_4(const MR_VolumeIndexer *_this, MR_VoxelId v, const MR_Vector3i *pos, bool bdPos, MR_OutEdge toNei)
MRC_API bool MR_VolumeIndexer_hasNeighbour(const MR_VolumeIndexer *_this, const MR_Vector3i *pos, MR_OutEdge toNei)
MRC_API MR_VoxelId * MR_VoxelLocation_GetMutable_id(MR_VoxelLocation *_this)
MRC_API void MR_VolumeIndexer_DestroyArray(const MR_VolumeIndexer *_this)
Destroys a heap-allocated array of MR_VolumeIndexer. Does nothing if the pointer is null.
MRC_API MR_VoxelLocation * MR_VolumeIndexer_toLoc_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId id)
signed char MR_OutEdge
Definition MRVolumeIndexer.h:18
MRC_API MR_VoxelId MR_VolumeIndexer_toVoxelId(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_ConstructFromAnother(const MR_VolumeIndexer *_other)
MRC_API MR_VoxelLocation * MR_VolumeIndexer_toLoc_MR_Vector3i(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_2_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId v, MR_OutEdge toNei)
MRC_API MR_Vector3i * MR_VoxelLocation_GetMutable_pos(MR_VoxelLocation *_this)
MRC_API MR_VoxelLocation * MR_VoxelLocation_AssignFromAnother(MR_VoxelLocation *_this, const MR_VoxelLocation *_other)
MRC_API MR_uint64_t MR_VolumeIndexer_size(const MR_VolumeIndexer *_this)
MRC_API void MR_VoxelLocation_Set_id(MR_VoxelLocation *_this, MR_VoxelId value)
MRC_API MR_Vector3i MR_VolumeIndexer_toPos(const MR_VolumeIndexer *_this, MR_VoxelId id)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_OffsetMutablePtr(MR_VolumeIndexer *ptr, ptrdiff_t i)
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector3i.
Definition MRVector3.h:63
Definition MRId.h:149