X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_QuadtreeNode.hxx;h=6ea6f186d7a390e99734cee3ae590b382bdd03c2;hb=f9d37ee66fa46871478d806faa54de237225d3c6;hp=78497ffae78a521d0457700ebc98ef86184d4fe6;hpb=25c483f304a19aace130948fd7f6771bb82bd09c;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_QuadtreeNode.hxx b/src/HYDROData/HYDROData_QuadtreeNode.hxx index 78497ffa..6ea6f186 100644 --- a/src/HYDROData/HYDROData_QuadtreeNode.hxx +++ b/src/HYDROData/HYDROData_QuadtreeNode.hxx @@ -35,6 +35,7 @@ #include "HYDROData_Quadtree.hxx" #include +#include #include #include @@ -44,9 +45,20 @@ //forward declaration class HYDROData_QuadtreeNode; class gp_XY; -class gp_XYZ; -typedef std::list Nodes_3D; +class Standard_EXPORT gpi_XYZ: public gp_XYZ +{ +public: + gpi_XYZ(); + + gpi_XYZ(const Standard_Real X, const Standard_Real Y, const Standard_Real Z, int i): gp_XYZ(X, Y, Z), myIndex(i) {} + + int getIndex() const {return myIndex; } +protected: + int myIndex; +}; + +typedef std::list Nodes_3D; class Standard_EXPORT HYDROData_QuadtreeNode: public HYDROData_Quadtree { @@ -70,16 +82,16 @@ public: //! Return in Result a list of Nodes potentials to be near Node void NodesAround(const gp_XY& Node, - std::list* Result, + std::list* Result, const double precision = 0.); //! Return in dist2Nodes nodes mapped to their square distance from Node bool NodesAround(const gp_XY& node, - std::map& dist2Nodes, + std::map& dist2Nodes, double precision); //! Update data according to node movement - void UpdateByMoveNode(const gp_XYZ* node, const gp_Pnt& toPnt); + void UpdateByMoveNode(const gpi_XYZ* node, const gp_Pnt& toPnt); //! Return nb nodes in a tree int NbNodes() const @@ -94,7 +106,7 @@ public: bool isEmpty() const { return myChildren == 0; } inline double getPrecision() {return myPrecision; } - inline double setPrecision(double precision) {myPrecision = precision; } + inline void setPrecision(double precision) {myPrecision = precision; } protected: