/* * graphic interface */ #ifndef INTERFACE_H #define INTERFACE_H #include "attr.h" #include "util.h" #include "matrix.h" #include struct point : module_vec { vec v, n; // vertex, normal attribute_set attr; // attributes point(const module_vec &v, const vec &pos, const vec &up, const attribute_set &as) t_no : module_vec(v), v(pos), n(up), attr(as) {}; }; typedef vector points; // <0 cw, >0 ccw double winding (const points &v) t_no; struct gfx_int { virtual ~gfx_int () t_no {}; virtual void begin_fig() t_no {}; virtual void end_fig() t_no {}; virtual void segment (const point &, const point &) t_err abstract; virtual void object (const points &) t_err abstract; }; #endif