57 for (
int layer_index = 0; layer_index < ctx->
num_uv_layers; layer_index++) {
110 const MPoly *coarse_poly,
111 const int ptex_of_poly_index)
114 const int first_ptex_loop_index = coarse_poly->
loopstart + ptex_of_poly_index;
119 const int last_ptex_loop_index = coarse_poly->
loopstart +
120 (ptex_of_poly_index + coarse_poly->
totloop - 1) %
122 loops_of_ptex->
first_loop = &coarse_mloop[first_ptex_loop_index];
123 loops_of_ptex->
last_loop = &coarse_mloop[last_ptex_loop_index];
166 const MPoly *coarse_poly)
169 const MLoop *coarse_mloop = coarse_mesh->
mloop;
170 if (coarse_poly->
totloop == 4) {
194 const float weight = 1.0f / (
float)coarse_poly->
totloop;
197 for (
int i = 0; i < coarse_poly->
totloop; i++) {
213 const MPoly *coarse_poly,
216 if (coarse_poly->
totloop == 4) {
222 const MLoop *coarse_mloop = coarse_mesh->
mloop;
236 const float weights[2] = {0.5f, 0.5f};
237 const int first_loop_index = loops_of_ptex.
first_loop - coarse_mloop;
238 const int last_loop_index = loops_of_ptex.
last_loop - coarse_mloop;
239 const int first_indices[2] = {
240 coarse_mloop[first_loop_index].
v,
244 const int last_indices[2] = {
245 coarse_mloop[first_loop_index].
v,
246 coarse_mloop[last_loop_index].
v,
301 const MPoly *coarse_poly)
304 if (coarse_poly->
totloop == 4) {
328 const float weight = 1.0f / (
float)coarse_poly->
totloop;
331 for (
int i = 0; i < coarse_poly->
totloop; i++) {
347 const MPoly *coarse_poly,
350 if (coarse_poly->
totloop == 4) {
356 const MLoop *coarse_mloop = coarse_mesh->
mloop;
368 const float weights[2] = {0.5f, 0.5f};
369 const int base_loop_index = coarse_poly->
loopstart;
370 const int first_loop_index = loops_of_ptex.
first_loop - coarse_mloop;
371 const int second_loop_index = base_loop_index +
372 (first_loop_index - base_loop_index + 1) % coarse_poly->
totloop;
373 const int first_indices[2] = {first_loop_index, second_loop_index};
374 const int last_indices[2] = {
375 loops_of_ptex.last_loop - coarse_mloop,
376 loops_of_ptex.first_loop - coarse_mloop,
428 const int ptex_face_index,
431 const int subdiv_vertex_index)
434 float vertex_data[6];
456 const int ptex_face_index,
464 float dummy_P[3], dPdu[3], dPdv[3],
D[3];
484 const int num_vertices,
487 const int num_polygons,
488 const int *
UNUSED(subdiv_polygon_offset))
497 subdiv_context->
coarse_mesh, num_vertices, num_edges, 0, num_loops, num_polygons,
mask);
513 const MVert *coarse_vertex,
514 MVert *subdiv_vertex)
518 const int coarse_vertex_index = coarse_vertex - coarse_mesh->
mvert;
519 const int subdiv_vertex_index = subdiv_vertex - subdiv_mesh->
mvert;
525 MVert *subdiv_vertex,
531 const float weights[4] = {(1.0f - u) * (1.0f -
v), u * (1.0f -
v), u *
v, (1.0f - u) *
v};
538 subdiv_vertex_index);
545 const int ptex_face_index,
548 const MVert *coarse_vert,
554 float D[3] = {0.0f, 0.0f, 0.0f};
573 const int ptex_face_index,
582 float D[3] = {0.0f, 0.0f, 0.0f};
600 const int ptex_face_index,
603 const int subdiv_vertex_index)
608 MVert *subdiv_vert = &subdiv_mvert[subdiv_vertex_index];
615 const int ptex_face_index,
618 const int UNUSED(coarse_vertex_index),
619 const int UNUSED(coarse_poly_index),
620 const int UNUSED(coarse_corner),
621 const int subdiv_vertex_index)
624 foreach_context, tls, ptex_face_index, u,
v, subdiv_vertex_index);
629 const int ptex_face_index,
632 const int UNUSED(coarse_edge_index),
633 const int UNUSED(coarse_poly_index),
634 const int UNUSED(coarse_corner),
635 const int subdiv_vertex_index)
638 foreach_context, tls, ptex_face_index, u,
v, subdiv_vertex_index);
643 const int ptex_face_index,
646 const int coarse_vertex_index,
647 const int UNUSED(coarse_poly_index),
648 const int UNUSED(coarse_corner),
649 const int subdiv_vertex_index)
654 const MVert *coarse_mvert = coarse_mesh->
mvert;
657 const MVert *coarse_vert = &coarse_mvert[coarse_vertex_index];
658 MVert *subdiv_vert = &subdiv_mvert[subdiv_vertex_index];
660 ctx, ptex_face_index, u,
v, coarse_vert, subdiv_vert);
665 const MPoly *coarse_poly,
666 const int coarse_corner)
693 const int ptex_face_index,
696 const int UNUSED(coarse_edge_index),
697 const int coarse_poly_index,
698 const int coarse_corner,
699 const int subdiv_vertex_index)
704 const MPoly *coarse_mpoly = coarse_mesh->
mpoly;
705 const MPoly *coarse_poly = &coarse_mpoly[coarse_poly_index];
708 MVert *subdiv_vert = &subdiv_mvert[subdiv_vertex_index];
716 if (coarse_poly->
totloop == 4) {
717 if (u == 0.5f &&
v == 0.5f) {
722 if (u == 1.0f &&
v == 1.0f) {
730 const int subdiv_vertex_index,
742 const int ptex_face_index,
745 const int coarse_poly_index,
746 const int coarse_corner,
747 const int subdiv_vertex_index)
753 const MPoly *coarse_mpoly = coarse_mesh->
mpoly;
754 const MPoly *coarse_poly = &coarse_mpoly[coarse_poly_index];
757 MVert *subdiv_vert = &subdiv_mvert[subdiv_vertex_index];
773 const MEdge *coarse_edge)
776 if (coarse_edge ==
NULL) {
779 subdiv_edge->
flag = 0;
796 const int coarse_edge_index,
797 const int subdiv_edge_index,
798 const bool UNUSED(is_loose),
805 MEdge *subdiv_edge = &subdiv_medge[subdiv_edge_index];
809 const MEdge *coarse_medge = coarse_mesh->
medge;
810 coarse_edge = &coarse_medge[coarse_edge_index];
813 subdiv_edge->
v1 = subdiv_v1;
814 subdiv_edge->
v2 = subdiv_v2;
830 const float weights[4] = {(1.0f - u) * (1.0f -
v), u * (1.0f -
v), u *
v, (1.0f - u) *
v};
843 const int ptex_face_index,
852 for (
int layer_index = 0; layer_index < ctx->
num_uv_layers; layer_index++) {
860 const MPoly *coarse_poly,
861 const int coarse_corner)
888 const int ptex_face_index,
891 const int UNUSED(coarse_loop_index),
892 const int coarse_poly_index,
893 const int coarse_corner,
894 const int subdiv_loop_index,
895 const int subdiv_vertex_index,
896 const int subdiv_edge_index)
901 const MPoly *coarse_mpoly = coarse_mesh->
mpoly;
902 const MPoly *coarse_poly = &coarse_mpoly[coarse_poly_index];
905 MLoop *subdiv_loop = &subdiv_mloop[subdiv_loop_index];
909 subdiv_loop->
v = subdiv_vertex_index;
910 subdiv_loop->
e = subdiv_edge_index;
921 const MPoly *coarse_poly)
931 const int coarse_poly_index,
932 const int subdiv_poly_index,
933 const int start_loop_index,
939 const MPoly *coarse_mpoly = coarse_mesh->
mpoly;
940 const MPoly *coarse_poly = &coarse_mpoly[coarse_poly_index];
943 MPoly *subdiv_poly = &subdiv_mpoly[subdiv_poly_index];
945 subdiv_poly->
loopstart = start_loop_index;
946 subdiv_poly->
totloop = num_loops;
957 const int coarse_vertex_index,
958 const int subdiv_vertex_index)
962 const MVert *coarse_mvert = coarse_mesh->
mvert;
963 const MVert *coarse_vertex = &coarse_mvert[coarse_vertex_index];
966 MVert *subdiv_vertex = &subdiv_mvert[subdiv_vertex_index];
975 const MEdge *neighbors[2])
977 const MEdge *coarse_medge = coarse_mesh->
medge;
980 int neighbor_counters[2] = {0, 0};
981 for (
int edge_index = 0; edge_index < coarse_mesh->
totedge; edge_index++) {
982 const MEdge *current_edge = &coarse_medge[edge_index];
983 if (current_edge == edge) {
986 if (
ELEM(edge->v1, current_edge->
v1, current_edge->
v2)) {
987 neighbors[0] = current_edge;
988 ++neighbor_counters[0];
990 if (
ELEM(edge->v2, current_edge->
v1, current_edge->
v2)) {
991 neighbors[1] = current_edge;
992 ++neighbor_counters[1];
998 if (neighbor_counters[0] > 1) {
1001 if (neighbor_counters[1] > 1) {
1002 neighbors[1] =
NULL;
1007 const MEdge *coarse_edge,
1008 const MEdge *neighbors[2],
1009 float points_r[4][3])
1011 const MVert *coarse_mvert = coarse_mesh->
mvert;
1016 if (neighbors[0] !=
NULL) {
1017 if (neighbors[0]->
v1 == coarse_edge->
v1) {
1018 copy_v3_v3(points_r[0], coarse_mvert[neighbors[0]->
v2].co);
1021 copy_v3_v3(points_r[0], coarse_mvert[neighbors[0]->
v1].co);
1025 sub_v3_v3v3(points_r[0], points_r[1], points_r[2]);
1029 if (neighbors[1] !=
NULL) {
1030 if (neighbors[1]->
v1 == coarse_edge->
v2) {
1031 copy_v3_v3(points_r[3], coarse_mvert[neighbors[1]->
v2].co);
1034 copy_v3_v3(points_r[3], coarse_mvert[neighbors[1]->
v1].co);
1038 sub_v3_v3v3(points_r[3], points_r[2], points_r[1]);
1044 const MEdge *coarse_edge,
1045 const bool is_simple,
1050 const MVert *coarse_mvert = coarse_mesh->
mvert;
1051 const MVert *vert_1 = &coarse_mvert[coarse_edge->
v1];
1052 const MVert *vert_2 = &coarse_mvert[coarse_edge->
v2];
1057 const MEdge *neighbors[2];
1068 const MEdge *coarse_edge,
1070 const int subdiv_vertex_index)
1077 const float interpolation_weights[2] = {1.0f - u, u};
1078 const int coarse_vertex_indices[2] = {coarse_edge->
v1, coarse_edge->
v2};
1080 &subdiv_mesh->
vdata,
1081 coarse_vertex_indices,
1082 interpolation_weights,
1085 subdiv_vertex_index);
1093 const int coarse_edge_index,
1095 const int subdiv_vertex_index)
1099 const MEdge *coarse_edge = &coarse_mesh->
medge[coarse_edge_index];
1105 if (!
ELEM(u, 0.0, 1.0)) {
1109 MVert *subdiv_vertex = &subdiv_mvert[subdiv_vertex_index];
1111 coarse_mesh, coarse_edge, is_simple, u, subdiv_vertex->
co);
1113 subdiv_vertex->
flag = 0;
1116 subdiv_vertex->
bweight = 0.0f;
1128 memset(foreach_context, 0,
sizeof(*foreach_context));
1155 const Mesh *coarse_mesh)
1174 subdiv_context.
settings = settings;
1176 subdiv_context.
subdiv = subdiv;
1183 foreach_context.
user_data = &subdiv_context;
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
const CustomData_MeshMasks CD_MASK_EVERYTHING
void CustomData_free(struct CustomData *data, int totelem)
int CustomData_number_of_layers(const struct CustomData *data, int type)
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
void CustomData_interp(const struct CustomData *source, struct CustomData *dest, const int *src_indices, const float *weights, const float *sub_weights, int count, int dest_index)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
void * CustomData_get_layer(const struct CustomData *data, int type)
void CustomData_free_elem(struct CustomData *data, int index, int count)
void CustomData_copy_data(const struct CustomData *source, struct CustomData *dest, int source_index, int dest_index, int count)
void key_curve_position_weights(float t, float data[4], int type)
bool BKE_mesh_poly_normals_are_dirty(const struct Mesh *mesh)
bool BKE_mesh_vertex_normals_are_dirty(const struct Mesh *mesh)
struct Mesh * BKE_mesh_new_nomain_from_template_ex(const struct Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len, struct CustomData_MeshMasks mask)
@ SUBDIV_STATS_SUBDIV_TO_MESH_GEOMETRY
@ SUBDIV_STATS_SUBDIV_TO_MESH
void BKE_subdiv_stats_end(SubdivStats *stats, eSubdivStatsValue value)
void BKE_subdiv_stats_begin(SubdivStats *stats, eSubdivStatsValue value)
@ SUBDIV_EVALUATOR_TYPE_CPU
void BKE_subdiv_eval_vertex_data(struct Subdiv *subdiv, const int ptex_face_index, const float u, const float v, float r_vertex_data[])
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv, int ptex_face_index, float u, float v, const float dPdu[3], const float dPdv[3], float r_D[3])
void BKE_subdiv_eval_final_point(struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3])
void BKE_subdiv_eval_limit_point(struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3])
void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv, int face_varying_channel, int ptex_face_index, float u, float v, float r_face_varying[2])
bool BKE_subdiv_eval_begin_from_mesh(struct Subdiv *subdiv, const struct Mesh *mesh, const float(*coarse_vertex_cos)[3], eSubdivEvaluatorType evaluator_type, struct OpenSubdiv_EvaluatorCache *evaluator_cache)
void BKE_subdiv_eval_limit_point_and_derivatives(struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_dPdu[3], float r_dPdv[3])
bool BKE_subdiv_foreach_subdiv_geometry(struct Subdiv *subdiv, const struct SubdivForeachContext *context, const struct SubdivToMeshSettings *mesh_settings, const struct Mesh *coarse_mesh)
#define BLI_array_alloca(arr, realsize)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_DISABLE(_bitmap, _index)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4])
MINLINE void add_v3_v3(float r[3], const float a[3])
#define CD_MASK_MULTIRES_GRIDS
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
ccl_gpu_kernel_postfix int ccl_global int * indices
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
bool loop_data_storage_allocated
const CustomData * loop_data
CustomData loop_data_storage
const MLoop * second_loop
uint32_t * subsurf_face_dot_tags
SubdivForeachVertexFromEdgeCb vertex_every_edge
SubdivForeachPolygonCb poly
SubdivForeachTopologyInformationCb topology_info
size_t user_data_tls_size
SubdivForeachLooseCb vertex_loose
SubdivForeachVertexInnerCb vertex_inner
SubdivForeachVertexOfLooseEdgeCb vertex_of_loose_edge
void(* user_data_tls_free)(void *tls)
SubdivForeachVertexFromEdgeCb vertex_edge
SubdivForeachVertexFromCornerCb vertex_corner
SubdivForeachVertexFromCornerCb vertex_every_corner
int * accumulated_counters
const SubdivToMeshSettings * settings
MLoopUV * uv_layers[MAX_MTFACE]
const MPoly * loop_interpolation_coarse_poly
VerticesForInterpolation vertex_interpolation
int loop_interpolation_coarse_corner
bool loop_interpolation_initialized
bool vertex_interpolation_initialized
const MPoly * vertex_interpolation_coarse_poly
int vertex_interpolation_coarse_corner
LoopsForInterpolation loop_interpolation
struct SubdivDisplacement * displacement_evaluator
CustomData vertex_data_storage
const CustomData * vertex_data
bool vertex_data_storage_allocated
static void points_for_loose_edges_interpolation_get(const Mesh *coarse_mesh, const MEdge *coarse_edge, const MEdge *neighbors[2], float points_r[4][3])
static void subdiv_vertex_data_interpolate(const SubdivMeshContext *ctx, MVert *subdiv_vertex, const VerticesForInterpolation *vertex_interpolation, const float u, const float v)
static void subdiv_mesh_loop(const SubdivForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int UNUSED(coarse_loop_index), const int coarse_poly_index, const int coarse_corner, const int subdiv_loop_index, const int subdiv_vertex_index, const int subdiv_edge_index)
static void loop_interpolation_init(const SubdivMeshContext *ctx, LoopsForInterpolation *loop_interpolation, const MPoly *coarse_poly)
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 subdiv_vertex_index)
static void evaluate_vertex_and_apply_displacement_copy(const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, const MVert *coarse_vert, MVert *subdiv_vert)
static void subdiv_mesh_vertex_displacement_every_edge(const SubdivForeachContext *foreach_context, void *tls, const int ptex_face_index, const float u, const float v, const int UNUSED(coarse_edge_index), const int UNUSED(coarse_poly_index), const int UNUSED(coarse_corner), const int subdiv_vertex_index)
struct SubdivMeshTLS SubdivMeshTLS
static void subdiv_mesh_tag_center_vertex(const MPoly *coarse_poly, const int subdiv_vertex_index, const float u, const float v, Mesh *subdiv_mesh)
static void subdiv_mesh_vertex_of_loose_edge(const struct SubdivForeachContext *foreach_context, void *UNUSED(tls), const int coarse_edge_index, const float u, const int subdiv_vertex_index)
static void loops_of_ptex_get(const SubdivMeshContext *ctx, LoopsOfPtex *loops_of_ptex, const MPoly *coarse_poly, const int ptex_of_poly_index)
static void vertex_interpolation_from_corner(const SubdivMeshContext *ctx, VerticesForInterpolation *vertex_interpolation, const MPoly *coarse_poly, const int corner)
struct VerticesForInterpolation VerticesForInterpolation
static void subdiv_copy_poly_data(const SubdivMeshContext *ctx, MPoly *subdiv_poly, const MPoly *coarse_poly)
void BKE_subdiv_mesh_interpolate_position_on_edge(const Mesh *coarse_mesh, const MEdge *coarse_edge, const bool is_simple, const float u, float pos_r[3])
static void subdiv_mesh_context_free(SubdivMeshContext *ctx)
static bool subdiv_mesh_is_center_vertex(const MPoly *coarse_poly, const float u, const float v)
static void loop_interpolation_end(LoopsForInterpolation *loop_interpolation)
struct LoopsOfPtex LoopsOfPtex
static bool subdiv_mesh_topology_info(const SubdivForeachContext *foreach_context, const int num_vertices, const int num_edges, const int num_loops, const int num_polygons, const int *UNUSED(subdiv_polygon_offset))
static void subdiv_interpolate_loop_data(const SubdivMeshContext *ctx, MLoop *subdiv_loop, const LoopsForInterpolation *loop_interpolation, const float u, const float v)
static void setup_foreach_callbacks(const SubdivMeshContext *subdiv_context, SubdivForeachContext *foreach_context)
static void subdiv_mesh_ensure_vertex_interpolation(SubdivMeshContext *ctx, SubdivMeshTLS *tls, const MPoly *coarse_poly, const int coarse_corner)
static void subdiv_mesh_tls_free(void *tls_v)
static void subdiv_vertex_data_copy(const SubdivMeshContext *ctx, const MVert *coarse_vertex, MVert *subdiv_vertex)
static void subdiv_accumulate_vertex_displacement(SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, MVert *subdiv_vert)
static void subdiv_eval_uv_layer(SubdivMeshContext *ctx, MLoop *subdiv_loop, const int ptex_face_index, const float u, const float v)
static void subdiv_mesh_vertex_of_loose_edge_interpolate(SubdivMeshContext *ctx, const MEdge *coarse_edge, const float u, const int subdiv_vertex_index)
static void subdiv_mesh_ctx_cache_custom_data_layers(SubdivMeshContext *ctx)
static void subdiv_mesh_vertex_displacement_every_corner(const SubdivForeachContext *foreach_context, void *tls, const int ptex_face_index, const float u, const float v, const int UNUSED(coarse_vertex_index), const int UNUSED(coarse_poly_index), const int UNUSED(coarse_corner), const int subdiv_vertex_index)
static void vertex_interpolation_end(VerticesForInterpolation *vertex_interpolation)
static void evaluate_vertex_and_apply_displacement_interpolate(const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, VerticesForInterpolation *vertex_interpolation, MVert *subdiv_vert)
static void subdiv_mesh_poly(const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int coarse_poly_index, const int subdiv_poly_index, const int start_loop_index, const int num_loops)
struct SubdivMeshContext SubdivMeshContext
static void subdiv_mesh_vertex_inner(const SubdivForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int coarse_poly_index, const int coarse_corner, const int subdiv_vertex_index)
static void subdiv_copy_edge_data(SubdivMeshContext *ctx, MEdge *subdiv_edge, const MEdge *coarse_edge)
static void subdiv_mesh_vertex_edge(const SubdivForeachContext *foreach_context, void *tls_v, const int ptex_face_index, const float u, const float v, const int UNUSED(coarse_edge_index), const int coarse_poly_index, const int coarse_corner, const int subdiv_vertex_index)
static void vertex_interpolation_init(const SubdivMeshContext *ctx, VerticesForInterpolation *vertex_interpolation, const MPoly *coarse_poly)
Mesh * BKE_subdiv_to_mesh(Subdiv *subdiv, const SubdivToMeshSettings *settings, const Mesh *coarse_mesh)
static void subdiv_mesh_vertex_displacement_every_corner_or_edge(const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int ptex_face_index, const float u, const float v, const int subdiv_vertex_index)
static void subdiv_mesh_edge(const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int coarse_edge_index, const int subdiv_edge_index, const bool UNUSED(is_loose), const int subdiv_v1, const int subdiv_v2)
static void loop_interpolation_from_corner(const SubdivMeshContext *ctx, LoopsForInterpolation *loop_interpolation, const MPoly *coarse_poly, const int corner)
struct LoopsForInterpolation LoopsForInterpolation
static void subdiv_mesh_ctx_cache_uv_layers(SubdivMeshContext *ctx)
static void subdiv_vertex_orco_evaluate(const SubdivMeshContext *ctx, const int ptex_face_index, const float u, const float v, const int subdiv_vertex_index)
static void subdiv_mesh_vertex_loose(const SubdivForeachContext *foreach_context, void *UNUSED(tls), const int coarse_vertex_index, const int subdiv_vertex_index)
static void subdiv_mesh_ensure_loop_interpolation(SubdivMeshContext *ctx, SubdivMeshTLS *tls, const MPoly *coarse_poly, const int coarse_corner)
static void subdiv_mesh_prepare_accumulator(SubdivMeshContext *ctx, int num_vertices)
static void find_edge_neighbors(const Mesh *coarse_mesh, const MEdge *edge, const MEdge *neighbors[2])
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)