Blender  V3.3
Functions
multires_reshape_apply_base.c File Reference
#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)
 

Function Documentation

◆ multires_reshape_apply_base_refine_from_base()

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().

◆ multires_reshape_apply_base_refine_from_deform()

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).

Note
Will re-evaluate all leading modifiers, so it's not cheap.

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().

◆ multires_reshape_apply_base_refit_base_mesh()

void multires_reshape_apply_base_refit_base_mesh ( MultiresReshapeContext reshape_context)

◆ multires_reshape_apply_base_update_mesh_coords()

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.

Note
Expects that mesh's CD_MDISPS has been set to object space positions.

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().

◆ v3_dist_from_plane()

static float v3_dist_from_plane ( const float  v[3],
const float  center[3],
const float  no[3] 
)
static