|
Blender V4.3
|
#include <memory>#include "BLI_array.hh"#include "BLI_bit_group_vector.hh"#include "BLI_bit_span_ops.hh"#include "BLI_index_mask_fwd.hh"#include "BLI_offset_indices.hh"#include "BLI_span.hh"#include "BLI_sys_types.h"#include "BLI_utility_mixins.hh"#include "BLI_vector.hh"#include "BKE_ccg.hh"Go to the source code of this file.
Classes | |
| struct | SubdivCCGMaskEvaluator |
| struct | SubdivToCCGSettings |
| struct | SubdivCCGCoord |
| struct | SubdivCCGAdjacentEdge |
| struct | SubdivCCGAdjacentVertex |
| struct | SubdivCCG |
| struct | SubdivCCGNeighbors |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| namespace | blender::bke::subdiv |
| namespace | blender::bke::ccg |
Enumerations | |
| enum | SubdivCCGAdjacencyType { SUBDIV_CCG_ADJACENT_NONE , SUBDIV_CCG_ADJACENT_VERTEX , SUBDIV_CCG_ADJACENT_EDGE } |
| Enumerator | |
|---|---|
| SUBDIV_CCG_ADJACENT_NONE | |
| SUBDIV_CCG_ADJACENT_VERTEX | |
| SUBDIV_CCG_ADJACENT_EDGE | |
Definition at line 284 of file BKE_subdiv_ccg.hh.
| void BKE_subdiv_ccg_average_grids | ( | SubdivCCG & | subdiv_ccg | ) |
Definition at line 836 of file subdiv_ccg.cc.
References SubdivCCG::adjacent_edges, SubdivCCG::adjacent_verts, BKE_subdiv_ccg_average_stitch_faces(), BKE_subdiv_ccg_key_top_level(), SubdivCCG::faces, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), and UNUSED_VARS.
Referenced by blender::ed::sculpt_paint::mask::apply_new_mask_grids(), BKE_subdiv_ccg_recalc_normals(), and blender::ed::sculpt_paint::mask::init_mask_grids().
| void BKE_subdiv_ccg_average_stitch_faces | ( | SubdivCCG & | subdiv_ccg, |
| const blender::IndexMask & | face_mask ) |
Referenced by multires_stitch_grids().
| bool BKE_subdiv_ccg_check_coord_valid | ( | const SubdivCCG & | subdiv_ccg, |
| const SubdivCCGCoord & | coord ) |
Definition at line 940 of file subdiv_ccg.cc.
References SubdivCCGCoord::grid_index, SubdivCCG::grid_size, SubdivCCG::grids_num, SubdivCCGCoord::x, and SubdivCCGCoord::y.
Referenced by BKE_subdiv_ccg_neighbor_coords_get().
| SubdivCCGAdjacencyType BKE_subdiv_ccg_coarse_mesh_adjacency_info_get | ( | const SubdivCCG & | subdiv_ccg, |
| const SubdivCCGCoord & | coord, | ||
| blender::Span< int > | corner_verts, | ||
| blender::OffsetIndices< int > | faces, | ||
| int & | r_v1, | ||
| int & | r_v2 ) |
Definition at line 1532 of file subdiv_ccg.cc.
References adjacent_vertices_index_from_adjacent_edge(), SubdivCCGCoord::grid_index, SubdivCCG::grid_size, is_boundary_grid_coord(), is_corner_grid_coord(), is_inner_edge_grid_coordinate(), SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, SubdivCCGCoord::x, and SubdivCCGCoord::y.
Referenced by BKE_subdiv_ccg_coord_is_mesh_boundary(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), and blender::ed::sculpt_paint::boundary::vert_is_boundary().
| bool BKE_subdiv_ccg_coord_is_mesh_boundary | ( | blender::OffsetIndices< int > | faces, |
| blender::Span< int > | corner_verts, | ||
| blender::BitSpan | boundary_verts, | ||
| const SubdivCCG & | subdiv_ccg, | ||
| SubdivCCGCoord | coord ) |
Definition at line 1568 of file subdiv_ccg.cc.
References BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(), BLI_assert_unreachable, SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, and v2.
Referenced by blender::ed::sculpt_paint::smooth::calc_relaxed_translations_grids(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), and blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids().
| void BKE_subdiv_ccg_eval_limit_point | ( | const SubdivCCG & | subdiv_ccg, |
| const SubdivCCGCoord & | coord, | ||
| float | r_point[3] ) |
Definition at line 1635 of file subdiv_ccg.cc.
References blender::bke::subdiv::eval_limit_point(), SubdivCCG::subdiv, subdiv_ccg_coord_to_ptex_coord(), and v.
Referenced by BKE_subdiv_ccg_eval_limit_positions().
| void BKE_subdiv_ccg_eval_limit_positions | ( | const SubdivCCG & | subdiv_ccg, |
| const CCGKey & | key, | ||
| int | grid_index, | ||
| blender::MutableSpan< blender::float3 > | r_limit_positions ) |
|
inline |
Definition at line 321 of file BKE_subdiv_ccg.hh.
References blender::bits::foreach_0_index(), CCGKey::grid_area, and blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty().
Referenced by blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), blender::ed::sculpt_paint::fake_neighbor_search_grids(), blender::ed::sculpt_paint::mask::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::nearest_vert_calc_grids(), and blender::ed::sculpt_paint::mask::sculpt_mask_init_exec().
| blender::BitGroupVector & BKE_subdiv_ccg_grid_hidden_ensure | ( | SubdivCCG & | subdiv_ccg | ) |
Definition at line 1589 of file subdiv_ccg.cc.
References SubdivCCG::grid_area, SubdivCCG::grid_hidden, SubdivCCG::grids_num, and blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty().
Referenced by BKE_sculpt_sync_face_visibility_to_grids(), blender::ed::sculpt_paint::hide::grid_hide_update(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_grid(), blender::ed::sculpt_paint::hide::invert_visibility_grids(), and blender::ed::sculpt_paint::undo::restore_vert_visibility_grids().
| void BKE_subdiv_ccg_grid_hidden_free | ( | SubdivCCG & | subdiv_ccg | ) |
Definition at line 1598 of file subdiv_ccg.cc.
References SubdivCCG::grid_hidden.
Referenced by BKE_sculpt_sync_face_visibility_to_grids(), blender::ed::sculpt_paint::hide::grids_show_all(), and blender::ed::sculpt_paint::undo::restore_vert_visibility_grids().
Definition at line 271 of file BKE_subdiv_ccg.hh.
References SubdivCCG::grid_to_face_map.
Referenced by blender::ed::sculpt_paint::face_set::active_face_set_get(), blender::ed::sculpt_paint::expand::active_face_set_id_get(), adjacent_vertices_index_from_adjacent_edge(), subdiv_ccg_coord_to_ptex_coord(), blender::ed::sculpt_paint::hide::vert_all_faces_visible_get(), blender::ed::sculpt_paint::face_set::vert_face_set_get(), and blender::ed::sculpt_paint::face_set::vert_has_face_set().
Definition at line 471 of file subdiv_ccg.cc.
References CCGKey::elem_size, CCGKey::grid_area, CCGKey::grid_bytes, CCGKey::grid_size, blender::bke::subdiv::grid_size_from_level(), CCGKey::has_mask, CCGKey::has_normals, CCGKey::level, CCGKey::mask_offset, CCGKey::normal_offset, and UNUSED_VARS.
Referenced by BKE_subdiv_ccg_key_top_level(), and multires_reshape_assign_final_coords_from_ccg().
Definition at line 495 of file subdiv_ccg.cc.
References BKE_subdiv_ccg_key(), and SubdivCCG::level.
Referenced by SculptSession::active_vert_index(), SculptSession::active_vert_position(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::mask::apply_mask_from_settings(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_new_mask_grids(), blender::ed::sculpt_paint::apply_translations(), blender::ed::sculpt_paint::smooth::average_data_grids(), BKE_pbvh_get_grid_num_faces(), BKE_pbvh_get_grid_num_verts(), BKE_pbvh_sync_visibility_from_verts(), BKE_subdiv_ccg_average_grids(), BKE_subdiv_ccg_average_stitch_faces(), BKE_subdiv_ccg_update_normals(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::pose::calc_average_face_set_center(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_limit_surface_positions(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_grids(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::expand::calc_topology_falloff_from_verts(), blender::ed::sculpt_paint::islands::calc_topology_islands_grids(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::cloth::calc_vert_neighbor_indices_grids(), blender::ed::sculpt_paint::calc_vert_neighbors(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), blender::ed::sculpt_paint::mask::copy_old_hidden_mask_grids(), blender::ed::sculpt_paint::boundary::data_init(), blender::ed::sculpt_paint::boundary::data_init_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), blender::ed::sculpt_paint::do_displacement_smear_brush(), blender::ed::sculpt_paint::do_mask_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::boundary::edit_data_init_grids(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::draw::pbvh::ensure_vbos_allocated_grids(), blender::ed::sculpt_paint::flood_fill::FillDataGrids::execute(), blender::ed::sculpt_paint::fake_neighbor_search(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), blender::draw::pbvh::fill_vbos_grids(), blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_grids(), blender::ed::sculpt_paint::find_symm_verts_grids(), blender::bke::pbvh::Tree::from_grids(), blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::gather_grids_positions(), blender::ed::sculpt_paint::mask::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::boundary::get_closest_boundary_vert_grids(), blender::ed::sculpt_paint::pose::grow_factors_grids(), blender::ed::sculpt_paint::mask::grow_mask_grids(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_grid(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::boundary::indices_init_grids(), blender::ed::sculpt_paint::boundary::init_boundary_grids(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_grids(), blender::ed::sculpt_paint::boundary::init_falloff_grids(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::expand::is_face_in_active_component(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_grids(), SculptSession::last_active_vert_index(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::draw::overlay::Sculpts::mesh_sync(), blender::ed::sculpt_paint::nearest_vert_calc_grids(), blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids(), blender::bke::pbvh::node_raycast_grids(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::hide::partialvis_gesture_update_grids(), blender::ed::sculpt_paint::hide::partialvis_masked_update_grids(), blender::bke::pbvh::pbvh_grids_node_nearest_to_ray(), blender::ed::sculpt_paint::undo::restore_list(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_mask_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::scatter_data_grids(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::mask::sharpen_mask_grids(), blender::ed::sculpt_paint::mask::shrink_mask_grids(), blender::ed::sculpt_paint::transform_node_grids(), blender::bke::pbvh::update_bounds(), blender::bke::pbvh::update_mask_grids(), blender::ed::sculpt_paint::expand::update_mask_grids(), and blender::ed::sculpt_paint::expand::vert_to_face_falloff_grids().
| bool BKE_subdiv_ccg_mask_init_from_paint | ( | SubdivCCGMaskEvaluator * | mask_evaluator, |
| const Mesh * | mesh ) |
Definition at line 156 of file subdiv_ccg_mask.cc.
References CD_GRID_PAINT_MASK, CustomData_get_layer(), mask_init_data(), mask_init_functions(), and SubdivCCGMaskEvaluator::user_data.
Referenced by BKE_subdiv_to_ccg_mesh().
| void BKE_subdiv_ccg_neighbor_coords_get | ( | const SubdivCCG & | subdiv_ccg, |
| const SubdivCCGCoord & | coord, | ||
| bool | include_duplicates, | ||
| SubdivCCGNeighbors & | r_neighbors ) |
Definition at line 1445 of file subdiv_ccg.cc.
References BKE_subdiv_ccg_check_coord_valid(), BLI_assert, SubdivCCGNeighbors::coords, SubdivCCGCoord::grid_index, SubdivCCG::grid_size, SubdivCCG::grids_num, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), is_boundary_grid_coord(), is_corner_grid_coord(), UNUSED_VARS, SubdivCCGCoord::x, and SubdivCCGCoord::y.
Referenced by blender::ed::sculpt_paint::smooth::average_data_grids(), blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::cloth::calc_vert_neighbor_indices_grids(), blender::ed::sculpt_paint::calc_vert_neighbors(), blender::ed::sculpt_paint::calc_vert_neighbors_interior(), blender::ed::sculpt_paint::boundary::edit_data_init_grids(), blender::ed::sculpt_paint::flood_fill::FillDataGrids::execute(), blender::ed::sculpt_paint::pose::grow_factors_grids(), blender::ed::sculpt_paint::mask::grow_mask_grids(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_grid(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_grids(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_grids(), blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids(), and blender::ed::sculpt_paint::mask::shrink_mask_grids().
| void BKE_subdiv_ccg_print_coord | ( | const char * | message, |
| const SubdivCCGCoord & | coord ) |
Definition at line 935 of file subdiv_ccg.cc.
References SubdivCCGCoord::grid_index, printf, SubdivCCGCoord::x, and SubdivCCGCoord::y.
| void BKE_subdiv_ccg_recalc_normals | ( | SubdivCCG & | subdiv_ccg | ) |
Definition at line 599 of file subdiv_ccg.cc.
References BKE_subdiv_ccg_average_grids(), SubdivCCG::faces, SubdivCCG::normals, and UNUSED_VARS.
Definition at line 1478 of file subdiv_ccg.cc.
References blender::opensubdiv::TopologyRefinerImpl::base_level(), SubdivCCG::cache_, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), SubdivCCG::start_face_grid_index, SubdivCCG::subdiv, and blender::bke::subdiv::Subdiv::topology_refiner.
Definition at line 1504 of file subdiv_ccg.cc.
References SubdivCCG::cache_, blender::Array< T, InlineBufferCapacity, Allocator >::data(), and SubdivCCG::start_face_grid_index.
| void BKE_subdiv_ccg_topology_counters | ( | const SubdivCCG & | subdiv_ccg, |
| int & | r_num_vertices, | ||
| int & | r_num_edges, | ||
| int & | r_num_faces, | ||
| int & | r_num_loops ) |
Definition at line 913 of file subdiv_ccg.cc.
References SubdivCCG::grid_size, and SubdivCCG::grids_num.
Referenced by stats_mesheval().
| void BKE_subdiv_ccg_update_normals | ( | SubdivCCG & | subdiv_ccg, |
| const blender::IndexMask & | face_mask ) |
Referenced by blender::bke::pbvh::update_normals().
| std::unique_ptr< SubdivCCG > BKE_subdiv_to_ccg | ( | blender::bke::subdiv::Subdiv & | subdiv, |
| const SubdivToCCGSettings & | settings, | ||
| const Mesh & | coarse_mesh, | ||
| SubdivCCGMaskEvaluator * | mask_evaluator ) |
Definition at line 395 of file subdiv_ccg.cc.
References bitscan_forward_i(), blender::bke::subdiv::grid_size_from_level(), blender::bke::subdiv::Subdiv::stats, blender::bke::subdiv::stats_begin(), blender::bke::subdiv::stats_end(), blender::bke::subdiv::SUBDIV_STATS_SUBDIV_TO_CCG, and UNUSED_VARS.
Referenced by BKE_subdiv_to_ccg_mesh().
| Mesh * BKE_subdiv_to_ccg_mesh | ( | blender::bke::subdiv::Subdiv & | subdiv, |
| const SubdivToCCGSettings & | settings, | ||
| const Mesh & | coarse_mesh ) |
Definition at line 424 of file subdiv_ccg.cc.
References BKE_mesh_new_nomain_from_template(), BKE_subdiv_ccg_mask_init_from_paint(), BKE_subdiv_to_ccg(), blender::bke::subdiv::eval_begin_from_mesh(), Mesh::faces_num, SubdivCCGMaskEvaluator::free, result, blender::bke::subdiv::Subdiv::stats, blender::bke::subdiv::stats_begin(), blender::bke::subdiv::stats_end(), blender::bke::subdiv::SUBDIV_EVALUATOR_TYPE_CPU, and blender::bke::subdiv::SUBDIV_STATS_SUBDIV_TO_CCG.
Referenced by multires_as_ccg(), and subdiv_as_ccg().