Package pygsear :: Module Path :: Class VelocityPath
[show private | hide private]
[frames | no frames]

Class VelocityPath

Path --+
       |
      VelocityPath

Known Subclasses:
VelocityPathTime, VelocityPathBounded, AccelerationPath

Move according to velocity in pixels per frame.
Method Summary
  __init__(self, startLocation, vx, vy, duration)
  __iter__(self)
(inherited from Path)
  accelerate(self, ax, ay)
  get_direction(self)
Return the direction from the previous location to the current location.
  get_position(self)
Return position along Path (inherited from Path)
  get_speed(self)
  get_x(self)
return x component of position (inherited from Path)
  get_y(self)
return y component of position (inherited from Path)
  next(self)
return position
  onscreen(self, slack)
true if path position is on main window (inherited from Path)
  pause(self)
stop moving along path (inherited from Path)
  reset(self)
put path back to original state (inherited from Path)
  set_endTime(self, duration)
Path will raise StopIteration after self.duration seconds (inherited from Path)
  set_position(self, position)
Set position and update positionOld (inherited from Path)
  set_velocity(self, vx, vy)
  unpause(self)
resume moving along path (inherited from Path)

Method Details

get_direction(self)

Return the direction from the previous location to the current location.
Overrides:
pygsear.Path.Path.get_direction (inherited documentation)

next(self)

return position
Raises:
StopIteration - If duration has expired, or if position has been set to (None, None)
Overrides:
pygsear.Path.Path.next (inherited documentation)

Generated by Epydoc 1.1 on Sun Jan 25 19:10:10 2004 http://epydoc.sf.net