Blender  V2.93
Macros | Functions
lineart_cpu.c File Reference
#include "MOD_lineart.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BKE_camera.h"
#include "BKE_collection.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_scene.h"
#include "DEG_depsgraph_query.h"
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "bmesh.h"
#include "bmesh_class.h"
#include "bmesh_tools.h"
#include "lineart_intern.h"

Go to the source code of this file.

Macros

#define LRT_ASSIGN_OCCLUSION_TASK(name)
 
#define INCREASE_RL
 
#define SELECT_RL(e_num, v1_link, v2_link, newrt)
 
#define RELINK_RL(e_num, newrt)
 
#define REMOVE_TRIANGLE_RL
 
#define LRT_CULL_ENSURE_MEMORY
 
#define LRT_CULL_DECIDE_INSIDE
 
#define LRT_MESH_FINISH
 
#define LRT_TRI_SAME_POINT(rt, 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)
 

Functions

static LineartBoundingArealineart_edge_first_bounding_area (LineartRenderBuffer *rb, LineartEdge *e)
 
static void lineart_bounding_area_link_line (LineartRenderBuffer *rb, LineartBoundingArea *root_ba, LineartEdge *e)
 
static LineartBoundingArealineart_bounding_area_next (LineartBoundingArea *this, LineartEdge *e, double x, double y, double k, int positive_x, int positive_y, double *next_x, double *next_y)
 
static bool lineart_get_edge_bounding_areas (LineartRenderBuffer *rb, LineartEdge *e, int *rowbegin, int *rowend, int *colbegin, int *colend)
 
static void lineart_bounding_area_link_triangle (LineartRenderBuffer *rb, LineartBoundingArea *root_ba, LineartTriangle *rt, double *LRUB, int recursive, int recursive_level, bool do_intersection)
 
static bool lineart_triangle_edge_image_space_occlusion (SpinLock *spl, const LineartTriangle *rt, const LineartEdge *e, const double *override_camera_loc, const bool override_cam_is_persp, const bool allow_overlapping_edges, const double vp[4][4], const double *camera_dir, const float cam_shift_x, const float cam_shift_y, double *from, double *to)
 
static void lineart_add_edge_to_list (LineartRenderBuffer *rb, LineartEdge *e)
 
static void lineart_discard_segment (LineartRenderBuffer *rb, LineartLineSegment *rls)
 
static LineartLineSegmentlineart_give_segment (LineartRenderBuffer *rb)
 
static void lineart_edge_cut (LineartRenderBuffer *rb, LineartEdge *e, double start, double end, uchar transparency_mask)
 
BLI_INLINE bool lineart_occlusion_is_adjacent_intersection (LineartEdge *e, LineartTriangle *rt)
 
static void lineart_occlusion_single_line (LineartRenderBuffer *rb, LineartEdge *e, int thread_id)
 
static int lineart_occlusion_make_task_info (LineartRenderBuffer *rb, LineartRenderTaskInfo *rti)
 
static void lineart_occlusion_worker (TaskPool *__restrict UNUSED(pool), LineartRenderTaskInfo *rti)
 
static void lineart_main_occlusion_begin (LineartRenderBuffer *rb)
 
static bool lineart_point_inside_triangle (const double v[2], const double v0[2], const double v1[2], const double v2[2])
 
static int lineart_point_on_line_segment (double v[2], double v0[2], double v1[2])
 
static int lineart_point_triangle_relation (double v[2], double v0[2], double v1[2], double v2[2])
 
static bool lineart_point_inside_triangle3d (double v[3], double v0[3], double v1[3], double v2[3])
 
static LineartElementLinkNodelineart_memory_get_triangle_space (LineartRenderBuffer *rb)
 
static LineartElementLinkNodelineart_memory_get_vert_space (LineartRenderBuffer *rb)
 
static LineartElementLinkNodelineart_memory_get_edge_space (LineartRenderBuffer *rb)
 
static void lineart_triangle_post (LineartTriangle *rt, LineartTriangle *orig)
 
static void lineart_triangle_set_cull_flag (LineartTriangle *rt, uchar flag)
 
static bool lineart_edge_match (LineartTriangle *rt, LineartEdge *e, int v1, int v2)
 
static void lineart_triangle_cull_single (LineartRenderBuffer *rb, LineartTriangle *rt, int in0, int in1, int in2, double *cam_pos, double *view_dir, bool allow_boundaries, double(*vp)[4], Object *ob, int *r_v_count, int *r_e_count, int *r_t_count, LineartElementLinkNode *v_eln, LineartElementLinkNode *e_eln, LineartElementLinkNode *t_eln)
 
static void lineart_main_cull_triangles (LineartRenderBuffer *rb, bool clip_far)
 
static void lineart_main_free_adjacent_data (LineartRenderBuffer *rb)
 
static void lineart_main_perspective_division (LineartRenderBuffer *rb)
 
static void lineart_vert_transform (BMVert *v, int index, LineartVert *RvBuf, double(*mv_mat)[4], double(*mvp_mat)[4])
 
static LineartTrianglelineart_triangle_from_index (LineartRenderBuffer *rb, LineartTriangle *rt_array, int index)
 
static char lineart_identify_feature_line (LineartRenderBuffer *rb, BMEdge *e, LineartTriangle *rt_array, LineartVert *rv_array, float crease_threshold, bool no_crease, bool count_freestyle, BMesh *bm_if_freestyle)
 
static void lineart_triangle_adjacent_assign (LineartTriangle *rt, LineartTriangleAdjacent *rta, LineartEdge *e)
 
static void lineart_geometry_object_load (Depsgraph *dg, Object *ob, double(*mv_mat)[4], double(*mvp_mat)[4], LineartRenderBuffer *rb, int override_usage, int *global_vindex)
 
static bool _lineart_object_not_in_source_collection (Collection *source, Object *ob)
 
