Blender Git Loki

Git Commits -> Revision fde4686

Revision fde4686 by Campbell Barton (master)
December 27, 2009, 01:32 (GMT)
barycentric transform utility geometry function.
From 2 triangles and 1 point, the relative position between the point and the first triangle is applied to the second triangle to find the target point.
the barycentric weights are calculated in 2D space with a signed area so values outside the triangle bounds are supported.

wrapped by python:
pt_to = Geometry.BarycentricTransform(pt_from, t1a, t1b, t1c, t2a, t1b, t1c)

NOTE:
- moved some barycentric weight functions out of projection painting into the math lib.
- ended up making some of the math functions use const args.
TODO:
- support exceptional cases. zero area tries and similar.


Commit Details:

Full Hash: fde4686d77dd72ccfa88febdea360136bfd17a36
SVN Revision: 25572
Parent Commit: 9c82e1e
Lines Changed: +176, -82

9 Modified Paths:

/source/blender/blenlib/BLI_math_geom.h (+13, -5) (Diff)
/source/blender/blenlib/BLI_math_rotation.h (+2, -1) (Diff)
/source/blender/blenlib/BLI_math_vector.h (+10, -10) (Diff)
/source/blender/blenlib/intern/math_geom.c (+82, -6) (Diff)
/source/blender/blenlib/intern/math_rotation.c (+1, -1) (Diff)
/source/blender/blenlib/intern/math_vector.c (+6, -6) (Diff)
/source/blender/blenlib/intern/math_vector_inline.c (+4, -4) (Diff)
/source/blender/editors/sculpt_paint/paint_image.c (+23, -49) (Diff)
/source/blender/python/generic/geometry.c (+35, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021