Blender V5.3
lineart_shadow.cc File Reference
#include "MOD_lineart.hh"
#include "lineart_intern.hh"
#include "BKE_global.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_grease_pencil_legacy_convert.hh"
#include "BKE_object.hh"
#include "BLI_listbase.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_rotation_c.hh"
#include "BLI_task_c.hh"
#include "BLI_time.hh"
#include "DNA_light_types.h"
#include "DNA_modifier_types.h"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  blender::LineartShadowFinalizeData

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define DISCARD_NONSENSE_SEGMENTS
#define GET_RATIO(n)

Functions

LineartElementLinkNode * blender::lineart_find_matching_eln (ListBaseT< LineartElementLinkNode > *shadow_elns, int obindex)
LineartEdge * blender::lineart_find_matching_edge (struct LineartElementLinkNode *shadow_eln, uint64_t edge_identifier)
static bool blender::lineart_contour_viewed_from_dark_side (LineartData *ld, LineartEdge *e)
void blender::lineart_register_shadow_cuts (struct LineartData *ld, struct LineartEdge *e, struct LineartEdge *shadow_edge)
void blender::lineart_register_intersection_shadow_cuts (struct LineartData *ld, ListBaseT< LineartElementLinkNode > *shadow_elns)
static LineartShadowSegment * blender::lineart_give_shadow_segment (LineartData *ld)
static void blender::lineart_shadow_segment_slice_get (double *fb_co_1, double *fb_co_2, double *gloc_1, double *gloc_2, double ratio, double at_1, double at_2, double *r_fb_co, double *r_gloc)
static bool blender::lineart_do_closest_segment (bool is_persp, double *s1_fb_co_1, double *s1_fb_co_2, double *s2_fb_co_1, double *s2_fb_co_2, double *s1_gloc_1, double *s1_gloc_2, double *s2_gloc_1, double *s2_gloc_2, double *r_fb_co_1, double *r_fb_co_2, double *r_gloc_1, double *r_gloc_2, double *r_new_in_the_middle, double *r_new_in_the_middle_global, double *r_new_at, bool *is_side_2r, bool *use_new_ref)
static void blender::lineart_shadow_create_shadow_edge_array (LineartData *ld, bool transform_edge_cuts, bool do_light_contour)
static void blender::lineart_shadow_edge_cut (LineartData *ld, LineartShadowEdge *e, double start, double end, double *start_gloc, double *end_gloc, double *start_fb_co, double *end_fb_co, bool facing_light, uint32_t target_reference)
static bool blender::lineart_shadow_cast_onto_triangle (LineartData *ld, LineartTriangle *tri, LineartShadowEdge *sedge, double *r_at_1, double *r_at_2, double *r_fb_co_1, double *r_fb_co_2, double *r_gloc_1, double *r_gloc_2, bool *r_facing_light)
static void blender::lineart_shadow_cast (LineartData *ld, bool transform_edge_cuts, bool do_light_contour)
static bool blender::lineart_shadow_cast_generate_edges (LineartData *ld, bool do_original_edges, LineartElementLinkNode **r_veln, LineartElementLinkNode **r_eeln)
static void blender::lineart_shadow_register_silhouette (LineartData *ld)
static void blender::lineart_shadow_register_enclosed_shapes (LineartData *ld, LineartData *shadow_ld)
bool blender::lineart_main_try_generate_shadow_v3 (struct Depsgraph *depsgraph, struct Scene *scene, struct LineartData *original_ld, struct GreasePencilLineartModifierData *lmd, struct LineartStaticMemPool *shadow_data_pool, struct LineartElementLinkNode **r_veln, struct LineartElementLinkNode **r_eeln, ListBaseT< LineartElementLinkNode > *r_calculated_edges_eln_list, struct LineartData **r_shadow_ld_if_reproject)
bool blender::lineart_main_try_generate_shadow (struct Depsgraph *depsgraph, struct Scene *scene, struct LineartData *original_ld, struct LineartGpencilModifierData *lmd_legacy, struct LineartStaticMemPool *shadow_data_pool, struct LineartElementLinkNode **r_veln, struct LineartElementLinkNode **r_eeln, ListBaseT< LineartElementLinkNode > *r_calculated_edges_eln_list, struct LineartData **r_shadow_ld_if_reproject)
static void blender::lineart_shadow_transform_task (void *__restrict userdata, const int element_index, const TaskParallelTLS *__restrict)
static void blender::lineart_shadow_finalize_shadow_edges_task (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict)
void blender::lineart_main_transform_and_add_shadow (struct LineartData *ld, struct LineartElementLinkNode *veln, struct LineartElementLinkNode *eeln)
void blender::lineart_main_make_enclosed_shapes (struct LineartData *ld, struct LineartData *shadow_ld)

Macro Definition Documentation

◆ DISCARD_NONSENSE_SEGMENTS

#define DISCARD_NONSENSE_SEGMENTS
Value:
if (es.occlusion != 0 || \
(es.next && LRT_DOUBLE_CLOSE_ENOUGH(es.ratio, ((LineartEdgeSegment *)es.next)->ratio))) \
{ \
continue; \
}
#define LRT_DOUBLE_CLOSE_ENOUGH(a, b)
#define LRT_ITER_ALL_LINES_NEXT

Referenced by blender::lineart_shadow_create_shadow_edge_array().

◆ GET_RATIO

#define GET_RATIO ( n)
Value:
(fabs(orig_e->v2->fbcoord[0] - orig_e->v1->fbcoord[0]) > \
fabs(orig_e->v2->fbcoord[1] - orig_e->v1->fbcoord[1])) ? \
((g##n##v[0] - orig_e->v1->fbcoord[0]) / \
(orig_e->v2->fbcoord[0] - orig_e->v1->fbcoord[0])) : \
((g##n##v[1] - orig_e->v1->fbcoord[1]) / (orig_e->v2->fbcoord[1] - orig_e->v1->fbcoord[1]))
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
Definition math_dual.h:241

Referenced by blender::lineart_shadow_register_enclosed_shapes().