static int lineart_usage_check (Collection *c, Object *ob, LineartRenderBuffer *_rb)
 
static void lineart_main_load_geometries (Depsgraph *depsgraph, Scene *scene, Object *camera, LineartRenderBuffer *rb, bool allow_duplicates)
 
static bool lineart_triangle_get_other_verts (const LineartTriangle *rt, const LineartVert *rv, LineartVert **l, LineartVert **r)
 
static bool lineart_edge_from_triangle (const LineartTriangle *rt, const LineartEdge *e, bool allow_overlapping_edges)
 
static bool lineart_triangle_edge_image_space_occlusion (SpinLock *UNUSED(spl), const LineartTriangle *rt, const LineartEdge *e, const double *override_camera_loc, const bool override_cam_is_persp, const bool allow_overlapping_edges, const double vp[4][4], const double *camera_dir, const float cam_shift_x, const float cam_shift_y, double *from, double *to)
 
static bool lineart_triangle_share_edge (const LineartTriangle *l, const LineartTriangle *r)
 
static LineartVertlineart_triangle_share_point (const LineartTriangle *l, const LineartTriangle *r)
 
static bool lineart_vert_already_intersected_2v (LineartVertIntersection *rv, LineartVertIntersection *v1, LineartVertIntersection *v2)
 
static void lineart_vert_set_intersection_2v (LineartVert *rv, LineartVert *v1, LineartVert *v2)
 
static LineartVertlineart_triangle_2v_intersection_test (LineartRenderBuffer *rb, LineartVert *v1, LineartVert *v2, LineartTriangle *rt, LineartTriangle *testing, LineartVert *last)
 
static LineartEdgelineart_triangle_intersect (LineartRenderBuffer *rb, LineartTriangle *rt, LineartTriangle *testing)
 
static void lineart_triangle_intersect_in_bounding_area (LineartRenderBuffer *rb, LineartTriangle *rt, LineartBoundingArea *ba)
 
static void lineart_main_get_view_vector (LineartRenderBuffer *rb)
 
static void lineart_destroy_render_data (LineartRenderBuffer *rb)
 
void MOD_lineart_destroy_render_data (LineartGpencilModifierData *lmd)
 
static LineartRenderBufferlineart_create_render_buffer (Scene *scene, LineartGpencilModifierData *lmd)
 
static int lineart_triangle_size_get (const Scene *scene, LineartRenderBuffer *rb)
 
static void lineart_main_bounding_area_make_initial (LineartRenderBuffer *rb)
 
static void lineart_bounding_areas_connect_new (LineartRenderBuffer *rb, LineartBoundingArea *root)
 
static void lineart_bounding_area_split (LineartRenderBuffer *rb, LineartBoundingArea *root, int recursive_level)
 
static bool lineart_bounding_area_line_intersect (LineartRenderBuffer *UNUSED(fb), const double l[2], const double r[2], LineartBoundingArea *ba)
 
static bool lineart_bounding_area_triangle_intersect (LineartRenderBuffer *fb, LineartTriangle *rt, LineartBoundingArea *ba)
 
static void lineart_main_link_lines (LineartRenderBuffer *rb)
 
static bool lineart_get_triangle_bounding_areas (LineartRenderBuffer *rb, LineartTriangle *rt, int *rowbegin, int *rowend, int *colbegin, int *colend)
 
LineartBoundingAreaMOD_lineart_get_parent_bounding_area (LineartRenderBuffer *rb, double x, double y)
 
static LineartBoundingArealineart_get_bounding_area (LineartRenderBuffer *rb, double x, double y)
 
LineartBoundingAreaMOD_lineart_get_bounding_area (LineartRenderBuffer *rb, double x, double y)
 
static void lineart_main_add_triangles (LineartRenderBuffer *rb)
 
bool MOD_lineart_compute_feature_lines (Depsgraph *depsgraph, LineartGpencilModifierData *lmd)
 
static int lineart_rb_edge_types (LineartRenderBuffer *rb)
 
static void lineart_gpencil_generate (LineartRenderBuffer *rb, 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 transparency_flags, uchar transparency_mask, short thickness, float opacity, const char *source_vgname, const char *vgname, int modifier_flags)
 
void MOD_lineart_gpencil_generate (LineartRenderBuffer *rb, Depsgraph *depsgraph, Object *ob, bGPDlayer *gpl, bGPDframe *gpf, char source_type, void *source_reference, int level_start, int level_end, int mat_nr, short edge_types, uchar transparency_flags, uchar transparency_mask, short thickness, float opacity, const char *source_vgname, const char *vgname, int modifier_flags)
 

Macro Definition Documentation

◆ INCREASE_RL

#define INCREASE_RL
Value:
v1_obi = e->v1_obindex; \
v2_obi = e->v2_obindex; \
new_e = &((LineartEdge *)e_eln->pointer)[e_count]; \
e_count++; \
e = new_e; \
e->v1_obindex = v1_obi; \
e->v2_obindex = v2_obi; \
rls = lineart_mem_aquire(&rb->render_data_pool, sizeof(LineartLineSegment)); \
BLI_addtail(&e->segments, rls);
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void * lineart_mem_aquire(struct LineartStaticMemPool *smp, size_t size)
Definition: lineart_util.c:95

◆ INTERSECT_JUST_GREATER

#define INTERSECT_JUST_GREATER (   is,
  order,
  num,
  index 
)
Value:
{ \
index = (num < is[order[0]] ? \
order[0] : \
(num < is[order[1]] ? order[1] : (num < is[order[2]] ? order[2] : order[2]))); \
}
_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 order

Definition at line 1939 of file lineart_cpu.c.

◆ INTERSECT_JUST_SMALLER

#define INTERSECT_JUST_SMALLER (   is,
  order,
  num,
  index 
)
Value:
{ \
index = (num > is[order[2]] ? \
order[2] : \
(num > is[order[1]] ? order[1] : (num > is[order[0]] ? order[0] : order[0]))); \
}

