Subversion Repositories DIN Is Noise

Rev

Rev 1528 | Rev 1712 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1528 Rev 1532
Line 6... Line 6...
6
6
7
#ifndef __hit
7
#ifndef __hit
8
#define __hit
8
#define __hit
9
9
10
#include "point.h"
10
#include "point.h"
-
 
11
#include "multi_curve.h"
11
12
12
struct multi_curve;
13
struct multi_curve;
13
struct hit_t {
14
struct hit_t {
14
  multi_curve* crv; // curve hit
15
  multi_curve* crv; // curve hit
15
  int crv_id; // id among list of curves
16
  int crv_id; // id among list of curves
Line 34... Line 35...
34
  void ensure_id ();
35
  void ensure_id ();
35
  hit_t& operator= (const hit_t& h);
36
  hit_t& operator= (const hit_t& h);
36
  void copy (const hit_t& src);
37
  void copy (const hit_t& src);
37
  const point<float>& get ();
38
  const point<float>& get ();
38
};
39
};
-
 
40
-
 
41
template <typename T> T& operator<< (T& t, const hit_t& h) {
-
 
42
  if (hit_t::name_only)
-
 
43
    t << h.crv->name;
-
 
44
  else {
-
 
45
    static const std::string what [] = {"nothing ", "vertex ", "L-tangent ", "R-tangent "};
-
 
46
    static const char* of = " of ";
-
 
47
    t << what[h.what] << h.id << of << h.crv->name;
-
 
48
  }
-
 
49
  return t;
-
 
50
}
-
 
51
39
#endif
52
#endif