diff options
author | Hans Goudey <h.goudey@me.com> | 2021-08-02 19:26:28 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-08-02 19:26:28 +0300 |
commit | 67d56eb71ef1b8da62d296290a87e7129f4c5ac6 (patch) | |
tree | be0f6829f0695a155b26ad6849e00af6125a8bd6 /intern/openvdb/openvdb_capi.h | |
parent | 77187718e4fb51ad8b1e486d0c09fcb0998afcd6 (diff) |
Cleanup: Remove unused/unecessary OpenVDB C API
This commit uses OpenVDB more directly for the voxel remesher, without
the extra indirection of copying to a Blender API. This makes the code
simpler, shorter, and easier to understand (though I didn't observe any
performance improvement).
This also removes the rest of the unused and undocumented OpenVDB C API,
which was written when Blender's code didn't really use C++, and doesn't
serve a purpose anymore. Those features will be implemented as nodes in
the future anyway (see D12100).
Differential Revision: https://developer.blender.org/D12097
Diffstat (limited to 'intern/openvdb/openvdb_capi.h')
-rw-r--r-- | intern/openvdb/openvdb_capi.h | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/intern/openvdb/openvdb_capi.h b/intern/openvdb/openvdb_capi.h index 9333413c2fe..3db1ef9484b 100644 --- a/intern/openvdb/openvdb_capi.h +++ b/intern/openvdb/openvdb_capi.h @@ -24,124 +24,8 @@ extern "C" { #endif -/* Level Set Filters */ -typedef enum OpenVDBLevelSet_FilterType { - OPENVDB_LEVELSET_FILTER_NONE = 0, - OPENVDB_LEVELSET_FILTER_GAUSSIAN = 1, - OPENVDB_LEVELSET_FILTER_MEAN = 2, - OPENVDB_LEVELSET_FILTER_MEDIAN = 3, - OPENVDB_LEVELSET_FILTER_MEAN_CURVATURE = 4, - OPENVDB_LEVELSET_FILTER_LAPLACIAN = 5, - OPENVDB_LEVELSET_FILTER_DILATE = 6, - OPENVDB_LEVELSET_FILTER_ERODE = 7, -} OpenVDBLevelSet_FilterType; - -typedef enum OpenVDBLevelSet_FilterBias { - OPENVDB_LEVELSET_FIRST_BIAS = 0, - OPENVDB_LEVELSET_SECOND_BIAS, - OPENVDB_LEVELSET_THIRD_BIAS, - OPENVDB_LEVELSET_WENO5_BIAS, - OPENVDB_LEVELSET_HJWENO5_BIAS, -} OpenVDBLevelSet_FilterBias; - -/* Level Set CSG Operations */ -typedef enum OpenVDBLevelSet_CSGOperation { - OPENVDB_LEVELSET_CSG_UNION = 0, - OPENVDB_LEVELSET_CSG_DIFFERENCE = 1, - OPENVDB_LEVELSET_CSG_INTERSECTION = 2, -} OpenVDBLevelSet_CSGOperation; - -typedef enum OpenVDBLevelSet_GridSampler { - OPENVDB_LEVELSET_GRIDSAMPLER_NONE = 0, - OPENVDB_LEVELSET_GRIDSAMPLER_POINT = 1, - OPENVDB_LEVELSET_GRIDSAMPLER_BOX = 2, - OPENVDB_LEVELSET_GRIDSAMPLER_QUADRATIC = 3, -} OpenVDBLevelSet_Gridsampler; - -struct OpenVDBTransform; -struct OpenVDBLevelSet; - -struct OpenVDBVolumeToMeshData { - int tottriangles; - int totquads; - int totvertices; - - float *vertices; - int *quads; - int *triangles; -}; - -struct OpenVDBRemeshData { - float *verts; - int *faces; - int totfaces; - int totverts; - - float *out_verts; - int *out_faces; - int *out_tris; - int out_totverts; - int out_totfaces; - int out_tottris; - int filter_type; - enum OpenVDBLevelSet_FilterType filter_bias; - enum OpenVDBLevelSet_FilterBias filter_width; /* Parameter for gaussian, median, mean. */ - - float voxel_size; - float isovalue; - float adaptivity; - int relax_disoriented_triangles; -}; - int OpenVDB_getVersionHex(void); -enum { - VEC_INVARIANT = 0, - VEC_COVARIANT = 1, - VEC_COVARIANT_NORMALIZE = 2, - VEC_CONTRAVARIANT_RELATIVE = 3, - VEC_CONTRAVARIANT_ABSOLUTE = 4, -}; - -struct OpenVDBTransform *OpenVDBTransform_create(void); -void OpenVDBTransform_free(struct OpenVDBTransform *transform); -void OpenVDBTransform_create_linear_transform(struct OpenVDBTransform *transform, - double voxel_size); - -struct OpenVDBLevelSet *OpenVDBLevelSet_create(bool initGrid, struct OpenVDBTransform *xform); -void OpenVDBLevelSet_free(struct OpenVDBLevelSet *level_set); -void OpenVDBLevelSet_mesh_to_level_set(struct OpenVDBLevelSet *level_set, - const float *vertices, - const int *faces, - const int totvertices, - const int totfaces, - struct OpenVDBTransform *xform); -void OpenVDBLevelSet_mesh_to_level_set_transform(struct OpenVDBLevelSet *level_set, - const float *vertices, - const int *faces, - const int totvertices, - const int totfaces, - struct OpenVDBTransform *transform); -void OpenVDBLevelSet_volume_to_mesh(struct OpenVDBLevelSet *level_set, - struct OpenVDBVolumeToMeshData *mesh, - const double isovalue, - const double adaptivity, - const bool relax_disoriented_triangles); -void OpenVDBLevelSet_filter(struct OpenVDBLevelSet *level_set, - OpenVDBLevelSet_FilterType filter_type, - int width, - float distance, - OpenVDBLevelSet_FilterBias bias); -void OpenVDBLevelSet_CSG_operation(struct OpenVDBLevelSet *out, - struct OpenVDBLevelSet *gridA, - struct OpenVDBLevelSet *gridB, - OpenVDBLevelSet_CSGOperation operation); - -struct OpenVDBLevelSet *OpenVDBLevelSet_transform_and_resample(struct OpenVDBLevelSet *level_setA, - struct OpenVDBLevelSet *level_setB, - char sampler, - float isolevel); - #ifdef __cplusplus } #endif |