Definition at line 1947 of file lineart_cpu.c.

◆ INTERSECT_SORT_MIN_TO_MAX_3

#define INTERSECT_SORT_MIN_TO_MAX_3 (   ia,
  ib,
  ic,
  lst 
)
Value:
{ \
lst[0] = LRT_MIN3_INDEX(ia, ib, ic); \
lst[1] = (((ia <= ib && ib <= ic) || (ic <= ib && ib <= ia)) ? \
1 : \
(((ic <= ia && ia <= ib) || (ib < ia && ia <= ic)) ? 0 : 2)); \
lst[2] = LRT_MAX3_INDEX(ia, ib, ic); \
}
#define LRT_MIN3_INDEX(a, b, c)
Definition: MOD_lineart.h:403
#define LRT_MAX3_INDEX(a, b, c)
Definition: MOD_lineart.h:401

Definition at line 1929 of file lineart_cpu.c.

◆ LRT_ASSIGN_OCCLUSION_TASK

#define LRT_ASSIGN_OCCLUSION_TASK (   name)
Value:
if (rb->name##_managed) { \
data = rb->name##_managed; \
rti->name = (void *)data; \
for (i = 0; i < LRT_THREAD_EDGE_COUNT && data; i++) { \
data = data->next; \
} \
rti->name##_end = data; \
rb->name##_managed = data; \
res = 1; \
} \
else { \
rti->name = NULL; \
}
#define LRT_THREAD_EDGE_COUNT
Definition: MOD_lineart.h:328

◆ LRT_CULL_DECIDE_INSIDE

#define LRT_CULL_DECIDE_INSIDE
Value:
/* These three represents points that are in the clipping range or not*/ \
in0 = 0, in1 = 0, in2 = 0; \
if (clip_far) { \
/* Point outside far plane. */ \
if (rt->v[0]->fbcoord[use_w] > clip_end) { \
in0 = 1; \
} \
if (rt->v[1]->fbcoord[use_w] > clip_end) { \
in1 = 1; \
} \
if (rt->v[2]->fbcoord[use_w] > clip_end) { \
in2 = 1; \
} \
} \
else { \
/* Point inside near plane. */ \
if (rt->v[0]->fbcoord[use_w] < clip_start) { \
in0 = 1; \
} \
if (rt->v[1]->fbcoord[use_w] < clip_start) { \
in1 = 1; \
} \
if (rt->v[2]->fbcoord[use_w] < clip_start) { \
in2 = 1; \
} \
}

◆ LRT_CULL_ENSURE_MEMORY

#define LRT_CULL_ENSURE_MEMORY
Value:
if (v_count > 60) { \
v_eln->element_count = v_count; \
v_count = 0; \
} \
if (t_count > 60) { \
t_eln->element_count = t_count; \
t_count = 0; \
} \
if (e_count > 60) { \
e_eln->element_count = e_count; \
e_count = 0; \
}
static LineartElementLinkNode * lineart_memory_get_triangle_space(LineartRenderBuffer *rb)
Definition: lineart_cpu.c:630
static LineartElementLinkNode * lineart_memory_get_vert_space(LineartRenderBuffer *rb)
Definition: lineart_cpu.c:649
static LineartElementLinkNode * lineart_memory_get_edge_space(LineartRenderBuffer *rb)
Definition: lineart_cpu.c:666

◆ LRT_MESH_FINISH

#define LRT_MESH_FINISH
Value:
if (ob->type != OB_MESH) { \
BKE_mesh_free_data(use_mesh); \
MEM_freeN(use_mesh); \
}
@ OB_MESH
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
Definition: bmesh_mesh.c:307

◆ LRT_TRI_SAME_POINT

#define LRT_TRI_SAME_POINT (   rt,
  i,
  pt 
)
Value:
((LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[0], pt->gloc[0]) && \
LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[1], pt->gloc[1]) && \
LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[2], pt->gloc[2])) || \
(LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[0], pt->gloc[0]) && \
LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[1], pt->gloc[1]) && \
LRT_DOUBLE_CLOSE_ENOUGH(rt->v[i]->gloc[2], pt->gloc[2])))
#define LRT_DOUBLE_CLOSE_ENOUGH(a, b)
Definition: MOD_lineart.h:411

◆ RELINK_RL

#define RELINK_RL (   e_num,
  newrt 
)
Value:
if (rta->e[e_num]) { \
old_e = rta->e[e_num]; \
old_e->t1 = ((old_e->t1 == rt) ? (newrt) : (old_e->t1)); \
old_e->t2 = ((old_e->t2 == rt) ? (newrt) : (old_e->t2)); \
}

◆ REMOVE_TRIANGLE_RL

#define REMOVE_TRIANGLE_RL
Value:
if (rta->e[0]) { \
rta->e[0]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
} \
if (rta->e[1]) { \
rta->e[1]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
} \
if (rta->e[2]) { \
rta->e[2]->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
}
@ LRT_EDGE_FLAG_CHAIN_PICKED

◆ SELECT_RL

#define SELECT_RL (   e_num,
  v1_link,
  v2_link,
  newrt 
)
Value:
if (rta->e[e_num]) { \
old_e = rta->e[e_num]; \
new_flag = old_e->flags; \
old_e->flags = LRT_EDGE_FLAG_CHAIN_PICKED; \
INCREASE_RL \
e->v1 = (v1_link); \
e->v2 = (v2_link); \
e->flags = new_flag; \
e->object_ref = ob; \
e->t1 = ((old_e->t1 == rt) ? (newrt) : (old_e->t1)); \
e->t2 = ((old_e->t2 == rt) ? (newrt) : (old_e->t2)); \
lineart_add_edge_to_list(rb, e); \
}

Function Documentation

◆ _lineart_object_not_in_source_collection()

