UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZtLattice.H
1 /* ZtLattice.H */
2 /* $Id: ZtLattice.H,v 1.9 2005/04/29 07:26:40 vlad Exp $ */
3 #ifndef __ZtLattice_H
4 #define __ZtLattice_H
5 
6 #include <mix/DoubleAr.H>
7 #include <zm/ZtTablet.H>
8 
9 
15 enum OpStatus {
16  opNone, opInsert, opRemove
17 };
18 
19 class ZtLattice : public ZtTablet
20 {
21 protected:
22 
23  double l_eps;
26  int ar_order;
28 public:
29 
30  OpStatus status;
31  double coord;
33  unsigned index;
37 
39  ZtLattice (ZtMain* pManager,
40  ZGroupId pxid, ZGroupId pyid,
41  ZDimension dim, ZGroupId nid);
42 
44  void attach_data (DoubleAr& points, int order = ASCENT_ORDER);
45 
47  void detach_data ();
48 
50  virtual void point (float nx, float ny);
51 
53  virtual void redraw ();
54 
58  virtual Logic check_point (const XEvent* xev, ZPoint& p);
59 
61  virtual ErrCode insert_layer (int iNumber, double dDepth);
62 
64  virtual ErrCode change_layer (int iNumber, double dDepth);
65 
67  virtual void delete_layer (int iNumber);
68 
70  double layer_value (int i) {
71  return (pt_ar==NULL)? 0: pt_ar->get(i);
72  }
73 
75  int n_of_layers () const {
76  return (pt_ar==NULL)? 0: pt_ar->count();
77  }
78 
80  void set_eps (double e) {
81  l_eps = e;
82  }
83 
85  Logic hit_layer (int iNumber, double dDepth) const;
86 
88  virtual const char* class_id () const;
89 
90 };
91 
92 
93 #endif /* ZtLattice.H */
OpStatus status
Definition: ZtLattice.H:30
Definition: ZBase.H:156
ZGEnv line
Definition: ZtLattice.H:36
void attach_data(DoubleAr &points, int order=ASCENT_ORDER)
Logic hit_layer(int iNumber, double dDepth) const
Definition: ZtTablet.H:15
ZtLattice(ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZDimension dim, ZGroupId nid)
unsigned index
Definition: ZtLattice.H:33
Definition: ZtMain.H:32
virtual Logic check_point(const XEvent *xev, ZPoint &p)
ZNCoordSlave & nx() const
int ar_order
Definition: ZtLattice.H:26
virtual ErrCode change_layer(int iNumber, double dDepth)
double layer_value(int i)
Definition: ZtLattice.H:70
virtual void redraw()
Definition: DoubleAr.H:14
Definition: ZBase.H:30
DoubleAr * pt_ar
Definition: ZtLattice.H:25
void set_eps(double e)
Definition: ZtLattice.H:80
virtual ErrCode insert_layer(int iNumber, double dDepth)
int n_of_layers() const
Definition: ZtLattice.H:75
virtual void point(float nx, float ny)
void detach_data()
Definition: ZtLattice.H:19
virtual void delete_layer(int iNumber)
double l_eps
Definition: ZtLattice.H:23
double coord
Definition: ZtLattice.H:31
virtual const char * class_id() const