diff python/moving.py @ 256:dc1faa7287bd

added the normal adaptation class
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 24 Jul 2012 01:37:21 -0400
parents 13ec22bec5d4
children d90be3c02267
line wrap: on
line diff
--- a/python/moving.py	Mon Jul 23 23:07:19 2012 -0400
+++ b/python/moving.py	Tue Jul 24 01:37:21 2012 -0400
@@ -332,6 +332,13 @@
         return Trajectory([[float(n) for n in line1.split(' ')],
                            [float(n) for n in line2.split(' ')]])
 
+    @staticmethod
+    def fromPointList(points):
+        t = Trajectory()
+        for p in points:
+            t.addPosition(p)
+        return t
+
     def __str__(self):
         return ' '.join([self.__getitem__(i).__str__() for i in xrange(self.length())])