static bool _lineart_object_not_in_source_collection ( Collection source,
Object ob 
)
static

◆ lineart_add_edge_to_list()

static void lineart_add_edge_to_list ( LineartRenderBuffer rb,
LineartEdge e 
)
static

◆ lineart_bounding_area_line_intersect()

static bool lineart_bounding_area_line_intersect ( LineartRenderBuffer UNUSEDfb,
const double  l[2],
const double  r[2],
LineartBoundingArea ba 
)
static

◆ lineart_bounding_area_link_line()

static void lineart_bounding_area_link_line ( LineartRenderBuffer rb,
LineartBoundingArea root_ba,
LineartEdge e 
)
static

◆ lineart_bounding_area_link_triangle()

static void lineart_bounding_area_link_triangle ( LineartRenderBuffer rb,
LineartBoundingArea root_ba,
LineartTriangle rt,
double LRUB,
int  recursive,
int  recursive_level,
bool  do_intersection 
)
static

◆ lineart_bounding_area_next()

static LineartBoundingArea * lineart_bounding_area_next ( LineartBoundingArea this,
LineartEdge e,
double  x,
double  y,
double  k,
int  positive_x,
int  positive_y,
double next_x,
double next_y 
)
static

This march along one render line in image space and get the next bounding area the line is crossing.

Definition at line 3427 of file lineart_cpu.c.

References LineartBoundingArea::b, e, l, LineartBoundingArea::l, LISTBASE_FOREACH, MIN2, LineartBoundingArea::r, r, ratiod(), LineartBoundingArea::u, x, and y.

Referenced by lineart_occlusion_single_line().

◆ lineart_bounding_area_split()

static void lineart_bounding_area_split ( LineartRenderBuffer rb,
LineartBoundingArea root,
int  recursive_level 
)
static

◆ lineart_bounding_area_triangle_intersect()

static bool lineart_bounding_area_triangle_intersect ( LineartRenderBuffer fb,
LineartTriangle rt,
LineartBoundingArea ba 
)
static

◆ lineart_bounding_areas_connect_new()

static void lineart_bounding_areas_connect_new ( LineartRenderBuffer rb,
LineartBoundingArea root 
)
static

◆ lineart_create_render_buffer()

static LineartRenderBuffer* lineart_create_render_buffer ( Scene scene,
LineartGpencilModifierData lmd 
)
static

Definition at line 2645 of file lineart_cpu.c.

References LineartRenderBuffer::allow_boundaries, LineartRenderBuffer::allow_overlapping_edges, LineartRenderBuffer::angle_splitting_threshold, LineartGpencilModifierData::angle_splitting_threshold, BKE_camera_sensor_fit(), BLI_spin_init(), Freestyle::c, LineartGpencilModifierData::calculation_flags, LineartRenderBuffer::cam_is_persp, LineartRenderBuffer::cam_obmat, CAM_PERSP, Scene::camera, LineartRenderBuffer::camera_pos, CAMERA_SENSOR_FIT_HOR, CAMERA_SENSOR_FIT_VERT, LineartRenderBuffer::chaining_image_threshold, LineartGpencilModifierData::chaining_image_threshold, copy_m4_m4(), copy_v3db_v3fl(), KDL::cos(), LineartRenderBuffer::crease_threshold, LineartGpencilModifierData::crease_threshold, Object::data, double(), LineartGpencilModifierData::edge_types, LineartRenderBuffer::far_clip, LineartRenderBuffer::fuzzy_everything, LineartRenderBuffer::fuzzy_intersections, LineartRenderBuffer::h, LineartRenderBuffer::lock_cuts, LineartStaticMemPool::lock_mem, LineartRenderBuffer::lock_task, LRT_ALLOW_CLIPPING_BOUNDARIES, LRT_ALLOW_OVERLAPPING_EDGES, LRT_EDGE_FLAG_CONTOUR, LRT_EDGE_FLAG_CREASE, LRT_EDGE_FLAG_EDGE_MARK, LRT_EDGE_FLAG_INTERSECTION, LRT_EDGE_FLAG_MATERIAL, LRT_EVERYTHING_AS_CONTOUR, LRT_INTERSECTION_AS_CONTOUR, LRT_REMOVE_DOUBLES, M_PI, MEM_callocN, LineartRenderBuffer::near_clip, NULL, Object::obmat, Scene::r, LineartRenderBuffer::remove_doubles, LineartGpencilModifierData::render_buffer, LineartRenderBuffer::render_data_pool, scene, LineartRenderBuffer::shift_x, LineartRenderBuffer::shift_y, LineartRenderBuffer::use_contour, LineartRenderBuffer::use_crease, LineartRenderBuffer::use_edge_marks, LineartRenderBuffer::use_intersections, LineartRenderBuffer::use_material, LineartRenderBuffer::w, RenderData::xsch, and RenderData::ysch.

Referenced by MOD_lineart_compute_feature_lines().

◆ lineart_destroy_render_data()

static void lineart_destroy_render_data ( LineartRenderBuffer rb)
static

◆ lineart_discard_segment()

static void lineart_discard_segment ( LineartRenderBuffer rb,
LineartLineSegment rls 
)
static

◆ lineart_edge_cut()

static void lineart_edge_cut ( LineartRenderBuffer rb,
LineartEdge e,
double  start,
double  end,
uchar  transparency_mask 
)
static

◆ lineart_edge_first_bounding_area()

static LineartBoundingArea * lineart_edge_first_bounding_area ( LineartRenderBuffer rb,
LineartEdge e 
)
static

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 3391 of file lineart_cpu.c.

References data, e, interp_v2_v2v2_db(), LB, lineart_get_bounding_area(), lineart_LineIntersectTest2d(), r, and RB.

Referenced by lineart_occlusion_single_line().

◆ lineart_edge_from_triangle()

static bool lineart_edge_from_triangle ( const LineartTriangle rt,
const LineartEdge e,
bool  allow_overlapping_edges 
)
static

