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.26 2008/03/31 07:58:19 guser1 Exp $ */
3 
4 #ifndef __u3d_raytracing_hpp
5 #define __u3d_raytracing_hpp
6 
7 #include <math.h>
8 #include <u3d_model.hpp>
9 #include <u3d_defines.hpp>
10 
11 #include "u3d_ray.hpp"
12 #include "u3d_raytr_defines.hpp"
13 
14 
15 //============================================================================
17 class U3dRayTracing
18 {
19  public:
20 
21  U3dRayTracing(U3dModel *mod3d);
22  virtual ~U3dRayTracing();
23 
25  virtual U3dRay* rayShoot(U3dPoint startP, double f, double az,
26  U3dCodeAr rCode, /*IntAr *bNums=NULL,*/
27  bool waySave=false);
29  bool snellius(double vin, double teta0, double az,
30  double vout, int rtr, double iAngle,
31  double iAz, double &teta1, double &az1);
32 
34  U3dModel* getModel() const { return m_model; };
35 
36 
37  protected:
38 
39  U3dModel *m_model;
43  U3D_STEP_RESULT RayStep(U3dRayPoint &rp, double df, double &dt,
44  double &iAngle, double &iAz,
45  double &iCurvity, int &iBoundNum,
46  U3D_WAVE_TYPE vPS, bool prevInt,
47  bool noIntersect=false);
48 
49  U3D_STEP_RESULT rayStep(U3dRayPoint &rp, double df, double &dt,
50  double &iAngle, double &iAz,
51  double &iCurvity, int &iBoundNum, int &bn1, int &bn2,
52  U3D_WAVE_TYPE vPS, bool prevInt,
53  bool noIntersect=false);
54 
55  bool intersectCellTriangles(const U3dGridCell* cell,
56  U3dPoint p1,
57  U3dPoint p2,
58  U3dPoint &ip, int &iBoundNum, double &iAngle, double &iAz,
59  int debug_level=0);
60 
61  bool processNeighbourCells(const U3dGridCell* cell1, const U3dGridCell* cell2,
62  U3dPoint p1, U3dPoint p2,
63  U3dPoint &ip, int &iBoundNum, double &iAngle, double &iAz,
64  int debug_level=0);
65 
67  double getTime(U3dPoint p0, U3dPoint p1, double v0);
68 
69  bool stepOnRay(U3dRayPoint p1, U3dRayPoint &p2,
70  double df, U3D_WAVE_TYPE vPS, bool prevInt,
71  double &vel);
72 
73  void stepOnChord(double k, double fK, double azK, double df, double vel,
74  U3dRayPoint rp0, U3dRayPoint &rp1);
75 
77  void CalcIntParams(U3dRayPoint p, U3dPoint p0, int rtr, U3dPoint &p1);
78 
79  void calcIntNeighPoints(U3dPoint p_int, double f, double az, U3dPoint &p0, U3dPoint &p1);
80 
82  void getEndPoint(U3dPoint p0, U3dPoint &p1);
83 
84  double dl;
85 
86 private:
87 
88  double BIGGEST_RADIUS;
89 
90 };
91 
92 
93 #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:34
Definition: u3d_grid_cell.hpp:32
Definition: u3d_raytracing.hpp:15