Table of Contents

Module: paths rdpyg/util/paths.py
Imported modules   
import math
Functions   
backwards
distance_between_points
forwards
forwards_from_next
interpolate_line
length_line
point_within
travel_line
within
  backwards 
backwards (
        cur_point,
        next_point,
        distance,
        )

backwards(point, point, num) -> point Returns the point backwards along the given line.

  distance_between_points 
distance_between_points ( p1,  p2 )

distance_between_points(point, point) -> num Returns the distance between two points.

Exceptions   
NotImplementedError
  forwards 
forwards (
        cur_point,
        next_point,
        distance,
        )

forwards(point, point, num) -> point Returns the point forwards the distance along the given line. From the current point!

  forwards_from_next 
forwards_from_next (
        cur_point,
        next_point,
        distance,
        )

forwards(point, point, num) -> point Returns the point forwards the distance along the given line. From the next point!

  interpolate_line 
interpolate_line (
        start_point,
        end_point,
        t,
        )

interpolate_line(point, point, num) -> point returns the new point along the line given. start_point - of the line. end_point - of the line. t - ratio between 0. - 1. along the line.

Exceptions   
NotImplementedError
  length_line 
length_line ( points )

length([point]) -> num returns the length of the line represented by the points.

  point_within 
point_within ( point,  a_rect )

point_within([x,y], rectstyle) -> true if a point is within the rect.

  travel_line 
travel_line (
        start_point,
        end_point,
        speed,
        elapsed_time,
        )

travel_lines(point, point, num, num) -> (time_left, new_point) Travels along the line given at a given speed, for a given time.

  within 
within (
        a,
        b,
        error_range,
        )

within(num, num, num) -> bool check if a is with error_range of b.

Classes   

Path

Used for storing the path from one point to another.


Table of Contents

This document was automatically generated on Sat Jul 30 12:45:42 2005 by HappyDoc version 2.1