Definition at line 1898 of file lineart_cpu.c.

References e, and LRT_TRI_SAME_POINT.

Referenced by lineart_triangle_edge_image_space_occlusion().

◆ lineart_edge_match()

static bool lineart_edge_match ( LineartTriangle rt,
LineartEdge e,
int  v1,
int  v2 
)
static

Definition at line 697 of file lineart_cpu.c.

References e, LineartTriangle::v, v1, and v2.

Referenced by lineart_triangle_adjacent_assign().

◆ lineart_geometry_object_load()

static void lineart_geometry_object_load ( Depsgraph dg,
Object ob,
double(*)  mv_mat[4],
double(*)  mvp_mat[4],
LineartRenderBuffer rb,
int  override_usage,
int *  global_vindex 
)
static

Definition at line 1468 of file lineart_cpu.c.

References BKE_editmesh_create(), BKE_mesh_new_from_object(), BKE_object_material_get(), BLI_addtail(), BMEditMesh::bm, bm, BM_EDGE, BM_edge_at_index(), BM_elem_index_get, BM_ELEM_TAG, BM_FACE, BM_face_at_index(), BM_mesh_bm_from_me(), BM_mesh_copy(), BM_mesh_create(), BM_mesh_elem_hflag_disable_all(), BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_mesh_normals_update(), BM_mesh_triangulate(), BM_VERT, BM_vert_at_index(), BMALLOC_TEMPLATE_FROM_ME, BMO_FLAG_DEFAULTS, BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_op_initf(), BMO_slot_copy, CD_FREESTYLE_EDGE, copy_m4d_m4(), copy_v3db_v3fl(), cosf, LineartRenderBuffer::crease_threshold, ObjectLineArt::crease_threshold, CustomData_has_layer(), Object::data, DEG_get_evaluated_object(), e, BMesh::edata, Mesh::edit_mesh, ELEM, LineartElementLinkNode::element_count, LineartTriangle::flags, LineartElementLinkNode::flags, LineartEdge::flags, MaterialLineArt::flags, ObjectLineArt::flags, LineartTriangle::gn, BMVert::head, BMHeader::hflag, Object::id, LineartVert::index, LineartTriangle::intersecting_verts, invert_m4_m4(), BMFace::l_first, LineartRenderBuffer::line_buffer_pointers, Material::lineart, Object::lineart, lineart_add_edge_to_list(), lineart_identify_feature_line(), lineart_list_append_pointer_pool(), lineart_list_append_pointer_pool_sized(), lineart_mem_aquire(), lineart_triangle_adjacent_assign(), lineart_triangle_from_index(), lineart_vert_transform(), LRT_ELEMENT_BORDER_ONLY, LRT_ELEMENT_NO_INTERSECTION, LRT_MATERIAL_TRANSPARENCY_ENABLED, LRT_MESH_FINISH, LRT_TRIANGLE_INTERSECTION_ONLY, LRT_TRIANGLE_NO_INTERSECTION, M_PI, BMFace::mat_nr, MEM_callocN, MEM_freeN, MOD_TRIANGULATE_NGON_BEAUTY, MOD_TRIANGULATE_QUAD_FIXED, mul_m4db_m4db_m4fl_uniq(), mul_v3_mat3_m4v3_db(), BMLoop::next, BMFace::no, normal, normalize_v3_db(), NULL, OB_CURVE, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, OBJECT_LRT_EXCLUDE, OBJECT_LRT_INCLUDE, OBJECT_LRT_INHERIT, OBJECT_LRT_INTERSECTION_ONLY, OBJECT_LRT_NO_INTERSECTION, OBJECT_LRT_OCCLUSION_ONLY, OBJECT_LRT_OWN_CREASE, LineartElementLinkNode::object_ref, LineartEdge::object_ref, Object::obmat, ID::orig_id, LineartRenderBuffer::remove_doubles, LineartRenderBuffer::render_data_pool, LineartEdge::segments, LineartEdge::t1, LineartEdge::t2, BMesh::totedge, BMesh::totface, BMesh::totvert, LineartTriangle::transparency_mask, MaterialLineArt::transparency_mask, transpose_m4(), LineartRenderBuffer::triangle_adjacent_pointers, LineartRenderBuffer::triangle_buffer_pointers, LineartRenderBuffer::triangle_size, Object::type, ObjectLineArt::usage, BMLoop::v, v, LineartTriangle::v, LineartEdge::v1, LineartEdge::v1_obindex, LineartEdge::v2, LineartEdge::v2_obindex, and LineartRenderBuffer::vertex_buffer_pointers.

Referenced by lineart_main_load_geometries().

◆ lineart_get_bounding_area()

static LineartBoundingArea* lineart_get_bounding_area ( LineartRenderBuffer rb,
double  x,
double  y 
)
static

◆ lineart_get_edge_bounding_areas()

static bool lineart_get_edge_bounding_areas ( LineartRenderBuffer rb,
LineartEdge e,
int *  rowbegin,
int *  rowend,
int *  colbegin,
int *  colend 
)
static

◆ lineart_get_triangle_bounding_areas()

static bool lineart_get_triangle_bounding_areas ( LineartRenderBuffer rb,
LineartTriangle rt,
int *  rowbegin,
int *  rowend,
int *  colbegin,
int *  colend 
)
static

◆ lineart_give_segment()

static LineartLineSegment* lineart_give_segment ( LineartRenderBuffer rb)
static

◆ lineart_gpencil_generate()

static void lineart_gpencil_generate ( LineartRenderBuffer rb,
Depsgraph depsgraph,
Object gpencil_object,
float(*)  gp_obmat_inverse[4],
bGPDlayer UNUSEDgpl,
bGPDframe gpf,
int  level_start,
int  level_end,
int  material_nr,
Object source_object,
Collection source_collection,
int  types,
uchar  transparency_flags,
uchar  transparency_mask,
short  thickness,
float  opacity,
const char *  source_vgname,
const char *  vgname,
int  modifier_flags 
)
static

