91 const double *override_camera_loc,
92 const bool override_cam_is_persp,
93 const bool allow_overlapping_edges,
94 const double m_view_projection[4][4],
95 const double camera_dir[3],
96 const float cam_shift_x,
97 const float cam_shift_y,
107 bool do_intersection,
154 uchar material_mask_bits,
187 for (seg =
e->segments.first; seg; seg = seg->
next) {
189 cut_start_before = seg;
190 new_seg1 = cut_start_before;
197 if (i_seg->
ratio > start + 1
e-09 && start > seg->
ratio) {
198 cut_start_before = i_seg;
206 for (seg = cut_start_before; seg; seg = seg->
next) {
210 cut_end_before = seg;
211 new_seg2 = cut_end_before;
217 cut_end_before = seg;
218 new_seg2 = cut_end_before;
223 if (seg->
ratio > end) {
224 cut_end_before = seg;
231 if (new_seg1 ==
NULL) {
234 if (new_seg2 ==
NULL) {
237 cut_end_before = new_seg2;
244 if (cut_start_before) {
245 if (cut_start_before != new_seg1) {
247 i_seg = cut_start_before->
prev ? cut_start_before->
prev :
NULL;
260 i_seg =
e->segments.last;
266 if (cut_end_before) {
268 if (cut_end_before != new_seg2) {
269 i_seg = cut_end_before->
prev ? cut_end_before->
prev :
NULL;
279 i_seg =
e->segments.last;
290 new_seg1->
ratio = start;
292 new_seg2->ratio = end;
296 new_seg2 = new_seg2->next;
300 for (seg = new_seg1; seg && seg != new_seg2; seg = seg->
next) {
323 for (seg =
e->segments.first; seg; seg = next_seg) {
324 next_seg = seg->
next;
340 e->min_occ = min_occ;
369 "new ba_line_array");
385 for (
int i = 0; i < nba->triangle_count; i++) {
473 for (i = 0; i < thread_count; i++) {
498 cl = (v0[0] -
v[0]) * (
v1[1] -
v[1]) - (v0[1] -
v[1]) * (
v1[0] -
v[0]);
501 cl = (
v1[0] -
v[0]) * (
v2[1] -
v[1]) - (
v1[1] -
v[1]) * (
v2[0] -
v[0]);
508 cl = (
v2[0] -
v[0]) * (v0[1] -
v[1]) - (
v2[1] -
v[1]) * (v0[0] -
v[0]);
525 double c1 = 1, c2 = 0;
531 if (
v1[0] == v0[0] &&
v1[1] == v0[1]) {
583 cl = (v0[0] -
v[0]) * (
v1[1] -
v[1]) - (v0[1] -
v[1]) * (
v1[0] -
v[0]);
586 cl = (
v1[0] -
v[0]) * (
v2[1] -
v[1]) - (
v1[1] -
v[1]) * (
v2[0] -
v[0]);
587 if ((
r =
c * cl) < 0) {
593 cl = (
v2[0] -
v[0]) * (v0[1] -
v[1]) - (
v2[1] -
v[1]) * (v0[0] -
v[0]);
594 if ((
r =
c * cl) < 0) {
600 cl = (v0[0] -
v[0]) * (
v1[1] -
v[1]) - (v0[1] -
v[1]) * (
v1[0] -
v[0]);
601 if ((
r =
c * cl) < 0) {
726 tri->
flags |= intersection_only;
731 return ((tri->
v[
v1] ==
e->v1 && tri->
v[
v2] ==
e->v2) ||
732 (tri->
v[
v2] ==
e->v1 && tri->
v[
v1] ==
e->v2));
755 bool allow_boundaries,
756 double m_view_projection[4][4],
765 double span_v1[3], span_v2[3], dot_v1, dot_v2;
767 int v_count = *r_v_count;
768 int e_count = *r_e_count;
769 int t_count = *r_t_count;
793 #define INCREASE_EDGE \
794 new_e = &((LineartEdge *)e_eln->pointer)[e_count]; \
797 es = lineart_mem_acquire(&ld->render_data_pool, sizeof(LineartEdgeSegment)); \
798 BLI_addtail(&e->segments, es);
800 #define SELECT_EDGE(e_num, v1_link, v2_link, new_tri) \
801 if (tri_adj->e[e_num]) { \
802 old_e = tri_adj->e[e_num]; \
803 new_flag = old_e->flags; \
804 old_e->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
805 lineart_discard_duplicated_edges(old_e); \
809 e->v1->index = (v1_link)->index; \
810 e->v2->index = (v1_link)->index; \
811 e->flags = new_flag; \
812 e->object_ref = ob; \
813 e->t1 = ((old_e->t1 == tri) ? (new_tri) : (old_e->t1)); \
814 e->t2 = ((old_e->t2 == tri) ? (new_tri) : (old_e->t2)); \
815 lineart_add_edge_to_array(&ld->pending_edges, e); \
818 #define RELINK_EDGE(e_num, new_tri) \
819 if (tri_adj->e[e_num]) { \
820 old_e = tri_adj->e[e_num]; \
821 old_e->t1 = ((old_e->t1 == tri) ? (new_tri) : (old_e->t1)); \
822 old_e->t2 = ((old_e->t2 == tri) ? (new_tri) : (old_e->t2)); \
825 #define REMOVE_TRIANGLE_EDGE \
826 if (tri_adj->e[0]) { \
827 tri_adj->e[0]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
828 lineart_discard_duplicated_edges(tri_adj->e[0]); \
830 if (tri_adj->e[1]) { \
831 tri_adj->e[1]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
832 lineart_discard_duplicated_edges(tri_adj->e[1]); \
834 if (tri_adj->e[2]) { \
835 tri_adj->e[2]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
836 lineart_discard_duplicated_edges(tri_adj->e[2]); \
839 switch (in0 + in1 + in2) {
880 a = dot_v1 / (dot_v1 + dot_v2);
884 vt[0].index = tri->
v[2]->
index;
891 a = dot_v1 / (dot_v1 + dot_v2);
895 vt[1].index = tri->
v[1]->
index;
899 if (allow_boundaries) {
919 tri1->
v[0] = tri->
v[0];
933 a = dot_v1 / (dot_v1 + dot_v2);
936 vt[0].index = tri->
v[0]->
index;
942 a = dot_v1 / (dot_v1 + dot_v2);
945 vt[1].index = tri->
v[1]->
index;
948 if (allow_boundaries) {
962 tri1->
v[2] = tri->
v[2];
974 a = dot_v1 / (dot_v1 + dot_v2);
977 vt[0].index = tri->
v[2]->
index;
983 a = dot_v1 / (dot_v1 + dot_v2);
986 vt[1].index = tri->
v[0]->
index;
989 if (allow_boundaries) {
1001 tri1->
v[0] = &vt[0];
1002 tri1->
v[1] = tri->
v[1];
1003 tri1->
v[2] = &vt[1];
1045 a = dot_v2 / (dot_v1 + dot_v2);
1049 vt[0].index = tri->
v[0]->
index;
1056 a = dot_v2 / (dot_v1 + dot_v2);
1060 vt[1].index = tri->
v[0]->
index;
1064 if (allow_boundaries) {
1081 tri1->
v[0] = tri->
v[1];
1082 tri1->
v[1] = &vt[1];
1083 tri1->
v[2] = &vt[0];
1085 tri2->
v[0] = &vt[1];
1086 tri2->
v[1] = tri->
v[1];
1087 tri2->
v[2] = tri->
v[2];
1101 a = dot_v1 / (dot_v1 + dot_v2);
1104 vt[0].index = tri->
v[1]->
index;
1110 a = dot_v1 / (dot_v1 + dot_v2);
1113 vt[1].index = tri->
v[1]->
index;
1116 if (allow_boundaries) {
1130 tri1->
v[0] = tri->
v[2];
1131 tri1->
v[1] = &vt[1];
1132 tri1->
v[2] = &vt[0];
1134 tri2->
v[0] = &vt[1];
1135 tri2->
v[1] = tri->
v[2];
1136 tri2->
v[2] = tri->
v[0];
1150 a = dot_v1 / (dot_v1 + dot_v2);
1153 vt[0].index = tri->
v[2]->
index;
1159 a = dot_v1 / (dot_v1 + dot_v2);
1162 vt[1].index = tri->
v[2]->
index;
1165 if (allow_boundaries) {
1179 tri1->
v[0] = tri->
v[0];
1180 tri1->
v[1] = &vt[1];
1181 tri1->
v[2] = &vt[0];
1183 tri2->
v[0] = &vt[1];
1184 tri2->
v[1] = tri->
v[0];
1185 tri2->
v[2] = tri->
v[1];
1195 *r_v_count = v_count;
1196 *r_e_count = e_count;
1197 *r_t_count = t_count;
1199 #undef INCREASE_EDGE
1202 #undef REMOVE_TRIANGLE_EDGE
1217 int v_count = 0, t_count = 0, e_count = 0;
1222 double view_dir[3], clip_advance[3];
1247 #define LRT_CULL_ENSURE_MEMORY \
1248 if (v_count > 60) { \
1249 v_eln->element_count = v_count; \
1250 v_eln = lineart_memory_get_vert_space(ld); \
1253 if (t_count > 60) { \
1254 t_eln->element_count = t_count; \
1255 t_eln = lineart_memory_get_triangle_space(ld); \
1258 if (e_count > 60) { \
1259 e_eln->element_count = e_count; \
1260 e_eln = lineart_memory_get_edge_space(ld); \
1264 #define LRT_CULL_DECIDE_INSIDE \
1266 in0 = 0, in1 = 0, in2 = 0; \
1269 if (tri->v[0]->fbcoord[use_w] > clip_end) { \
1272 if (tri->v[1]->fbcoord[use_w] > clip_end) { \
1275 if (tri->v[2]->fbcoord[use_w] > clip_end) { \
1281 if (tri->v[0]->fbcoord[use_w] < clip_start) { \
1284 if (tri->v[1]->fbcoord[use_w] < clip_start) { \
1287 if (tri->v[2]->fbcoord[use_w] < clip_start) { \
1293 int in0 = 0, in1 = 0, in2 = 0;
1306 ob = eln->object_ref;
1307 for (i = 0; i < eln->element_count; i++) {
1338 #undef LRT_CULL_ENSURE_MEMORY
1339 #undef LRT_CULL_DECIDE_INSIDE
1355 for (i = 0; i < eln->element_count; i++) {
1371 for (i = 0; i < eln->element_count; i++) {
1394 #define LRT_VERT_OUT_OF_BOUND(v) \
1395 (v && (v->fbcoord[0] < -1 || v->fbcoord[0] > 1 || v->fbcoord[1] < -1 || v->fbcoord[1] > 1))
1399 for (i = 0; i < eln->element_count; i++) {
1443 #define LRT_MESH_EDGE_TYPES_COUNT 6
1491 void *__restrict chunk_join,
1492 void *__restrict chunk)
1505 Mesh *me = e_feat_data->
me;
1514 if (i < edge_nabr[i].
e) {
1518 bool face_mark_filtered =
false;
1521 bool only_contour =
false;
1522 if (enable_face_mark) {
1526 ff1 = &((
FreestyleFace *)me->pdata.layers[index].data)[mlooptri[i / 3].poly];
1528 if (edge_nabr[i].
e > -1) {
1529 ff2 = &((
FreestyleFace *)me->pdata.layers[index].data)[mlooptri[edge_nabr[i].e / 3].poly];
1540 face_mark_filtered =
true;
1545 face_mark_filtered =
true;
1549 face_mark_filtered = !face_mark_filtered;
1551 if (!face_mark_filtered) {
1554 only_contour =
true;
1559 if (enable_face_mark && !face_mark_filtered && !only_contour) {
1564 if (edge_nabr[i].
e == -1) {
1574 int f1 = i / 3, f2 = edge_nabr[i].e / 3;
1580 vert = &e_feat_data->
v_array[edge_nabr[i].v1];
1582 double view_vector_persp[3];
1583 double *view_vector = view_vector_persp;
1584 double dot_v1 = 0, dot_v2 = 0;
1599 if ((
result = dot_v1 * dot_v2) <= 0 && (dot_v1 + dot_v2)) {
1611 if (material_back_face) {
1622 view_vector = view_vector_persp;
1633 if ((
result = dot_v1 * dot_v2) <= 0 && (dot_v1 + dot_v2)) {
1638 if (!only_contour) {
1641 bool do_crease =
true;
1643 (me->mpoly[mlooptri[f1].poly].flag &
ME_SMOOTH) &&
1644 (me->mpoly[mlooptri[f2].poly].flag &
ME_SMOOTH)) {
1652 int mat1 = me->mpoly[mlooptri[f1].poly].mat_nr;
1653 int mat2 = me->mpoly[mlooptri[f2].poly].mat_nr;
1671 if (!edge_flag_result) {
1679 if (real_edges[i % 3] >= 0) {
1680 MEdge *medge = &me->medge[real_edges[i % 3]];
1689 fe = &((
FreestyleEdge *)me->edata.layers[index].data)[real_edges[i % 3]];
1696 edge_nabr[i].flags = edge_flag_result;
1698 if (edge_flag_result) {
1732 if (new_count >= loose_data->
loose_max) {
1758 Mesh *me = loose_data->
me;
1766 void *__restrict chunk_join,
1767 void *__restrict chunk)
1782 "LineartPendingEdges array");
1788 pe->
array = new_array;
1808 "LineartPendingEdges array final");
1809 pe->
array = new_array;
1867 tri->
v[0] = &vert_arr[
v1];
1868 tri->
v[1] = &vert_arr[
v2];
1869 tri->
v[2] = &vert_arr[v3];
1929 adj_e->
v1 = mloop[looptri->
tri[i % 3]].
v;
1930 adj_e->
v2 = mloop[looptri->
tri[(i + 1) % 3]].
v;
1931 if (adj_e->
v1 > adj_e->
v2) {
1936 edge_nabr->
v1 = adj_e->
v1;
1937 edge_nabr->
v2 = adj_e->
v2;
1938 edge_nabr->
flags = 0;
1945 "LineartAdjacentEdge arr");
1947 "LineartEdgeNeighbor arr");
1957 en_data.
adj_e = adj_e;
1966 for (
int i = 0; i < total_edges - 1; i++) {
1967 if (adj_e[i].
v1 == adj_e[i + 1].
v1 && adj_e[i].
v2 == adj_e[i + 1].
v2) {
1968 edge_nabr[adj_e[i].
e].
e = adj_e[i + 1].
e;
1969 edge_nabr[adj_e[i + 1].
e].
e = adj_e[i].
e;
1999 bool can_find_freestyle_edge =
false;
2001 if (layer_index != -1) {
2002 can_find_freestyle_edge =
true;
2005 bool can_find_freestyle_face =
false;
2007 if (layer_index != -1) {
2008 can_find_freestyle_face =
true;
2032 ob_info->
v_eln = elem_link_node;
2034 bool use_auto_smooth =
false;
2035 float crease_angle = 0;
2041 use_auto_smooth =
true;
2061 int usage = ob_info->
usage;
2069 "LineartTriangleAdjacent");
2084 vert_data.
v_arr = la_v_arr;
2102 tri_data.
tri_arr = la_tri_arr;
2106 uint32_t total_edges = tot_tri * 3;
2124 edge_feat_data.
ld = la_data;
2125 edge_feat_data.
me = me;
2127 edge_feat_data.
mlooptri = mlooptri;
2130 edge_feat_data.
v_array = la_v_arr;
2148 &edge_feat_settings);
2190 la_edge = la_edge_arr;
2191 la_seg = la_seg_arr;
2193 for (
int i = 0; i < total_edges; i++) {
2196 if (i < edge_nabr->
e) {
2201 if (edge_nabr->
flags == 0) {
2210 if (!(use_type & edge_nabr->
flags)) {
2214 la_edge->
v1 = &la_v_arr[edge_nabr->
v1];
2215 la_edge->
v2 = &la_v_arr[edge_nabr->
v2];
2221 if (edge_nabr->
e != -1) {
2222 findex = edge_nabr->
e / 3;
2228 la_edge->
flags = use_type;
2252 edge_added = la_edge;
2264 for (
int i = 0; i < loose_data.
loose_count; i++) {
2313 return c->lineart_intersection_mask;
2334 return c->lineart_intersection_priority;
2353 if (object_has_special_usage) {
2357 if (
c->gobject.first) {
2364 switch (
c->lineart_usage) {
2395 int this_face_count)
2399 for (
int i = 0; i < thread_count; i++) {
2400 if (olti_list[i].total_faces < min_face) {
2402 use_olti = &olti_list[i];
2419 float mesh_min[3], mesh_max[3];
2427 for (
int i = 0; i < 8; i++) {
2431 co[i][0] -= shift_x * 2 * co[i][3];
2432 co[i][1] -= shift_y * 2 * co[i][3];
2435 bool cond[6] = {
true,
true,
true,
true,
true,
true};
2438 for (
int i = 0; i < 8; i++) {
2439 cond[0] &= (co[i][0] < -co[i][3]);
2440 cond[1] &= (co[i][0] > co[i][3]);
2441 cond[2] &= (co[i][1] < -co[i][3]);
2442 cond[3] &= (co[i][1] > co[i][3]);
2443 cond[4] &= (co[i][2] < -co[i][3]);
2444 cond[5] &= (co[i][2] > co[i][3]);
2446 for (
int i = 0; i < 6; i++) {
2459 float use_mat[4][4],
2487 if ((!use_mesh) || use_mesh->
edit_mesh) {
2528 bool allow_duplicates,
2529 bool do_shadow_casting,
2535 if (!do_shadow_casting) {
2539 double asp = ((
double)ld->
w / (
double)ld->
h);
2568 if (
G.debug_value == 4000) {
2573 int bound_box_discard_count = 0;
2587 if (allow_duplicates) {
2626 if (
G.debug_value == 4000) {
2627 printf(
"thread count: %d\n", thread_count);
2629 for (
int i = 0; i < thread_count; i++) {
2643 for (
int i = 0; i < thread_count; i++) {
2648 edge_count += obi->pending_edges.next;
2653 for (
int i = 0; i < thread_count; i++) {
2659 int v_count = obi->v_eln->element_count;
2660 obi->v_eln->global_index_offset = global_i;
2661 for (
int vi = 0; vi < v_count; vi++) {
2662 v[vi].index += global_i;
2668 obi->global_i_offset = global_i;
2669 global_i += v_count;
2674 if (
G.debug_value == 4000) {
2676 printf(
"Line art loading time: %lf\n", t_elapsed);
2677 printf(
"Discarded %d object from bound box check\n", bound_box_discard_count);
2690 if (tri->
v[0] == vt) {
2695 if (tri->
v[1] == vt) {
2700 if (tri->
v[2] == vt) {
2710 bool allow_overlapping_edges)
2729 if (allow_overlapping_edges) {
2730 #define LRT_TRI_SAME_POINT(tri, i, pt) \
2731 ((LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[0], pt->gloc[0]) && \
2732 LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[1], pt->gloc[1]) && \
2733 LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[2], pt->gloc[2])) || \
2734 (LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[0], pt->gloc[0]) && \
2735 LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[1], pt->gloc[1]) && \
2736 LRT_DOUBLE_CLOSE_ENOUGH(tri->v[i]->gloc[2], pt->gloc[2])))
2743 #undef LRT_TRI_SAME_POINT
2750 #define INTERSECT_SORT_MIN_TO_MAX_3(ia, ib, ic, lst) \
2752 lst[0] = LRT_MIN3_INDEX(ia, ib, ic); \
2753 lst[1] = (((ia <= ib && ib <= ic) || (ic <= ib && ib <= ia)) ? \
2755 (((ic <= ia && ia <= ib) || (ib < ia && ia <= ic)) ? 0 : 2)); \
2756 lst[2] = LRT_MAX3_INDEX(ia, ib, ic); \
2760 #define INTERSECT_JUST_GREATER(is, order, num, index) \
2762 index = (num < is[order[0]] ? \
2764 (num < is[order[1]] ? order[1] : (num < is[order[2]] ? order[2] : -1))); \
2768 #define INTERSECT_JUST_SMALLER(is, order, num, index) \
2770 index = (num > is[order[2]] ? \
2772 (num > is[order[1]] ? order[1] : (num > is[order[0]] ? order[0] : -1))); \
2775 #define LRT_ISEC(index) (index == 0 ? isec_e1 : (index == 1 ? isec_e2 : isec_e3))
2776 #define LRT_PARALLEL(index) (index == 0 ? para_e1 : (index == 1 ? para_e2 : para_e3))
2802 const double *override_camera_loc,
2803 const bool override_cam_is_persp,
2804 const bool allow_overlapping_edges,
2805 const double m_view_projection[4][4],
2806 const double camera_dir[3],
2807 const float cam_shift_x,
2808 const float cam_shift_y,
2812 double cross_ratios[3] = {0};
2814 int cross_v1 = -1, cross_v2 = -1;
2816 int isec_e1, isec_e2, isec_e3;
2818 bool para_e1, para_e2, para_e3;
2823 double view_vector[4];
2825 double dot_v1, dot_v2, dot_v1a, dot_v2a;
2827 double gloc[4], trans[4];
2830 double *LFBC =
e->v1->fbcoord, *RFBC =
e->v2->fbcoord, *FBC0 = tri->
v[0]->
fbcoord,
2834 if ((
MAX3(FBC0[0], FBC1[0], FBC2[0]) <
MIN2(LFBC[0], RFBC[0])) ||
2835 (
MIN3(FBC0[0], FBC1[0], FBC2[0]) >
MAX2(LFBC[0], RFBC[0])) ||
2836 (
MAX3(FBC0[1], FBC1[1], FBC2[1]) <
MIN2(LFBC[1], RFBC[1])) ||
2837 (
MIN3(FBC0[1], FBC1[1], FBC2[1]) >
MAX2(LFBC[1], RFBC[1])) ||
2838 (
MIN3(FBC0[3], FBC1[3], FBC2[3]) >
MAX2(LFBC[3], RFBC[3]))) {
2860 if (override_cam_is_persp) {
2885 if (
fabs(dot_f) < FLT_EPSILON) {
2894 if (!isec_e1 && !isec_e2 && !isec_e3) {
2896 if ((!state_v1) && (!state_v2)) {
2903 dot_v1a =
fabs(dot_v1);
2904 if (dot_v1a < DBL_EPSILON) {
2908 dot_v2a =
fabs(dot_v2);
2909 if (dot_v2a < DBL_EPSILON) {
2913 if (dot_v1 - dot_v2 == 0) {
2916 else if (dot_v1 * dot_v2 <= 0) {
2917 cut = dot_v1a /
fabs(dot_v1 - dot_v2);
2920 cut =
fabs(dot_v2 + dot_v1) /
fabs(dot_v1 - dot_v2);
2921 cut = dot_v2a > dot_v1a ? 1 - cut : cut;
2925 if (override_cam_is_persp) {
2929 trans[0] -= cam_shift_x * 2;
2930 trans[1] -= cam_shift_y * 2;
2932 if (
fabs(
e->v1->fbcoord[0] -
e->v2->fbcoord[0]) >
2933 fabs(
e->v1->fbcoord[1] -
e->v2->fbcoord[1])) {
2934 cut =
ratiod(
e->v1->fbcoord[0],
e->v2->fbcoord[0], trans[0]);
2937 cut =
ratiod(
e->v1->fbcoord[1],
e->v2->fbcoord[1], trans[1]);
2941 #define LRT_GUARD_NOT_FOUND \
2942 if (cross_v1 < 0 || cross_v2 < 0) { \
3033 if (cross_v1 >= 0 &&
LRT_ISEC(cross_v1)) {
3037 if (cross_v1 >= 0) {
3039 if (cross_v1 >= 0) {
3049 double dot_1f = dot_v1 * dot_f, dot_2f = dot_v2 * dot_f;
3052 if (dot_1f <= 0 && dot_2f <= 0 && (dot_v1 || dot_v2)) {
3053 *
from =
MAX2(0, cross_ratios[cross_v1]);
3054 *to =
MIN2(1, cross_ratios[cross_v2]);
3060 if (dot_1f >= 0 && dot_2f <= 0 && (dot_v1 || dot_v2)) {
3061 *
from =
MAX2(cut, cross_ratios[cross_v1]);
3062 *to =
MIN2(1, cross_ratios[cross_v2]);
3068 if (dot_1f <= 0 && dot_2f >= 0 && (dot_v1 || dot_v2)) {
3069 *
from =
MAX2(0, cross_ratios[cross_v1]);
3070 *to =
MIN2(cut, cross_ratios[cross_v2]);
3081 #undef INTERSECT_SORT_MIN_TO_MAX_3
3082 #undef INTERSECT_JUST_GREATER
3083 #undef INTERSECT_JUST_SMALLER
3093 if (
l->
v[0]->index ==
r->v[0]->index) {
3094 if (
l->
v[1]->index ==
r->v[1]->index ||
l->
v[1]->index ==
r->v[2]->index ||
3095 l->
v[2]->index ==
r->v[2]->index ||
l->
v[2]->index ==
r->v[1]->index) {
3099 if (
l->
v[0]->index ==
r->v[1]->index) {
3100 if (
l->
v[1]->index ==
r->v[0]->index ||
l->
v[1]->index ==
r->v[2]->index ||
3101 l->
v[2]->index ==
r->v[2]->index ||
l->
v[2]->index ==
r->v[0]->index) {
3105 if (
l->
v[0]->index ==
r->v[2]->index) {
3106 if (
l->
v[1]->index ==
r->v[1]->index ||
l->
v[1]->index ==
r->v[0]->index ||
3107 l->
v[2]->index ==
r->v[0]->index ||
l->
v[2]->index ==
r->v[1]->index) {
3111 if (
l->
v[1]->index ==
r->v[0]->index) {
3112 if (
l->
v[2]->index ==
r->v[1]->index ||
l->
v[2]->index ==
r->v[2]->index ||
3113 l->
v[0]->index ==
r->v[2]->index ||
l->
v[0]->index ==
r->v[1]->index) {
3117 if (
l->
v[1]->index ==
r->v[1]->index) {
3118 if (
l->
v[2]->index ==
r->v[0]->index ||
l->
v[2]->index ==
r->v[2]->index ||
3119 l->
v[0]->index ==
r->v[2]->index ||
l->
v[0]->index ==
r->v[0]->index) {
3123 if (
l->
v[1]->index ==
r->v[2]->index) {
3124 if (
l->
v[2]->index ==
r->v[1]->index ||
l->
v[2]->index ==
r->v[0]->index ||
3125 l->
v[0]->index ==
r->v[0]->index ||
l->
v[0]->index ==
r->v[1]->index) {
3137 if (
l->
v[0] ==
r->v[0]) {
3140 if (
l->
v[0] ==
r->v[1]) {
3143 if (
l->
v[0] ==
r->v[2]) {
3146 if (
l->
v[1] ==
r->v[0]) {
3149 if (
l->
v[1] ==
r->v[1]) {
3152 if (
l->
v[1] ==
r->v[2]) {
3155 if (
l->
v[2] ==
r->v[0]) {
3158 if (
l->
v[2] ==
r->v[1]) {
3161 if (
l->
v[2] ==
r->v[2]) {
3172 double dir_v1[3], dir_v2[3];
3173 double dot_v1, dot_v2;
3182 if (dot_v1 * dot_v2 > 0 || (!dot_v1 && !dot_v2)) {
3186 dot_v1 =
fabs(dot_v1);
3187 dot_v2 =
fabs(dot_v2);
3289 "LineartIsecSingle");
3293 th->
array = new_array;
3298 isec_single->
tri1 = tri1;
3299 isec_single->
tri2 = tri2;
3306 #define LRT_ISECT_TRIANGLE_PER_THREAD 4096
3324 while (remaining > 0 && eln) {
3326 int added_count =
MIN2(remaining, remaining_this_eln);
3327 remaining -= added_count;
3328 if (remaining || added_count == remaining_this_eln) {
3355 d->thread_count = thread_count;
3360 for (
int i = 0; i < thread_count; i++) {
3372 for (
int i = 0; i < d->thread_count; i++) {
3390 double *G0 = tri->
v[0]->
gloc, *G1 = tri->
v[1]->
gloc, *G2 = tri->
v[2]->
gloc;
3393 for (
int i = 0; i < up_to; i++) {
3411 double *RG0 = testing_triangle->
v[0]->
gloc, *RG1 = testing_triangle->
v[1]->
gloc,
3412 *RG2 = testing_triangle->
v[2]->
gloc;
3415 if ((
MIN3(G0[2], G1[2], G2[2]) >
MAX3(RG0[2], RG1[2], RG2[2])) ||
3416 (
MAX3(G0[2], G1[2], G2[2]) <
MIN3(RG0[2], RG1[2], RG2[2])) ||
3417 (
MIN3(G0[0], G1[0], G2[0]) >
MAX3(RG0[0], RG1[0], RG2[0])) ||
3418 (
MAX3(G0[0], G1[0], G2[0]) <
MIN3(RG0[0], RG1[0], RG2[0])) ||
3419 (
MIN3(G0[1], G1[1], G2[1]) >
MAX3(RG0[1], RG1[1], RG2[1])) ||
3420 (
MAX3(G0[1], G1[1], G2[1]) <
MIN3(RG0[1], RG1[1], RG2[1])) ||
3427 double iv1[3], iv2[3];
3439 float direction[3] = {0, 0, 1};
3442 float obmat_no_scale[4][4];
3471 for (
int i = 0; i < 4; i++) {
3528 if (
G.debug_value == 4000) {
3529 printf(
"LRT: Destroyed render data.\n");
3565 double clipping_offset = 0;
3569 clipping_offset = 0.0001;
3573 if (active_camera) {
3596 double asp = ((
double)ld->
w / (
double)ld->
h);
3707 if (ld->
w > ld->
h) {
3708 sp_w = sp_h * ld->
w / ld->
h;
3711 sp_h = sp_w * ld->
h / ld->
w;
3716 double span_w = (
double)1 / sp_w * 2.0;
3717 double span_h = (
double)1 / sp_h * 2.0;
3732 for (row = 0; row < sp_h; row++) {
3737 ba->
l = span_w *
col - 1.0;
3738 ba->
r = (
col == sp_w - 1) ? 1.0 : (span_w * (
col + 1) - 1.0);
3739 ba->
u = 1.0 - span_h * row;
3740 ba->
b = (row == sp_h - 1) ? -1.0 : (1.0 - span_h * (row + 1));
3742 ba->
cx = (ba->
l + ba->
r) / 2;
3743 ba->
cy = (ba->
u + ba->
b) / 2;
3749 "ba_linked_triangles");
3788 if (ba[1].u > tba->
b && ba[1].
b < tba->u) {
3792 if (ba[2].u > tba->
b && ba[2].
b < tba->u) {
3799 if (ba[0].u > tba->
b && ba[0].
b < tba->u) {
3803 if (ba[3].u > tba->
b && ba[3].
b < tba->u) {
3810 if (ba[0].
r > tba->l && ba[0].
l < tba->r) {
3814 if (ba[1].
r > tba->l && ba[1].
l < tba->r) {
3821 if (ba[2].
r > tba->l && ba[2].
l < tba->r) {
3825 if (ba[3].
r > tba->l && ba[3].
l < tba->r) {
3835 next_lip = lip2->
next;
3839 if (ba[1].u > tba->
b && ba[1].
b < tba->u) {
3842 if (ba[2].u > tba->
b && ba[2].
b < tba->u) {
3850 next_lip = lip2->
next;
3854 if (ba[0].u > tba->
b && ba[0].
b < tba->u) {
3857 if (ba[3].u > tba->
b && ba[3].
b < tba->u) {
3865 next_lip = lip2->
next;
3869 if (ba[0].
r > tba->l && ba[0].
l < tba->r) {
3872 if (ba[1].
r > tba->l && ba[1].
l < tba->r) {
3880 next_lip = lip2->
next;
3884 if (ba[2].
r > tba->l && ba[2].
l < tba->r) {
3887 if (ba[3].
r > tba->l && ba[3].
l < tba->r) {
3905 for (
int i = 0; i < 4; i++) {
3938 for (
int i = 0; i < total_tile_initial; i++) {
3949 int recursive_level)
3958 ba[0].
cx = (ba[0].
l + ba[0].
r) / 2;
3959 ba[0].
cy = (ba[0].
u + ba[0].
b) / 2;
3965 ba[1].
cx = (ba[1].
l + ba[1].
r) / 2;
3966 ba[1].
cy = (ba[1].
u + ba[1].
b) / 2;
3972 ba[2].
cx = (ba[2].
l + ba[2].
r) / 2;
3973 ba[2].
cy = (ba[2].
u + ba[2].
b) / 2;
3979 ba[3].
cx = (ba[3].
l + ba[3].
r) / 2;
3980 ba[3].
cy = (ba[3].
u + ba[3].
b) / 2;
3983 for (
int i = 0; i < 4; i++) {
3987 "ba_linked_triangles");
4029 double converted[4];
4032 if (((converted[0] = ba->
l) >
MAX2(
l[0],
r[0])) || ((converted[1] = ba->
r) <
MIN2(
l[0],
r[0])) ||
4033 ((converted[2] = ba->
b) >
MAX2(
l[1],
r[1])) || ((converted[3] = ba->
u) <
MIN2(
l[1],
r[1]))) {
4040 c1 = dx * (converted[2] -
l[1]) - dy * (converted[0] -
l[0]);
4043 c1 = dx * (converted[2] -
l[1]) - dy * (converted[1] -
l[0]);
4049 c1 = dx * (converted[3] -
l[1]) - dy * (converted[0] -
l[0]);
4055 c1 = dx * (converted[3] -
l[1]) - dy * (converted[1] -
l[0]);
4067 bool *r_triangle_vert_inside)
4069 double p1[2], p2[2], p3[2], p4[2];
4072 p3[0] = p1[0] = ba->
l;
4073 p2[1] = p1[1] = ba->
b;
4074 p2[0] = p4[0] = ba->
r;
4075 p3[1] = p4[1] = ba->
u;
4077 if ((FBC1[0] >= p1[0] && FBC1[0] <= p2[0] && FBC1[1] >= p1[1] && FBC1[1] <= p3[1]) ||
4078 (FBC2[0] >= p1[0] && FBC2[0] <= p2[0] && FBC2[1] >= p1[1] && FBC2[1] <= p3[1]) ||
4079 (FBC3[0] >= p1[0] && FBC3[0] <= p2[0] && FBC3[1] >= p1[1] && FBC3[1] <= p3[1])) {
4080 *r_triangle_vert_inside =
true;
4084 *r_triangle_vert_inside =
false;
4120 int recursive_level,
4121 bool do_intersection,
4124 bool triangle_vert_inside;
4131 if (old_ba->
child) {
4134 double *
B1 = l_r_u_b;
4143 for (
int iba = 0; iba < 4; iba++) {
4146 ld, &old_ba->
child[iba], tri,
B1, recursive, recursive_level + 1, do_intersection, th);
4164 if (triangle_vert_inside) {
4180 if (recursive_level < ld->qtree.recursive_level &&
4182 if (!old_ba->
child) {
4201 ld, root_ba, tri, l_r_u_b, recursive, recursive_level, do_intersection, th);
4214 if (recursive && ba->
child) {
4215 for (
int i = 0; i < 4; i++) {
4238 ld,
e->v1->fbcoord,
e->v2->fbcoord, &root_ba->
child[0])) {
4242 ld,
e->v1->fbcoord,
e->v2->fbcoord, &root_ba->
child[1])) {
4246 ld,
e->v1->fbcoord,
e->v2->fbcoord, &root_ba->
child[2])) {
4250 ld,
e->v1->fbcoord,
e->v2->fbcoord, &root_ba->
child[3])) {
4258 if (root_ba->
child) {
4259 for (
int i = 0; i < 4; i++) {
4269 "cleared lineart edges");
4288 int r1, r2, c1, c2, row,
col;
4290 for (row = r1; row != r2 + 1; row++) {
4305 for (
int i = 0; i < 4; i++) {
4315 int usable_count = 0;
4318 if (
e->min_occ > max_occlusion) {
4324 if (!usable_count) {
4330 "cleaned lineart edge array");
4335 if (
e->min_occ > max_occlusion) {
4338 new_array[new_i] =
e;
4363 if (!tri->
v[0] || !tri->
v[1] || !tri->
v[2]) {
4372 if (
b[0] > 1 ||
b[1] < -1 ||
b[2] > 1 ||
b[3] < -1) {
4376 (*colbegin) = (int)((
b[0] + 1.0) / sp_w);
4377 (*colend) = (int)((
b[1] + 1.0) / sp_w);
4378 (*rowend) = ld->
qtree.
count_y - (int)((
b[2] + 1.0) / sp_h) - 1;
4379 (*rowbegin) = ld->
qtree.
count_y - (int)((
b[3] + 1.0) / sp_h) - 1;
4387 if ((*colbegin) < 0) {
4390 if ((*rowbegin) < 0) {
4403 if (!
e->v1 || !
e->v2) {
4407 if (
e->v1->fbcoord[0] !=
e->v1->fbcoord[0] ||
e->v2->fbcoord[0] !=
e->v2->fbcoord[0]) {
4411 b[0] =
MIN2(
e->v1->fbcoord[0],
e->v2->fbcoord[0]);
4412 b[1] =
MAX2(
e->v1->fbcoord[0],
e->v2->fbcoord[0]);
4413 b[2] =
MIN2(
e->v1->fbcoord[1],
e->v2->fbcoord[1]);
4414 b[3] =
MAX2(
e->v1->fbcoord[1],
e->v2->fbcoord[1]);
4416 if (
b[0] > 1 ||
b[1] < -1 ||
b[2] > 1 ||
b[3] < -1) {
4420 (*colbegin) = (int)((
b[0] + 1.0) / sp_w);
4421 (*colend) = (int)((
b[1] + 1.0) / sp_w);
4422 (*rowend) = ld->
qtree.
count_y - (int)((
b[2] + 1.0) / sp_h) - 1;
4423 (*rowbegin) = ld->
qtree.
count_y - (int)((
b[3] + 1.0) / sp_h) - 1;
4426 if ((*rowend) < (*rowbegin)) {
4430 if ((*colend) < (*colbegin)) {
4447 if (
x > 1 || x < -1 || y > 1 ||
y < -1) {
4451 col = (int)((
x + 1.0) / sp_w);
4474 int c = (int)((
x + 1.0) / sp_w);
4490 while (iba->
child) {
4493 iba = &iba->
child[0];
4496 iba = &iba->
child[3];
4501 iba = &iba->
child[1];
4504 iba = &iba->
child[2];
4523 int _dir_control = 0;
4530 for (
int ei = index_start; ei < index_end; ei++) {
4539 for (co = x1; co <=
x2; co++) {
4540 for (
r =
y1;
r <= y2;
r++) {
4557 int total_lines = 0;
4559 for (
int i = 0; i < d->thread_count; i++) {
4561 if (
G.debug_value == 4000) {
4562 printf(
"Thread %d isec generated %d lines.\n", i, th->
current);
4588 for (
int i = 0; i < d->thread_count; i++) {
4594 for (
int j = 0; j < th->
current; j++) {
4616 v1->fbcoord[2] = ZMin * ZMax / (ZMax -
fabs(
v1->fbcoord[2]) * (ZMax - ZMin));
4617 v2->fbcoord[2] = ZMin * ZMax / (ZMax -
fabs(
v2->fbcoord[2]) * (ZMax - ZMin));
4623 e->edge_identifier = (((
uint64_t)
e->t1->target_reference) << 32) |
e->t2->target_reference;
4637 if (
e->t1->intersection_priority >
e->t2->intersection_priority) {
4638 e->object_ref = ob1;
4640 else if (
e->t1->intersection_priority <
e->t2->intersection_priority) {
4641 e->object_ref = ob2;
4646 e->object_ref = ob1;
4666 if (
G.debug_value == 4000) {
4688 if (
G.debug_value == 4000) {
4690 printf(
"Line art intersection time: %f\n", t_elapsed);
4702 double data[2] = {fbcoord1[0], fbcoord1[1]};
4703 double LU[2] = {-1, 1}, RU[2] = {1, 1},
LB[2] = {-1, -1},
RB[2] = {1, -1};
4704 double r = 1, sr = 1;
4743 double rx, ry, ux, uy, lx, ly, bx, by;
4748 if (positive_x > 0) {
4750 ry =
y + k * (rx -
x);
4753 if (positive_y > 0) {
4755 ux =
x + (uy -
y) / k;
4756 r1 =
ratiod(fbcoord1[0], fbcoord2[0], rx);
4757 r2 =
ratiod(fbcoord1[0], fbcoord2[0], ux);
4758 if (
MIN2(r1, r2) > 1) {
4766 if (ba->
u >= ry && ba->
b < ry) {
4777 if (ba->
r >= ux && ba->
l < ux) {
4786 else if (positive_y < 0) {
4788 bx =
x + (by -
y) / k;
4789 r1 =
ratiod(fbcoord1[0], fbcoord2[0], rx);
4790 r2 =
ratiod(fbcoord1[0], fbcoord2[0], bx);
4791 if (
MIN2(r1, r2) > 1) {
4797 if (ba->
u >= ry && ba->
b < ry) {
4807 if (ba->
r >= bx && ba->
l < bx) {
4817 r1 =
ratiod(fbcoord1[0], fbcoord2[0], this->
r);
4823 if (ba->
u >=
y && ba->
b <
y) {
4833 else if (positive_x < 0) {
4835 ly =
y + k * (lx -
x);
4838 if (positive_y > 0) {
4840 ux =
x + (uy -
y) / k;
4841 r1 =
ratiod(fbcoord1[0], fbcoord2[0], lx);
4842 r2 =
ratiod(fbcoord1[0], fbcoord2[0], ux);
4843 if (
MIN2(r1, r2) > 1) {
4849 if (ba->
u >= ly && ba->
b < ly) {
4859 if (ba->
r >= ux && ba->
l < ux) {
4869 else if (positive_y < 0) {
4871 bx =
x + (by -
y) / k;
4872 r1 =
ratiod(fbcoord1[0], fbcoord2[0], lx);
4873 r2 =
ratiod(fbcoord1[0], fbcoord2[0], bx);
4874 if (
MIN2(r1, r2) > 1) {
4880 if (ba->
u >= ly && ba->
b < ly) {
4890 if (ba->
r >= bx && ba->
l < bx) {
4900 r1 =
ratiod(fbcoord1[0], fbcoord2[0], this->
l);
4906 if (ba->
u >=
y && ba->
b <
y) {
4916 if (positive_y > 0) {
4917 r1 =
ratiod(fbcoord1[1], fbcoord2[1], this->u);
4923 if (ba->
r >
x && ba->
l <=
x) {
4930 else if (positive_y < 0) {
4931 r1 =
ratiod(fbcoord1[1], fbcoord2[1], this->
b);
4937 if (ba->
r >
x && ba->
l <=
x) {
4960 bool enable_stroke_depth_offset)
4964 int intersections_only = 0;
4968 if (
G.debug_value == 4000) {
4990 *cached_result = lc;
5022 if (shadow_generated) {
5070 if (!intersections_only) {
5132 if (
G.debug_value == 4000) {
5136 printf(
"Line art total time: %lf\n", t_elapsed);
5145 float (*gp_obmat_inverse)[4],
5154 uchar mask_switches,
5155 uchar material_mask_bits,
5156 uchar intersection_mask,
5159 uchar shaodow_selection,
5160 uchar silhouette_mode,
5161 const char *source_vgname,
5164 int modifier_calculation_flags)
5166 if (cache ==
NULL) {
5167 if (
G.debug_value == 4000) {
5168 printf(
"NULL Lineart cache!\n");
5173 int stroke_count = 0;
5177 if (source_object) {
5182 if (source_collection) {
5199 if (!(ec->type & (
types & enabled_types))) {
5202 if (ec->level > level_end || ec->level < level_start) {
5205 if (orig_ob && orig_ob != ec->object_ref) {
5208 if (orig_col && ec->object_ref) {
5222 if (ec->material_mask_bits != material_mask_bits) {
5227 if (!(ec->material_mask_bits & material_mask_bits)) {
5234 if (ec->intersection_mask != intersection_mask) {
5239 if ((intersection_mask) && !(ec->intersection_mask & intersection_mask)) {
5244 if (shaodow_selection) {
5265 bool is_silhouette =
false;
5267 if (!ec->silhouette_backdrop) {
5268 is_silhouette =
true;
5271 ec->silhouette_backdrop)) {
5272 is_silhouette =
true;
5276 if ((!orig_ob) && (!ec->silhouette_backdrop)) {
5277 is_silhouette =
true;
5282 ec->silhouette_backdrop != ec->object_ref) {
5283 is_silhouette =
true;
5286 if (inverse_silhouette) {
5287 is_silhouette = !is_silhouette;
5289 if (!is_silhouette) {
5308 point->pressure = 1.0f;
5315 if (source_vgname && vgname) {
5324 if ((!source_vgname) || strstr(db->name, source_vgname) == db->name) {
5331 int sindex = 0, vindex;
5333 vindex = eci->index;
5340 float use_weight = mdw->
weight;
5342 use_weight = 1 - use_weight;
5356 if (
G.debug_value == 4000) {
5363 if (
G.debug_value == 4000) {
5364 printf(
"LRT: Generated %d strokes.\n", stroke_count);
5374 void *source_reference,
5379 uchar mask_switches,
5380 uchar material_mask_bits,
5381 uchar intersection_mask,
5384 uchar shadow_selection,
5385 uchar silhouette_mode,
5386 const char *source_vgname,
5389 int modifier_calculation_flags)
5392 if (!gpl || !gpf || !ob) {
5398 int16_t use_types = edge_types;
5400 if (!source_reference) {
5403 source_object = (
Object *)source_reference;
5406 if (!source_reference) {
5409 source_collection = (
Collection *)source_reference;
5412 float gp_obmat_inverse[4][4];
5436 modifier_calculation_flags);
Camera data-block and utility functions.
float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y)
int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey)
bool BKE_collection_has_object_recursive_instanced(struct Collection *collection, struct Object *ob)
bool BKE_collection_has_object(struct Collection *collection, const struct Object *ob)
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_active_layer_index(const struct CustomData *data, int type)
int CustomData_get_layer_index(const struct CustomData *data, int type)
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps)
struct bGPDstroke * BKE_gpencil_stroke_add(struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness, bool insert_at_head)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_set_random_color(struct bGPDstroke *gps)
void BKE_id_free(struct Main *bmain, void *idv)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get_eval(struct Object *ob, short act)
void BKE_mesh_looptri_get_real_edges(const struct Mesh *mesh, const struct MLoopTri *looptri, int r_edges[3])
struct Mesh * BKE_mesh_new_from_object(struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers, bool preserve_origindex)
bool BKE_mesh_minmax(const struct Mesh *me, float r_min[3], float r_max[3])
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure(const struct Mesh *mesh)
int BKE_mesh_runtime_looptri_len(const struct Mesh *mesh)
General operations, lookup, etc. for blender objects.
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
int BKE_object_visibility(const struct Object *ob, int dag_eval_mode)
int BKE_render_num_threads(const struct RenderData *r)
bool BKE_scene_camera_switch_update(struct Scene *scene)
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
MINLINE double ratiod(double min, double max, double pos)
MINLINE int max_ii(int a, int b)
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void mul_v4_m4v3_db(double r[4], const double mat[4][4], const double vec[3])
void mul_v3_m4v3_db(double r[3], const double mat[4][4], const double vec[3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void unit_m4_db(double m[4][4])
void copy_m4d_m4(double m1[4][4], const float m2[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_m4db_m4db_m4fl_uniq(double R[4][4], const double A[4][4], const float B[4][4])
void mul_v3_mat3_m4v3_db(double r[3], const double M[4][4], const double v[3])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void transpose_m4(float R[4][4])
void copy_m4_m4_db(double m1[4][4], const double m2[4][4])
void mul_v3_mat3_m4v3(float r[3], const float M[4][4], const float v[3])
float focallength_to_fov(float focal_length, float sensor)
MINLINE double normalize_v3_db(double n[3])
void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], double t)
MINLINE float normalize_v3(float r[3])
MINLINE void mul_v3db_db(double r[3], double f)
MINLINE void add_v3_v3_db(double r[3], const double a[3])
MINLINE double dot_v3v3_db(const double a[3], const double b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3db_v3fl(double r[3], const float a[3])
MINLINE void cross_v3_v3v3_db(double r[3], const double a[3], const double b[3])
MINLINE void copy_v3_v3_db(double r[3], const double a[3])
void interp_v2_v2v2_db(double target[2], const double a[2], const double b[2], double t)
MINLINE void sub_v3_v3v3_db(double r[3], const double a[3], const double b[3])
MINLINE void sub_v2_v2v2_db(double r[2], const double a[2], const double b[2])
void BLI_task_pool_work_and_wait(TaskPool *pool)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
TaskPool * BLI_task_pool_create(void *userdata, eTaskPriority priority)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
void BLI_task_pool_free(TaskPool *pool)
void BLI_task_pool_push(TaskPool *pool, TaskRunFunction run, void *taskdata, bool free_taskdata, TaskFreeFunction freedata)
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void BLI_spin_lock(SpinLock *spin)
void BLI_spin_end(SpinLock *spin)
#define INIT_MINMAX(min, max)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
#define DEG_OBJECT_ITER_END
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, flag_)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
Object groups, one object can be in many groups at once.
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_FORCE_INTERSECTION
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_NO_INTERSECTION
@ COLLECTION_HIDE_VIEWPORT
@ COLLECTION_LRT_USE_INTERSECTION_MASK
@ COLLECTION_LRT_USE_INTERSECTION_PRIORITY
@ LRT_GPENCIL_MATERIAL_MASK_ENABLE
@ LRT_GPENCIL_INTERSECTION_MATCH
@ LRT_GPENCIL_MATERIAL_MASK_MATCH
@ LRT_SILHOUETTE_FILTER_INDIVIDUAL
@ LRT_GPENCIL_INVERT_COLLECTION
@ LRT_GPENCIL_INVERT_SILHOUETTE_FILTER
@ LRT_GPENCIL_OFFSET_TOWARDS_CUSTOM_CAMERA
@ LRT_SHADOW_FILTER_ILLUMINATED_ENCLOSED_SHAPES
@ LRT_SHADOW_FILTER_ILLUMINATED
@ LRT_SHADOW_FILTER_SHADED
@ LRT_EDGE_FLAG_SHADOW_FACING_LIGHT
@ LRT_EDGE_FLAG_PROJECTED_SHADOW
@ LRT_EDGE_FLAG_CONTOUR_SECONDARY
@ LRT_EDGE_FLAG_INTERSECTION
@ LRT_EDGE_FLAG_LIGHT_CONTOUR
@ LRT_EDGE_FLAG_CHAIN_PICKED
@ LRT_EDGE_FLAG_NEXT_IS_DUPLICATION
@ LRT_EDGE_FLAG_EDGE_MARK
@ LRT_GPENCIL_INVERT_SOURCE_VGROUP
@ LRT_EVERYTHING_AS_CONTOUR
@ LRT_USE_CREASE_ON_SMOOTH_SURFACES
@ LRT_ALLOW_OVERLAP_EDGE_TYPES
@ LRT_USE_IMAGE_BOUNDARY_TRIMMING
@ LRT_INTERSECTION_AS_CONTOUR
@ LRT_ALLOW_OVERLAPPING_EDGES
@ LRT_GPENCIL_MATCH_OUTPUT_VGROUP
@ LRT_ALLOW_DUPLI_OBJECTS
@ LRT_FILTER_FACE_MARK_INVERT
@ LRT_USE_BACK_FACE_CULLING
@ LRT_CHAIN_GEOMETRY_SPACE
@ LRT_USE_CREASE_ON_SHARP_EDGES
@ LRT_FILTER_FACE_MARK_KEEP_CONTOUR
@ LRT_ALLOW_CLIPPING_BOUNDARIES
@ LRT_FILTER_FACE_MARK_BOUNDARIES
@ LRT_CHAIN_PRESERVE_DETAILS
@ LRT_MATERIAL_CUSTOM_INTERSECTION_PRIORITY
@ LRT_MATERIAL_MASK_ENABLED
@ OBJECT_LRT_OWN_INTERSECTION_PRIORITY
@ OBJECT_LRT_NO_INTERSECTION
@ OBJECT_LRT_OCCLUSION_ONLY
@ OBJECT_LRT_INTERSECTION_ONLY
@ OBJECT_LRT_FORCE_INTERSECTION
_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 GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_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 GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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 y
_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 GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_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 GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_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.
#define MEM_recallocN(vmemh, len)
#define LRT_TILE_EDGE_COUNT_INITIAL
#define LRT_DOUBLE_CLOSE_ENOUGH(a, b)
#define LRT_SHADOW_MASK_INHIBITED
#define LRT_SHADOW_MASK_UNDEFINED
#define LRT_OBINDEX_LOWER
BLI_INLINE int lineart_intersect_seg_seg(const double a1[2], const double a2[2], const double b1[2], const double b2[2], double *r_ratio, bool *r_aligned)
#define LRT_OBINDEX_SHIFT
#define LRT_SHADOW_MASK_ILLUMINATED_SHAPE
#define LRT_LIGHT_CONTOUR_TARGET
#define LRT_SHADOW_MASK_ENCLOSED_SHAPE
#define LRT_SHADOW_TEST_SHAPE_BITS
#define LRT_OBINDEX_HIGHER
@ LRT_TILE_RECURSIVE_PERSPECTIVE
@ LRT_TILE_RECURSIVE_ORTHO
#define LRT_SHADOW_MASK_ILLUMINATED
#define LRT_TILE_SPLITTING_TRIANGLE_LIMIT
@ LRT_TRIANGLE_NO_INTERSECTION
@ LRT_TRIANGLE_MAT_BACK_FACE_CULLING
@ LRT_TRIANGLE_INTERSECTION_ONLY
@ LRT_TRIANGLE_FORCE_INTERSECTION
#define LRT_THREAD_EDGE_COUNT
#define LRT_SHADOW_MASK_SHADED
@ LRT_ELEMENT_NO_INTERSECTION
@ LRT_ELEMENT_BORDER_ONLY
@ LRT_ELEMENT_INTERSECTION_DATA
@ LRT_ELEMENT_IS_ADDITIONAL
struct LineartTriangle LineartTriangle
#define LRT_EDGE_IDENTIFIER(obi, e)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
Platform independent time functions.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
const Depsgraph * depsgraph
BLI_INLINE float fb(float length, float L)
void MOD_lineart_chain_connect(LineartData *ld)
void MOD_lineart_chain_split_for_fixed_occlusion(LineartData *ld)
void MOD_lineart_chain_clip_at_border(LineartData *ld)
int MOD_lineart_chain_count(const LineartEdgeChain *ec)
void MOD_lineart_finalize_chains(LineartData *ld)
void MOD_lineart_chain_find_silhouette_backdrop_objects(LineartData *ld)
void MOD_lineart_chain_feature_lines(LineartData *ld)
void MOD_lineart_chain_clear_picked_flag(LineartCache *lc)
void MOD_lineart_smooth_chains(LineartData *ld, float tolerance)
void MOD_lineart_chain_split_angle(LineartData *ld, float angle_threshold_rad)
void MOD_lineart_chain_offset_towards_camera(LineartData *ld, float dist, bool use_custom_camera)
void lineart_sort_adjacent_items(LineartAdjacentEdge *ai, int length)
struct EdgeNeighborData EdgeNeighborData
static void lineart_bounding_area_line_add(LineartBoundingArea *ba, LineartEdge *e)
void MOD_lineart_clear_cache(struct LineartCache **lc)
static void lineart_object_load_single_instance(LineartData *ld, Depsgraph *depsgraph, Scene *scene, Object *ob, Object *ref_ob, float use_mat[4][4], bool is_render, LineartObjectLoadTaskInfo *olti, int thread_count, int obindex)
static void lineart_bounding_areas_connect_recursive(LineartData *ld, LineartBoundingArea *root)
static LineartTriangle * lineart_triangle_from_index(LineartData *ld, LineartTriangle *rt_array, int index)
static int lineart_triangle_size_get(LineartData *ld)
void lineart_main_occlusion_begin(LineartData *ld)
static LineartBoundingArea * lineart_get_bounding_area(LineartData *ld, double x, double y)
#define INTERSECT_JUST_SMALLER(is, order, num, index)
static void lineart_init_isec_thread(LineartIsecData *d, LineartData *ld, int thread_count)
#define LRT_MESH_EDGE_TYPES_COUNT
#define RELINK_EDGE(e_num, new_tri)
static void lineart_destroy_isec_thread(LineartIsecData *d)
static bool lineart_triangle_intersect_math(LineartTriangle *tri, LineartTriangle *t2, double *v1, double *v2)
static bool lineart_bounding_area_triangle_intersect(LineartData *fb, LineartTriangle *tri, LineartBoundingArea *ba, bool *r_triangle_vert_inside)
void lineart_main_discard_out_of_frame_edges(LineartData *ld)
void lineart_main_get_view_vector(LineartData *ld)
void lineart_main_link_lines(LineartData *ld)
void lineart_main_load_geometries(Depsgraph *depsgraph, Scene *scene, Object *camera, LineartData *ld, bool allow_duplicates, bool do_shadow_casting, ListBase *shadow_elns)
void MOD_lineart_destroy_render_data(LineartGpencilModifierData *lmd)
bool lineart_edge_from_triangle(const LineartTriangle *tri, const LineartEdge *e, bool allow_overlapping_edges)
static LineartEdgeNeighbor * lineart_build_edge_neighbor(Mesh *me, int total_edges)
static bool lineart_edge_match(LineartTriangle *tri, LineartEdge *e, int v1, int v2)
static void lineart_join_loose_edge_arr(LooseEdgeData *loose_data, LooseEdgeData *to_be_joined)
static void lineart_create_edges_from_isec_data(LineartIsecData *d)
static void lineart_edge_neighbor_init_task(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static void lineart_add_isec_thread(LineartIsecThread *th, const double *v1, const double *v2, LineartTriangle *tri1, LineartTriangle *tri2)
struct LineartIsecThread LineartIsecThread
static bool lineart_triangle_2v_intersection_math(LineartVert *v1, LineartVert *v2, LineartTriangle *tri, const double *last, double *rv)
static void lineart_load_tri_task(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
void lineart_main_bounding_areas_connect_post(LineartData *ld)
static const int LRT_MESH_EDGE_TYPES[]
static void lineart_geometry_object_load(LineartObjectInfo *ob_info, LineartData *la_data, ListBase *shadow_elns)
static void lineart_add_loose_edge(LooseEdgeData *loose_data, MEdge *e)
#define LRT_VERT_OUT_OF_BOUND(v)
static void lineart_destroy_render_data(LineartData *ld)
void lineart_main_add_triangles(LineartData *ld)
static bool lineart_triangle_share_edge(const LineartTriangle *l, const LineartTriangle *r)
LineartBoundingArea * MOD_lineart_get_bounding_area(LineartData *ld, double x, double y)
static uchar lineart_intersection_mask_check(Collection *c, Object *ob)
void lineart_add_edge_to_array(LineartPendingEdges *pe, LineartEdge *e)
static bool lineart_point_inside_triangle3d(double v[3], double v0[3], double v1[3], double v2[3])
static int lineart_occlusion_make_task_info(LineartData *ld, LineartRenderTaskInfo *rti)
static void lineart_loose_data_reallocate(LooseEdgeData *loose_data, int count)
#define LRT_CULL_DECIDE_INSIDE
void lineart_main_clear_linked_edges(LineartData *ld)
static void lineart_triangle_adjacent_assign(LineartTriangle *tri, LineartTriangleAdjacent *tri_adj, LineartEdge *e)
static void lineart_bounding_area_triangle_reallocate(LineartBoundingArea *ba)
static void lineart_free_bounding_area_memories(LineartData *ld)
static void lineart_occlusion_worker(TaskPool *__restrict UNUSED(pool), LineartRenderTaskInfo *rti)
LineartBoundingArea * lineart_bounding_area_next(LineartBoundingArea *this, double *fbcoord1, double *fbcoord2, double x, double y, double k, int positive_x, int positive_y, double *next_x, double *next_y)
static bool lineart_triangle_edge_image_space_occlusion(const LineartTriangle *tri, const LineartEdge *e, const double *override_camera_loc, const bool override_cam_is_persp, const bool allow_overlapping_edges, const double m_view_projection[4][4], const double camera_dir[3], const float cam_shift_x, const float cam_shift_y, double *from, double *to)
static int lineart_edge_type_duplication_count(int eflag)
struct LooseEdgeData LooseEdgeData
struct LineartIsecData LineartIsecData
void lineart_main_cull_triangles(LineartData *ld, bool clip_far)
static void lineart_add_triangles_worker(TaskPool *__restrict UNUSED(pool), LineartIsecThread *th)
static void lineart_bounding_area_split(LineartData *ld, LineartBoundingArea *root, int recursive_level)
static void feat_data_sum_reduce(const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk)
void lineart_main_bounding_area_make_initial(LineartData *ld)
static void lineart_add_edge_to_array_thread(LineartObjectInfo *obi, LineartEdge *e)
static void loose_data_sum_reduce(const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk)
struct LineartIsecSingle LineartIsecSingle
static void lineart_bounding_area_link_triangle(LineartData *ld, LineartBoundingArea *root_ba, LineartTriangle *tri, double l_r_u_b[4], int recursive, int recursive_level, bool do_intersection, struct LineartIsecThread *th)
static void lineart_mvert_transform_task(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
#define LRT_ISECT_TRIANGLE_PER_THREAD
LineartBoundingArea * lineart_edge_first_bounding_area(LineartData *ld, double *fbcoord1, double *fbcoord2)
static void lineart_triangle_post(LineartTriangle *tri, LineartTriangle *orig)
static bool lineart_get_triangle_bounding_areas(LineartData *ld, LineartTriangle *tri, int *rowbegin, int *rowend, int *colbegin, int *colend)
static void lineart_triangle_intersect_in_bounding_area(LineartTriangle *tri, LineartBoundingArea *ba, LineartIsecThread *th, int up_to)
static void lineart_object_load_worker(TaskPool *__restrict UNUSED(pool), LineartObjectLoadTaskInfo *olti)
static void lineart_triangle_set_cull_flag(LineartTriangle *tri, uchar flag)
static void lineart_finalize_object_edge_array(LineartPendingEdges *pe, LineartObjectInfo *obi)
bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifierData *lmd, LineartCache **cached_result, bool enable_stroke_depth_offset)
void lineart_main_free_adjacent_data(LineartData *ld)
static LineartEdgeSegment * lineart_give_segment(LineartData *ld)
static void lineart_occlusion_single_line(LineartData *ld, LineartEdge *e, int thread_id)
static void lineart_triangle_cull_single(LineartData *ld, LineartTriangle *tri, int in0, int in1, int in2, double cam_pos[3], double view_dir[3], bool allow_boundaries, double m_view_projection[4][4], Object *ob, int *r_v_count, int *r_e_count, int *r_t_count, LineartElementLinkNode *v_eln, LineartElementLinkNode *e_eln, LineartElementLinkNode *t_eln)
struct EdgeFeatData EdgeFeatData
static void lineart_free_bounding_area_memory(LineartBoundingArea *ba, bool recursive)
#define REMOVE_TRIANGLE_EDGE
static bool lineart_point_inside_triangle(const double v[2], const double v0[2], const double v1[2], const double v2[2])
static void lineart_end_bounding_area_recursive(LineartBoundingArea *ba)
static void lineart_bounding_area_link_edge(LineartData *ld, LineartBoundingArea *root_ba, LineartEdge *e)
#define LRT_PARALLEL(index)
static void lineart_identify_mlooptri_feature_edges(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict tls)
static void lineart_geometry_load_assign_thread(LineartObjectLoadTaskInfo *olti_list, LineartObjectInfo *obi, int thread_count, int this_face_count)
static LineartCache * lineart_init_cache(void)
LineartBoundingArea * MOD_lineart_get_parent_bounding_area(LineartData *ld, double x, double y)
void lineart_destroy_render_data_keep_init(LineartData *ld)
static int lineart_point_on_line_segment(double v[2], double v0[2], double v1[2])
static uchar lineart_intersection_priority_check(Collection *c, Object *ob)
#define INTERSECT_JUST_GREATER(is, order, num, index)
struct LineartEdgeNeighbor LineartEdgeNeighbor
static bool lineart_schedule_new_triangle_task(LineartIsecThread *th)
static void lineart_discard_duplicated_edges(LineartEdge *old_e)
#define LRT_TRI_SAME_POINT(tri, i, pt)
static void lineart_clear_linked_edges_recursive(LineartData *ld, LineartBoundingArea *root_ba)
void lineart_edge_cut(LineartData *ld, LineartEdge *e, double start, double end, uchar material_mask_bits, uchar mat_occlusion, uint32_t shadow_bits)
static LineartVert * lineart_triangle_share_point(const LineartTriangle *l, const LineartTriangle *r)
static LineartElementLinkNode * lineart_memory_get_vert_space(LineartData *ld)
static int lineart_usage_check(Collection *c, Object *ob, bool is_render)
static bool lineart_get_edge_bounding_areas(LineartData *ld, LineartEdge *e, int *rowbegin, int *rowend, int *colbegin, int *colend)
static LineartElementLinkNode * lineart_memory_get_triangle_space(LineartData *ld)
static void lineart_discard_segment(LineartData *ld, LineartEdgeSegment *es)
void lineart_main_perspective_division(LineartData *ld)
static void lineart_main_remove_unused_lines_from_tiles(LineartData *ld)
static void lineart_bounding_areas_connect_new(LineartData *ld, LineartBoundingArea *root)
static void lineart_identify_loose_edges(void *__restrict UNUSED(userdata), const int i, const TaskParallelTLS *__restrict tls)
#define INTERSECT_SORT_MIN_TO_MAX_3(ia, ib, ic, lst)
void lineart_finalize_object_edge_array_reserve(LineartPendingEdges *pe, int count)
#define SELECT_EDGE(e_num, v1_link, v2_link, new_tri)
static void lineart_main_remove_unused_lines_recursive(LineartBoundingArea *ba, uint8_t max_occlusion)
BLI_INLINE bool lineart_occlusion_is_adjacent_intersection(LineartEdge *e, LineartTriangle *tri)
static void lineart_gpencil_generate(LineartCache *cache, Depsgraph *depsgraph, Object *gpencil_object, float(*gp_obmat_inverse)[4], bGPDlayer *UNUSED(gpl), bGPDframe *gpf, int level_start, int level_end, int material_nr, Object *source_object, Collection *source_collection, int types, uchar mask_switches, uchar material_mask_bits, uchar intersection_mask, int16_t thickness, float opacity, uchar shaodow_selection, uchar silhouette_mode, const char *source_vgname, const char *vgname, int modifier_flags, int modifier_calculation_flags)
static bool lineart_triangle_get_other_verts(const LineartTriangle *tri, const LineartVert *vt, LineartVert **l, LineartVert **r)
struct EdgeFeatReduceData EdgeFeatReduceData
void MOD_lineart_gpencil_generate(LineartCache *cache, Depsgraph *depsgraph, Object *ob, bGPDlayer *gpl, bGPDframe *gpf, int8_t source_type, void *source_reference, int level_start, int level_end, int mat_nr, int16_t edge_types, uchar mask_switches, uchar material_mask_bits, uchar intersection_mask, int16_t thickness, float opacity, uchar shadow_selection, uchar silhouette_mode, const char *source_vgname, const char *vgname, int modifier_flags, int modifier_calculation_flags)
static LineartElementLinkNode * lineart_memory_get_edge_space(LineartData *ld)
static LineartData * lineart_create_render_buffer(Scene *scene, LineartGpencilModifierData *lmd, Object *camera, Object *active_camera, LineartCache *lc)
#define LRT_CULL_ENSURE_MEMORY
static bool lineart_bounding_area_edge_intersect(LineartData *UNUSED(fb), const double l[2], const double r[2], LineartBoundingArea *ba)
static int lineart_point_triangle_relation(double v[2], double v0[2], double v1[2], double v2[2])
static bool lineart_geometry_check_visible(double model_view_proj[4][4], double shift_x, double shift_y, Mesh *use_mesh)
#define LRT_GUARD_NOT_FOUND
void lineart_register_intersection_shadow_cuts(struct LineartData *ld, struct ListBase *shadow_elns)
bool lineart_main_try_generate_shadow(struct Depsgraph *depsgraph, struct Scene *scene, struct LineartData *original_ld, struct LineartGpencilModifierData *lmd, struct LineartStaticMemPool *shadow_data_pool, struct LineartElementLinkNode **r_veln, struct LineartElementLinkNode **r_eeln, struct ListBase *r_calculated_edges_eln_list, struct LineartData **r_shadow_ld_if_reproject)
void * lineart_list_append_pointer_pool_sized(ListBase *h, struct LineartStaticMemPool *smp, void *data, int size)
#define LRT_BOUND_AREA_CROSSES(b1, b2)
#define LRT_EDGE_BA_MARCHING_BEGIN(fb1, fb2)
void * lineart_mem_acquire_thread(struct LineartStaticMemPool *smp, size_t size)
#define LRT_EDGE_BA_MARCHING_NEXT(fb1, fb2)
LineartEdge * lineart_find_matching_edge(struct LineartElementLinkNode *shadow_eln, uint64_t edge_identifier)
void lineart_register_shadow_cuts(struct LineartData *ld, struct LineartEdge *e, struct LineartEdge *shadow_edge)
#define LRT_EDGE_BA_MARCHING_END
void lineart_main_make_enclosed_shapes(struct LineartData *ld, struct LineartData *shadow_ld)
#define LRT_ITER_ALL_LINES_END
void lineart_count_and_print_render_buffer_memory(struct LineartData *ld)
void * lineart_list_append_pointer_pool_thread(ListBase *h, struct LineartStaticMemPool *smp, void *data)
void lineart_matrix_perspective_44d(double(*mProjection)[4], double fFov_rad, double fAspect, double zMin, double zMax)
void lineart_list_remove_pointer_item_no_free(ListBase *h, LinkData *lip)
#define LRT_ITER_ALL_LINES_BEGIN
void lineart_main_transform_and_add_shadow(struct LineartData *ld, struct LineartElementLinkNode *veln, struct LineartElementLinkNode *eeln)
void * lineart_list_append_pointer_pool_sized_thread(ListBase *h, LineartStaticMemPool *smp, void *data, int size)
LineartElementLinkNode * lineart_find_matching_eln(struct ListBase *shadow_elns, int obindex)
void lineart_mem_destroy(struct LineartStaticMemPool *smp)
void * lineart_mem_acquire(struct LineartStaticMemPool *smp, size_t size)
void * lineart_list_append_pointer_pool(ListBase *h, struct LineartStaticMemPool *smp, void *data)
void lineart_matrix_ortho_44d(double(*mProjection)[4], double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float2 fabs(const float2 &a)
static double B1(double u)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
thread_local int thread_id
static const pxr::TfToken opacity("opacity", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
unsigned __int64 uint64_t
LineartEdgeNeighbor * edge_nabr
const MLoopTri * mlooptri
LineartTriangle * tri_array
LineartAdjacentEdge * adj_e
LineartEdgeNeighbor * edge_nabr
struct LineartBoundingArea * child
struct LineartEdge ** linked_lines
uint32_t insider_triangle_count
struct LineartTriangle ** linked_triangles
uint32_t max_triangle_count
LineartStaticMemPool chain_data_pool
uint16_t all_enabled_edge_types
LineartStaticMemPool shadow_data_pool
float cam_obmat_secondary[4][4]
bool use_contour_secondary
bool filter_face_mark_invert
bool cam_is_persp_secondary
bool use_loose_edge_chain
double view_projection[4][4]
bool shadow_enclose_shapes
bool chain_preserve_details
double view_vector_secondary[3]
double camera_pos_secondary[3]
float chaining_image_threshold
bool filter_face_mark_keep_contour
double active_camera_pos[3]
float chain_smooth_tolerance
bool use_loose_as_contour
bool use_image_boundary_trimming
bool shadow_use_silhouette
bool filter_face_mark_boundaries
bool allow_overlapping_edges
bool allow_duplicated_types
bool use_back_face_culling
float angle_splitting_threshold
bool use_geometry_space_chain
bool light_reference_available
ListBase vertex_buffer_pointers
ListBase line_buffer_pointers
ListBase triangle_adjacent_pointers
ListBase triangle_buffer_pointers
uint32_t initial_tile_count
struct LineartBoundingArea * initials
LineartStaticMemPool render_data_pool
struct LineartData::_conf conf
struct LineartData::_geom geom
struct LineartData::_qtree qtree
int isect_scheduled_up_to_index
LineartElementLinkNode * isect_scheduled_up_to
LineartStaticMemPool * edge_data_pool
struct LineartPendingEdges pending_edges
LineartStaticMemPool * chain_data_pool
struct LineartEdgeSegment * prev
struct LineartEdgeSegment * next
uint32_t shadow_mask_bits
uint8_t material_mask_bits
struct LineartTriangle * t2
struct LineartTriangle * t1
struct Object * object_ref
eLineArtElementNodeFlag flags
struct LineartElementLinkNode * next
char shadow_use_silhouette_override
struct Object * light_contour_object
float angle_splitting_threshold
short edge_types_override
char shadow_selection_override
struct LineartCache * cache
struct Object * source_camera
float chain_smooth_tolerance
float chaining_image_threshold
struct LineartData * la_data_ptr
float stroke_depth_offset
LineartIsecThread * threads
LineartElementLinkNode * pending_from
LineartIsecSingle * array
LineartElementLinkNode * pending_to
LineartElementLinkNode * v_eln
struct Mesh * original_me
struct LineartPendingEdges pending_edges
double model_view_proj[4][4]
struct Object * original_ob_eval
uint8_t override_intersection_mask
struct LineartObjectInfo * next
uint8_t intersection_priority
struct Object * original_ob
LineartObjectInfo * pending
struct LineartPendingEdges pending_edges
struct LineartEdge * e[3]
struct LineartEdge * testing_e[1]
struct LineartTriangle base
uint8_t material_mask_bits
uint8_t intersection_priority
uint8_t intersection_mask
uint32_t target_reference
struct LinkNode * intersecting_verts
struct LineartVert * v[3]
unsigned char mat_occlusion
unsigned char intersection_priority
unsigned char material_mask_bits
struct MaterialLineArt lineart
struct MLoopTri_Store looptris
struct BMEditMesh * edit_mesh
struct MDeformVert * dvert
ListBase vertex_group_names
unsigned char intersection_priority
struct Collection * master_collection
TaskParallelReduceFunc func_reduce
size_t userdata_chunk_size
int lineart_triangle_size
LineartTriangleAdjacent * tri_adj
LineartObjectInfo * ob_info
const MLoopTri * mlooptri
LineartTriangle * tri_arr
double(* model_view_proj)[4]
struct MDeformVert * dvert
function< void(void)> TaskRunFunction
double PIL_check_seconds_timer(void)