comparison python/prediction.py @ 985:668a85c963c3

work on processing and managing large video datasets
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 06 Mar 2018 22:44:33 -0500
parents d6c1c05d11f5
children f026ce2af637
comparison
equal deleted inserted replaced
984:a69695d14e59 985:668a85c963c3
478 crossingZones = [] 478 crossingZones = []
479 479
480 p1 = obj1.getPositionAtInstant(currentInstant) 480 p1 = obj1.getPositionAtInstant(currentInstant)
481 p2 = obj2.getPositionAtInstant(currentInstant) 481 p2 = obj2.getPositionAtInstant(currentInstant)
482 if (p1-p2).norm2() <= collisionDistanceThreshold: 482 if (p1-p2).norm2() <= collisionDistanceThreshold:
483 collisionPoints = [SafetyPoint((p1+p1)*0.5, 1., 0.)] 483 collisionPoints = [SafetyPoint((p1+p2)*0.5, 1., 0.)]
484 else: 484 else:
485 v1 = obj1.getVelocityAtInstant(currentInstant) 485 v1 = obj1.getVelocityAtInstant(currentInstant)
486 v2 = obj2.getVelocityAtInstant(currentInstant) 486 v2 = obj2.getVelocityAtInstant(currentInstant)
487 intersection = moving.intersection(p1, p1+v1, p2, p2+v2) 487 intersection = moving.intersection(p1, p1+v1, p2, p2+v2)
488 488