Defines | Functions

path_simplifier.c File Reference

Simplify the path calculated by A* algorithm. More...

#include "path_simplifier.h"
#include <math.h>
#include <stdlib.h>
Include dependency graph for path_simplifier.c:

Defines

#define POW(x)   (x*x)
Path_simplifier constants

#define PATH_ERROR   0.09
 Max error for the path simplifier.

Functions

void freePathMemory (PathPoint *simple_path)
 Free memory allocated for simple path.
Path simplifier functions

PathPointnewPathPoint (PathPoint *last, float x, float y)
 Put the REAL coordonates (X,Y) in a list of points.
void calc_line (float x1, float y1, float x2, float y2, Line *l)
 Calc line parameters from two points.
float calc_dist (Line *l, float x, float y)
 Calc the distance between a line and a point.
int path_simplifier (PathPoint *path, int nbpoints, PathPoint *first_point, double *angle)
 Simplify a given path.

Detailed Description

Simplify the path calculated by A* algorithm.

Author:
Jose Maria Martin Laguna <jmmartin@etud.insa-toulouse.fr>, (C) 2007

Define Documentation

#define PATH_ERROR   0.09

Max error for the path simplifier.

#define POW (   x  )     (x*x)