Subversion Repositories DIN Is Noise

Rev

Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1528 jag 1
/*
2
* trail.h
2302 jag 3
* DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath
1528 jag 4
* For more information, please visit http://dinisnoise.org/
5
*/
6
 
7
#ifndef __TRAIL
8
#define __TRAIL
9
 
10
#include <list>
11
#include <string>
12
#include "point.h"
13
 
14
struct trail_t {
15
 
16
  static float* tpts;
17
  static int n_tpts;
1661 jag 18
  static void alloc (int n);
1528 jag 19
  static void destroy () { if (tpts) delete[] tpts; }
20
 
1661 jag 21
  struct pts_t {
22
    std::list <float> x;
23
    std::list <float> y;
24
  } pts;
25
  point<float> last;
26
 
1747 jag 27
  int cur, total;
1661 jag 28
 
1756 jag 29
  trail_t ();
1663 jag 30
  trail_t (int tp);
1528 jag 31
  void add (float x, float y);
1747 jag 32
  void change (int delta);
33
  void set (int t);
34
  void reset ();
1528 jag 35
  void draw ();
1661 jag 36
 
1657 jag 37
#ifdef __SVG__
38
  void write ();
39
#endif
1661 jag 40
 
1528 jag 41
};
42
 
43
#endif