diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 19:45:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 19:45:26 +0300 |
commit | dbe1b07e058db33a9e806d8e9808463d563d4aa5 (patch) | |
tree | 79ba8e3a9adc48cb55f5e7f35f82f1d90bc6e2b5 /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | 73c577d46a2fd99c519ce7ef0fd9deb3b914099f (diff) |
Cleanup: right shift
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index f215fdcd579..71b63ccbdff 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -82,12 +82,13 @@ /* Convert the object-space axis-aligned bounding box (expressed as * its minimum and maximum corners) into a screen-space rectangle, * returns zero if the result is empty */ -bool paint_convert_bb_to_rect(rcti *rect, - const float bb_min[3], - const float bb_max[3], - const ARegion *ar, - RegionView3D *rv3d, - Object *ob) +bool paint_convert_bb_to_rect( + rcti *rect, + const float bb_min[3], + const float bb_max[3], + const ARegion *ar, + RegionView3D *rv3d, + Object *ob) { float projection_mat[4][4]; int i, j, k; @@ -128,11 +129,12 @@ bool paint_convert_bb_to_rect(rcti *rect, /* Get four planes in object-space that describe the projection of * screen_rect from screen into object-space (essentially converting a * 2D screens-space bounding box into four 3D planes) */ -void paint_calc_redraw_planes(float planes[4][4], - const ARegion *ar, - RegionView3D *rv3d, - Object *ob, - const rcti *screen_rect) +void paint_calc_redraw_planes( + float planes[4][4], + const ARegion *ar, + RegionView3D *rv3d, + Object *ob, + const rcti *screen_rect) { BoundBox bb; bglMats mats; @@ -152,8 +154,9 @@ void paint_calc_redraw_planes(float planes[4][4], negate_m4(planes); } -float paint_calc_object_space_radius(ViewContext *vc, const float center[3], - float pixel_radius) +float paint_calc_object_space_radius( + ViewContext *vc, const float center[3], + float pixel_radius) { Object *ob = vc->obact; float delta[3], scale, loc[3]; @@ -182,7 +185,9 @@ float paint_get_tex_pixel(const MTex *mtex, float u, float v, struct ImagePool * return intensity; } -void paint_get_tex_pixel_col(const MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, int thread, bool convert_to_linear, struct ColorSpace *colorspace) +void paint_get_tex_pixel_col( + const MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, + int thread, bool convert_to_linear, struct ColorSpace *colorspace) { float co[3] = {u, v, 0.0f}; int hasrgb; @@ -238,9 +243,10 @@ static void imapaint_project(float matrix[4][4], const float co[3], float pco[4] mul_m4_v4(matrix, pco); } -static void imapaint_tri_weights(float matrix[4][4], GLint view[4], - const float v1[3], const float v2[3], const float v3[3], - const float co[2], float w[3]) +static void imapaint_tri_weights( + float matrix[4][4], GLint view[4], + const float v1[3], const float v2[3], const float v3[3], + const float co[2], float w[3]) { float pv1[4], pv2[4], pv3[4], h[3], divw; float wmat[3][3], invwmat[3][3]; |