Blender  V3.3
Classes | Macros | Typedefs | Functions
mask_evaluate.c File Reference
#include <stddef.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h"
#include "BKE_curve.h"
#include "BKE_mask.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"

Go to the source code of this file.

Classes

struct  FeatherEdgesBucket
 

Macros

#define BUCKET_INDEX(co)   feather_bucket_index_from_coord(co, min, bucket_scale, buckets_per_side)
 

Typedefs

typedef struct FeatherEdgesBucket FeatherEdgesBucket
 

Functions

unsigned int BKE_mask_spline_resolution (MaskSpline *spline, int width, int height)
 
unsigned int BKE_mask_spline_feather_resolution (MaskSpline *spline, int width, int height)
 
int BKE_mask_spline_differentiate_calc_total (const MaskSpline *spline, const unsigned int resol)
 
float(* BKE_mask_spline_differentiate_with_resolution (MaskSpline *spline, const unsigned int resol, unsigned int *r_tot_diff_point))[2]
 
float(* BKE_mask_spline_differentiate (MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2]
 
static void feather_bucket_add_edge (FeatherEdgesBucket *bucket, int start, int end)
 
static void feather_bucket_check_intersect (float(*feather_points)[2], int tot_feather_point, FeatherEdgesBucket *bucket, int cur_a, int cur_b)
 
static int feather_bucket_index_from_coord (const float co[2], const float min[2], const float bucket_scale[2], const int buckets_per_side)
 
static void feather_bucket_get_diagonal (FeatherEdgesBucket *buckets, int start_bucket_index, int end_bucket_index, int buckets_per_side, FeatherEdgesBucket **r_diagonal_bucket_a, FeatherEdgesBucket **r_diagonal_bucket_b)
 
void BKE_mask_spline_feather_collapse_inner_loops (MaskSpline *spline, float(*feather_points)[2], const unsigned int tot_feather_point)
 
static float(* mask_spline_feather_differentiated_points_with_resolution__even (MaskSpline *spline, const unsigned int resol, const bool do_feather_isect, unsigned int *r_tot_feather_point))[2]
 
static float(* mask_spline_feather_differentiated_points_with_resolution__double (MaskSpline *spline, const unsigned int resol, const bool do_feather_isect, unsigned int *r_tot_feather_point))[2]
 
float(* BKE_mask_spline_feather_differentiated_points_with_resolution (MaskSpline *spline, const unsigned int resol, const bool do_feather_isect, unsigned int *r_tot_feather_point))[2]
 
float(* BKE_mask_spline_feather_points (MaskSpline *spline, int *r_tot_feather_point))[2]
 
floatBKE_mask_point_segment_feather_diff (MaskSpline *spline, MaskSplinePoint *point, int width, int height, unsigned int *r_tot_feather_point)
 
floatBKE_mask_point_segment_diff (MaskSpline *spline, MaskSplinePoint *point, int width, int height, unsigned int *r_tot_diff_point)
 
static void mask_evaluate_apply_point_parent (MaskSplinePoint *point, float ctime)
 
void BKE_mask_layer_evaluate_animation (MaskLayer *masklay, const float ctime)
 
void BKE_mask_layer_evaluate_deform (MaskLayer *masklay, const float ctime)
 
void BKE_mask_eval_animation (struct Depsgraph *depsgraph, Mask *mask)
 
void BKE_mask_eval_update (struct Depsgraph *depsgraph, Mask *mask)
 

Detailed Description

Functions for evaluating the mask beziers into points for the outline and feather.

Definition in file mask_evaluate.c.

Macro Definition Documentation

◆ BUCKET_INDEX

#define BUCKET_INDEX (   co)    feather_bucket_index_from_coord(co, min, bucket_scale, buckets_per_side)

Typedef Documentation

◆ FeatherEdgesBucket

Function Documentation

◆ BKE_mask_eval_animation()

void BKE_mask_eval_animation ( struct Depsgraph depsgraph,
Mask mask 
)

◆ BKE_mask_eval_update()

void BKE_mask_eval_update ( struct Depsgraph depsgraph,
Mask mask 
)

◆ BKE_mask_layer_evaluate_animation()

void BKE_mask_layer_evaluate_animation ( MaskLayer masklay,
const float  ctime 
)

◆ BKE_mask_layer_evaluate_deform()

void BKE_mask_layer_evaluate_deform ( MaskLayer masklay,
const float  ctime 
)

◆ BKE_mask_point_segment_diff()

float* BKE_mask_point_segment_diff ( MaskSpline spline,
MaskSplinePoint point,
int  width,
int  height,
unsigned int *  r_tot_diff_point 
)

◆ BKE_mask_point_segment_feather_diff()

float* BKE_mask_point_segment_feather_diff ( MaskSpline spline,
MaskSplinePoint point,
int  width,
int  height,
unsigned int *  r_tot_feather_point 
)

◆ BKE_mask_spline_differentiate()

float(* BKE_mask_spline_differentiate ( MaskSpline spline,
int  width,
int  height,
unsigned int *  r_tot_diff_point 
) )[2]

◆ BKE_mask_spline_differentiate_calc_total()

int BKE_mask_spline_differentiate_calc_total ( const MaskSpline spline,
const unsigned int  resol 
)

◆ BKE_mask_spline_differentiate_with_resolution()

float(* BKE_mask_spline_differentiate_with_resolution ( MaskSpline spline,
const unsigned int  resol,
unsigned int *  r_tot_diff_point 
) )[2]

◆ BKE_mask_spline_feather_collapse_inner_loops()

void BKE_mask_spline_feather_collapse_inner_loops ( MaskSpline spline,
float(*)  feather_points[2],
const unsigned int  tot_feather_point 
)

◆ BKE_mask_spline_feather_differentiated_points_with_resolution()

float(* BKE_mask_spline_feather_differentiated_points_with_resolution ( struct MaskSpline spline,
unsigned int  resol,
bool  do_feather_isect,
unsigned int *  r_tot_feather_point 
) )[2]

◆ BKE_mask_spline_feather_points()

float(* BKE_mask_spline_feather_points ( MaskSpline spline,
int *  r_tot_feather_point 
) )[2]

◆ BKE_mask_spline_feather_resolution()

unsigned int BKE_mask_spline_feather_resolution ( MaskSpline spline,
int  width,
int  height 
)

◆ BKE_mask_spline_resolution()

unsigned int BKE_mask_spline_resolution ( MaskSpline spline,
int  width,
int  height 
)

◆ feather_bucket_add_edge()

static void feather_bucket_add_edge ( FeatherEdgesBucket bucket,
int  start,
int  end 
)
static

◆ feather_bucket_check_intersect()

static void feather_bucket_check_intersect ( float(*)  feather_points[2],
int  tot_feather_point,
FeatherEdgesBucket bucket,
int  cur_a,
int  cur_b 
)
static

◆ feather_bucket_get_diagonal()

static void feather_bucket_get_diagonal ( FeatherEdgesBucket buckets,
int  start_bucket_index,
int  end_bucket_index,
int  buckets_per_side,
FeatherEdgesBucket **  r_diagonal_bucket_a,
FeatherEdgesBucket **  r_diagonal_bucket_b 
)
static

Definition at line 297 of file mask_evaluate.c.

Referenced by BKE_mask_spline_feather_collapse_inner_loops().

◆ feather_bucket_index_from_coord()

static int feather_bucket_index_from_coord ( const float  co[2],
const float  min[2],
const float  bucket_scale[2],
const int  buckets_per_side 
)
static

Definition at line 278 of file mask_evaluate.c.

References min, x, and y.

◆ mask_evaluate_apply_point_parent()

static void mask_evaluate_apply_point_parent ( MaskSplinePoint point,
float  ctime 
)
static

Definition at line 837 of file mask_evaluate.c.

References BKE_mask_point_parent_matrix_get(), mul_m3_v2(), and point.

Referenced by BKE_mask_layer_evaluate_deform().

◆ mask_spline_feather_differentiated_points_with_resolution__double()

static float(* mask_spline_feather_differentiated_points_with_resolution__double ( MaskSpline spline,
const unsigned int  resol,
const bool  do_feather_isect,
unsigned int *  r_tot_feather_point 
) )[2]
static

◆ mask_spline_feather_differentiated_points_with_resolution__even()

static float(* mask_spline_feather_differentiated_points_with_resolution__even ( MaskSpline spline,
const unsigned int  resol,
const bool  do_feather_isect,
unsigned int *  r_tot_feather_point 
) )[2]
static