◆ lineart_identify_feature_line()

static char lineart_identify_feature_line ( LineartRenderBuffer rb,
BMEdge e,
LineartTriangle rt_array,
LineartVert rv_array,
float  crease_threshold,
bool  no_crease,
bool  count_freestyle,
BMesh bm_if_freestyle 
)
static

◆ lineart_main_add_triangles()

static void lineart_main_add_triangles ( LineartRenderBuffer rb)
static

◆ lineart_main_bounding_area_make_initial()

static void lineart_main_bounding_area_make_initial ( LineartRenderBuffer rb)
static

◆ lineart_main_cull_triangles()

static void lineart_main_cull_triangles ( LineartRenderBuffer rb,
bool  clip_far 
)
static

◆ lineart_main_free_adjacent_data()

static void lineart_main_free_adjacent_data ( LineartRenderBuffer rb)
static

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 1297 of file lineart_cpu.c.

References BLI_pophead(), LinkData::data, LineartTriangle::intersecting_verts, LISTBASE_FOREACH, MEM_freeN, NULL, LineartRenderBuffer::triangle_adjacent_pointers, LineartRenderBuffer::triangle_buffer_pointers, and LineartRenderBuffer::triangle_size.

Referenced by MOD_lineart_compute_feature_lines().

◆ lineart_main_get_view_vector()

static void lineart_main_get_view_vector ( LineartRenderBuffer rb)
static

The calculated view vector will point towards the far-plane from the camera position.

Definition at line 2573 of file lineart_cpu.c.

References LineartRenderBuffer::cam_obmat, copy_m4_m4(), copy_v3db_v3fl(), invert_m4_m4(), mul_v3_mat3_m4v3(), normalize_v3(), transpose_m4(), and LineartRenderBuffer::view_vector.

Referenced by MOD_lineart_compute_feature_lines().

◆ lineart_main_link_lines()

static void lineart_main_link_lines ( LineartRenderBuffer rb)
static

◆ lineart_main_load_geometries()

static void lineart_main_load_geometries ( Depsgraph depsgraph,
Scene scene,
Object camera,
LineartRenderBuffer rb,
bool  allow_duplicates 
)
static

◆ lineart_main_occlusion_begin()

static void lineart_main_occlusion_begin ( LineartRenderBuffer rb)
static

◆ lineart_main_perspective_division()

static void lineart_main_perspective_division ( LineartRenderBuffer rb)
static

◆ lineart_memory_get_edge_space()

static LineartElementLinkNode* lineart_memory_get_edge_space ( LineartRenderBuffer rb)
static

◆ lineart_memory_get_triangle_space()

static LineartElementLinkNode* lineart_memory_get_triangle_space ( LineartRenderBuffer rb)
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 630 of file lineart_cpu.c.

References LineartElementLinkNode::element_count, LineartElementLinkNode::flags, lineart_list_append_pointer_pool_sized(), lineart_mem_aquire(), LRT_ELEMENT_IS_ADDITIONAL, LineartRenderBuffer::render_data_pool, LineartRenderBuffer::triangle_buffer_pointers, and LineartRenderBuffer::triangle_size.

Referenced by lineart_main_cull_triangles().

◆ lineart_memory_get_vert_space()

static LineartElementLinkNode* lineart_memory_get_vert_space ( LineartRenderBuffer rb)
static

◆ lineart_occlusion_is_adjacent_intersection()

BLI_INLINE bool lineart_occlusion_is_adjacent_intersection ( LineartEdge e,
LineartTriangle rt 
)

To see if given line is connected to an adjacent intersection line.

Definition at line 311 of file lineart_cpu.c.

References e, v1, and v2.

Referenced by lineart_occlusion_single_line().

◆ lineart_occlusion_make_task_info()

static int lineart_occlusion_make_task_info ( LineartRenderBuffer rb,
LineartRenderTaskInfo rti 
)
static

◆ lineart_occlusion_single_line()

static void lineart_occlusion_single_line ( LineartRenderBuffer rb,
LineartEdge e,
int  thread_id 
)
static

◆ lineart_occlusion_worker()

static void lineart_occlusion_worker ( TaskPool *__restrict   UNUSEDpool,
LineartRenderTaskInfo rti 
)
static

◆ lineart_point_inside_triangle()

static bool lineart_point_inside_triangle ( const double  v[2],
const double  v0[2],
const double  v1[2],
const double  v2[2] 
)
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 475 of file lineart_cpu.c.

References Freestyle::c, v, v1, and v2.

Referenced by lineart_bounding_area_triangle_intersect().

◆ lineart_point_inside_triangle3d()

static bool lineart_point_inside_triangle3d ( double  v[3],
double  v0[3],
double  v1[3],
double  v2[3] 
)
static

Similar with lineart_point_inside_triangle, but in 3d. Returns false when not co-planar.

Definition at line 589 of file lineart_cpu.c.

References cross_v3_v3v3_db(), dot_v3v3_db(), l, r, sub_v3_v3v3_db(), v, v1, and v2.

Referenced by lineart_triangle_2v_intersection_test().

◆ lineart_point_on_line_segment()

static int lineart_point_on_line_segment ( double  v[2],
double  v0[2],
double  v1[2] 
)
static

Definition at line 507 of file lineart_cpu.c.

References LRT_DOUBLE_CLOSE_ENOUGH, ratiod(), sub_v2_v2v2_db(), v, and v1.

Referenced by lineart_point_triangle_relation().

◆ lineart_point_triangle_relation()

static int lineart_point_triangle_relation ( double  v[2],
double  v0[2],
double  v1[2],
double  v2[2] 
)
static

Same algorithm as lineart_point_inside_triangle(), but returns differently: 0-outside 1-on the edge 2-inside.

