UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Zt3DPoints.H
1 /* Zt3DPoints.H */
2 #ifndef __Zt3DPoints_H
3 #define __Zt3DPoints_H
4 
5 #include <mix/wenv.h>
6 #include <zm/ZtObject.H>
7 #include <zm/ZScaledPalette.H>
8 #include <mod3d/mod3d_basic.H>
9 #include <mix/misc.h>
10 
11 
12 /***********************************************************************
13  * Create plain projection of 3D points array.
14  ***********************************************************************/
15 class Zt3DPoints: public ZtObject
16 {
17 public:
18 
19  /* Zt3DPoints constructor */
20  Zt3DPoints (ZtMain* pManager, ZGroupId pxid, ZGroupId pyid,
21  ZGroupId nxid, ZGroupId nyid);
22 
23  /* Set magnification parameter */
24  void set_magnification(int mgf);
25 
26  /* Data attachment */
27  void attach_data(const aPoints& P);
28 
29  /* Sorting data */
30  void sort();
31 
32  /* Colour control */
33  void set_mark_color (const char* szColorName)
34  {
35  set_foreground(szColorName);
36  }
37 
38  /* Attach colour palette */
39  void attach_palette (ZScaledPalette* pal);
40 
41  /* Detach colour palette */
42  void detach_palette ();
43 
44  /* Direct draw procedure */
45  virtual void redraw ();
46 
48  virtual const char* class_id () const;
49 
50 public:
51 
52  struct Val_Ind
53  {
54  double value;
55  int index;
56  };
57 
58 #define AnyType Val_Ind
59 #define AnyAr Val_Ind_Ar
60 #include <mix/AnyAr.H>
61 
62 protected:
63 
64  int Magnifier; /* Magnification parameter for drawing */
65  int n_points;
66  aPoints points3d; /* x,y,z natural points positions */
67  Val_Ind_Ar PoInd;
68  ZScaledPalette *pScPal;
69  Logic Attach_Data_Flag;
70 
71 private:
72 
73  static void exchange_val_ind (void* P, unsigned i1, unsigned i2);
74  static Compar compare_val_ind (void* P, unsigned i1, unsigned i2);
75 
76 };
77 
78 
79 #endif /* Zt3DPoints.H */
virtual void redraw()
Definition: ZtMain.H:32
Definition: Zt3DPoints.H:15
virtual const char * class_id() const
Definition: ZtObject.H:57
Definition: ZScaledPalette.H:15
Definition: Zt3DPoints.H:52