Blender
V3.3
|
#include "BKE_subdiv_deform.h"
#include <string.h>
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
#include "BKE_subdiv.h"
#include "BKE_subdiv_eval.h"
#include "BKE_subdiv_foreach.h"
#include "BKE_subdiv_mesh.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Classes | |
struct | SubdivDeformContext |
Functions | |
Accumulation helpers | |
static void | subdiv_accumulate_vertex_displacement (SubdivDeformContext *ctx, const int ptex_face_index, const float u, const float v, int vertex_index) |
Subdivision callbacks | |
static bool | subdiv_mesh_topology_info (const SubdivForeachContext *foreach_context, const int UNUSED(num_vertices), const int UNUSED(num_edges), const int UNUSED(num_loops), const int UNUSED(num_polygons), const int *UNUSED(subdiv_polygon_offset)) |
static void | subdiv_mesh_vertex_every_corner (const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int UNUSED(coarse_poly_index), const int UNUSED(coarse_corner), const int UNUSED(subdiv_vertex_index)) |
static void | subdiv_mesh_vertex_corner (const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, const int UNUSED(coarse_poly_index), const int UNUSED(coarse_corner), const int UNUSED(subdiv_vertex_index)) |
Initialization | |
static void | setup_foreach_callbacks (const SubdivDeformContext *subdiv_context, SubdivForeachContext *foreach_context) |
Public entry point | |
void | BKE_subdiv_deform_coarse_vertices (struct Subdiv *subdiv, const struct Mesh *coarse_mesh, float(*vertex_cos)[3], int num_verts) |
Subdivision context | |
typedef struct SubdivDeformContext | SubdivDeformContext |
static void | subdiv_mesh_prepare_accumulator (SubdivDeformContext *ctx, int num_vertices) |
static void | subdiv_mesh_context_free (SubdivDeformContext *ctx) |
typedef struct SubdivDeformContext SubdivDeformContext |
void BKE_subdiv_deform_coarse_vertices | ( | struct Subdiv * | subdiv, |
const struct Mesh * | coarse_mesh, | ||
float(*) | vertex_cos[3], | ||
int | num_verts | ||
) |
Definition at line 182 of file subdiv_deform.c.
References BKE_subdiv_eval_begin_from_mesh(), BKE_subdiv_foreach_subdiv_geometry(), BKE_subdiv_stats_begin(), BKE_subdiv_stats_end(), SubdivDeformContext::coarse_mesh, Subdiv::displacement_evaluator, SubdivDeformContext::have_displacement, NULL, SubdivDeformContext::num_verts, SubdivToMeshSettings::resolution, setup_foreach_callbacks(), Subdiv::stats, SubdivDeformContext::subdiv, SUBDIV_EVALUATOR_TYPE_CPU, subdiv_mesh_context_free(), SUBDIV_STATS_SUBDIV_TO_MESH, SUBDIV_STATS_SUBDIV_TO_MESH_GEOMETRY, Mesh::totpoly, SubdivToMeshSettings::use_optimal_display, SubdivForeachContext::user_data, and SubdivDeformContext::vertex_cos.
Referenced by deformMatrices().
|
static |
Definition at line 163 of file subdiv_deform.c.
References SubdivDeformContext::have_displacement, subdiv_mesh_topology_info(), subdiv_mesh_vertex_corner(), subdiv_mesh_vertex_every_corner(), SubdivForeachContext::topology_info, SubdivForeachContext::vertex_corner, and SubdivForeachContext::vertex_every_corner.
Referenced by BKE_subdiv_deform_coarse_vertices().
|
static |
Definition at line 70 of file subdiv_deform.c.
References SubdivDeformContext::accumulated_counters, add_v3_v3(), BKE_subdiv_eval_displacement(), BKE_subdiv_eval_limit_point_and_derivatives(), copy_v3_v3(), D(), SubdivDeformContext::have_displacement, SubdivDeformContext::subdiv, v, and SubdivDeformContext::vertex_cos.
Referenced by subdiv_mesh_vertex_every_corner().
|
static |
Definition at line 59 of file subdiv_deform.c.
References SubdivDeformContext::accumulated_counters, and MEM_SAFE_FREE.
Referenced by BKE_subdiv_deform_coarse_vertices().
|
static |
Definition at line 50 of file subdiv_deform.c.
References SubdivDeformContext::accumulated_counters, SubdivDeformContext::have_displacement, and MEM_calloc_arrayN.
Referenced by subdiv_mesh_topology_info().
|
static |
Definition at line 100 of file subdiv_deform.c.
References SubdivDeformContext::coarse_mesh, subdiv_mesh_prepare_accumulator(), Mesh::totvert, and SubdivForeachContext::user_data.
Referenced by setup_foreach_callbacks().
|
static |
Definition at line 126 of file subdiv_deform.c.
References SubdivDeformContext::accumulated_counters, add_v3_v3(), BKE_subdiv_eval_limit_point(), BLI_assert, copy_v3_v3(), D(), SubdivDeformContext::have_displacement, mul_v3_fl(), NULL, ORIGINDEX_NONE, SubdivDeformContext::subdiv, SubdivForeachContext::user_data, v, and SubdivDeformContext::vertex_cos.
Referenced by setup_foreach_callbacks().
|
static |
Definition at line 112 of file subdiv_deform.c.
References subdiv_accumulate_vertex_displacement(), SubdivForeachContext::user_data, and v.
Referenced by setup_foreach_callbacks().