Definition at line 547 of file lineart_cpu.c.

References Freestyle::c, lineart_point_on_line_segment(), r, v, v1, and v2.

Referenced by lineart_triangle_edge_image_space_occlusion().

◆ lineart_rb_edge_types()

static int lineart_rb_edge_types ( LineartRenderBuffer rb)
static

◆ lineart_triangle_2v_intersection_test()

static LineartVert* lineart_triangle_2v_intersection_test ( LineartRenderBuffer rb,
LineartVert v1,
LineartVert v2,
LineartTriangle rt,
LineartTriangle testing,
LineartVert last 
)
static

◆ lineart_triangle_adjacent_assign()

static void lineart_triangle_adjacent_assign ( LineartTriangle rt,
LineartTriangleAdjacent rta,
LineartEdge e 
)
static

Definition at line 1453 of file lineart_cpu.c.

References e, LineartTriangleAdjacent::e, and lineart_edge_match().

Referenced by lineart_geometry_object_load().

◆ lineart_triangle_cull_single()

static void lineart_triangle_cull_single ( LineartRenderBuffer rb,
LineartTriangle rt,
int  in0,
int  in1,
int  in2,
double cam_pos,
double view_dir,
bool  allow_boundaries,
double(*)  vp[4],
Object ob,
int *  r_v_count,
int *  r_e_count,
int *  r_t_count,
LineartElementLinkNode v_eln,
LineartElementLinkNode e_eln,
LineartElementLinkNode t_eln 
)
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.

1-----|-------0
| | ---
| |---
| ---|
2-- |
(near)---------->(far)
Will become:
|N******0
|* ***
|N**
|
|
(near)---------->(far)
params N

(in0) means "when point 0 is invisible". conditions for point 1, 2 are the same idea.

0------|----------1
-- | |
---| |
|-- |
| --- |
| --- |
| --2
(near)---------->(far)
Will become:
|N*********1
|* *** |
|* *** |
|N** |
| *** |
| *** |
| **2
(near)---------->(far)

Definition at line 707 of file lineart_cpu.c.

References Freestyle::a, LineartRenderBuffer::contours, dot_v3v3_db(), e, LineartTriangle::flags, LineartVert::gloc, INCREASE_RL, LineartVert::index, interp_v3_v3v3_db(), LineartTriangle::intersecting_verts, lineart_prepend_edge_direct(), lineart_triangle_post(), lineart_triangle_set_cull_flag(), LRT_CULL_DISCARD, LRT_CULL_GENERATED, LRT_CULL_USED, LRT_EDGE_FLAG_CONTOUR, mul_v4_m4v3_db(), LineartElementLinkNode::pointer, RELINK_RL, REMOVE_TRIANGLE_RL, SELECT_RL, sub_v3_v3v3_db(), LineartRenderBuffer::triangle_size, and LineartTriangle::v.

Referenced by lineart_main_cull_triangles().

◆ lineart_triangle_edge_image_space_occlusion() [1/2]

static bool lineart_triangle_edge_image_space_occlusion ( SpinLock spl,
const LineartTriangle rt,
const LineartEdge e,
const double override_camera_loc,
const bool  override_cam_is_persp,
const bool  allow_overlapping_edges,
const double  vp[4][4],
const double camera_dir,
const float  cam_shift_x,
const float  cam_shift_y,
double from,
double to 
)
static

◆ lineart_triangle_edge_image_space_occlusion() [2/2]

static bool lineart_triangle_edge_image_space_occlusion ( SpinLock UNUSEDspl,
const LineartTriangle rt,
const LineartEdge e,
const double override_camera_loc,
const bool  override_cam_is_persp,
const bool  allow_overlapping_edges,
const double  vp[4][4],
const double camera_dir,
const float  cam_shift_x,
const float  cam_shift_y,
double from,
double to 
)
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.

Definition at line 1960 of file lineart_cpu.c.

References Freestyle::a, Freestyle::c, copy_v3_v3_db(), copy_v4_v4_db(), DBL_TRIANGLE_LIM, dot_v3v3_db(), e, fabs(), LineartVert::fbcoord, from, LineartVert::gloc, LineartTriangle::gn, interp_v3_v3v3_db(), INTERSECT_JUST_GREATER, INTERSECT_JUST_SMALLER, INTERSECT_SORT_MIN_TO_MAX_3, LF, lineart_edge_from_triangle(), lineart_LineIntersectTest2d(), lineart_point_triangle_relation(), LRT_ABC, MAX2, MAX3, MIN2, MIN3, mul_v3db_db(), mul_v4_m4v3_db(), order, ratiod(), RF, sub_v3_v3v3_db(), and LineartTriangle::v.

◆ lineart_triangle_from_index()

static LineartTriangle* lineart_triangle_from_index ( LineartRenderBuffer rb,
LineartTriangle rt_array,
int  index 
)
static

Because we have a variable size for LineartTriangle, we need an access helper. See LineartTriangleThread for more info.

Definition at line 1358 of file lineart_cpu.c.

References LineartRenderBuffer::triangle_size.

Referenced by lineart_geometry_object_load(), and lineart_identify_feature_line().

◆ lineart_triangle_get_other_verts()

static bool lineart_triangle_get_other_verts ( const LineartTriangle rt,
const LineartVert rv,
LineartVert **  l,
LineartVert **  r 
)
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 1875 of file lineart_cpu.c.

References l, r, and LineartTriangle::v.

Referenced by lineart_triangle_intersect().

◆ lineart_triangle_intersect()

static LineartEdge* lineart_triangle_intersect ( LineartRenderBuffer rb,
LineartTriangle rt,
LineartTriangle testing 
)
static

◆ lineart_triangle_intersect_in_bounding_area()

static void lineart_triangle_intersect_in_bounding_area ( LineartRenderBuffer rb,
LineartTriangle rt,
LineartBoundingArea ba 
)
static

