Blender
V3.3
|
#include "BKE_subdiv.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "BLI_utildefines.h"
#include "BKE_modifier.h"
#include "BKE_subdiv_modifier.h"
#include "MEM_guardedalloc.h"
#include "subdiv_converter.h"
#include "opensubdiv_capi.h"
#include "opensubdiv_converter_capi.h"
#include "opensubdiv_evaluator_capi.h"
#include "opensubdiv_topology_refiner_capi.h"
Go to the source code of this file.
Functions | |
void | BKE_subdiv_init () |
void | BKE_subdiv_exit () |
eSubdivFVarLinearInterpolation | BKE_subdiv_fvar_interpolation_from_uv_smooth (int uv_smooth) |
eSubdivVtxBoundaryInterpolation | BKE_subdiv_vtx_boundary_interpolation_from_subsurf (int boundary_smooth) |
bool | BKE_subdiv_settings_equal (const SubdivSettings *settings_a, const SubdivSettings *settings_b) |
Subdiv * | BKE_subdiv_new_from_converter (const SubdivSettings *settings, struct OpenSubdiv_Converter *converter) |
Subdiv * | BKE_subdiv_new_from_mesh (const SubdivSettings *settings, const Mesh *mesh) |
Subdiv * | BKE_subdiv_update_from_converter (Subdiv *subdiv, const SubdivSettings *settings, OpenSubdiv_Converter *converter) |
Subdiv * | BKE_subdiv_update_from_mesh (Subdiv *subdiv, const SubdivSettings *settings, const Mesh *mesh) |
void | BKE_subdiv_free (Subdiv *subdiv) |
int * | BKE_subdiv_face_ptex_offset_get (Subdiv *subdiv) |
Definition at line 37 of file subdiv.c.
References openSubdiv_cleanup().
Referenced by WM_exit_ex().
int* BKE_subdiv_face_ptex_offset_get | ( | Subdiv * | subdiv | ) |
Definition at line 209 of file subdiv.c.
References Subdiv::cache_, Subdiv::face_ptex_offset, OpenSubdiv_TopologyRefiner::getNumFacePtexFaces, OpenSubdiv_TopologyRefiner::getNumFaces, MEM_malloc_arrayN, NULL, and Subdiv::topology_refiner.
Referenced by context_init_commoon(), displacement_init_data(), draw_subdiv_build_cache(), subdiv_ccg_coord_to_ptex_coord(), subdiv_ccg_evaluate_grids(), and subdiv_foreach_ctx_init().
Definition at line 184 of file subdiv.c.
References BKE_subdiv_displacement_detach(), BKE_subsurf_modifier_free_gpu_cache_cb, Subdiv::cache_, Subdiv::evaluator, Subdiv::face_ptex_offset, MEM_freeN, NULL, openSubdiv_deleteEvaluator(), openSubdiv_deleteTopologyRefiner(), OPENSUBDIV_EVALUATOR_CPU, Subdiv::topology_refiner, and OpenSubdiv_Evaluator::type.
Referenced by BKE_subdiv_ccg_destroy(), BKE_subdiv_update_from_converter(), BKE_subsurf_modifier_subdiv_descriptor_ensure(), context_free_subdiv(), deformMatrices(), DRW_cache_free_old_subdiv(), freeRuntimeData(), blender::nodes::node_geo_mesh_subdivide_cc::geometry_set_mesh_subdivide(), mesh_wrapper_ensure_subdivision(), modifyMesh(), multires_do_versions_simple_to_catmull_clark(), multires_reshape_context_free(), multires_reshape_create_subdiv(), blender::nodes::node_geo_subdivision_surface_cc::node_geo_exec(), and subdiv_for_simple_to_catmull_clark().
eSubdivFVarLinearInterpolation BKE_subdiv_fvar_interpolation_from_uv_smooth | ( | int | uv_smooth | ) |
Definition at line 46 of file subdiv.c.
References BLI_assert_msg, SUBDIV_FVAR_LINEAR_INTERPOLATION_ALL, SUBDIV_FVAR_LINEAR_INTERPOLATION_BOUNDARIES, SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_AND_JUNCTIONS, SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_JUNCTIONS_AND_CONCAVE, SUBDIV_FVAR_LINEAR_INTERPOLATION_CORNERS_ONLY, SUBDIV_FVAR_LINEAR_INTERPOLATION_NONE, SUBSURF_UV_SMOOTH_ALL, SUBSURF_UV_SMOOTH_NONE, SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES, SUBSURF_UV_SMOOTH_PRESERVE_CORNERS, SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_AND_JUNCTIONS, and SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE.
Referenced by BKE_multires_subdiv_settings_init(), BKE_subsurf_modifier_runtime_init(), blender::nodes::node_geo_mesh_subdivide_cc::geometry_set_mesh_subdivide(), and blender::nodes::node_geo_subdivision_surface_cc::node_geo_exec().
Subdiv* BKE_subdiv_new_from_converter | ( | const SubdivSettings * | settings, |
struct OpenSubdiv_Converter * | converter | ||
) |
Definition at line 98 of file subdiv.c.
References BKE_subdiv_stats_begin(), BKE_subdiv_stats_end(), BKE_subdiv_stats_init(), Subdiv::displacement_evaluator, Subdiv::evaluator, OpenSubdiv_Converter::getNumVertices, OpenSubdiv_TopologyRefinerSettings::is_adaptive, SubdivSettings::is_adaptive, OpenSubdiv_TopologyRefinerSettings::level, SubdivSettings::level, MEM_callocN, NULL, openSubdiv_createTopologyRefinerFromConverter(), Subdiv::settings, Subdiv::stats, SUBDIV_STATS_TOPOLOGY_REFINER_CREATION_TIME, and Subdiv::topology_refiner.
Referenced by BKE_subdiv_new_from_mesh(), BKE_subdiv_update_from_converter(), reshape_subdiv_create(), and subdiv_for_simple_to_catmull_clark().
Subdiv* BKE_subdiv_new_from_mesh | ( | const SubdivSettings * | settings, |
const Mesh * | mesh | ||
) |
Definition at line 127 of file subdiv.c.
References BKE_subdiv_converter_free(), BKE_subdiv_converter_init_for_mesh(), BKE_subdiv_new_from_converter(), mesh, NULL, and Mesh::totvert.
bool BKE_subdiv_settings_equal | ( | const SubdivSettings * | settings_a, |
const SubdivSettings * | settings_b | ||
) |
Definition at line 83 of file subdiv.c.
References SubdivSettings::fvar_linear_interpolation, SubdivSettings::is_adaptive, SubdivSettings::is_simple, SubdivSettings::level, and SubdivSettings::vtx_boundary_interpolation.
Referenced by BKE_subdiv_update_from_converter().
Subdiv* BKE_subdiv_update_from_converter | ( | Subdiv * | subdiv, |
const SubdivSettings * | settings, | ||
OpenSubdiv_Converter * | converter | ||
) |
Definition at line 141 of file subdiv.c.
References BKE_subdiv_free(), BKE_subdiv_new_from_converter(), BKE_subdiv_settings_equal(), BKE_subdiv_stats_begin(), BKE_subdiv_stats_end(), NULL, openSubdiv_topologyRefinerCompareWithConverter(), Subdiv::settings, Subdiv::stats, SUBDIV_STATS_TOPOLOGY_COMPARE, and Subdiv::topology_refiner.
Referenced by BKE_subdiv_update_from_mesh().
Subdiv* BKE_subdiv_update_from_mesh | ( | Subdiv * | subdiv, |
const SubdivSettings * | settings, | ||
const Mesh * | mesh | ||
) |
Definition at line 171 of file subdiv.c.
References BKE_subdiv_converter_free(), BKE_subdiv_converter_init_for_mesh(), BKE_subdiv_update_from_converter(), and mesh.
eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsurf | ( | int | boundary_smooth | ) |
Definition at line 66 of file subdiv.c.
References BLI_assert_msg, SUBDIV_VTX_BOUNDARY_EDGE_AND_CORNER, SUBDIV_VTX_BOUNDARY_EDGE_ONLY, SUBSURF_BOUNDARY_SMOOTH_ALL, and SUBSURF_BOUNDARY_SMOOTH_PRESERVE_CORNERS.
Referenced by BKE_multires_subdiv_settings_init(), BKE_subsurf_modifier_runtime_init(), blender::nodes::node_geo_mesh_subdivide_cc::geometry_set_mesh_subdivide(), and blender::nodes::node_geo_subdivision_surface_cc::node_geo_exec().