Home | Trees | Index | Help |
---|
Package pygsear :: Module Path :: Class PathNG |
|
Path
--+
|
PathNG
Next-generation Path
This one will integrate all of these disparate Path subclasses in to one uberclass. I think this will make it more usable.Method Summary | |
---|---|
__init__(self,
startLocation,
vx,
vy,
ax,
ay,
gx,
gy,
duration)
| |
__iter__(self)
(inherited from Path )
| |
reverse travel in x-direction | |
reverse travel in y-direction | |
return direction to a point | |
return distance to a point | |
return acceleration | |
return direction of travel | |
Return position along Path (inherited from Path )
| |
return speed | |
return velocity | |
return x component of position (inherited from Path )
| |
return y component of position (inherited from Path )
| |
return next position along path | |
true if path position is on main window (inherited from Path )
| |
stop moving along path (inherited from Path )
| |
Go back to initial position, velocity and acceleration | |
Set acceleration | |
set direction of travel | |
Path will raise StopIteration after self.duration seconds (inherited from Path )
| |
Set constant portion of acceleration (ie gravity) | |
Set position and update positionOld (inherited from Path )
| |
Set a constraint on the path. | |
Change speed while keeping the same direction of movement. | |
Set acceleration to back go to on reset() | |
Set location to go back to on reset() | |
Set velocity to go back to on reset() | |
set turn rate in rad/s | |
Set velocity | |
show_restrictions(self)
| |
turn to the left by radians | |
turn_left(self)
| |
turn_right(self)
| |
turn_straight(self)
| |
turn as quickly as possible towards a point | |
resume moving along path (inherited from Path )
| |
_set_velocity(self,
vx,
vy)
|
Method Details |
---|
bounce_x(self)reverse travel in x-direction |
bounce_y(self)reverse travel in y-direction |
direction(self, point)return direction to a point |
distance(self, point)return distance to a point |
get_acceleration(self)return acceleration |
get_direction(self)return direction of travel Direction is given in radians. 0 radians is towards the right edge of the screen. |
get_speed(self)return speed |
get_velocity(self)return velocity |
next(self, t=None)return next position along path |
reset(self)Go back to initial position, velocity and acceleration Also updates self.ticks to current time |
set_acceleration(self, ax=None, ay=None)Set acceleration
|
set_direction(self, direction)set direction of travel Maintains current speed. |
set_gravity(self, gx=None, gy=None)Set constant portion of acceleration (ie gravity)
|
set_restriction(self, onscreen=None, **kw)Set a constraint on the path. Restrictions are set as keyword arguments. So far these are the contraints that work:
|
set_speed(self, speed=None, accelerate=None)Change speed while keeping the same direction of movement.
|
set_startAcceleration(self, accel=None)Set acceleration to back go to on reset()
|
set_startLocation(self, location=None)Set location to go back to on reset()
|
set_startVelocity(self, vel=None)Set velocity to go back to on reset()
|
set_turnRate(self, turnRate=0)set turn rate in rad/s |
set_velocity(self, special=None, vx=None, vy=None)Set velocity
|
turn(self, rad=None)turn to the left by radians |
turn_towards(self, point)turn as quickly as possible towards a point |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Nov 30 19:33:15 2003 | http://epydoc.sf.net |