Blender
V3.3
|
#include "multires_reshape.h"
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BKE_customdata.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
#include "BKE_multires.h"
#include "BKE_subdiv_eval.h"
#include "DEG_depsgraph_query.h"
Go to the source code of this file.
Functions | |
void | multires_reshape_apply_base_update_mesh_coords (MultiresReshapeContext *reshape_context) |
static float | v3_dist_from_plane (const float v[3], const float center[3], const float no[3]) |
void | multires_reshape_apply_base_refit_base_mesh (MultiresReshapeContext *reshape_context) |
void | multires_reshape_apply_base_refine_from_base (MultiresReshapeContext *reshape_context) |
void | multires_reshape_apply_base_refine_from_deform (MultiresReshapeContext *reshape_context) |
void multires_reshape_apply_base_refine_from_base | ( | MultiresReshapeContext * | reshape_context | ) |
Refine subdivision surface to the new positions of the base mesh.
Definition at line 162 of file multires_reshape_apply_base.c.
References MultiresReshapeContext::base_mesh, BKE_subdiv_eval_refine_from_mesh(), NULL, and MultiresReshapeContext::subdiv.
Referenced by multiresModifier_base_apply().
void multires_reshape_apply_base_refine_from_deform | ( | MultiresReshapeContext * | reshape_context | ) |
Refine subdivision surface to the new positions of the deformed mesh (base mesh with all modifiers leading the multi-res applied).
Definition at line 167 of file multires_reshape_apply_base.c.
References MultiresReshapeContext::base_mesh, BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_subdiv_eval_refine_from_mesh(), BLI_assert, MultiresReshapeContext::depsgraph, depsgraph, float(), MEM_freeN, MultiresReshapeContext::mmd, NULL, MultiresReshapeContext::object, and MultiresReshapeContext::subdiv.
Referenced by multiresModifier_base_apply().
void multires_reshape_apply_base_refit_base_mesh | ( | MultiresReshapeContext * | reshape_context | ) |
Perform better fitting of the base mesh so its subdivided version brings vertices to their desired locations.
Definition at line 66 of file multires_reshape_apply_base.c.
References add_v3_v3(), MultiresReshapeContext::base_mesh, BKE_mesh_calc_poly_normal_coords(), BKE_mesh_tag_coords_changed(), BKE_mesh_vert_poly_map_create(), center, MVert::co, copy_v3_v3(), MeshElemMap::count, count, float(), MeshElemMap::indices, MPoly::loopstart, MEM_calloc_arrayN, MEM_freeN, MEM_malloc_arrayN, Mesh::mloop, Mesh::mpoly, mul_v3_fl(), Mesh::mvert, normalize_v3(), Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, MLoop::v, and v3_dist_from_plane().
Referenced by multiresModifier_base_apply().
void multires_reshape_apply_base_update_mesh_coords | ( | MultiresReshapeContext * | reshape_context | ) |
Update mesh coordinates to the final positions of displacement in object space. This is effectively desired position of base mesh vertices after canceling out displacement.
Definition at line 30 of file multires_reshape_apply_base.c.
References add_v3_v3v3(), MultiresReshapeContext::base_mesh, MVert::co, D(), ReshapeConstGridElement::displacement, GridCoord::grid_index, Mesh::mloop, mul_v3_m3v3(), multires_reshape_evaluate_limit_at_grid(), multires_reshape_orig_grid_element_for_grid_coord(), Mesh::mvert, P(), Mesh::totloop, GridCoord::u, GridCoord::v, and MLoop::v.
Referenced by multiresModifier_base_apply().
|
static |
Definition at line 59 of file multires_reshape_apply_base.c.
References center, dot_v3v3(), sub_v3_v3v3(), and v.
Referenced by multires_reshape_apply_base_refit_base_mesh().