UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_surfsource.hpp
1 
2 /* u3d_surfsource.hpp */
3 /* $Id: u3d_surfsource.hpp,v 1.1 2008/05/13 12:19:18 sad Exp $ */
4 //------------------------------------------------------------------------------
5 #ifndef __u3d_surfsourcehpp
6 #define __u3d_surfsourcehpp
7 
8 #include "u3d_rtmod_defines.hpp"
9 #include <mth/u3d_box.hpp>
10 #include <mth/u3d_math_abstract_surface.hpp>
11 #include <mth/u3d_triangled_abstract_surface.hpp>
12 
13 
14 //==============================================================================
16 {
17  friend bool comp2SurfTest(const U3dSurfSource& s1, const U3dSurfSource& s2);
18 
19 public:
20 
21  U3dSurfSource(U3dMathAbstractSurface *mathsurf_in, U3dCodeAr wc, int bId, float stp); // unstable constructor !!!!
22  U3dSurfSource(U3dTriangledAbstractSurface *triansurf_in, U3dCodeAr wc, int bId, float stp);
23 
25  U3dSurfSource(U3dTriangledAbstractSurface *triansurf_in, const char* data, int size) :
26  m_mathsurf(NULL),
27  m_triansurf(triansurf_in)
28  {
29  deserialize(data, size);
30  }
31 
32  ~U3dSurfSource();
33 
34  void setIJCell(U3dPoint p, double stF, double stAz, double T,
35  double F, double Az, double nF, double nAz);
36 
37  void getIJ(U3dPoint p, int &i, int &j);
38 
39  int getIMax() { return m_p_size; }
40  int getJMax() { return m_q_size; }
41 
42  SSPQCell getCell(int i, int j) { return m_pqgrid[i][j]; }
43  U3dPoint getCellPoint(int i, int j);
44  U3dPoint getCellInitPoint(int i, int j);
45 
46  double getIJStF(int i, int j) { return m_pqgrid[i][j].st_f; }
47  double getIJStAz(int i, int j) { return m_pqgrid[i][j].st_az; }
48 
49  double getIJT(int i, int j) { return m_pqgrid[i][j].t; }
50  double getIJF(int i, int j) { return m_pqgrid[i][j].f; }
51  double getIJAz(int i, int j) { return m_pqgrid[i][j].az; }
52  double getIJNF(int i, int j) { return m_pqgrid[i][j].n_f; }
53  double getIJNAz(int i, int j) { return m_pqgrid[i][j].n_az; }
54 
55  void setShadowedFlag(int i, int j) { m_pqgrid[i][j].t = -2; }
56 
57  bool getReady() { return m_ready; }
58  int getBoundId() { return m_bound_id; }
59 
60  U3dCodeAr getCode() const { return m_wave_code; }
61 
62  U3D_WAVE_TYPE getWType() { return m_wave_code[0].wType; }
63  const U3dTriangledAbstractSurface* getTrSurf() { return m_triansurf; }
64  const U3dMathAbstractSurface* getMathSurf() { return m_mathsurf; }
65 
70  void serialize(char** data, int* size);
71 
72 
74  void deserialize(const char* data, int size);
75 
76 
78  void setID(int id) { m_queue_ID=id; };
79 
80 
82  int getID() { return m_queue_ID; };
83 
84 
85 private:
86 
87  int m_queue_ID;
88 
89  U3dMathAbstractSurface *m_mathsurf;
90  U3dTriangledAbstractSurface *m_triansurf;
92  SSPQCell **m_pqgrid;
94  U3dCodeAr m_wave_code;
95  int m_bound_id;
96 
97 
98 
99  float m_step_x;
100  float m_step_y;
102  int m_p_size;
103  int m_q_size;
106  float *m_xgrid;
107  float *m_ygrid;
110  double m_xmn;
111  double m_xmx;
112  double m_ymn;
113  double m_ymx;
114 
115  bool m_ready;
116 };
117 
118 
119 //----------------------------------------------------------------------------
120 #endif /* u3d_surfsource.hpp */
121 
122 
123 
124 
double az
Definition: u3d_rtmod_defines.hpp:72
Definition: u3d_math_abstract_surface.hpp:11
Definition: u3d_surfsource.hpp:15
Definition: u3d_triangled_abstract_surface.hpp:31
void setID(int id)
Definition: u3d_surfsource.hpp:78
double st_f
Definition: u3d_rtmod_defines.hpp:68
double t
Definition: u3d_rtmod_defines.hpp:70
int getID()
Definition: u3d_surfsource.hpp:82
Definition: u3d_point.hpp:16
Definition: u3d_rtmod_defines.hpp:67
void deserialize(const char *data, int size)
U3dSurfSource(U3dTriangledAbstractSurface *triansurf_in, const char *data, int size)
Definition: u3d_surfsource.hpp:25
double f
Definition: u3d_rtmod_defines.hpp:71
void serialize(char **data, int *size)
double st_az
Definition: u3d_rtmod_defines.hpp:69