Rev 2302 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2302 | Rev 2335 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | struct multi_curve; |
14 | struct multi_curve; |
15 | 15 | ||
16 | struct hit_t { |
16 | struct hit_t { |
17 | 17 | ||
18 | multi_curve* crv; // curve hit |
18 | multi_curve* crv; // curve hit |
19 | int crv_id; // id among list of curves |
19 | int crv_id; // curve id |
20 | enum {NONE = 0, VERTEX, LEFT_TANGENT, RIGHT_TANGENT}; // things that can be hit |
20 | enum {NONE = 0, VERTEX, LEFT_TANGENT, RIGHT_TANGENT}; // can be hit |
21 | int what; // what was hit |
21 | int what; // what was hit |
22 | int id; // id of hit thing |
22 | int id; // id of thing hit |
23 | - | ||
24 | static int name_only; |
- | |
25 | 23 | ||
26 | // tangent vectors from corresponding vertex
|
24 | // tangent vectors from corresponding vertex
|
27 | //
|
25 | //
|
28 | point<float> left_tangent, right_tangent; |
26 | point<float> left_tangent, right_tangent; |
29 | float left_tangent_magnitude, right_tangent_magnitude; |
27 | float left_tangent_magnitude, right_tangent_magnitude; |
Line 39... | Line 37... | ||
39 | hit_t& operator= (const hit_t& h); |
37 | hit_t& operator= (const hit_t& h); |
40 | void copy (const hit_t& src); |
38 | void copy (const hit_t& src); |
41 | 39 | ||
42 | pointinfo<float>& get (); |
40 | pointinfo<float>& get (); |
43 | 41 | ||
- | 42 | static int name_only; |
|
- | 43 | ||
44 | }; |
44 | }; |
45 | 45 | ||
46 | template <typename T> T& operator<< (T& t, const hit_t& h) { |
46 | template <typename T> T& operator<< (T& t, const hit_t& h) { |
47 | if (hit_t::name_only) |
47 | if (hit_t::name_only) |
48 | t << h.crv->name; |
48 | t << h.crv->name; |