Blender  V2.93
openvdb_level_set.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2015 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #ifndef __OPENVDB_LEVEL_SET_H__
21 #define __OPENVDB_LEVEL_SET_H__
22 
23 #include "openvdb_capi.h"
24 #include <openvdb/math/FiniteDifference.h>
25 #include <openvdb/openvdb.h>
26 #include <openvdb/tools/GridTransformer.h>
27 #include <openvdb/tools/LevelSetFilter.h>
28 #include <openvdb/tools/MeshToVolume.h>
29 #include <openvdb/tools/VolumeToMesh.h>
30 
32  private:
33  openvdb::FloatGrid::Ptr grid;
34 
35  public:
38  const openvdb::FloatGrid::Ptr &get_grid();
39  void set_grid(const openvdb::FloatGrid::Ptr &grid);
40 
41  void mesh_to_level_set(const float *vertices,
42  const unsigned int *faces,
43  const unsigned int totvertices,
44  const unsigned int totfaces,
45  const openvdb::math::Transform::Ptr &transform);
46 
48  const double isovalue,
49  const double adaptivity,
50  const bool relax_disoriented_triangles);
51  void filter(OpenVDBLevelSet_FilterType filter_type,
52  int width,
53  float distance,
54  OpenVDBLevelSet_FilterBias filter_bias);
55  openvdb::FloatGrid::Ptr CSG_operation_apply(const openvdb::FloatGrid::Ptr &gridA,
56  const openvdb::FloatGrid::Ptr &gridB,
58 };
59 
60 #endif /* __OPENVDB_LEVEL_SET_H__ */
_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
static char faces[256]
OpenVDBLevelSet_CSGOperation
Definition: openvdb_capi.h:48
OpenVDBLevelSet_FilterType
Definition: openvdb_capi.h:28
OpenVDBLevelSet_FilterBias
Definition: openvdb_capi.h:39
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)