def __init__(self, capture, sampled, **kwargs): """ Initialise splined marker trajectory. @param capture: Parent L{SplinedMarkerCapture}. @param sampled: L{Marker6DOF} with sampled data. @param kwargs: Keyword arguments for spline trajectory constructors. """ SplinedMarker3DOF.__init__(self, capture, sampled, **kwargs) SplinedRotationTrajectory.__init__(self, sampled, **kwargs)
def __init__(self, parent, sampled, **kwargs): """ Initialise splined joint. @param sampled: the L{SampledJoint} from which to generate splined trajectories @param parent: the parent joint in the body model hierarchy """ Joint.__init__(self, parent, sampled.name, sampled.positionOffset) OffsetTrajectory.__init__(self, parent, sampled.positionOffset) SplinedRotationTrajectory.__init__(self, sampled, **kwargs) self.children = [ (SplinedJoint(self, child, **kwargs) if child.isJoint else PointTrajectory(self, child.name, child.positionOffset)) for child in sampled.children]
def __init__(self, parent, sampled, **kwargs): """ Initialise splined joint. @param sampled: the L{SampledJoint} from which to generate splined trajectories @param parent: the parent joint in the body model hierarchy """ Joint.__init__(self, parent, sampled.name, sampled.positionOffset) OffsetTrajectory.__init__(self, parent, sampled.positionOffset) SplinedRotationTrajectory.__init__(self, sampled, **kwargs) self.children = [ (SplinedJoint(self, child, **kwargs) if child.isJoint else PointTrajectory(self, child.name, child.positionOffset)) for child in sampled.children ]
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)
def __init__(self, t): sampled = SampledTrajectory(None, TimeSeries(t, randomRotationSequence(t))) SplinedRotationTrajectory.__init__(self, sampled)