Changeset View
Changeset View
Standalone View
Standalone View
intern/openvdb/openvdb_capi.h
| Show All 18 Lines | |||||
| #ifndef __OPENVDB_CAPI_H__ | #ifndef __OPENVDB_CAPI_H__ | ||||
| #define __OPENVDB_CAPI_H__ | #define __OPENVDB_CAPI_H__ | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| #include <stddef.h> | |||||
| /* Level Set Filters */ | /* Level Set Filters */ | ||||
| typedef enum OpenVDBLevelSet_FilterType { | typedef enum OpenVDBLevelSet_FilterType { | ||||
| OPENVDB_LEVELSET_FILTER_NONE = 0, | OPENVDB_LEVELSET_FILTER_NONE = 0, | ||||
| OPENVDB_LEVELSET_FILTER_GAUSSIAN = 1, | OPENVDB_LEVELSET_FILTER_GAUSSIAN = 1, | ||||
| OPENVDB_LEVELSET_FILTER_MEAN = 2, | OPENVDB_LEVELSET_FILTER_MEAN = 2, | ||||
| OPENVDB_LEVELSET_FILTER_MEDIAN = 3, | OPENVDB_LEVELSET_FILTER_MEDIAN = 3, | ||||
| OPENVDB_LEVELSET_FILTER_MEAN_CURVATURE = 4, | OPENVDB_LEVELSET_FILTER_MEAN_CURVATURE = 4, | ||||
| OPENVDB_LEVELSET_FILTER_LAPLACIAN = 5, | OPENVDB_LEVELSET_FILTER_LAPLACIAN = 5, | ||||
| Show All 25 Lines | |||||
| struct OpenVDBReader; | struct OpenVDBReader; | ||||
| struct OpenVDBWriter; | struct OpenVDBWriter; | ||||
| struct OpenVDBTransform; | struct OpenVDBTransform; | ||||
| struct OpenVDBLevelSet; | struct OpenVDBLevelSet; | ||||
| struct OpenVDBFloatGrid; | struct OpenVDBFloatGrid; | ||||
| struct OpenVDBIntGrid; | struct OpenVDBIntGrid; | ||||
| struct OpenVDBVectorGrid; | struct OpenVDBVectorGrid; | ||||
| struct ParticleList; | |||||
| struct OpenVDBVolumeToMeshData { | struct OpenVDBVolumeToMeshData { | ||||
| int tottriangles; | int tottriangles; | ||||
| int totquads; | int totquads; | ||||
| int totvertices; | int totvertices; | ||||
| float *vertices; | float *vertices; | ||||
| unsigned int *quads; | unsigned int *quads; | ||||
| unsigned int *triangles; | unsigned int *triangles; | ||||
| }; | }; | ||||
| struct OpenVDBRemeshData { | |||||
| float *verts; | |||||
| unsigned int *faces; | |||||
| int totfaces; | |||||
| int totverts; | |||||
| float *out_verts; | |||||
| unsigned int *out_faces; | |||||
| unsigned 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); | int OpenVDB_getVersionHex(void); | ||||
| enum { | enum { | ||||
| VEC_INVARIANT = 0, | VEC_INVARIANT = 0, | ||||
| VEC_COVARIANT = 1, | VEC_COVARIANT = 1, | ||||
| VEC_COVARIANT_NORMALIZE = 2, | VEC_COVARIANT_NORMALIZE = 2, | ||||
| VEC_CONTRAVARIANT_RELATIVE = 3, | VEC_CONTRAVARIANT_RELATIVE = 3, | ||||
| VEC_CONTRAVARIANT_ABSOLUTE = 4, | VEC_CONTRAVARIANT_ABSOLUTE = 4, | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | void OpenVDBReader_get_meta_mat4(struct OpenVDBReader *reader, | ||||
| const char *name, | const char *name, | ||||
| float value[4][4]); | float value[4][4]); | ||||
| struct OpenVDBTransform *OpenVDBTransform_create(void); | struct OpenVDBTransform *OpenVDBTransform_create(void); | ||||
| void OpenVDBTransform_free(struct OpenVDBTransform *transform); | void OpenVDBTransform_free(struct OpenVDBTransform *transform); | ||||
| void OpenVDBTransform_create_linear_transform(struct OpenVDBTransform *transform, | void OpenVDBTransform_create_linear_transform(struct OpenVDBTransform *transform, | ||||
| double voxel_size); | double voxel_size); | ||||
| struct OpenVDBLevelSet *OpenVDBLevelSet_create(bool initGrid, struct OpenVDBTransform *xform); | struct OpenVDBLevelSet *OpenVDBLevelSet_create(bool initGrid, float voxel_size, float half_width); | ||||
| void OpenVDBLevelSet_free(struct OpenVDBLevelSet *level_set); | void OpenVDBLevelSet_free(struct OpenVDBLevelSet *level_set); | ||||
| void OpenVDBLevelSet_mesh_to_level_set(struct OpenVDBLevelSet *level_set, | void OpenVDBLevelSet_mesh_to_level_set(struct OpenVDBLevelSet *level_set, | ||||
| const float *vertices, | const float *vertices, | ||||
| const unsigned int *faces, | const unsigned int *faces, | ||||
| const unsigned int totvertices, | const unsigned int totvertices, | ||||
| const unsigned int totfaces, | const unsigned int totfaces, | ||||
| struct OpenVDBTransform *xform); | struct OpenVDBTransform *xform, | ||||
| void OpenVDBLevelSet_mesh_to_level_set_transform(struct OpenVDBLevelSet *level_set, | bool do_convert, | ||||
| const float *vertices, | bool do_add, | ||||
| const unsigned int *faces, | OpenVDBLevelSet_CSGOperation op); | ||||
| const unsigned int totvertices, | |||||
| const unsigned int totfaces, | |||||
| struct OpenVDBTransform *transform); | |||||
| void OpenVDBLevelSet_volume_to_mesh(struct OpenVDBLevelSet *level_set, | void OpenVDBLevelSet_volume_to_mesh(struct OpenVDBLevelSet *level_set, | ||||
| struct OpenVDBVolumeToMeshData *mesh, | struct OpenVDBVolumeToMeshData *mesh, | ||||
| const double isovalue, | const double isovalue, | ||||
| const double adaptivity, | const double adaptivity, | ||||
| const bool relax_disoriented_triangles); | const bool relax_disoriented_triangles, | ||||
| struct OpenVDBLevelSet *mask); | |||||
| void OpenVDBLevelSet_filter(struct OpenVDBLevelSet *level_set, | void OpenVDBLevelSet_filter(struct OpenVDBLevelSet *level_set, | ||||
| OpenVDBLevelSet_FilterType filter_type, | OpenVDBLevelSet_FilterType filter_type, | ||||
| int width, | int width, | ||||
| int iterations, | |||||
| float sigma, | |||||
| float distance, | float distance, | ||||
| OpenVDBLevelSet_FilterBias bias); | OpenVDBLevelSet_FilterBias bias, | ||||
| const bool sharpen_features, | |||||
| const float edge_tolerance); | |||||
| void OpenVDBLevelSet_CSG_operation(struct OpenVDBLevelSet *out, | void OpenVDBLevelSet_CSG_operation(struct OpenVDBLevelSet *out, | ||||
| struct OpenVDBLevelSet *gridA, | struct OpenVDBLevelSet *gridA, | ||||
| struct OpenVDBLevelSet *gridB, | struct OpenVDBLevelSet *gridB, | ||||
| OpenVDBLevelSet_CSGOperation operation); | OpenVDBLevelSet_CSGOperation operation); | ||||
| struct OpenVDBLevelSet *OpenVDBLevelSet_transform_and_resample(struct OpenVDBLevelSet *level_setA, | struct OpenVDBLevelSet *OpenVDBLevelSet_transform_and_resample(struct OpenVDBLevelSet *level_setA, | ||||
| struct OpenVDBLevelSet *level_setB, | struct OpenVDBLevelSet *level_setB, | ||||
| char sampler, | char sampler, | ||||
| float isolevel); | float isolevel); | ||||
| struct OpenVDBLevelSet *OpenVDB_level_set_copy(struct OpenVDBLevelSet *level_set); | |||||
| void OpenVDBLevelSet_particles_to_level_set(struct OpenVDBLevelSet *level_set, | |||||
| struct ParticleList *part_list, | |||||
| float min_radius, | |||||
| bool trail, | |||||
| float trail_size); | |||||
| struct OpenVDBLevelSet *OpenVDBLevelSet_copy(struct OpenVDBLevelSet *level_set); | |||||
| struct ParticleList *OpenVDB_create_part_list(size_t totpart, float rad_scale, float vel_scale); | |||||
| void OpenVDB_part_list_free(struct ParticleList *part_list); | |||||
| void OpenVDB_add_particle(struct ParticleList *part_list, float pos[3], float rad, float vel[3]); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif /* __OPENVDB_CAPI_H__ */ | #endif /* __OPENVDB_CAPI_H__ */ | ||||