Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-27 04:32:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-27 04:32:58 +0300
commitfde4686d77dd72ccfa88febdea360136bfd17a36 (patch)
tree52a715e72488c70457f5c29a74e24c0e3977e470 /source/blender/blenlib/intern/math_rotation.c
parent9c82e1efc32bdff04c3136ef5a2959ed73711ca7 (diff)
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.
Diffstat (limited to 'source/blender/blenlib/intern/math_rotation.c')
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 084db725409..61d5eeaaa2c 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -327,7 +327,7 @@ void normalize_qt(float *q)
}
}
-void rotation_between_vecs_to_quat(float *q, float v1[3], float v2[3])
+void rotation_between_vecs_to_quat(float *q, const float v1[3], const float v2[3])
{
float axis[3];
float angle;