diff python/moving.py @ 108:6efe470ea5e5

added test existsAtInstant to STObject
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 15 Jul 2011 03:04:39 -0400
parents 916678481896
children 606010d1d9a4
line wrap: on
line diff
--- a/python/moving.py	Fri Jul 15 02:32:34 2011 -0400
+++ b/python/moving.py	Fri Jul 15 03:04:39 2011 -0400
@@ -112,6 +112,9 @@
     def getTimeInterval(self):
         return self.timeInterval
 
+    def existsAtInstant(self, t):
+        return self.timeInterval.contains(t)
+
     def commonTimeInterval(self, obj2):
         return self.getTimeInterval().intersection(obj2.getTimeInterval())