UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_migr_shooter.hpp
1 /* u3d_migr_shooter.hpp */
2 /* $Id: u3d_migr_shooter.hpp,v 1.2 2008/09/18 14:01:50 sasha Exp $ */
3 
4 #ifndef __u3d_migr_shooter_hpp
5 #define __u3d_migr_shooter_hpp
6 
7 #include <rbm/u3d_abstract_shooter.hpp>
8 #include "u3d_migr_defines.hpp"
9 
12 {
13 public:
14 
15  U3dMigrRayShooter(U3dModel *mod3d, URayReflCoefType coeff_type = ZOEPPRITZ);
16 
19  U3dRay* rayShoot(U3dPoint startP, double f, double az,
20  U3dCodeAr rCode, bool waySave);
21 
22  U3dBox* getImageBox() { return new U3dBox(m_imageBox); }
23 
24 protected:
25 
27  void markCell(ushort i, ushort j, ushort k, double f, double az, double t);
28 
30  void addRayPoint(U3dPoint p0, U3dRayPoint rp1, U3D_WAVE_TYPE wType,
31  /*double t,*/ double dt);
32 
34  void addRayPoint2D(int ind1_0, int ind2_0, int ind1_cur, int ind2_cur,
35  int ind1_step, int ind2_step,
36  double coord1_step, double coord2_step,
37  double coord1_2_mul, double coord2_1_mul,
38  double coord3_1_mul, double coord3_2_mul,
39  int ind_const, U3dRayPoint rp0, int plane,
40  U3D_WAVE_TYPE wt, double end_time);
41 
43  void setCurrentStartAngles(U3dPoint sp, double f, double az);
44 
46  bool getCellIJK(U3dPoint point, ushort &i, ushort&j, ushort &k);
47  inline void getCellI(U3dPoint p, ushort &i);
48  inline void getCellJ(U3dPoint p, ushort &j);
49  inline void getCellK(U3dPoint p, ushort &k);
52  virtual void calculateImageBox();
53 
54  // ****************************************************************************
55 
56  //private:
57 
58 
60  int getFaceId(U3dRay *r);
61 
63  int getFaceIMax(int faceId);
64 
66  int getFaceJMax(int faceId);
67 
70  void getFaceCellIJ(U3dRay *r, int faceId, int &i, int &j);
71 
73  void setShadowedFlag(int i, int j, int faceId);
74 
76  float getFaceCellT(int i, int j, int faceId);
77 
79  float getFaceCellStF(int i, int j, int faceId);
80 
82  float getFaceCellStAz(int i, int j, int faceId);
83 
84 
86  MigrInnerCell getFaceCell(int i, int j, int faceId);
87 
88  // ****************************************************************************
89 
90  // ****************************************************************************
91 
94  U3dBox m_imageBox;
95 
96  float m_stepX;
97  float m_stepY;
98  float m_stepZ;
100  ushort m_i_max;
101  ushort m_j_max;
102  ushort m_k_max;
105  double m_curStF;
106  double m_curStAz;
109 };
110 
111 
112 //==============================================================================
113 //------------------------------------------------------------------------------
114 inline void U3dMigrRayShooter::getCellI(U3dPoint p, ushort &i)
115 {
116  if (fabs(p.getX() - m_model->getModelBox().getXMax()) < U3D_EPSILON) i = m_i_max;
117  else { double x = p.getX() - m_model->getModelBox().getXMin(); i = ushort (x / m_stepX); }
118 }
119 
120 //------------------------------------------------------------------------------
121 inline void U3dMigrRayShooter::getCellJ(U3dPoint p, ushort &j)
122 {
123  if (fabs(p.getY() - m_model->getModelBox().getYMax()) < U3D_EPSILON) j = m_j_max;
124  else { double y = p.getY() - m_model->getModelBox().getYMin(); j = ushort (y / m_stepY); }
125 }
126 
127 //------------------------------------------------------------------------------
128 inline void U3dMigrRayShooter::getCellK(U3dPoint p, ushort &k)
129 {
130  if (fabs(p.getZ() - m_model->getModelBox().getZMax()) < U3D_EPSILON) k = m_k_max;
131  else { double z = p.getZ() - m_model->getModelBox().getZMin(); k = ushort (z / m_stepZ); }
132 }
133 
134 
135 
136 
137 #endif
double m_curStF
Definition: u3d_migr_shooter.hpp:105
void setCurrentStartAngles(U3dPoint sp, double f, double az)
float getFaceCellStAz(int i, int j, int faceId)
void getCellI(U3dPoint p, ushort &i)
Definition: u3d_migr_shooter.hpp:114
void getCellJ(U3dPoint p, ushort &j)
Definition: u3d_migr_shooter.hpp:121
U3dBox getModelBox() const
Definition: u3d_model.hpp:66
int getFaceIMax(int faceId)
void markCell(ushort i, ushort j, ushort k, double f, double az, double t)
double getYMax() const
Definition: u3d_box.hpp:182
Definition: u3d_box.hpp:24
U3dRay * rayShoot(U3dPoint startP, double f, double az, U3dCodeAr rCode, bool waySave)
MigrDataCube m_migr_cube
Definition: u3d_migr_shooter.hpp:92
ushort m_k_max
Definition: u3d_migr_shooter.hpp:102
float getFaceCellStF(int i, int j, int faceId)
float getFaceCellT(int i, int j, int faceId)
double getZ() const
Definition: u3d_point.hpp:141
double getXMax() const
Definition: u3d_box.hpp:172
double getXMin() const
Definition: u3d_box.hpp:167
Definition: geometry.H:16
float m_stepY
Definition: u3d_migr_shooter.hpp:97
void getCellK(U3dPoint p, ushort &k)
Definition: u3d_migr_shooter.hpp:128
MigrInnerCell getFaceCell(int i, int j, int faceId)
double getY() const
Definition: u3d_point.hpp:135
int getFaceJMax(int faceId)
virtual void calculateImageBox()
Definition: u3d_point.hpp:16
U3dModel * m_model
Definition: u3d_raytracing.hpp:32
double getYMin() const
Definition: u3d_box.hpp:177
Definition: u3d_ray.hpp:14
float m_stepX
Definition: u3d_migr_shooter.hpp:96
Definition: u3d_raytr_defines.hpp:65
int getFaceId(U3dRay *r)
ushort m_j_max
Definition: u3d_migr_shooter.hpp:101
Definition: u3d_model.hpp:15
void addRayPoint2D(int ind1_0, int ind2_0, int ind1_cur, int ind2_cur, int ind1_step, int ind2_step, double coord1_step, double coord2_step, double coord1_2_mul, double coord2_1_mul, double coord3_1_mul, double coord3_2_mul, int ind_const, U3dRayPoint rp0, int plane, U3D_WAVE_TYPE wt, double end_time)
double m_curStAz
Definition: u3d_migr_shooter.hpp:106
double getZMax() const
Definition: u3d_box.hpp:192
double getZMin() const
Definition: u3d_box.hpp:187
Definition: u3d_abstract_shooter.hpp:17
void setShadowedFlag(int i, int j, int faceId)
migration-cell structure
Definition: u3d_migr_defines.hpp:31
double getX() const
Definition: u3d_point.hpp:129
U3dPoint m_curSP
Definition: u3d_migr_shooter.hpp:107
bool getCellIJK(U3dPoint point, ushort &i, ushort &j, ushort &k)
float m_stepZ
Definition: u3d_migr_shooter.hpp:98
void getFaceCellIJ(U3dRay *r, int faceId, int &i, int &j)
ushort m_i_max
Definition: u3d_migr_shooter.hpp:100
void addRayPoint(U3dPoint p0, U3dRayPoint rp1, U3D_WAVE_TYPE wType, double dt)
Definition: u3d_migr_shooter.hpp:11