27 return openvdb::OPENVDB_LIBRARY_VERSION;
34 openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
35 grid->setGridClass(openvdb::GRID_LEVEL_SET);
56 transform->create_linear_transform(voxel_size);
65 const float *vertices,
66 const unsigned int *
faces,
67 const unsigned int totvertices,
68 const unsigned int totfaces,
75 const float *vertices,
76 const unsigned int *
faces,
77 const unsigned int totvertices,
78 const unsigned int totfaces,
86 const double isovalue,
87 const double adaptivity,
88 const bool relax_disoriented_triangles)
117 openvdb::FloatGrid::Ptr sourceGrid = level_setA->
get_grid();
118 openvdb::FloatGrid::Ptr targetGrid = level_setB->
get_grid()->deepCopy();
121 &targetXform = targetGrid->transform();
126 openvdb::Mat4R xform = sourceXform.baseMap()->getAffineMap()->getMat4() *
127 targetXform.baseMap()->getAffineMap()->getMat4().inverse();
130 openvdb::tools::GridTransformer transformer(xform);
135 transformer.transformGrid<openvdb::tools::PointSampler, openvdb::FloatGrid>(*sourceGrid,
138 targetGrid->tree().prune();
143 transformer.transformGrid<openvdb::tools::BoxSampler, openvdb::FloatGrid>(*sourceGrid,
146 targetGrid->tree().prune();
151 transformer.transformGrid<openvdb::tools::QuadraticSampler, openvdb::FloatGrid>(*sourceGrid,
154 targetGrid->tree().prune();
161 targetGrid = openvdb::tools::levelSetRebuild(*targetGrid, isolevel, 1.0f);
162 openvdb::tools::pruneLevelSet(targetGrid->tree());
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void OpenVDBTransform_free(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)
OpenVDBLevelSet * OpenVDBLevelSet_create(bool initGrid, OpenVDBTransform *xform)
OpenVDBTransform * OpenVDBTransform_create()
void OpenVDBLevelSet_mesh_to_level_set_transform(struct OpenVDBLevelSet *level_set, const float *vertices, const unsigned int *faces, const unsigned int totvertices, const unsigned int totfaces, OpenVDBTransform *transform)
void OpenVDBLevelSet_free(OpenVDBLevelSet *level_set)
void OpenVDBLevelSet_filter(struct OpenVDBLevelSet *level_set, OpenVDBLevelSet_FilterType filter_type, int width, float distance, OpenVDBLevelSet_FilterBias bias)
int OpenVDB_getVersionHex()
void OpenVDBLevelSet_mesh_to_level_set(struct OpenVDBLevelSet *level_set, const float *vertices, const unsigned int *faces, const unsigned int totvertices, const unsigned int totfaces, OpenVDBTransform *xform)
OpenVDBLevelSet * OpenVDBLevelSet_transform_and_resample(struct OpenVDBLevelSet *level_setA, struct OpenVDBLevelSet *level_setB, char sampler, float isolevel)
void OpenVDBLevelSet_CSG_operation(struct OpenVDBLevelSet *out, struct OpenVDBLevelSet *gridA, struct OpenVDBLevelSet *gridB, OpenVDBLevelSet_CSGOperation operation)
void OpenVDBTransform_create_linear_transform(OpenVDBTransform *transform, double voxel_size)
OpenVDBLevelSet_CSGOperation
OpenVDBLevelSet_FilterType
@ OPENVDB_LEVELSET_GRIDSAMPLER_QUADRATIC
@ OPENVDB_LEVELSET_GRIDSAMPLER_NONE
@ OPENVDB_LEVELSET_GRIDSAMPLER_BOX
@ OPENVDB_LEVELSET_GRIDSAMPLER_POINT
OpenVDBLevelSet_FilterBias
void set_grid(const openvdb::FloatGrid::Ptr &grid)
void volume_to_mesh(struct OpenVDBVolumeToMeshData *mesh, const double isovalue, const double adaptivity, const bool relax_disoriented_triangles)
const openvdb::FloatGrid::Ptr & get_grid()
void filter(OpenVDBLevelSet_FilterType filter_type, int width, float distance, OpenVDBLevelSet_FilterBias filter_bias)
openvdb::FloatGrid::Ptr CSG_operation_apply(const openvdb::FloatGrid::Ptr &gridA, const openvdb::FloatGrid::Ptr &gridB, OpenVDBLevelSet_CSGOperation operation)
void mesh_to_level_set(const float *vertices, const unsigned int *faces, const unsigned int totvertices, const unsigned int totfaces, const openvdb::math::Transform::Ptr &transform)
ccl_device_inline float distance(const float2 &a, const float2 &b)