UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_raytracing.hpp
1 /* u3d_raytracing.hpp */
2 /* $Id: u3d_raytracing.hpp,v 1.3 2008/06/02 12:02:11 sasha Exp $ */
3 
4 #ifndef __u3d_raytracing_hpp
5 #define __u3d_raytracing_hpp
6 
7 #include <cmath>
8 #include <rbm/u3d_model.hpp>
9 
10 #include "u3d_ray.hpp"
11 #include "u3d_raytr_defines.hpp"
12 
13 //============================================================================
16 {
17  public:
18 
19  U3dRayTracing(U3dModel *mod3d);
20  virtual ~U3dRayTracing();
21 
23  virtual U3dRay* rayShoot(U3dPoint startP, double f, double az,
24  U3dCodeAr rCode, /*IntAr *bNums=NULL,*/
25  bool waySave=false);
27  bool snellius(double vin, double teta0, double az,
28  double vout, int rtr, double iAngle,
29  double iAz, double &teta1, double &az1);
30 
32  U3dModel* getModel() const { return m_model; };
33 
34 
35  protected:
36 
37  U3dModel *m_model;
41  U3D_STEP_RESULT RayStep(U3dRayPoint &rp, double df, double &dt,
42  double &iAngle, double &iAz,
43  double &iCurvity, int &iBoundNum,
44  U3D_WAVE_TYPE vPS, bool prevInt,
45  bool noIntersect=false);
46 
47  U3D_STEP_RESULT rayStep(U3dRayPoint &rp, double df, double &dt,
48  double &iAngle, double &iAz,
49  double &iCurvity, int &iBoundNum, int &bn1, int &bn2,
50  U3D_WAVE_TYPE vPS, bool prevInt,
51  bool noIntersect=false);
52 
53  bool intersectCellTriangles(const U3dGridCell* cell,
54  U3dPoint p1,
55  U3dPoint p2,
56  U3dPoint &ip, int &iBoundNum, double &iAngle, double &iAz,
57  int debug_level=0);
58 
59  bool processNeighbourCells(const U3dGridCell* cell1, const U3dGridCell* cell2,
60  U3dPoint p1, U3dPoint p2,
61  U3dPoint &ip, int &iBoundNum, double &iAngle, double &iAz,
62  int debug_level=0);
63 
65  double getTime(U3dPoint p0, U3dPoint p1, double v0);
66 
67  bool stepOnRay(U3dRayPoint p1, U3dRayPoint &p2,
68  double df, U3D_WAVE_TYPE vPS, bool prevInt,
69  double &vel);
70 
71  void stepOnChord(double k, double fK, double azK, double df, double vel,
72  U3dRayPoint rp0, U3dRayPoint &rp1);
73 
75  void CalcIntParams(U3dRayPoint p, U3dPoint p0, int rtr, U3dPoint &p1);
76 
77  void calcIntNeighPoints(U3dPoint p_int, double f, double az, U3dPoint &p0, U3dPoint &p1);
78 
80  void getEndPoint(U3dPoint p0, U3dPoint &p1);
81 
82  double dl;
83 
84 private:
85 
86  double BIGGEST_RADIUS;
87 
88 };
89 
90 
91 #endif /* u3d_raytracing.hpp */
void CalcIntParams(U3dRayPoint p, U3dPoint p0, int rtr, U3dPoint &p1)
U3D_STEP_RESULT RayStep(U3dRayPoint &rp, double df, double &dt, double &iAngle, double &iAz, double &iCurvity, int &iBoundNum, U3D_WAVE_TYPE vPS, bool prevInt, bool noIntersect=false)
virtual U3dRay * rayShoot(U3dPoint startP, double f, double az, U3dCodeAr rCode, bool waySave=false)
U3dBox * m_modelBox
Definition: u3d_raytracing.hpp:38
Definition: u3d_box.hpp:24
bool snellius(double vin, double teta0, double az, double vout, int rtr, double iAngle, double iAz, double &teta1, double &az1)
void getEndPoint(U3dPoint p0, U3dPoint &p1)
Definition: u3d_point.hpp:16
U3dModel * m_model
Definition: u3d_raytracing.hpp:32
Definition: u3d_ray.hpp:14
double getTime(U3dPoint p0, U3dPoint p1, double v0)
Definition: u3d_raytr_defines.hpp:65
Definition: u3d_model.hpp:15
U3dModel * getModel() const
Definition: u3d_raytracing.hpp:32
Definition: u3d_grid_cell.hpp:32
Definition: u3d_raytracing.hpp:15