UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_plane_triangled_surface.hpp
1 // u3d_plane_triangled_surface.hpp
2 // $Id: u3d_plane_triangled_surface.hpp,v 1.1 2008/05/14 15:40:50 sad Exp $
3 #ifndef U3D_PLANE_TRIANGLED_SURFACE_
4 #define U3D_PLANE_TRIANGLED_SURFACE_
5 
6 #include "u3d_triangled_abstract_surface.hpp"
7 #include <mth/u3d_box.hpp>
8 
9 
11 {
12 public:
13 
14  U3dPlaneTriangledSurface(U3dPointsAr points, U3dPoint zeroPoint);
15 
17 
18  U3dPlaneTriangledSurface(U3dBox box, U3dPoint point, double dip, double az,
19  U3dPoint zeroPoint);
20 
21  // Copy constructor
23 
24  virtual bool getSideColor(const U3dPoint& p, U3D_COLOR& u3dcolor) const;
25 
26  virtual U3dBox getBox() const { return m_box; };
27 
28  virtual void addPoint(U3dPoint *p);
29  virtual bool removePoint(int i);
30  virtual void movePoint(int i, double d1, double d2, double d3);
31 
32  virtual ~U3dPlaneTriangledSurface() {};
33 
34 private:
35 
36  const U3dBox box;
37  // const U3dPoint point;
38 
39  /*
40  double azimuth; // You can't create getters for azimuth and dipangle,
41  double dipangle; // because they do not initialize in first constructor!!!!
42  */
43 
44 
45 
46  struct AngleComparatorU3dPoints{
47  AngleComparatorU3dPoints(const U3dPoint& sp, const U3dPoint& cp,
48  double a, double b, double c);
49 
50  bool operator()(const U3dPoint* p1, const U3dPoint* p2);
51  const double A, B, C;
52  const U3dPoint &sourcePoint, &centerPoint;
53  const double sorA, sorB, sorC, sorLength;
54  };
55 
56  U3dBox m_box;
57 
58  void p_triangulate(double a, double b, double c, double d);
59 
60 };
61 
62 
63 bool getPlaneSegmentIntersect(const double& a, const double& b,
64  const double& c, const double& d,
65  const double& xA,const double& yA, const double& zA,
66  const double& A, const double& B, const double& C,
67  double* resultX, double* resultY, double* resultZ);
68 
69 
70 
71 #endif // U3D_PLANE_TRIANGLED_SURFACE_
Definition: u3d_triangled_abstract_surface.hpp:31
Definition: u3d_plane_triangled_surface.hpp:10
Definition: u3d_box.hpp:24
Definition: geometry.H:16
Definition: u3d_point.hpp:16
virtual bool getSideColor(const U3dPoint &p, U3D_COLOR &u3dcolor) const