UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_bound.hpp
1 /* u3d_bound.hpp */
2 /* $Id: u3d_bound.hpp,v 1.22 2007/12/24 10:36:34 guser3 Exp $ */
3 #ifndef __u3d_bound_hpp
4 #define __u3d_bound_hpp
5 
6 //#include<vector>
7 #include <u3d_defines.hpp>
8 #include <u3d_point.hpp>
9 #include <u3d_box.hpp>
10 
11 #include <u3d_svrg_math_bs_surface.hpp>
12 #include <u3d_svrg_math_crom3_surface.hpp>
13 #include <u3d_svrg_math_beta3_surface.hpp>
14 #include <u3d_svrg_math_bs3_surface.hpp>
15 #include <u3d_svrg_math_bezier3_surface.hpp>
16 #include <u3d_curvature_triangled_surface.hpp>
17 #include <u3d_plane_triangled_surface.hpp>
18 
19 #include "u3d_model_defines.hpp"
20 
21 
22 
23 //----------------------------------------------------------------------------
25 class U3dBound
26 {
27 
28 public:
29 
31  U3dBound(U3dBox modelBox, U3dPointsAr points, U3dSignAr relations,
32  U3dInterpolationType iType);
33 
35  U3dBound(U3dBox modelBox, U3dPoint p, double dip, double az);
36 
39  ~U3dBound();
40 
42  U3dBox* getBoundBox() const { return m_box; }
43 
45  bool getSideColor(U3dPoint, U3D_COLOR&);
46 
47  void severance(const U3dBound *b, U3D_COLOR color) { m_trianSurf->severance(b->getTrSurf(), color); }
48 
50  void getInitialPoints(U3dPointsAr &ps);
51 
53  int getApproxType() { return 0; }
54 
56  U3dSignAr getRelations() const { return m_relations; }
57 
58  // -------------------------------------------------------------------
59  // Getting data from "triangled surface" object
60 
63 
66 
67 
69  const int_set& getActTrIds() { return m_trianSurf->getActTrNums(); }
70 
72  int getActTrNum() const { return m_trianSurf->getActTrNums().size(); }
73 
75  U3dPoint getPoint(int pId) const throw(std::out_of_range) { return U3dPoint(*m_trianSurf->getPoint(pId)); }
76 
78  const U3dTriangle* getTriangle(int id) const throw(std::out_of_range) { return m_trianSurf->getTriangle(id); }
79 
81  bool getTrianglePoints(int trId, U3dPoint& p1, U3dPoint& p2, U3dPoint& p3);
82 
83 
85  U3dInterpolationType getIntType() const { return m_intType; };
86 
87  //--------------------------------------------------------------------
88 
89 protected:
90 
91  bool m_ready;
93  void calculateBoundBox(); /*< Temporary: calcultion of surface box */
94 
98  U3dBox* m_box;
100  U3dSignAr m_relations;
103  U3dInterpolationType m_intType;
104 };
105 
106 typedef safe_vector<U3dBound*> U3dBoundsAr;
107 
108 
109 
110 
111 
112 #endif /* u3d_bound.hpp */
113 
U3dTriangledAbstractSurface * getTrSurf() const
Definition: u3d_bound.hpp:61
const U3dPoint * getPoint(int id) const
Definition: u3d_triangled_abstract_surface.hpp:91
U3dBox * getBoundBox() const
Definition: u3d_bound.hpp:42
const U3dTriangle * getTriangle(int id) const
Definition: u3d_triangled_abstract_surface.hpp:52
Definition: u3d_math_abstract_surface.hpp:11
Definition: u3d_triangled_abstract_surface.hpp:31
U3dInterpolationType m_intType
Definition: u3d_bound.hpp:102
Definition: u3d_box.hpp:24
Definition: u3d_bound.hpp:21
int getActTrNum() const
Definition: u3d_bound.hpp:72
bool getSideColor(U3dPoint, U3D_COLOR &)
U3dBound(U3dBox modelBox, U3dPointsAr points, U3dSignAr relations, U3dInterpolationType iType)
U3dPoint getPoint(int pId) const
Definition: u3d_bound.hpp:75
Definition: u3d_triangle.hpp:18
U3dSignAr m_relations
Definition: u3d_bound.hpp:99
U3dSignAr getRelations() const
Definition: u3d_bound.hpp:56
void severance(U3dTriangledAbstractSurface *other, const U3D_COLOR &)
bool getTrianglePoints(int trId, U3dPoint &p1, U3dPoint &p2, U3dPoint &p3)
const U3dTriangle * getTriangle(int id) const
Definition: u3d_bound.hpp:78
Definition: u3d_point.hpp:16
U3dMathAbstractSurface * getMathSurf() const
Definition: u3d_bound.hpp:65
bool m_ready
Definition: u3d_bound.hpp:84
U3dInterpolationType getIntType() const
Definition: u3d_bound.hpp:85
const int_set & getActTrIds()
Definition: u3d_bound.hpp:69
const U3dPointsAr & getInitialPoints() const
int getApproxType()
Definition: u3d_bound.hpp:53
U3dBox * m_box
Definition: u3d_bound.hpp:97
U3dMathAbstractSurface * m_mathSurf
Definition: u3d_bound.hpp:94
U3dTriangledAbstractSurface * m_trianSurf
Definition: u3d_bound.hpp:95
Definition: u3d_defines.hpp:188
const std::set< int > & getActTrNums()
Definition: u3d_triangled_abstract_surface.hpp:143