Differential D16893 Diff 59975 source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| if (ml_index == mp->loopstart) { | if (ml_index == mp->loopstart) { | ||||
| /* First loop in face. */ | /* First loop in face. */ | ||||
| const int ml_index_last = ml_index_end - 1; | const int ml_index_last = ml_index_end - 1; | ||||
| const int l_next_tmp = mp->loopstart; | const int l_next_tmp = mp->loopstart; | ||||
| compute_normalize_edge_vectors(auv, | compute_normalize_edge_vectors(auv, | ||||
| av, | av, | ||||
| data->uv[ml_index_last], | data->uv[ml_index_last], | ||||
| data->uv[l_next_tmp], | data->uv[l_next_tmp], | ||||
| mr->vert_positions[mr->mloop[ml_index_last].v], | mr->vert_positions[mr->corner_verts[ml_index_last]], | ||||
| mr->vert_positions[mr->mloop[l_next_tmp].v]); | mr->vert_positions[mr->corner_verts[l_next_tmp]]); | ||||
| /* Save last edge. */ | /* Save last edge. */ | ||||
| copy_v2_v2(last_auv, auv[1]); | copy_v2_v2(last_auv, auv[1]); | ||||
| copy_v3_v3(last_av, av[1]); | copy_v3_v3(last_av, av[1]); | ||||
| } | } | ||||
| if (l_next == ml_index_end) { | if (l_next == ml_index_end) { | ||||
| l_next = mp->loopstart; | l_next = mp->loopstart; | ||||
| /* Move previous edge. */ | /* Move previous edge. */ | ||||
| copy_v2_v2(auv[0], auv[1]); | copy_v2_v2(auv[0], auv[1]); | ||||
| copy_v3_v3(av[0], av[1]); | copy_v3_v3(av[0], av[1]); | ||||
| /* Copy already calculated last edge. */ | /* Copy already calculated last edge. */ | ||||
| copy_v2_v2(auv[1], last_auv); | copy_v2_v2(auv[1], last_auv); | ||||
| copy_v3_v3(av[1], last_av); | copy_v3_v3(av[1], last_av); | ||||
| } | } | ||||
| else { | else { | ||||
| compute_normalize_edge_vectors(auv, | compute_normalize_edge_vectors(auv, | ||||
| av, | av, | ||||
| data->uv[ml_index], | data->uv[ml_index], | ||||
| data->uv[l_next], | data->uv[l_next], | ||||
| mr->vert_positions[mr->mloop[ml_index].v], | mr->vert_positions[mr->corner_verts[ml_index]], | ||||
| mr->vert_positions[mr->mloop[l_next].v]); | mr->vert_positions[mr->corner_verts[l_next]]); | ||||
| } | } | ||||
| edituv_get_edituv_stretch_angle(auv, av, &data->vbo_data[ml_index]); | edituv_get_edituv_stretch_angle(auv, av, &data->vbo_data[ml_index]); | ||||
| } | } | ||||
| } | } | ||||
| static GPUVertFormat *get_edituv_stretch_angle_format_subdiv() | static GPUVertFormat *get_edituv_stretch_angle_format_subdiv() | ||||
| { | { | ||||
| static GPUVertFormat format = {0}; | static GPUVertFormat format = {0}; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||