Advertisement
Guest User

polyzug.h

a guest
Jun 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. #ifndef KEKALUDA_H_INCLUDED
  2. #define KEKALUDA_H_INCLUDED
  3.  
  4. #define MAX_NAME_LENGTH 100
  5. #define MAX_LINE_LENGTH 200
  6.  
  7. enum Ending_e {
  8. OPEN, //offene Kurve
  9. CLOSED //geschlossene Kurve
  10. };
  11.  
  12. struct Point_s {
  13. double x_coord;
  14. double y_coord;
  15. };
  16. typedef struct Point_s Point_t;
  17.  
  18. struct Trajectory_s {
  19. char name [MAX_NAME_LENGTH]; //IME KRIVE
  20. struct Point_s points[MAX_LINE_LENGTH]; //POLJE SA TACKAMA
  21. enum Ending_e ending; //Vrsta krive
  22. long pointCount, maxPoints; //Broj tacaka
  23. //Maksimalan broj tacaka
  24. };
  25. typedef struct Trajectory_s Trajectory_t;
  26.  
  27. Point_t createPoint (double x, double y);
  28. void createPolygonline(Trajectory_t *line, long pointCount);
  29. void generateTable(Trajectory_t *line);
  30. double calculateHeight(Trajectory_t *line);
  31. double distanceEuklid(Point_t pkt1, Point_t pkt2);
  32.  
  33. long roundVal(double d);
  34. void plotPolygon(Trajectory_t *line, long Nx, long Ny);
  35. long saveLine(Trajectory_t *line);
  36. Trajectory_t loadLine(char *filename);
  37.  
  38. #endif // KEKALUDA_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement