|
Blender V5.0
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_math_vector_types.hh"#include "BLI_polyfill_2d.h"#include "BLI_span.hh"#include "DNA_gpencil_legacy_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "BKE_gpencil_geom_legacy.h"#include "BKE_gpencil_legacy.h"Go to the source code of this file.
Classes | |
| struct | tGPDeleteIsland |
Typedefs | |
| using | float3 |
Functions | |
| void | BKE_gpencil_stroke_2d_flat (const bGPDspoint *points, int totpoints, float(*points2d)[2], int *r_direction) |
| static void | gpencil_calc_stroke_fill_uv (const float(*points2d)[2], bGPDstroke *gps, const float minv[2], const float maxv[2], float(*r_uv)[2]) |
Stroke Fill Triangulate | |
| void | BKE_gpencil_stroke_fill_triangulate (bGPDstroke *gps) |
| void | BKE_gpencil_stroke_uv_update (bGPDstroke *gps) |
| void | BKE_gpencil_stroke_geometry_update (bGPdata *, bGPDstroke *gps) |
| static void | gpencil_stroke_join_islands (bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps_first, bGPDstroke *gps_last) |
| bGPDstroke * | BKE_gpencil_stroke_delete_tagged_points (bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *next_stroke, int tag_flags, const bool select, const bool flat_cap, const int limit) |
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| void BKE_gpencil_stroke_2d_flat | ( | const bGPDspoint * | points, |
| int | totpoints, | ||
| float(*) | points2d[2], | ||
| int * | r_direction ) |
Definition at line 31 of file gpencil_geom_legacy.cc.
References BLI_assert, copy_v3_v3(), cross, cross_v3_v3v3(), dot_v3v3(), i, mul_v3_v3fl(), normalize_v3(), sub_v3_v3v3(), and bGPDspoint::x.
Referenced by BKE_gpencil_stroke_fill_triangulate().
| bGPDstroke * BKE_gpencil_stroke_delete_tagged_points | ( | struct bGPdata * | gpd, |
| struct bGPDframe * | gpf, | ||
| struct bGPDstroke * | gps, | ||
| struct bGPDstroke * | next_stroke, | ||
| int | tag_flags, | ||
| bool | select, | ||
| bool | flat_cap, | ||
| int | limit ) |
Split the given stroke into several new strokes, partitioning it based on whether the stroke points have a particular flag is set (e.g. GP_SPOINT_SELECT in most cases, but not always).
Definition at line 340 of file gpencil_geom_legacy.cc.
References BKE_gpencil_free_stroke(), BKE_gpencil_stroke_duplicate(), BKE_gpencil_stroke_geometry_update(), BLI_addtail(), BLI_insertlinkbefore(), BLI_remlink(), bGPDstroke::caps, bGPDstroke::dvert, MDeformVert::dw, e, tGPDeleteIsland::end_idx, bGPDspoint::flag, bGPDstroke::flag, GP_SPOINT_SELECT, GP_SPOINT_TAG, GP_STROKE_CAP_FLAT, GP_STROKE_CYCLIC, gpencil_stroke_join_islands(), i, bGPDstroke::inittime, is_cyclic(), max_ff(), MEM_calloc_arrayN(), MEM_dupallocN(), MEM_freeN(), bGPDstroke::points, select, tGPDeleteIsland::start_idx, bGPDframe::strokes, bGPDspoint::time, and bGPDstroke::totpoints.
Referenced by annotation_stroke_eraser_dostroke().
| void BKE_gpencil_stroke_fill_triangulate | ( | struct bGPDstroke * | gps | ) |
Triangulate stroke to generate data for filling areas.
| gps | Grease pencil stroke |
Definition at line 150 of file gpencil_geom_legacy.cc.
References ARRAY_SET_ITEMS, BKE_gpencil_stroke_2d_flat(), BLI_assert, BLI_polyfill_calc(), copy_v2_v2(), float, gpencil_calc_stroke_fill_uv(), i, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), MEM_SAFE_FREE, bGPDstroke::points, bGPDstroke::tot_triangles, bGPDstroke::totpoints, bGPDstroke::triangles, bGPDspoint::uv_fill, and bGPDtriangle::verts.
Referenced by BKE_gpencil_stroke_geometry_update().
| void BKE_gpencil_stroke_geometry_update | ( | struct bGPdata * | gpd, |
| struct bGPDstroke * | gps ) |
Recalc all internal geometry data for the stroke
| gpd | Grease pencil data-block |
| gps | Grease pencil stroke |
Definition at line 224 of file gpencil_geom_legacy.cc.
References BKE_gpencil_stroke_fill_triangulate(), BKE_gpencil_stroke_uv_update(), MEM_SAFE_FREE, bGPDstroke::tot_triangles, bGPDstroke::totpoints, and bGPDstroke::triangles.
Referenced by BKE_gpencil_stroke_delete_tagged_points(), blo_do_versions_280(), and gpencil_stroke_join_islands().
| void BKE_gpencil_stroke_uv_update | ( | struct bGPDstroke * | gps | ) |
Update Stroke UV data.
| gps | Grease pencil stroke |
Definition at line 209 of file gpencil_geom_legacy.cc.
References i, len_v3v3(), bGPDstroke::points, bGPDstroke::totpoints, bGPDspoint::uv_fac, and x.
Referenced by BKE_gpencil_stroke_geometry_update().
|
static |
Definition at line 106 of file gpencil_geom_legacy.cc.
References add_v2_v2(), cos, i, mul_v2_fl(), sin, bGPDstroke::totpoints, bGPDstroke::uv_rotation, bGPDstroke::uv_scale, bGPDstroke::uv_translation, x, and y.
Referenced by BKE_gpencil_stroke_fill_triangulate().
|
static |
Definition at line 251 of file gpencil_geom_legacy.cc.
References BKE_gpencil_free_stroke(), BKE_gpencil_stroke_duplicate(), BKE_gpencil_stroke_geometry_update(), BLI_addhead(), BLI_remlink(), copy_v3_v3(), copy_v4_v4(), bGPDstroke::dvert, MDeformVert::dw, bGPDspoint::flag, bGPDstroke::flag, GP_STROKE_CYCLIC, i, MEM_calloc_arrayN(), MEM_dupallocN(), bGPDstroke::points, bGPDspoint::pressure, bGPDspoint::strength, bGPDframe::strokes, bGPDspoint::time, bGPDstroke::totpoints, bGPDspoint::vert_color, and bGPDspoint::x.
Referenced by BKE_gpencil_stroke_delete_tagged_points().