Blender V5.0
BKE_gpencil_geom_legacy.h File Reference

Go to the source code of this file.

Functions

void BKE_gpencil_stroke_2d_flat (const struct bGPDspoint *points, int totpoints, float(*points2d)[2], int *r_direction)
void BKE_gpencil_stroke_fill_triangulate (struct bGPDstroke *gps)
void BKE_gpencil_stroke_geometry_update (struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_uv_update (struct bGPDstroke *gps)
struct bGPDstrokeBKE_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)

Function Documentation

◆ BKE_gpencil_stroke_2d_flat()

void BKE_gpencil_stroke_2d_flat ( const struct bGPDspoint * points,
int totpoints,
float(*) points2d[2],
int * r_direction )

Get points of stroke always flat to view not affected by camera view or view position.

Parameters
pointsArray of grease pencil points (3D)
totpointsTotal of points
points2dResult array of 2D points
r_directionReturn Concave (-1), Convex (1), or Auto-detect (0)

References select.

◆ BKE_gpencil_stroke_delete_tagged_points()

struct 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 )

◆ BKE_gpencil_stroke_fill_triangulate()

◆ 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

Parameters
gpdGrease pencil data-block
gpsGrease 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().

◆ BKE_gpencil_stroke_uv_update()

void BKE_gpencil_stroke_uv_update ( struct bGPDstroke * gps)

Update Stroke UV data.

Parameters
gpsGrease 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().