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:
authorJoshua Leung <aligorith@gmail.com>2009-10-30 09:33:40 +0300
committerJoshua Leung <aligorith@gmail.com>2009-10-30 09:33:40 +0300
commitae3cf92491be73f353b278f1632a68990d0e44d9 (patch)
treefe905d35c85aa502620c97e9b53324c8dc99e5ba /source/blender/blenlib/intern/arithb.c
parentfe68d2672dcba346a5bbf904a3d46141e5b4c651 (diff)
New Track To Constraint: "Damped"
This is effectively a C-port of Nathan Vegdahl's "No Twist" TrackTo PyConstraint, and has been added as a separate type of constraint to be consistent with the existing constraints (Locked Track, and Track To). In general, this works considerably better than the existing "Track To" constraint, since it works by determining the smallest rotation necessary to get the current orientation of the owner to an orientation which would be tracking the target. It is also a much more straightforward approach than the weird old method the old Track To uses. I've made a few tweaks to the code to deal with the (hopefully rare) cases where the target and the constrained are coincident. These don't appear to cause too much trouble in general. TODO: - Probably the naming of the constraints will change, to better convey their purposes. Naming suggestions welcome.
Diffstat (limited to 'source/blender/blenlib/intern/arithb.c')
-rw-r--r--source/blender/blenlib/intern/arithb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 68f56620e21..c42e21d5234 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -131,6 +131,7 @@ float Normalize(float *n)
return d;
}
+/* Crossf stores the cross product c = a x b */
void Crossf(float *c, float *a, float *b)
{
c[0] = a[1] * b[2] - a[2] * b[1];