|
Blender V5.0
|
#include <algorithm>#include "MOD_lineart.hh"#include "BLI_bounds.hh"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_matrix.hh"#include "BLI_math_rotation.h"#include "BLI_sort.hh"#include "BLI_task.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLI_vector.hh"#include "BKE_attribute.hh"#include "BKE_camera.h"#include "BKE_collection.hh"#include "BKE_curves.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_geometry_set.hh"#include "BKE_global.hh"#include "BKE_grease_pencil.hh"#include "BKE_lib_id.hh"#include "BKE_material.hh"#include "BKE_mesh.hh"#include "BKE_object.hh"#include "BKE_scene.hh"#include "DEG_depsgraph_query.hh"#include "DNA_camera_types.h"#include "DNA_collection_types.h"#include "DNA_light_types.h"#include "DNA_material_types.h"#include "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_scene_types.h"#include "MEM_guardedalloc.h"#include "RE_pipeline.h"#include "intern/render_types.h"#include "ED_grease_pencil.hh"#include "GEO_join_geometries.hh"#include "lineart_intern.hh"Go to the source code of this file.
Classes | |
| struct | LineartIsecSingle |
| struct | LineartIsecThread |
| struct | LineartIsecData |
| struct | LineartEdgeNeighbor |
| struct | VertData |
| struct | EdgeFeatData |
| struct | EdgeFeatReduceData |
| struct | LooseEdgeData |
| struct | TriData |
| struct | EdgeNeighborData |
| struct | LineartChainWriteInfo |
Macros | |
| #define | INCREASE_EDGE |
| #define | SELECT_EDGE(e_num, v1_link, v2_link, new_tri) |
| #define | RELINK_EDGE(e_num, new_tri) |
| #define | REMOVE_TRIANGLE_EDGE |
| #define | LRT_CULL_ENSURE_MEMORY |
| #define | LRT_CULL_DECIDE_INSIDE |
| #define | LRT_VERT_OUT_OF_BOUND(v) |
| #define | LRT_MESH_EDGE_TYPES_COUNT 6 |
| #define | LRT_TRI_SAME_POINT(tri, i, pt) |
| #define | INTERSECT_SORT_MIN_TO_MAX_3(ia, ib, ic, lst) |
| #define | INTERSECT_JUST_GREATER(is, order, num, index) |
| #define | INTERSECT_JUST_SMALLER(is, order, num, index) |
| #define | LRT_ISEC(index) |
| #define | LRT_PARALLEL(index) |
| #define | LRT_GUARD_NOT_FOUND |
| #define | LRT_ISECT_TRIANGLE_PER_THREAD 4096 |
Typedefs | |
| using | float3 |
| using | int3 |
Enumerations | |
| enum | LineartPointTri { LRT_OUTSIDE_TRIANGLE = 0 , LRT_ON_TRIANGLE = 1 , LRT_INSIDE_TRIANGLE = 2 } |
Variables | |
| static const int | LRT_MESH_EDGE_TYPES [] |
| #define INCREASE_EDGE |
Referenced by lineart_triangle_cull_single().
| #define INTERSECT_JUST_GREATER | ( | is, | |
| order, | |||
| num, | |||
| index ) |
Definition at line 2765 of file lineart_cpu.cc.
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define INTERSECT_JUST_SMALLER | ( | is, | |
| order, | |||
| num, | |||
| index ) |
Definition at line 2773 of file lineart_cpu.cc.
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define INTERSECT_SORT_MIN_TO_MAX_3 | ( | ia, | |
| ib, | |||
| ic, | |||
| lst ) |
Definition at line 2755 of file lineart_cpu.cc.
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define LRT_CULL_DECIDE_INSIDE |
Referenced by lineart_main_cull_triangles().
| #define LRT_CULL_ENSURE_MEMORY |
Referenced by lineart_main_cull_triangles().
| #define LRT_GUARD_NOT_FOUND |
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define LRT_ISEC | ( | index | ) |
Definition at line 2780 of file lineart_cpu.cc.
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define LRT_ISECT_TRIANGLE_PER_THREAD 4096 |
Definition at line 3322 of file lineart_cpu.cc.
Referenced by lineart_schedule_new_triangle_task().
| #define LRT_MESH_EDGE_TYPES_COUNT 6 |
Definition at line 1454 of file lineart_cpu.cc.
Referenced by lineart_edge_type_duplication_count(), and lineart_geometry_object_load().
| #define LRT_PARALLEL | ( | index | ) |
Definition at line 2781 of file lineart_cpu.cc.
Referenced by lineart_triangle_edge_image_space_occlusion().
| #define LRT_TRI_SAME_POINT | ( | tri, | |
| i, | |||
| pt ) |
Referenced by lineart_edge_from_triangle().
| #define LRT_VERT_OUT_OF_BOUND | ( | v | ) |
Referenced by lineart_main_discard_out_of_frame_edges().
| #define RELINK_EDGE | ( | e_num, | |
| new_tri ) |
Referenced by lineart_triangle_cull_single().
| #define REMOVE_TRIANGLE_EDGE |
Referenced by lineart_triangle_cull_single().
| #define SELECT_EDGE | ( | e_num, | |
| v1_link, | |||
| v2_link, | |||
| new_tri ) |
Referenced by lineart_triangle_cull_single().
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::int3 |
Definition at line 602 of file BLI_math_vector_types.hh.
| enum LineartPointTri |
| Enumerator | |
|---|---|
| LRT_OUTSIDE_TRIANGLE | |
| LRT_ON_TRIANGLE | |
| LRT_INSIDE_TRIANGLE | |
Definition at line 570 of file lineart_cpu.cc.
| int3 blender::bke::mesh::corner_tri_get_real_edges | ( | Span< int2 > | edges, |
| Span< int > | corner_verts, | ||
| Span< int > | corner_edges, | ||
| const int3 & | corner_tri ) |
Return the triangle's three edge indices they are real edges, otherwise -1.
Definition at line 245 of file mesh_tessellate.cc.
Referenced by lineart_identify_corner_tri_feature_edges().
|
static |
Definition at line 1508 of file lineart_cpu.cc.
References EdgeFeatReduceData::feat_edges.
Referenced by lineart_geometry_object_load().
| void lineart_add_edge_to_array | ( | LineartPendingEdges * | pe, |
| LineartEdge * | e ) |
Definition at line 1734 of file lineart_cpu.cc.
References LineartPendingEdges::array, e, LIKELY, LineartPendingEdges::max, MEM_freeN(), MEM_malloc_arrayN(), and LineartPendingEdges::next.
Referenced by lineart_add_edge_to_array_thread(), lineart_create_edges_from_isec_data(), lineart_main_make_enclosed_shapes(), lineart_main_transform_and_add_shadow(), and lineart_triangle_cull_single().
|
static |
Definition at line 1753 of file lineart_cpu.cc.
References e, lineart_add_edge_to_array(), and LineartObjectInfo::pending_edges.
Referenced by lineart_geometry_object_load().
|
static |
Definition at line 3296 of file lineart_cpu.cc.
References LineartIsecThread::array, copy_v3_v3_db(), LineartIsecThread::current, LineartIsecThread::max, MEM_freeN(), MEM_malloc_arrayN(), LineartTriangle::target_reference, LineartIsecSingle::tri1, LineartIsecSingle::tri2, LineartIsecSingle::v1, LineartIsecSingle::v2, and v2.
Referenced by lineart_triangle_intersect_in_bounding_area().
|
static |
Definition at line 4550 of file lineart_cpu.cc.
References LineartData::_qtree::count_x, LineartTriangle::flags, LineartIsecThread::index_from, LineartIsecThread::index_to, LineartData::_qtree::initials, LineartIsecThread::ld, lineart_bounding_area_link_triangle(), lineart_get_triangle_bounding_areas(), lineart_schedule_new_triangle_task(), LRT_CULL_DISCARD, LRT_CULL_USED, LineartElementLinkNode::next, LineartIsecThread::pending_from, LineartIsecThread::pending_to, LineartData::qtree, and LineartData::sizeof_triangle.
Referenced by lineart_main_add_triangles().
|
static |
Definition at line 4058 of file lineart_cpu.cc.
References LineartBoundingArea::b, l, LineartBoundingArea::l, LineartBoundingArea::r, and LineartBoundingArea::u.
Referenced by lineart_bounding_area_link_edge(), and lineart_bounding_area_triangle_intersect().
|
static |
Definition at line 370 of file lineart_cpu.cc.
References e, LineartBoundingArea::line_count, LineartBoundingArea::linked_lines, LineartBoundingArea::max_line_count, MEM_freeN(), and MEM_malloc_arrayN().
Referenced by lineart_bounding_area_link_edge().
|
static |
Definition at line 4270 of file lineart_cpu.cc.
References LineartBoundingArea::child, e, lineart_bounding_area_edge_intersect(), lineart_bounding_area_line_add(), and lineart_bounding_area_link_edge().
Referenced by lineart_bounding_area_link_edge(), and lineart_main_link_lines().
|
static |
This function does two things:
1) Builds a quad-tree under ld->InitialBoundingAreas to achieve good geometry separation for fast overlapping test between triangles and lines. This acceleration structure makes the occlusion stage much faster.
2) Test triangles with other triangles that are previously linked into each tile (LineartBoundingArea) for intersection lines. When splitting the tile into 4 children and re-linking triangles into the child tiles, intersections are inhibited so we don't get duplicated intersection lines.
Definition at line 4155 of file lineart_cpu.cc.
References b, BLI_spin_lock(), BLI_spin_unlock(), LineartBoundingArea::child, LineartData::conf, LineartVert::fbcoord, LineartBoundingArea::insider_triangle_count, LineartBoundingArea::l, lineart_bounding_area_link_triangle(), lineart_bounding_area_split(), lineart_bounding_area_triangle_intersect(), lineart_bounding_area_triangle_reallocate(), lineart_triangle_intersect_in_bounding_area(), LineartBoundingArea::linked_triangles, LineartBoundingArea::lock, LRT_BOUND_AREA_CROSSES, LRT_TILE_SPLITTING_TRIANGLE_LIMIT, LineartBoundingArea::max_triangle_count, LineartBoundingArea::triangle_count, LineartData::_conf::use_intersections, and LineartTriangle::v.
Referenced by lineart_add_triangles_worker(), lineart_bounding_area_link_triangle(), and lineart_bounding_area_split().
| LineartBoundingArea * lineart_bounding_area_next | ( | struct LineartBoundingArea * | self, |
| double * | fbcoord1, | ||
| double * | fbcoord2, | ||
| double | x, | ||
| double | y, | ||
| double | k, | ||
| int | positive_x, | ||
| int | positive_y, | ||
| double * | next_x, | ||
| double * | next_y ) |
This march along one render line in image space and get the next bounding area the line is crossing.
Definition at line 4761 of file lineart_cpu.cc.
References LineartBoundingArea::b, LineartBoundingArea::l, LISTBASE_FOREACH, LineartBoundingArea::r, ratiod(), self, LineartBoundingArea::u, x, and y.
|
static |
Subdivide a tile after one tile contains too many triangles, then re-link triangles into all the child tiles.
Definition at line 3980 of file lineart_cpu.cc.
References b, LineartBoundingArea::b, BLI_spin_init(), LineartBoundingArea::child, LineartBoundingArea::cx, LineartBoundingArea::cy, LineartVert::fbcoord, i, l, LineartBoundingArea::l, lineart_bounding_area_link_triangle(), lineart_mem_acquire_thread(), LineartBoundingArea::linked_lines, LineartBoundingArea::linked_triangles, lock, LRT_BOUND_AREA_CROSSES, LRT_TILE_EDGE_COUNT_INITIAL, LRT_TILE_SPLITTING_TRIANGLE_LIMIT, LineartBoundingArea::max_line_count, LineartBoundingArea::max_triangle_count, MEM_calloc_arrayN(), LineartBoundingArea::r, LineartData::render_data_pool, LineartBoundingArea::triangle_count, LineartBoundingArea::u, and LineartTriangle::v.
Referenced by lineart_bounding_area_link_triangle().
|
static |
Definition at line 4102 of file lineart_cpu.cc.
References LineartBoundingArea::b, fb(), LineartVert::fbcoord, LineartBoundingArea::l, lineart_bounding_area_edge_intersect(), lineart_point_inside_triangle(), LineartBoundingArea::r, LineartBoundingArea::u, and LineartTriangle::v.
Referenced by lineart_bounding_area_link_triangle().
|
static |
Definition at line 363 of file lineart_cpu.cc.
References LineartBoundingArea::linked_triangles, LineartBoundingArea::max_triangle_count, and MEM_recallocN.
Referenced by lineart_bounding_area_link_triangle().
|
static |
Re-link adjacent tiles after one gets subdivided.
Definition at line 3786 of file lineart_cpu.cc.
References LineartBoundingArea::b, BLI_listbase_clear(), LineartBoundingArea::bp, LineartBoundingArea::child, LinkData::data, LineartBoundingArea::l, lineart_list_append_pointer_pool(), lineart_list_remove_pointer_item_no_free(), LISTBASE_FOREACH, LineartBoundingArea::lp, LinkData::next, LineartData::render_data_pool, LineartBoundingArea::rp, and LineartBoundingArea::up.
Referenced by lineart_bounding_areas_connect_recursive().
|
static |
Definition at line 3934 of file lineart_cpu.cc.
References LineartBoundingArea::child, i, lineart_bounding_areas_connect_new(), and lineart_bounding_areas_connect_recursive().
Referenced by lineart_bounding_areas_connect_recursive(), and lineart_main_bounding_areas_connect_post().
|
static |
Definition at line 1929 of file lineart_cpu.cc.
References EdgeNeighborData::adj_e, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), EdgeNeighborData::corner_tris, EdgeNeighborData::corner_verts, LineartAdjacentEdge::e, LineartEdgeNeighbor::e, EdgeNeighborData::edge_nabr, i, lineart_edge_neighbor_init_task(), lineart_sort_adjacent_items(), MEM_freeN(), MEM_malloc_arrayN(), TaskParallelSettings::min_iter_per_thread, EdgeNeighborData::tri_faces, and v2.
Referenced by lineart_geometry_object_load().
|
static |
Definition at line 4301 of file lineart_cpu.cc.
References LineartBoundingArea::child, i, LineartBoundingArea::line_count, lineart_clear_linked_edges_recursive(), LineartBoundingArea::linked_lines, LineartBoundingArea::max_line_count, MEM_calloc_arrayN(), and MEM_freeN().
Referenced by lineart_clear_linked_edges_recursive(), and lineart_main_clear_linked_edges().
|
static |
Definition at line 4590 of file lineart_cpu.cc.
References LineartIsecThread::array, BLI_addhead(), BLI_addtail(), LineartData::conf, copy_v3_v3_db(), LineartIsecThread::current, e, LineartData::edge_data_pool, LineartElementLinkNode::element_count, fabs(), LineartData::_conf::far_clip, LineartVert::fbcoord, LineartElementLinkNode::flags, G, LineartData::geom, LineartVert::gloc, i, LineartTriangle::intersection_mask, LineartIsecData::ld, LineartData::_geom::line_buffer_pointers, lineart_add_edge_to_array(), lineart_find_matching_eln(), lineart_mem_acquire(), LRT_ELEMENT_INTERSECTION_DATA, LRT_OBINDEX_HIGHER, MOD_LINEART_EDGE_FLAG_INTERSECTION, mul_v3db_db(), mul_v4_m4v3_db(), LineartData::_conf::near_clip, LineartElementLinkNode::object_ref, LineartData::pending_edges, LineartElementLinkNode::pointer, printf, LineartData::_conf::shift_x, LineartData::_conf::shift_y, LineartIsecData::thread_count, LineartIsecData::threads, LineartIsecSingle::tri1, LineartIsecSingle::tri2, v, LineartIsecSingle::v1, LineartIsecSingle::v2, v2, and LineartData::_conf::view_projection.
Referenced by lineart_main_add_triangles().
|
static |
Definition at line 3567 of file lineart_cpu.cc.
References LineartData::_conf::active_camera_pos, LineartCache::all_enabled_edge_types, LineartData::_conf::allow_boundaries, LineartData::_conf::allow_duplicated_types, LineartData::_conf::allow_overlapping_edges, GreasePencilLineartModifierData::angle_splitting_threshold, LineartData::_conf::angle_splitting_threshold, BKE_camera_sensor_fit(), BKE_render_num_threads(), BLI_spin_init(), GreasePencilLineartModifierData::cache, GreasePencilLineartModifierData::calculation_flags, LineartData::_conf::cam_is_persp, LineartData::_conf::cam_is_persp_secondary, LineartData::_conf::cam_obmat, LineartData::_conf::cam_obmat_secondary, CAM_PERSP, LineartData::_conf::camera_pos, LineartData::_conf::camera_pos_secondary, CAMERA_SENSOR_FIT_HOR, CAMERA_SENSOR_FIT_VERT, LineartCache::chain_data_pool, LineartData::chain_data_pool, LineartData::_conf::chain_preserve_details, GreasePencilLineartModifierData::chain_smooth_tolerance, LineartData::_conf::chain_smooth_tolerance, GreasePencilLineartModifierData::chaining_image_threshold, LineartData::_conf::chaining_image_threshold, Camera::clip_end, Camera::clip_start, LineartData::conf, copy_m4_m4(), copy_v3db_v3fl(), cos, GreasePencilLineartModifierData::crease_threshold, LineartData::_conf::crease_threshold, Object::data, LineartData::edge_data_pool, GreasePencilLineartModifierData::edge_types_override, LineartData::_conf::far_clip, LineartData::_conf::filter_face_mark, LineartData::_conf::filter_face_mark_boundaries, LineartData::_conf::filter_face_mark_invert, LineartData::_conf::filter_face_mark_keep_contour, LineartData::_conf::force_crease, LineartData::_conf::fuzzy_everything, LineartData::_conf::fuzzy_intersections, LineartData::h, GreasePencilLineartModifierData::la_data_ptr, LA_SUN, GreasePencilLineartModifierData::level_end_override, GreasePencilLineartModifierData::light_contour_object, LineartData::_conf::light_reference_available, LINEART_SHADOW_FILTER_ILLUMINATED_ENCLOSED_SHAPES, LineartData::lock_cuts, LineartStaticMemPool::lock_mem, LineartData::lock_task, LRT_TILE_RECURSIVE_ORTHO, LRT_TILE_RECURSIVE_PERSPECTIVE, M_PI, LineartData::_conf::max_occlusion_level, MEM_callocN(), MOD_LINEART_ALLOW_CLIPPING_BOUNDARIES, MOD_LINEART_ALLOW_OVERLAP_EDGE_TYPES, MOD_LINEART_ALLOW_OVERLAPPING_EDGES, MOD_LINEART_CHAIN_GEOMETRY_SPACE, MOD_LINEART_CHAIN_LOOSE_EDGES, MOD_LINEART_CHAIN_PRESERVE_DETAILS, MOD_LINEART_EDGE_FLAG_CONTOUR, MOD_LINEART_EDGE_FLAG_CREASE, MOD_LINEART_EDGE_FLAG_EDGE_MARK, MOD_LINEART_EDGE_FLAG_INTERSECTION, MOD_LINEART_EDGE_FLAG_LIGHT_CONTOUR, MOD_LINEART_EDGE_FLAG_LOOSE, MOD_LINEART_EDGE_FLAG_MATERIAL, MOD_LINEART_EDGE_FLAG_PROJECTED_SHADOW, MOD_LINEART_EVERYTHING_AS_CONTOUR, MOD_LINEART_FILTER_FACE_MARK, MOD_LINEART_FILTER_FACE_MARK_BOUNDARIES, MOD_LINEART_FILTER_FACE_MARK_INVERT, MOD_LINEART_FILTER_FACE_MARK_KEEP_CONTOUR, MOD_LINEART_INTERSECTION_AS_CONTOUR, MOD_LINEART_LOOSE_AS_CONTOUR, MOD_LINEART_USE_BACK_FACE_CULLING, MOD_LINEART_USE_CREASE_ON_SHARP_EDGES, MOD_LINEART_USE_CREASE_ON_SMOOTH_SURFACES, MOD_LINEART_USE_IMAGE_BOUNDARY_TRIMMING, LineartData::_conf::near_clip, normalize_v3(), OB_LAMP, GreasePencilLineartModifierData::overscan, LineartData::_conf::overscan, LineartData::qtree, Scene::r, LineartData::_qtree::recursive_level, LineartData::render_data_pool, Camera::sensor_fit, LineartData::_conf::shadow_enclose_shapes, LineartData::_conf::shadow_selection, GreasePencilLineartModifierData::shadow_selection_override, LineartData::_conf::shadow_use_silhouette, GreasePencilLineartModifierData::shadow_use_silhouette_override, LineartData::_conf::sharp_as_crease, LineartData::_conf::shift_x, LineartData::_conf::shift_y, Camera::shiftx, Camera::shifty, LineartData::thread_count, Camera::type, Object::type, LineartData::_conf::use_back_face_culling, LineartData::_conf::use_contour, LineartData::_conf::use_crease, LineartData::_conf::use_edge_marks, LineartData::_conf::use_geometry_space_chain, LineartData::_conf::use_image_boundary_trimming, LineartData::_conf::use_intersections, LineartData::_conf::use_light_contour, LineartData::_conf::use_loose, LineartData::_conf::use_loose_as_contour, LineartData::_conf::use_loose_edge_chain, LineartData::_conf::use_material, LineartData::_conf::use_shadow, LineartData::w, RenderData::xsch, and RenderData::ysch.
Referenced by MOD_lineart_compute_feature_lines_v3().
|
static |
Definition at line 3389 of file lineart_cpu.cc.
References LineartIsecThread::array, i, MEM_freeN(), LineartIsecData::thread_count, and LineartIsecData::threads.
Referenced by lineart_main_add_triangles().
|
static |
Definition at line 3520 of file lineart_cpu.cc.
References BLI_spin_end(), lineart_destroy_render_data_keep_init(), lineart_mem_destroy(), LineartData::lock_cuts, LineartStaticMemPool::lock_mem, LineartData::lock_task, and LineartData::render_data_pool.
Referenced by MOD_lineart_destroy_render_data_v3().
| void lineart_destroy_render_data_keep_init | ( | LineartData * | ld | ) |
Definition at line 3495 of file lineart_cpu.cc.
References LineartPendingEdges::array, BLI_listbase_clear(), LineartData::chains, LineartData::geom, i, LineartData::_qtree::initial_tile_count, LineartData::_qtree::initials, LineartData::_geom::line_buffer_pointers, lineart_end_bounding_area_recursive(), lineart_free_bounding_area_memories(), lineart_mem_destroy(), MEM_freeN(), LineartData::pending_edges, LineartData::qtree, LineartData::render_data_pool, LineartData::_geom::triangle_buffer_pointers, LineartData::_geom::vertex_buffer_pointers, and LineartData::wasted_cuts.
Referenced by lineart_destroy_render_data(), lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
|
static |
Definition at line 743 of file lineart_cpu.cc.
References e, MOD_LINEART_EDGE_FLAG_CHAIN_PICKED, and MOD_LINEART_EDGE_FLAG_NEXT_IS_DUPLICATION.
|
static |
Definition at line 129 of file lineart_cpu.cc.
References BLI_addtail(), BLI_spin_lock(), BLI_spin_unlock(), LineartData::lock_cuts, and LineartData::wasted_cuts.
Referenced by lineart_edge_cut().
| void lineart_edge_cut | ( | struct LineartData * | ld, |
| struct LineartEdge * | e, | ||
| double | start, | ||
| double | end, | ||
| uchar | material_mask_bits, | ||
| uchar | mat_occlusion, | ||
| uint32_t | shadow_bits ) |
Cuts the edge in image space and mark occlusion level for each segment.
Definition at line 160 of file lineart_cpu.cc.
References BLI_addtail(), BLI_insertlinkbefore(), BLI_remlink(), e, lineart_discard_segment(), lineart_give_segment(), LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, LRT_DOUBLE_CLOSE_ENOUGH, LRT_SHADOW_MASK_ENCLOSED_SHAPE, LRT_SHADOW_MASK_ILLUMINATED, LRT_SHADOW_MASK_ILLUMINATED_SHAPE, LRT_SHADOW_MASK_INHIBITED, LRT_SHADOW_MASK_SHADED, LineartEdgeSegment::material_mask_bits, MOD_LINEART_EDGE_FLAG_LIGHT_CONTOUR, LineartEdgeSegment::next, LineartEdgeSegment::occlusion, LineartEdgeSegment::prev, LineartEdgeSegment::ratio, LineartEdgeSegment::shadow_mask_bits, and UNLIKELY.
Referenced by lineart_occlusion_single_line(), lineart_register_shadow_cuts(), lineart_shadow_cast_generate_edges(), lineart_shadow_register_enclosed_shapes(), and lineart_shadow_register_silhouette().
| LineartBoundingArea * lineart_edge_first_bounding_area | ( | struct LineartData * | ld, |
| double * | fbcoord1, | ||
| double * | fbcoord2 ) |
This function gets the tile for the point e->v1, and later use lineart_bounding_area_next() to get next along the way.
Definition at line 4731 of file lineart_cpu.cc.
References data, interp_v2_v2v2_db(), LB, lineart_get_bounding_area(), lineart_intersect_seg_seg(), and RB.
| bool lineart_edge_from_triangle | ( | const LineartTriangle * | tri, |
| const LineartEdge * | e, | ||
| bool | allow_overlapping_edges ) |
Definition at line 2710 of file lineart_cpu.cc.
References e, LRT_LIGHT_CONTOUR_TARGET, LRT_TRI_SAME_POINT, MOD_LINEART_EDGE_FLAG_LIGHT_CONTOUR, LineartEdge::t1, LineartEdge::t2, and LineartTriangle::target_reference.
Referenced by lineart_shadow_cast(), and lineart_triangle_edge_image_space_occlusion().
|
static |
Definition at line 737 of file lineart_cpu.cc.
References e, LineartTriangle::v, and v2.
Referenced by lineart_triangle_adjacent_assign().
|
static |
Definition at line 1887 of file lineart_cpu.cc.
References EdgeNeighborData::adj_e, EdgeNeighborData::corner_tris, EdgeNeighborData::corner_verts, LineartAdjacentEdge::e, LineartEdgeNeighbor::e, EdgeNeighborData::edge_nabr, LineartEdgeNeighbor::flags, i, LineartAdjacentEdge::v1, LineartEdgeNeighbor::v1, LineartAdjacentEdge::v2, and LineartEdgeNeighbor::v2.
Referenced by lineart_build_edge_neighbor().
|
static |
Definition at line 1456 of file lineart_cpu.cc.
References count, i, LRT_MESH_EDGE_TYPES, and LRT_MESH_EDGE_TYPES_COUNT.
Referenced by lineart_identify_corner_tri_feature_edges().
|
static |
Definition at line 3485 of file lineart_cpu.cc.
References BLI_spin_end(), LineartBoundingArea::child, i, lineart_end_bounding_area_recursive(), and LineartBoundingArea::lock.
Referenced by lineart_destroy_render_data_keep_init(), and lineart_end_bounding_area_recursive().
|
static |
Definition at line 1773 of file lineart_cpu.cc.
References LineartPendingEdges::array, MEM_freeN(), LineartPendingEdges::next, and LineartObjectInfo::pending_edges.
Referenced by lineart_main_load_geometries().
| void lineart_finalize_object_edge_array_reserve | ( | LineartPendingEdges * | pe, |
| int | count ) |
Definition at line 1758 of file lineart_cpu.cc.
References LineartPendingEdges::array, count, LineartPendingEdges::max, and MEM_malloc_arrayN().
Referenced by lineart_main_load_geometries(), and lineart_main_make_enclosed_shapes().
|
static |
Definition at line 4261 of file lineart_cpu.cc.
References LineartData::_qtree::count_x, LineartData::_qtree::count_y, i, LineartData::_qtree::initials, lineart_free_bounding_area_memory(), and LineartData::qtree.
Referenced by lineart_destroy_render_data_keep_init().
|
static |
Definition at line 4246 of file lineart_cpu.cc.
References BLI_spin_end(), LineartBoundingArea::child, i, lineart_free_bounding_area_memory(), LineartBoundingArea::linked_lines, LineartBoundingArea::linked_triangles, LineartBoundingArea::lock, and MEM_freeN().
Referenced by lineart_free_bounding_area_memories(), and lineart_free_bounding_area_memory().
|
static |
Definition at line 2402 of file lineart_cpu.cc.
References bounds(), copy_v3_v3_db(), copy_v3db_v3fl(), blender::bounds::corners(), i, and mul_v4_m4v3_db().
Referenced by lineart_object_load_single_instance().
|
static |
Definition at line 2383 of file lineart_cpu.cc.
References i, LineartObjectInfo::next, LineartObjectLoadTaskInfo::pending, and LineartObjectLoadTaskInfo::total_faces.
Referenced by lineart_object_load_single_instance().
|
static |
Definition at line 1965 of file lineart_cpu.cc.
References LineartData::_conf::allow_duplicated_types, BKE_id_free(), BLI_addtail(), BLI_parallel_range_settings_defaults(), BLI_spin_lock(), BLI_spin_unlock(), BLI_task_parallel_range(), LineartData::conf, TriData::corner_tris, TriData::corner_verts, cosf, blender::bke::LooseGeomCache::count, LineartData::_conf::crease_threshold, ObjectLineArt::crease_threshold, e, LineartEdgeNeighbor::e, blender::bke::Edge, LineartData::edge_data_pool, LineartEdge::edge_identifier, ELEM, LineartElementLinkNode::element_count, blender::bke::Face, feat_data_sum_reduce(), EdgeFeatReduceData::feat_edges, LineartEdge::flags, LineartEdgeNeighbor::flags, LineartElementLinkNode::flags, ObjectLineArt::flags, LineartObjectInfo::free_use_mesh, TaskParallelSettings::func_reduce, LineartData::geom, i, blender::bke::LooseGeomCache::is_loose_bits, EdgeFeatData::ld, LineartData::_geom::line_buffer_pointers, Object::lineart, lineart_add_edge_to_array_thread(), lineart_build_edge_neighbor(), lineart_find_matching_edge(), lineart_find_matching_eln(), lineart_identify_corner_tri_feature_edges(), lineart_list_append_pointer_pool_sized_thread(), lineart_list_append_pointer_pool_thread(), lineart_load_tri_task(), lineart_mem_acquire_thread(), lineart_mvert_transform_task(), lineart_register_shadow_cuts(), lineart_triangle_adjacent_assign(), lineart_triangle_from_index(), TriData::lineart_triangle_size, LineartData::lock_task, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), LooseEdgeData::loose_array, LooseEdgeData::loose_count, LRT_EDGE_IDENTIFIER, LRT_ELEMENT_BORDER_ONLY, LRT_ELEMENT_NO_INTERSECTION, LRT_MESH_EDGE_TYPES, LRT_MESH_EDGE_TYPES_COUNT, M_PI, TriData::material_indices, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), MEM_SAFE_FREE, TaskParallelSettings::min_iter_per_thread, MOD_LINEART_EDGE_FLAG_LOOSE, MOD_LINEART_EDGE_FLAG_NEXT_IS_DUPLICATION, LineartObjectInfo::model_view, VertData::model_view, LineartObjectInfo::model_view_proj, VertData::model_view_proj, OB_FONT, TriData::ob_info, LineartElementLinkNode::obindex, LineartObjectInfo::obindex, OBJECT_LRT_FORCE_INTERSECTION, OBJECT_LRT_INCLUDE, OBJECT_LRT_INHERIT, OBJECT_LRT_NO_INTERSECTION, OBJECT_LRT_OWN_CREASE, LineartEdge::object_ref, LineartElementLinkNode::object_ref, LineartObjectInfo::original_me, LineartObjectInfo::original_ob, LineartObjectInfo::original_ob_eval, TriData::positions, VertData::positions, LineartData::render_data_pool, LineartEdge::segments, Span< T >::size(), LineartData::sizeof_triangle, LineartEdge::t1, LineartEdge::t2, TriData::tri_adj, TriData::tri_arr, TriData::tri_faces, LineartData::_geom::triangle_adjacent_pointers, LineartData::_geom::triangle_buffer_pointers, Object::type, LineartObjectInfo::usage, LineartData::_conf::use_loose, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, LineartEdge::v1, LineartEdgeNeighbor::v1, LineartEdge::v2, LineartEdgeNeighbor::v2, VertData::v_arr, LineartObjectInfo::v_eln, TriData::vert_arr, and LineartData::_geom::vertex_buffer_pointers.
Referenced by lineart_object_load_worker().
|
static |
Definition at line 4504 of file lineart_cpu.cc.
References LineartBoundingArea::child, LineartData::_qtree::count_x, LineartData::_qtree::count_y, LineartBoundingArea::cx, LineartBoundingArea::cy, LineartData::_qtree::initials, LineartData::qtree, LineartData::_qtree::tile_height, LineartData::_qtree::tile_width, x, and y.
Referenced by lineart_edge_first_bounding_area(), and MOD_lineart_get_bounding_area().
|
static |
Definition at line 4435 of file lineart_cpu.cc.
References b, CLAMP, LineartData::_qtree::count_x, LineartData::_qtree::count_y, e, LineartData::qtree, LineartData::_qtree::tile_height, and LineartData::_qtree::tile_width.
Referenced by lineart_main_link_lines().
|
static |
Definition at line 4399 of file lineart_cpu.cc.
References b, LineartData::_qtree::count_x, LineartData::_qtree::count_y, LineartVert::fbcoord, LineartData::qtree, LineartData::_qtree::tile_height, LineartData::_qtree::tile_width, and LineartTriangle::v.
Referenced by lineart_add_triangles_worker().
|
static |
Definition at line 142 of file lineart_cpu.cc.
References BLI_pophead(), BLI_spin_lock(), BLI_spin_unlock(), LineartData::edge_data_pool, ListBase::first, lineart_mem_acquire_thread(), LineartData::lock_cuts, and LineartData::wasted_cuts.
Referenced by lineart_edge_cut().
|
static |
Definition at line 1517 of file lineart_cpu.cc.
References LineartData::_conf::allow_duplicated_types, BKE_object_material_get_eval(), LineartData::_conf::cam_is_persp, LineartData::_conf::cam_is_persp_secondary, LineartData::_conf::camera_pos, LineartData::_conf::camera_pos_secondary, LineartData::conf, EdgeFeatData::corner_edges, corner_tri_get_real_edges(), EdgeFeatData::corner_tris, EdgeFeatData::corner_verts, EdgeFeatData::crease_threshold, dot_v3v3_db(), e, LineartEdgeNeighbor::e, EdgeFeatData::edge_nabr, EdgeFeatData::edges, EdgeFeatReduceData::feat_edges, LineartData::_conf::filter_face_mark, LineartData::_conf::filter_face_mark_boundaries, LineartData::_conf::filter_face_mark_invert, LineartData::_conf::filter_face_mark_keep_contour, LineartEdgeNeighbor::flags, LineartTriangle::flags, LineartData::_conf::force_crease, EdgeFeatData::freestyle_edge, EdgeFeatData::freestyle_face, LineartVert::gloc, LineartTriangle::gn, i, blender::Span< T >::is_empty(), EdgeFeatData::ld, Material::lineart, lineart_edge_type_duplication_count(), lineart_triangle_from_index(), LRT_CULL_DISCARD, LRT_TRIANGLE_MAT_BACK_FACE_CULLING, MaterialLineArt::mat_occlusion, EdgeFeatData::material_indices, MOD_LINEART_EDGE_FLAG_CONTOUR, MOD_LINEART_EDGE_FLAG_CONTOUR_SECONDARY, MOD_LINEART_EDGE_FLAG_CREASE, MOD_LINEART_EDGE_FLAG_EDGE_MARK, MOD_LINEART_EDGE_FLAG_INHIBIT, MOD_LINEART_EDGE_FLAG_MATERIAL, EdgeFeatData::ob_eval, result, LineartData::_conf::sharp_as_crease, EdgeFeatData::sharp_edges, EdgeFeatData::sharp_faces, sub_v3_v3v3_db(), EdgeFeatData::tri_array, EdgeFeatData::tri_faces, EdgeFeatData::use_auto_smooth, LineartData::_conf::use_back_face_culling, LineartData::_conf::use_contour, LineartData::_conf::use_contour_secondary, LineartData::_conf::use_crease, LineartData::_conf::use_edge_marks, EdgeFeatData::use_freestyle_edge, EdgeFeatData::use_freestyle_face, LineartData::_conf::use_material, LineartEdgeNeighbor::v1, EdgeFeatData::v_array, LineartData::_conf::view_vector, and LineartData::_conf::view_vector_secondary.
Referenced by lineart_geometry_object_load().
|
static |
Definition at line 3369 of file lineart_cpu.cc.
References LineartIsecThread::array, LineartIsecThread::current, ListBase::first, LineartData::geom, i, LineartData::isect_scheduled_up_to, LineartData::isect_scheduled_up_to_index, LineartIsecData::ld, LineartIsecThread::ld, LineartIsecThread::max, MEM_calloc_arrayN(), MEM_malloc_arrayN(), LineartIsecData::thread_count, LineartIsecThread::thread_id, LineartIsecData::threads, and LineartData::_geom::triangle_buffer_pointers.
Referenced by lineart_main_add_triangles().
|
static |
Definition at line 2292 of file lineart_cpu.cc.
References BKE_collection_has_object(), Collection::children, COLLECTION_LRT_USE_INTERSECTION_MASK, Object::id, Collection::lineart_flags, Collection::lineart_intersection_mask, lineart_intersection_mask_check(), LISTBASE_FOREACH, ID::orig_id, and result.
Referenced by lineart_intersection_mask_check(), and lineart_object_load_single_instance().
|
static |
Definition at line 2310 of file lineart_cpu.cc.
References BKE_collection_has_object(), Collection::children, COLLECTION_LRT_USE_INTERSECTION_PRIORITY, ObjectLineArt::flags, Object::id, ObjectLineArt::intersection_priority, Object::lineart, Collection::lineart_flags, Collection::lineart_intersection_priority, lineart_intersection_priority_check(), LISTBASE_FOREACH, OBJECT_LRT_OWN_INTERSECTION_PRIORITY, ID::orig_id, and result.
Referenced by lineart_intersection_priority_check(), and lineart_object_load_single_instance().
|
static |
Definition at line 1815 of file lineart_cpu.cc.
References BKE_object_material_get(), Material::blend_flag, copy_v3db_v3fl(), TriData::corner_tris, TriData::corner_verts, ELEM, LineartTriangle::flags, MaterialLineArt::flags, LineartTriangle::gn, i, LineartTriangle::intersecting_verts, LineartTriangle::intersection_mask, LineartObjectInfo::intersection_priority, LineartTriangle::intersection_priority, MaterialLineArt::intersection_priority, blender::Span< T >::is_empty(), Material::lineart, TriData::lineart_triangle_size, LRT_MATERIAL_CUSTOM_INTERSECTION_PRIORITY, LRT_MATERIAL_MASK_ENABLED, LRT_OBINDEX_LOWER, LRT_TRIANGLE_FORCE_INTERSECTION, LRT_TRIANGLE_INTERSECTION_ONLY, LRT_TRIANGLE_MAT_BACK_FACE_CULLING, LRT_TRIANGLE_NO_INTERSECTION, MA_BL_CULL_BACKFACE, LineartTriangle::mat_occlusion, MaterialLineArt::mat_occlusion, TriData::material_indices, LineartTriangle::material_mask_bits, MaterialLineArt::material_mask_bits, mul_v3_mat3_m4v3_db(), LineartObjectInfo::normal, normal_tri_v3(), normalize_v3_db(), TriData::ob_info, LineartObjectInfo::obindex, OBJECT_LRT_FORCE_INTERSECTION, OBJECT_LRT_INTERSECTION_ONLY, OBJECT_LRT_NO_INTERSECTION, OBJECT_LRT_OCCLUSION_ONLY, LineartObjectInfo::original_ob_eval, LineartObjectInfo::override_intersection_mask, TriData::positions, LineartTriangle::target_reference, TriData::tri_adj, TriData::tri_arr, TriData::tri_faces, LineartObjectInfo::usage, LineartTriangle::v, v2, and TriData::vert_arr.
Referenced by lineart_geometry_object_load().
| void lineart_main_add_triangles | ( | struct LineartData * | ld | ) |
Sequentially add triangles into render buffer, intersection lines between those triangles will also be computed at the same time.
Definition at line 4699 of file lineart_cpu.cc.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), BLI_time_now_seconds(), LineartData::conf, G, i, lineart_add_triangles_worker(), lineart_create_edges_from_isec_data(), lineart_destroy_isec_thread(), lineart_init_isec_thread(), printf, TASK_PRIORITY_HIGH, LineartData::thread_count, LineartIsecData::threads, and LineartData::_conf::use_intersections.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_bounding_area_make_initial | ( | LineartData * | ld | ) |
Definition at line 3722 of file lineart_cpu.cc.
References LineartBoundingArea::b, BLI_spin_init(), col, LineartData::_qtree::count_x, LineartData::_qtree::count_y, LineartBoundingArea::cx, LineartBoundingArea::cy, LineartData::h, i, LineartData::_qtree::initial_tile_count, LineartData::_qtree::initials, LineartBoundingArea::l, lineart_mem_acquire(), LineartBoundingArea::linked_lines, LineartBoundingArea::linked_triangles, LineartBoundingArea::lock, LRT_BA_ROWS, LRT_TILE_EDGE_COUNT_INITIAL, LRT_TILE_SPLITTING_TRIANGLE_LIMIT, LineartBoundingArea::max_line_count, LineartBoundingArea::max_triangle_count, MEM_calloc_arrayN(), LineartData::qtree, LineartBoundingArea::r, LineartData::render_data_pool, LineartData::_qtree::tile_height, LineartData::_qtree::tile_width, LineartBoundingArea::u, and LineartData::w.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_bounding_areas_connect_post | ( | LineartData * | ld | ) |
Definition at line 3944 of file lineart_cpu.cc.
References LineartBoundingArea::bp, col, LineartData::_qtree::count_x, LineartData::_qtree::count_y, i, LineartData::_qtree::initials, lineart_bounding_areas_connect_recursive(), lineart_list_append_pointer_pool(), LineartBoundingArea::lp, LineartData::qtree, LineartData::render_data_pool, LineartBoundingArea::rp, and LineartBoundingArea::up.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_clear_linked_edges | ( | LineartData * | ld | ) |
Definition at line 4316 of file lineart_cpu.cc.
References LineartData::_qtree::count_x, LineartData::_qtree::count_y, i, LineartData::_qtree::initials, lineart_clear_linked_edges_recursive(), and LineartData::qtree.
Referenced by lineart_main_make_enclosed_shapes().
| void lineart_main_cull_triangles | ( | struct LineartData * | ld, |
| bool | clip_far ) |
This function cuts triangles with near- or far-plane. Setting clip_far = true for cutting with far-plane. For triangles that's crossing the plane, it will generate new 1 or 2 triangles with new topology that represents the trimmed triangle. (which then became a triangle or a square formed by two triangles)
Definition at line 1215 of file lineart_cpu.cc.
References add_v3_v3_db(), LineartData::_conf::allow_boundaries, LineartData::_conf::cam_is_persp, LineartData::_conf::camera_pos, LineartData::conf, copy_v3_v3_db(), LineartElementLinkNode::element_count, LineartData::_conf::far_clip, LineartTriangle::flags, LineartData::geom, i, lineart_memory_get_edge_space(), lineart_memory_get_triangle_space(), lineart_memory_get_vert_space(), lineart_triangle_cull_single(), LISTBASE_FOREACH, LRT_CULL_DECIDE_INSIDE, LRT_CULL_DISCARD, LRT_CULL_ENSURE_MEMORY, LRT_ELEMENT_IS_ADDITIONAL, mul_v3db_db(), LineartData::_conf::near_clip, LineartData::sizeof_triangle, LineartData::_geom::triangle_buffer_pointers, LineartData::_conf::view_projection, and LineartData::_conf::view_vector.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_discard_out_of_frame_edges | ( | LineartData * | ld | ) |
Definition at line 1388 of file lineart_cpu.cc.
References bounds(), e, LineartData::geom, i, ISECT_LINE_LINE_NONE, isect_seg_seg_v2(), LineartData::_geom::line_buffer_pointers, LISTBASE_FOREACH, LRT_VERT_OUT_OF_BOUND, MOD_LINEART_EDGE_FLAG_CHAIN_PICKED, and v2.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_free_adjacent_data | ( | struct LineartData * | ld | ) |
Adjacent data is only used during the initial stages of computing. So we can free it using this function when it is not needed anymore.
Definition at line 1347 of file lineart_cpu.cc.
References BLI_pophead(), LineartData::geom, i, LineartTriangle::intersecting_verts, LISTBASE_FOREACH, MEM_freeN(), LineartData::sizeof_triangle, LineartData::_geom::triangle_adjacent_pointers, and LineartData::_geom::triangle_buffer_pointers.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_get_view_vector | ( | struct LineartData * | ld | ) |
The calculated view vector will point towards the far-plane from the camera position.
Definition at line 3455 of file lineart_cpu.cc.
References LineartData::_conf::cam_obmat, LineartData::_conf::cam_obmat_secondary, LineartData::conf, copy_m4_m4(), copy_v3db_v3fl(), invert_m4_m4(), LineartData::_conf::light_reference_available, mul_v3_mat3_m4v3(), normalize_v3(), transpose_m4(), LineartData::_conf::view_vector, and LineartData::_conf::view_vector_secondary.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_link_lines | ( | struct LineartData * | ld | ) |
Link lines to their respective bounding areas.
Definition at line 4326 of file lineart_cpu.cc.
References col, LineartData::_qtree::count_x, e, LineartData::_qtree::initials, lineart_bounding_area_link_edge(), lineart_get_edge_bounding_areas(), LRT_ITER_ALL_LINES_BEGIN, LRT_ITER_ALL_LINES_END, and LineartData::qtree.
Referenced by lineart_main_make_enclosed_shapes(), lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_load_geometries | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | camera, | ||
| LineartData * | ld, | ||
| bool | allow_duplicates, | ||
| bool | do_shadow_casting, | ||
| ListBase * | shadow_elns, | ||
| blender::Set< const Object * > * | included_objects ) |
Definition at line 2518 of file lineart_cpu.cc.
References BKE_camera_sensor_fit(), BKE_camera_sensor_size(), BKE_object_visibility(), BLI_assert, BLI_listbase_clear(), BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), BLI_time_now_seconds(), CAM_CUSTOM, LineartData::_conf::cam_obmat, CAM_ORTHO, CAM_PANO, CAM_PERSP, CAMERA_SENSOR_FIT_HOR, CAMERA_SENSOR_FIT_VERT, Camera::clip_end, Camera::clip_start, LineartData::conf, copy_m4_m4_db(), DAG_EVAL_RENDER, Object::data, DEG_get_evaluated(), DEG_get_mode(), DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, depsgraph, ELEM, DEGObjectIterSettings::flags, focallength_to_fov(), G, LineartData::geom, LineartData::h, i, DEGObjectIterSettings::included_objects, invert_m4_m4(), LineartObjectLoadTaskInfo::ld, Camera::lens, lineart_finalize_object_edge_array(), lineart_finalize_object_edge_array_reserve(), lineart_matrix_ortho_44d(), lineart_matrix_perspective_44d(), lineart_mem_acquire(), lineart_object_load_single_instance(), lineart_object_load_worker(), mul_m4db_m4db_m4fl(), OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_SURF, OB_VISIBLE_SELF, Camera::ortho_scale, LineartData::_conf::overscan, LineartData::pending_edges, printf, LineartData::render_data_pool, result, Camera::sensor_fit, Camera::sensor_x, Camera::sensor_y, LineartObjectLoadTaskInfo::shadow_elns, TASK_PRIORITY_HIGH, LineartData::thread_count, LineartObjectLoadTaskInfo::thread_id, LineartData::_geom::triangle_buffer_pointers, Camera::type, unit_m4_db(), v, LineartData::_geom::vertex_buffer_pointers, LineartData::_conf::view, view, LineartData::_conf::view_projection, LineartData::w, and w().
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_occlusion_begin | ( | struct LineartData * | ld | ) |
All internal functions starting with lineart_main_ is called inside #MOD_lineart_compute_feature_lines function. This function handles all occlusion calculation.
Definition at line 471 of file lineart_cpu.cc.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), i, LineartRenderTaskInfo::ld, lineart_occlusion_worker(), MEM_calloc_arrayN(), MEM_freeN(), TASK_PRIORITY_HIGH, LineartData::thread_count, and LineartRenderTaskInfo::thread_id.
Referenced by lineart_main_make_enclosed_shapes(), lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
| void lineart_main_perspective_division | ( | LineartData * | ld | ) |
Definition at line 1366 of file lineart_cpu.cc.
References LineartData::_conf::cam_is_persp, LineartData::conf, LineartVert::fbcoord, LineartData::geom, i, LISTBASE_FOREACH, LineartData::_conf::shift_x, LineartData::_conf::shift_y, and LineartData::_geom::vertex_buffer_pointers.
Referenced by lineart_main_try_generate_shadow_v3(), and MOD_lineart_compute_feature_lines_v3().
|
static |
Definition at line 4389 of file lineart_cpu.cc.
References col, LineartData::conf, LineartData::_qtree::count_x, LineartData::_qtree::count_y, LineartData::_qtree::initials, lineart_main_remove_unused_lines_recursive(), LineartData::_conf::max_occlusion_level, and LineartData::qtree.
Referenced by MOD_lineart_compute_feature_lines_v3().
|
static |
Definition at line 4343 of file lineart_cpu.cc.
References LineartBoundingArea::child, e, i, LineartBoundingArea::line_count, lineart_main_remove_unused_lines_recursive(), LineartBoundingArea::linked_lines, LineartBoundingArea::max_line_count, MEM_calloc_arrayN(), and MEM_freeN().
Referenced by lineart_main_remove_unused_lines_from_tiles(), and lineart_main_remove_unused_lines_recursive().
|
static |
Definition at line 701 of file lineart_cpu.cc.
References LineartData::conf, LineartData::_conf::crease_threshold, LineartElementLinkNode::crease_threshold, LineartData::edge_data_pool, LineartElementLinkNode::element_count, LineartElementLinkNode::flags, LineartData::geom, LineartData::_geom::line_buffer_pointers, lineart_list_append_pointer_pool_sized(), lineart_mem_acquire(), and LRT_ELEMENT_IS_ADDITIONAL.
Referenced by lineart_main_cull_triangles().
|
static |
The following lineart_memory_get_XXX_space functions are for allocating new memory for some modified geometries in the culling stage.
Definition at line 667 of file lineart_cpu.cc.
References LineartElementLinkNode::element_count, LineartElementLinkNode::flags, LineartData::geom, lineart_list_append_pointer_pool_sized(), lineart_mem_acquire(), LRT_ELEMENT_IS_ADDITIONAL, LineartData::render_data_pool, LineartData::sizeof_triangle, and LineartData::_geom::triangle_buffer_pointers.
Referenced by lineart_main_cull_triangles().
|
static |
Definition at line 685 of file lineart_cpu.cc.
References LineartElementLinkNode::element_count, LineartElementLinkNode::flags, LineartData::geom, lineart_list_append_pointer_pool_sized(), lineart_mem_acquire(), LRT_ELEMENT_IS_ADDITIONAL, LineartData::render_data_pool, and LineartData::_geom::vertex_buffer_pointers.
Referenced by lineart_main_cull_triangles().
|
static |
Definition at line 1432 of file lineart_cpu.cc.
References copy_v3db_v3fl(), i, VertData::model_view, VertData::model_view_proj, mul_v3_m4v3_db(), mul_v4_m4v3_db(), VertData::positions, v, and VertData::v_arr.
Referenced by lineart_geometry_object_load().
|
static |
Definition at line 2446 of file lineart_cpu.cc.
References BKE_mesh_new_from_object(), BKE_object_get_evaluated_mesh(), LineartData::conf, copy_m4d_m4(), DEG_get_evaluated(), depsgraph, ELEM, Mesh::faces_num, LineartObjectInfo::free_use_mesh, Object::id, LineartObjectInfo::intersection_priority, invert_m4_m4(), lineart_geometry_check_visible(), lineart_geometry_load_assign_thread(), lineart_intersection_mask_check(), lineart_intersection_priority_check(), lineart_mem_acquire(), lineart_usage_check(), LRT_OBINDEX_SHIFT, Scene::master_collection, LineartObjectInfo::model_view, LineartObjectInfo::model_view_proj, mul_m4db_m4db_m4fl(), LineartObjectInfo::normal, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, LineartObjectInfo::obindex, OBJECT_LRT_EXCLUDE, ID::orig_id, LineartObjectInfo::original_me, LineartObjectInfo::original_ob, LineartObjectInfo::original_ob_eval, LineartObjectInfo::override_intersection_mask, LineartData::render_data_pool, Mesh::runtime, LineartData::_conf::shift_x, LineartData::_conf::shift_y, transpose_m4(), Object::type, LineartObjectInfo::usage, LineartData::_conf::view, and LineartData::_conf::view_projection.
Referenced by lineart_main_load_geometries().
|
static |
Definition at line 2284 of file lineart_cpu.cc.
References LineartObjectLoadTaskInfo::ld, lineart_geometry_object_load(), LineartObjectInfo::next, LineartObjectLoadTaskInfo::pending, and LineartObjectLoadTaskInfo::shadow_elns.
Referenced by lineart_main_load_geometries().
| BLI_INLINE bool lineart_occlusion_is_adjacent_intersection | ( | LineartEdge * | e, |
| LineartTriangle * | tri ) |
To see if given line is connected to an adjacent intersection line.
Definition at line 357 of file lineart_cpu.cc.
References BLI_INLINE, e, LRT_LIGHT_CONTOUR_TARGET, and LineartTriangle::target_reference.
Referenced by lineart_occlusion_single_line().
|
static |
Definition at line 433 of file lineart_cpu.cc.
References LineartPendingEdges::array, BLI_spin_lock(), BLI_spin_unlock(), LineartData::lock_task, LRT_THREAD_EDGE_COUNT, LineartPendingEdges::max, LineartPendingEdges::next, LineartData::pending_edges, LineartRenderTaskInfo::pending_edges, and LineartData::scheduled_count.
Referenced by lineart_occlusion_worker().
|
static |
Definition at line 389 of file lineart_cpu.cc.
References LineartData::_conf::allow_overlapping_edges, LineartTriangleThread::base, LineartData::_conf::cam_is_persp, LineartData::_conf::camera_pos, LineartData::conf, e, LineartTriangle::flags, i, l, lineart_edge_cut(), lineart_occlusion_is_adjacent_intersection(), lineart_triangle_edge_image_space_occlusion(), LRT_EDGE_BA_MARCHING_BEGIN, LRT_EDGE_BA_MARCHING_END, LRT_EDGE_BA_MARCHING_NEXT, LRT_TRIANGLE_INTERSECTION_ONLY, LineartTriangle::mat_occlusion, LineartTriangle::material_mask_bits, LineartData::_conf::max_occlusion_level, LineartData::_conf::shift_x, LineartData::_conf::shift_y, LineartTriangleThread::testing_e, LineartData::_conf::view_projection, and LineartData::_conf::view_vector.
Referenced by lineart_occlusion_worker().
|
static |
Definition at line 458 of file lineart_cpu.cc.
References LineartPendingEdges::array, i, LineartRenderTaskInfo::ld, lineart_occlusion_make_task_info(), lineart_occlusion_single_line(), LineartPendingEdges::max, LineartRenderTaskInfo::pending_edges, and LineartRenderTaskInfo::thread_id.
Referenced by lineart_main_occlusion_begin().
|
static |
Test if v lies with in the triangle formed by v0, v1, and v2. Returns false when v is exactly on the edge.
For v to be inside the triangle, it needs to be at the same side of v0->v1, v1->v2, and v2->v0, where the "side" is determined by checking the sign of cross(v1-v0, v1-v) and so on.
Definition at line 497 of file lineart_cpu.cc.
Referenced by lineart_bounding_area_triangle_intersect().
|
static |
Similar with lineart_point_inside_triangle, but in 3d. Returns false when not co-planar.
Definition at line 626 of file lineart_cpu.cc.
References cross_v3_v3v3_db(), dot_v3v3_db(), l, sub_v3_v3v3_db(), v, and v2.
Referenced by lineart_triangle_2v_intersection_math().
|
static |
Definition at line 528 of file lineart_cpu.cc.
References DBL_TRIANGLE_LIM, LRT_DOUBLE_CLOSE_ENOUGH, ratiod(), sub_v2_v2v2_db(), and v.
Referenced by lineart_point_triangle_relation().
|
static |
Same algorithm as lineart_point_inside_triangle(), but returns differently: 0-outside 1-on the edge 2-inside.
Definition at line 580 of file lineart_cpu.cc.
References lineart_point_on_line_segment(), LRT_INSIDE_TRIANGLE, LRT_ON_TRIANGLE, LRT_OUTSIDE_TRIANGLE, v, and v2.
Referenced by lineart_triangle_edge_image_space_occlusion().
|
static |
Definition at line 3324 of file lineart_cpu.cc.
References BLI_spin_lock(), BLI_spin_unlock(), LineartElementLinkNode::element_count, LineartData::geom, LineartIsecThread::index_from, LineartIsecThread::index_to, LineartData::isect_scheduled_up_to, LineartData::isect_scheduled_up_to_index, ListBase::last, LineartIsecThread::ld, LineartData::lock_task, LRT_ISECT_TRIANGLE_PER_THREAD, LineartElementLinkNode::next, LineartIsecThread::pending_from, LineartIsecThread::pending_to, and LineartData::_geom::triangle_buffer_pointers.
Referenced by lineart_add_triangles_worker().
|
static |
Definition at line 1910 of file lineart_cpu.cc.
References b, length(), blender::parallel_sort(), LineartAdjacentEdge::v1, and LineartAdjacentEdge::v2.
Referenced by lineart_build_edge_neighbor().
|
static |
Definition at line 3183 of file lineart_cpu.cc.
References copy_v3_v3_db(), dot_v3v3_db(), fabs(), LineartVert::gloc, LineartTriangle::gn, interp_v3_v3v3_db(), lineart_point_inside_triangle3d(), LRT_DOUBLE_CLOSE_ENOUGH, sub_v3_v3v3_db(), LineartTriangle::v, and v2.
Referenced by lineart_triangle_intersect_math().
|
static |
Definition at line 1787 of file lineart_cpu.cc.
References e, LineartTriangleAdjacent::e, and lineart_edge_match().
Referenced by lineart_geometry_object_load().
|
static |
Does near-plane cut on 1 triangle only. When cutting with far-plane, the camera vectors gets reversed by the caller so don't need to implement one in a different direction.
(!in0) means "when point 0 is visible". conditions for point 1, 2 are the same idea.
(in0) means "when point 0 is invisible". conditions for point 1, 2 are the same idea.
Definition at line 756 of file lineart_cpu.cc.
References dot_v3v3_db(), e, LineartTriangle::flags, LineartVert::gloc, INCREASE_EDGE, LineartVert::index, interp_v3_v3v3_db(), LineartTriangle::intersecting_verts, lineart_add_edge_to_array(), lineart_triangle_post(), lineart_triangle_set_cull_flag(), LRT_CULL_DISCARD, LRT_CULL_GENERATED, LRT_CULL_USED, MOD_LINEART_EDGE_FLAG_CONTOUR, mul_v4_m4v3_db(), LineartData::pending_edges, LineartElementLinkNode::pointer, RELINK_EDGE, REMOVE_TRIANGLE_EDGE, SELECT_EDGE, LineartData::sizeof_triangle, sub_v3_v3v3_db(), and LineartTriangle::v.
Referenced by lineart_main_cull_triangles().
|
static |
This is the main function to calculate the occlusion status between 1(one) triangle and 1(one) line. if returns true, then from/to will carry the occluded segments in ratio from e->v1 to e->v2. The line is later cut with these two values.
TODO(@Yiming): This function uses a convoluted method that needs to be redesigned.
1) The lineart_intersect_seg_seg() and lineart_point_triangle_relation() are separate calls, which would potentially return results that doesn't agree, especially when it's an edge extruding from one of the triangle's point. To get the information using one math process can solve this problem.
2) Currently using discrete a/b/c/para_e1/para_e2/para_e3/is[3] values for storing intersection/edge_aligned/intersection_order info, which isn't optimal, needs a better representation (likely a struct) for readability and clarity of code path.
I keep this function as-is because it's still fast, and more importantly the output value threshold is already in tune with the cutting function in the next stage. While current "edge aligned" fix isn't ideal, it does solve most of the precision issue especially in orthographic camera mode.
Definition at line 2805 of file lineart_cpu.cc.
References copy_v3_v3_db(), DBL_TRIANGLE_LIM, dot_v3v3_db(), e, fabs(), LineartVert::fbcoord, LineartVert::gloc, LineartTriangle::gn, interp_v3_v3v3_db(), INTERSECT_JUST_GREATER, INTERSECT_JUST_SMALLER, INTERSECT_SORT_MIN_TO_MAX_3, lineart_edge_from_triangle(), lineart_intersect_seg_seg(), lineart_point_triangle_relation(), LRT_GUARD_NOT_FOUND, LRT_INSIDE_TRIANGLE, LRT_ISEC, LRT_ON_TRIANGLE, LRT_OUTSIDE_TRIANGLE, LRT_PARALLEL, MOD_LINEART_EDGE_FLAG_PROJECTED_SHADOW, MOD_LINEART_EDGE_FLAG_SHADOW_FACING_LIGHT, mul_v3db_db(), mul_v4_m4v3_db(), ratiod(), sub_v3_v3v3_db(), LineartTriangle::target_reference, and LineartTriangle::v.
Referenced by lineart_occlusion_single_line().
|
static |
Because we have a variable size for LineartTriangle, we need an access helper. See LineartTriangleThread for more info.
Definition at line 1472 of file lineart_cpu.cc.
References b, and LineartData::sizeof_triangle.
Referenced by lineart_geometry_object_load(), and lineart_identify_corner_tri_feature_edges().
|
static |
Returns the two other verts of the triangle given a vertex. Returns false if the given vertex doesn't belong to this triangle.
Definition at line 2687 of file lineart_cpu.cc.
References l, and LineartTriangle::v.
Referenced by lineart_triangle_intersect_math().
|
static |
Definition at line 3398 of file lineart_cpu.cc.
References BLI_assert, LineartEdge::flags, LineartTriangle::flags, LineartVert::gloc, i, lineart_add_isec_thread(), lineart_triangle_intersect_math(), lineart_triangle_share_edge(), LineartBoundingArea::linked_triangles, LRT_TRIANGLE_FORCE_INTERSECTION, LRT_TRIANGLE_INTERSECTION_ONLY, LRT_TRIANGLE_NO_INTERSECTION, LineartTriangleThread::testing_e, LineartIsecThread::thread_id, and LineartTriangle::v.
Referenced by lineart_bounding_area_link_triangle().
|
static |
Definition at line 3223 of file lineart_cpu.cc.
References copy_v3_v3_db(), LineartVert::gloc, lineart_triangle_2v_intersection_math(), lineart_triangle_get_other_verts(), lineart_triangle_share_point(), next, LineartTriangle::v, and v2.
Referenced by lineart_triangle_intersect_in_bounding_area().
|
static |
Definition at line 718 of file lineart_cpu.cc.
References copy_v3_v3_db(), LineartTriangle::flags, LineartTriangle::gn, LineartTriangle::intersection_mask, LineartTriangle::intersection_priority, LRT_CULL_GENERATED, LineartTriangle::mat_occlusion, LineartTriangle::material_mask_bits, and LineartTriangle::target_reference.
Referenced by lineart_triangle_cull_single().
|
static |
Definition at line 730 of file lineart_cpu.cc.
References flag, LineartTriangle::flags, and LRT_TRIANGLE_INTERSECTION_ONLY.
Referenced by lineart_triangle_cull_single().
|
static |
At this stage of the computation we don't have triangle adjacent info anymore, so we can only compare the global vert index.
Definition at line 3101 of file lineart_cpu.cc.
References LineartVert::index, l, and LineartTriangle::v.
Referenced by lineart_triangle_intersect_in_bounding_area().
|
static |
Definition at line 3150 of file lineart_cpu.cc.
References l, and LineartTriangle::v.
Referenced by lineart_triangle_intersect_math().
|
static |
Definition at line 3717 of file lineart_cpu.cc.
References LineartData::thread_count.
Referenced by MOD_lineart_compute_feature_lines_v3().
|
static |
See if this object in such collection is used for generating line art, Disabling a collection for line art will doable all objects inside.
Definition at line 2334 of file lineart_cpu.cc.
References BKE_collection_has_object(), Collection::children, COLLECTION_HIDE_RENDER, COLLECTION_HIDE_VIEWPORT, COLLECTION_LRT_EXCLUDE, COLLECTION_LRT_FORCE_INTERSECTION, COLLECTION_LRT_INTERSECTION_ONLY, COLLECTION_LRT_NO_INTERSECTION, COLLECTION_LRT_OCCLUSION_ONLY, ListBase::first, Collection::flag, Collection::gobject, Object::id, Object::lineart, Collection::lineart_usage, lineart_usage_check(), LISTBASE_FOREACH, OBJECT_LRT_EXCLUDE, OBJECT_LRT_FORCE_INTERSECTION, OBJECT_LRT_INHERIT, OBJECT_LRT_INTERSECTION_ONLY, OBJECT_LRT_NO_INTERSECTION, OBJECT_LRT_OCCLUSION_ONLY, ID::orig_id, result, and ObjectLineArt::usage.
Referenced by lineart_object_load_single_instance(), and lineart_usage_check().
| void MOD_lineart_clear_cache | ( | LineartCache ** | lc | ) |
Definition at line 3557 of file lineart_cpu.cc.
References lineart_mem_destroy(), and MEM_freeN().
Referenced by bake_single_target(), bake_strokes(), blender::generate_strokes(), and blender::modify_geometry_set().
| bool MOD_lineart_compute_feature_lines_v3 | ( | Depsgraph * | depsgraph, |
| GreasePencilLineartModifierData & | lmd, | ||
| LineartCache ** | cached_result, | ||
| bool | enable_stroke_depth_offset ) |
This is the entry point of all line art calculations.
Definition at line 4981 of file lineart_cpu.cc.
References LineartData::_conf::angle_splitting_threshold, BKE_scene_camera_switch_update(), BLI_time_now_seconds(), GreasePencilLineartModifierData::calculation_flags, Scene::camera, LineartData::_conf::chain_smooth_tolerance, LineartCache::chains, LineartData::chains, LineartData::conf, DEG_get_evaluated(), DEG_get_evaluated_scene(), depsgraph, ListBase::first, GreasePencilLineartModifierData::flags, G, LineartData::geom, lineart_count_and_print_render_buffer_memory(), lineart_create_render_buffer_v3(), lineart_destroy_render_data_keep_init(), lineart_main_add_triangles(), lineart_main_bounding_area_make_initial(), lineart_main_bounding_areas_connect_post(), lineart_main_cull_triangles(), lineart_main_discard_out_of_frame_edges(), lineart_main_free_adjacent_data(), lineart_main_get_view_vector(), lineart_main_link_lines(), lineart_main_load_geometries(), lineart_main_make_enclosed_shapes(), lineart_main_occlusion_begin(), lineart_main_perspective_division(), lineart_main_remove_unused_lines_from_tiles(), lineart_main_transform_and_add_shadow(), lineart_main_try_generate_shadow_v3(), lineart_mem_destroy(), lineart_register_intersection_shadow_cuts(), lineart_triangle_size_get(), MEM_freeN(), MOD_LINEART_ALLOW_DUPLI_OBJECTS, MOD_lineart_chain_clear_picked_flag(), MOD_lineart_chain_clip_at_border(), MOD_lineart_chain_connect(), MOD_lineart_chain_feature_lines(), MOD_lineart_chain_find_silhouette_backdrop_objects(), MOD_lineart_chain_offset_towards_camera(), MOD_lineart_chain_split_angle(), MOD_lineart_chain_split_for_fixed_occlusion(), MOD_lineart_finalize_chains(), MOD_lineart_init_cache(), MOD_LINEART_OFFSET_TOWARDS_CUSTOM_CAMERA, MOD_lineart_smooth_chains(), MOD_LINEART_USE_CUSTOM_CAMERA, OB_CAMERA, LineartModifierRuntime::object_dependencies, printf, RE_GetSceneRender(), GreasePencilLineartModifierData::runtime, LineartCache::shadow_data_pool, LineartCache::shadow_elns, LineartData::_conf::shadow_enclose_shapes, LineartData::_conf::shadow_selection, LineartData::_conf::shadow_use_silhouette, LineartData::sizeof_triangle, GreasePencilLineartModifierData::source_camera, GreasePencilLineartModifierData::stroke_depth_offset, Object::type, LineartData::_conf::use_image_boundary_trimming, and LineartData::_geom::vertex_buffer_pointers.
Referenced by bake_strokes(), and blender::generate_strokes().
| void MOD_lineart_destroy_render_data_v3 | ( | GreasePencilLineartModifierData * | lmd | ) |
Definition at line 3535 of file lineart_cpu.cc.
References G, GreasePencilLineartModifierData::la_data_ptr, lineart_destroy_render_data(), MEM_freeN(), and printf.
Referenced by bake_strokes(), and blender::generate_strokes().
| LineartBoundingArea * MOD_lineart_get_bounding_area | ( | LineartData * | ld, |
| double | x, | ||
| double | y ) |
Wrapper for more convenience.
Definition at line 4541 of file lineart_cpu.cc.
References lineart_get_bounding_area(), MOD_lineart_get_parent_bounding_area(), x, and y.
Referenced by MOD_lineart_chain_feature_lines().
| LineartBoundingArea * MOD_lineart_get_parent_bounding_area | ( | LineartData * | ld, |
| double | x, | ||
| double | y ) |
This only gets initial "biggest" tile.
Definition at line 4480 of file lineart_cpu.cc.
References col, LineartData::_qtree::count_x, LineartData::_qtree::count_y, LineartData::_qtree::initials, LineartData::qtree, LineartData::_qtree::tile_height, LineartData::_qtree::tile_width, x, and y.
Referenced by lineart_bounding_area_get_end_point(), lineart_bounding_area_link_chain(), and MOD_lineart_get_bounding_area().
| void MOD_lineart_gpencil_generate_v3 | ( | const LineartCache * | cache, |
| const blender::float4x4 & | inverse_mat, | ||
| Depsgraph * | depsgraph, | ||
| blender::bke::greasepencil::Drawing & | drawing, | ||
| const int8_t | source_type, | ||
| Object * | source_object, | ||
| Collection * | source_collection, | ||
| const int | level_start, | ||
| const int | level_end, | ||
| const int | mat_nr, | ||
| const int16_t | edge_types, | ||
| const uchar | mask_switches, | ||
| const uchar | material_mask_bits, | ||
| const uchar | intersection_mask, | ||
| const float | thickness, | ||
| const float | opacity, | ||
| const uchar | shadow_selection, | ||
| const uchar | silhouette_mode, | ||
| const char * | source_vgname, | ||
| const char * | vgname, | ||
| const int | modifier_flags, | ||
| const int | modifier_calculation_flags ) |
Definition at line 5189 of file lineart_cpu.cc.
References LineartCache::all_enabled_edge_types, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::CurvesGeometry::attributes_for_write(), BKE_collection_has_object_recursive_instanced(), BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_object_get_evaluated_mesh(), BLI_addtail(), LineartChainWriteInfo::chain, LineartEdgeChain::chain, LineartCache::chains, count, blender::bke::Curve, CURVE_TYPE_POLY, blender::bke::curves_new_nomain(), blender::bke::CurvesGeometry::deform_verts_for_write(), DEG_get_evaluated(), depsgraph, blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::SpanAttributeWriter< T >::finish(), blender::bke::GeometrySet::from_curves(), G, Curves::geometry, blender::bke::GeometrySet::get_curves_for_write(), i, Collection::id, Object::id, LineartEdgeChain::index_offset, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Span< T >::is_empty(), Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::geometry::join_geometries(), blender::IndexRange::last(), LINEART_SHADOW_FILTER_ILLUMINATED, LINEART_SHADOW_FILTER_ILLUMINATED_ENCLOSED_SHAPES, LINEART_SHADOW_FILTER_SHADED, LINEART_SILHOUETTE_FILTER_INDIVIDUAL, LINEART_SOURCE_COLLECTION, LINEART_SOURCE_OBJECT, LISTBASE_FOREACH, LISTBASE_FOREACH_INDEX, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), LRT_SHADOW_MASK_ILLUMINATED, LRT_SHADOW_MASK_ILLUMINATED_SHAPE, LRT_SHADOW_MASK_SHADED, LRT_SHADOW_MASK_UNDEFINED, LRT_SHADOW_TEST_SHAPE_BITS, max_ii(), MEM_callocN(), MOD_lineart_chain_count(), MOD_LINEART_EDGE_FLAG_CONTOUR, MOD_LINEART_EDGE_FLAG_INTERSECTION, MOD_LINEART_INTERSECTION_MATCH, MOD_LINEART_INVERT_COLLECTION, MOD_LINEART_INVERT_SILHOUETTE_FILTER, MOD_LINEART_INVERT_SOURCE_VGROUP, MOD_LINEART_MATCH_OUTPUT_VGROUP, MOD_LINEART_MATERIAL_MASK_ENABLE, MOD_LINEART_MATERIAL_MASK_MATCH, bDeformGroup::name, OB_MESH, LineartEdgeChain::object_ref, blender::bke::CurvesGeometry::offsets_for_write(), ID::orig_id, blender::bke::Point, LineartChainWriteInfo::point_count, blender::bke::CurvesGeometry::positions_for_write(), printf, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::bke::SpanAttributeWriter< T >::span, blender::StringRefBase::startswith(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_topology_changed(), blender::math::transform_point(), Object::type, UNLIKELY, CurvesGeometry::vertex_group_names, Mesh::vertex_group_names, and MDeformWeight::weight.
Referenced by bake_strokes(), and blender::generate_strokes().
| LineartCache * MOD_lineart_init_cache | ( | ) |
Definition at line 3551 of file lineart_cpu.cc.
References MEM_callocN().
Referenced by MOD_lineart_compute_feature_lines_v3(), and blender::modify_geometry_set().
|
static |
Definition at line 1445 of file lineart_cpu.cc.
Referenced by lineart_edge_type_duplication_count(), and lineart_geometry_object_load().