diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-26 12:07:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-26 12:07:09 +0400 |
commit | 8eb119a5cd05dc39fd6afec2aa40e4c425622462 (patch) | |
tree | e96745bd4ffcb84df26e875bd57f51ae274d421a /source/blender/editors/sculpt_paint | |
parent | 540c2eee566318a40fef26cd60f182020d2cb7ff (diff) |
renamed math functions and made public
lambda_cp_line --> line_point_factor_v3
lambda_cp_line2 --> line_point_factor_v2
correction to previous commit function name
isect_seg_sphere_v3 --> isect_line_sphere_v3
... since its not clipped.
added a clip argument to the python version of the function.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index cae5c14aa97..c9a6aa87cd0 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1174,25 +1174,6 @@ static void project_face_seams_init(const ProjPaintState *ps, const int face_ind #endif // PROJ_DEBUG_NOSEAMBLEED -/* TODO - move to math_geom.c */ - -/* little sister we only need to know lambda */ -#ifndef PROJ_DEBUG_NOSEAMBLEED -static float lambda_cp_line2(const float p[2], const float l1[2], const float l2[2]) -{ - float h[2], u[2]; - - u[0] = l2[0] - l1[0]; - u[1] = l2[1] - l1[1]; - - h[0] = p[0] - l1[0]; - h[1] = p[1] - l1[1]; - - return(dot_v2v2(u, h)/dot_v2v2(u, u)); -} -#endif // PROJ_DEBUG_NOSEAMBLEED - - /* Converts a UV location to a 3D screenspace location * Takes a 'uv' and 3 UV coords, and sets the values of pixelScreenCo * @@ -2518,9 +2499,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i */ /* Since this is a seam we need to work out where on the line this pixel is */ - //fac = lambda_cp_line2(uv, uv_seam_quad[0], uv_seam_quad[1]); + //fac = line_point_factor_v2(uv, uv_seam_quad[0], uv_seam_quad[1]); - fac = lambda_cp_line2(uv, seam_subsection[0], seam_subsection[1]); + fac = line_point_factor_v2(uv, seam_subsection[0], seam_subsection[1]); if (fac < 0.0f) { VECCOPY(pixelScreenCo, edge_verts_inset_clip[0]); } else if (fac > 1.0f) { VECCOPY(pixelScreenCo, edge_verts_inset_clip[1]); } else { interp_v3_v3v3(pixelScreenCo, edge_verts_inset_clip[0], edge_verts_inset_clip[1], fac); } |