◆ lineart_triangle_post()

static void lineart_triangle_post ( LineartTriangle rt,
LineartTriangle orig 
)
static

◆ lineart_triangle_set_cull_flag()

static void lineart_triangle_set_cull_flag ( LineartTriangle rt,
uchar  flag 
)
static

Definition at line 690 of file lineart_cpu.c.

References LineartTriangle::flags, and LRT_TRIANGLE_INTERSECTION_ONLY.

Referenced by lineart_triangle_cull_single().

◆ lineart_triangle_share_edge()

static bool lineart_triangle_share_edge ( const LineartTriangle l,
const LineartTriangle r 
)
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 2192 of file lineart_cpu.c.

References l, r, and BMLoop::v.

Referenced by lineart_triangle_intersect_in_bounding_area().

◆ lineart_triangle_share_point()

static LineartVert* lineart_triangle_share_point ( const LineartTriangle l,
const LineartTriangle r 
)
static

Definition at line 2235 of file lineart_cpu.c.

References l, NULL, r, and BMLoop::v.

Referenced by lineart_triangle_intersect().

◆ lineart_triangle_size_get()

static int lineart_triangle_size_get ( const Scene scene,
LineartRenderBuffer rb 
)
static

◆ lineart_usage_check()

static int lineart_usage_check ( Collection c,
Object ob,
LineartRenderBuffer _rb 
)
static

◆ lineart_vert_already_intersected_2v()

static bool lineart_vert_already_intersected_2v ( LineartVertIntersection rv,
LineartVertIntersection v1,
LineartVertIntersection v2 
)
static

To save time and prevent overlapping lines when computing intersection lines.

Definition at line 2271 of file lineart_cpu.c.

References LineartVertIntersection::isec1, LineartVertIntersection::isec2, v1, and v2.

Referenced by lineart_triangle_2v_intersection_test().

◆ lineart_vert_set_intersection_2v()

static void lineart_vert_set_intersection_2v ( LineartVert rv,
LineartVert v1,
LineartVert v2 
)
static

◆ lineart_vert_transform()

static void lineart_vert_transform ( BMVert v,
int  index,
LineartVert RvBuf,
double(*)  mv_mat[4],
double(*)  mvp_mat[4] 
)
static

Transform a single vert to it's viewing position.

Definition at line 1344 of file lineart_cpu.c.

References BMVert::co, copy_v3db_v3fl(), LineartVert::fbcoord, LineartVert::gloc, mul_v3_m4v3_db(), mul_v4_m4v3_db(), and v.

Referenced by lineart_geometry_object_load().

◆ MOD_lineart_compute_feature_lines()

bool MOD_lineart_compute_feature_lines ( Depsgraph depsgraph,
LineartGpencilModifierData lmd 
)

This is the entry point of all line art calculations.

Returns
True when a change is made.

Definition at line 3651 of file lineart_cpu.c.

References LineartRenderBuffer::_source_collection, LineartRenderBuffer::_source_object, LineartRenderBuffer::_source_type, LineartRenderBuffer::angle_splitting_threshold, BKE_scene_camera_switch_update(), LineartGpencilModifierData::calculation_flags, Scene::camera, LineartGpencilModifierData::chaining_image_threshold, DEG_get_evaluated_scene(), depsgraph, ListBase::first, G, LineartGpencilModifierData::level_end, LineartGpencilModifierData::level_start, lineart_count_and_print_render_buffer_memory(), lineart_create_render_buffer(), lineart_main_add_triangles(), lineart_main_bounding_area_make_initial(), lineart_main_cull_triangles(), lineart_main_free_adjacent_data(), lineart_main_get_view_vector(), lineart_main_link_lines(), lineart_main_load_geometries(), lineart_main_occlusion_begin(), lineart_main_perspective_division(), lineart_triangle_size_get(), LRT_ALLOW_DUPLI_OBJECTS, MAX2, LineartRenderBuffer::max_occlusion_level, MIN2, MOD_lineart_chain_clear_picked_flag(), MOD_lineart_chain_connect(), MOD_lineart_chain_discard_short(), MOD_lineart_chain_feature_lines(), MOD_lineart_chain_split_angle(), MOD_lineart_chain_split_for_fixed_occlusion(), scene, LineartGpencilModifierData::source_collection, LineartGpencilModifierData::source_object, LineartGpencilModifierData::source_type, LineartRenderBuffer::triangle_size, and LineartRenderBuffer::vertex_buffer_pointers.

Referenced by bake_strokes(), bakeModifier(), and generateStrokes().

◆ MOD_lineart_destroy_render_data()

void MOD_lineart_destroy_render_data ( LineartGpencilModifierData lmd)

◆ MOD_lineart_get_bounding_area()

LineartBoundingArea* MOD_lineart_get_bounding_area ( LineartRenderBuffer rb,
double  x,
double  y 
)

Wrapper for more convenience.

Definition at line 3342 of file lineart_cpu.c.

References lineart_get_bounding_area(), MOD_lineart_get_parent_bounding_area(), NULL, x, and y.

Referenced by MOD_lineart_chain_feature_lines().

◆ MOD_lineart_get_parent_bounding_area()

LineartBoundingArea* MOD_lineart_get_parent_bounding_area ( LineartRenderBuffer rb,
double  x,
double  y 
)

◆ MOD_lineart_gpencil_generate()

void MOD_lineart_gpencil_generate ( LineartRenderBuffer rb,
Depsgraph depsgraph,
Object ob,
bGPDlayer gpl,
bGPDframe gpf,
char  source_type,
void *  source_reference,
int  level_start,
int  level_end,
int  mat_nr,
short  edge_types,
uchar  transparency_flags,
uchar  transparency_mask,
short  thickness,
float  opacity,
const char *  source_vgname,
const char *  vgname,
int  modifier_flags 
)