UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_rtmod_shooter.hpp
1 /* u3d_rtmod_shooter.hpp */
2 /* $Id: u3d_rtmod_shooter.hpp,v 1.2 2008/06/02 12:02:11 sasha Exp $ */
3 //------------------------------------------------------------------------------
4 
5 #ifndef __u3d_rtmod_shooter_hpp
6 #define __u3d_rtmod_shooter_hpp
7 
8 #include <u3d_abstract_shooter.hpp>
9 #include <u3d_raydyn_calculator.hpp>
10 #include "u3d_rtmod_defines.hpp"
11 #include "u3d_surfsource.hpp"
12 
13 #include <iostream>
14 #include <fstream>
15 #include <iomanip>
16 using namespace std;
17 
18 //==============================================================================
20 {
21 public:
22 
23  U3dRTModRayShooter(U3dModel *mod3d, float stp, URayReflCoefType ctype = ZOEPPRITZ, bool save_ray_path = false);
24 
25 
26  /* ===================== surface sources calculation ===================== */
27 
29  bool getSurfSource(U3dPoint sp ,
30  U3D_WAVE_TYPE wt ,
31  int bId ,
32  U3dSurfSource*& ss_out );
33 
34  bool initialSurfCovering(U3dPoint p ,
35  U3dCodeAr c ,
36  int debug_level = 0 );
37 
39  bool shootSurfFirstRay(U3dPoint p ,
40  U3dCodeAr code ,
41  double &in_f ,
42  double &in_az ,
43  double df ,
44  double daz );
45 
47  bool coverSurfFace(U3dPoint p ,
48  U3dCodeAr c ,
49  int debug_level = 0 );
50 
52  U3dRay* rayShoot(U3dPoint startP ,
53  double f ,
54  double az ,
55  U3dCodeAr rCode ,
56  bool waySave );
57 
58 
59  /* ===================== direct SP-REC shooting ===================== */
60 
62  bool shootPoint(U3dRayPoint start_p ,
63  U3dPoint recp ,
64  double &devF ,
65  double &devAz ,
66  U3dCodeAr rCode ,
67  int bodyId ,
68  U3dRayPoint &wp ,
69  int debug_level = 0 );
70 
72  double SPBodyRecShoot(U3dPoint startP ,
73  U3dPoint recp ,
74  double f ,
75  double az ,
76  U3dCodeAr rCode ,
77  int bodyId ,
78  U3dRayPoint &wp );
79 
81  U3dRay* oneBodySP2RecRayShoot(U3dPoint startP ,
82  U3dPoint recp ,
83  double stF ,
84  double stAz ,
85  U3D_WAVE_TYPE wt ,
86  int bodyId );
87 
88 
89  /* ===================== dynamic ===================== */
90 
91  void calcDynamic(U3dRayPoint sp, U3dPoint recp, U3dCodeAr c, double &ampl, U3dPoints &ray_points);
92 
93  U3dRay* getDynRay(U3dRayPoint sp, U3dPoint recp, U3dCodeAr c, double &dist, U3dPoint &lp, int debug_level = 0);
94 
95  bool calcGeomDivergence(U3dRay* ray, U3dPoint recp, double &geom_div);
96 
99  U3dRay* rayShootDyn(U3dRayPoint start_p ,
100  U3dPoint recp ,
101  U3dCodeAr rCode ,
102  bool waySave ,
103  int debug_level=0);
104 
105 
106  /* ===================== service ===================== */
107 
109  bool getReady() { return m_ready; }
110 
112  bool initSS(int bId, U3dCodeAr wc);
113 
115  void cleanSS();
116 
119 
120  void reloadSS();
121 
122 protected:
123 
124  void shadowPerimeter();
125 
126  /* Get the nearest to the receiver point of the (rp_prev -> rp0) segment of ray trajectory */
127  U3dRayPoint getNearestRayPoint(U3dRayPoint rp_prev, U3dRayPoint rp0, U3dPoint recp, double vel);
128 
129  //bool initSS(int bId, U3dCodeAr wc);
130  //void cleanSS();
131 
133  int getFaceId(U3dRay *r);
134 
136  int getFaceIMax(int faceId);
137 
139  int getFaceJMax(int faceId);
140 
143  void getFaceCellIJ(U3dPoint p, int faceId, int &i, int &j);
144 
146  void setShadowedFlag(int i, int j, int faceId);
147 
149  float getFaceCellT(int i, int j, int faceId);
150 
152  float getFaceCellStF(int i, int j, int faceId);
153 
155  float getFaceCellStAz(int i, int j, int faceId);
156 
157  void formFaceActiveZones(int faceId);
158 
159  U3dSurfSource *m_ss;
160  bool m_ready;
161  float m_ss_stp;
162 
163  static int m_faceId;
164 
165 };
166 
167 
168 //==============================================================================
169 #endif
bool getReady()
Definition: u3d_rtmod_shooter.hpp:109
Definition: u3d_surfsource.hpp:15
Definition: u3d_point.hpp:16
Definition: rays.H:81
Definition: u3d_rtmod_shooter.hpp:19
Definition: u3d_ray.hpp:14
Definition: u3d_raytr_defines.hpp:65
bool m_save_ray_path
Definition: u3d_rtmod_shooter.hpp:118
Definition: u3d_model.hpp:15
Definition: u3d_abstract_shooter.hpp:17