def __init__(self, sampled, **kwargs): """ Initialise splined body model. @param sampled: The L{SampledBodyModel} from which to generated splined trajectories """ SplinedJoint.__init__(self, None, sampled, **kwargs) SplinedPositionTrajectory.__init__(self, sampled, **kwargs)
def __init__(self, capture, sampled, **kwargs): """ Initialise splined marker trajectory. @param capture: Parent L{SplinedMarkerCapture}. @param sampled: L{Marker3DOF} with sampled data. @param kwargs: Keyword arguments for spline trajectory constructors. """ Marker.__init__(self, capture, sampled.id) SplinedPositionTrajectory.__init__(self, sampled, **kwargs)
def _update_trajectory(self): smooth_rotations = False if self._position_data and not self._orientation_data: samp = SampledPositionTrajectory(self._position_data) self.trajectory = SplinedPositionTrajectory(samp) elif self._orientation_data and not self._position_data: samp = SampledRotationTrajectory(self._orientation_data) self.trajectory = SplinedRotationTrajectory( samp, smoothRotations=smooth_rotations) elif self._position_data and self._orientation_data: samp = SampledTrajectory(self._position_data, self._orientation_data) self.trajectory = SplinedTrajectory( samp, smoothRotations=smooth_rotations)