#include "HYDROData_Quadtree.hxx"
#include <gp_Pnt.hxx>
+#include <gp_XYZ.hxx>
#include <list>
#include <set>
//forward declaration
class HYDROData_QuadtreeNode;
class gp_XY;
-class gp_XYZ;
-typedef std::list<gp_XYZ*> 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<gpi_XYZ*> Nodes_3D;
class Standard_EXPORT HYDROData_QuadtreeNode: public HYDROData_Quadtree
{
//! Return in Result a list of Nodes potentials to be near Node
void NodesAround(const gp_XY& Node,
- std::list<const gp_XYZ*>* Result,
+ std::list<const gpi_XYZ*>* Result,
const double precision = 0.);
//! Return in dist2Nodes nodes mapped to their square distance from Node
bool NodesAround(const gp_XY& node,
- std::map<double, const gp_XYZ*>& dist2Nodes,
+ std::map<double, const gpi_XYZ*>& 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
//! tells us if the tree as already bin computed
bool isEmpty() const { return myChildren == 0; }
+ inline double getPrecision() {return myPrecision; }
+ inline void setPrecision(double precision) {myPrecision = precision; }
+
protected:
struct Limit: public HYDROData_TreeLimit
//! The set of nodes inside the box of the Quadtree (Empty if Quadtree is not a leaf)
Nodes_3D* myNodes;
+
+ //! distance to look for nearest nodes
+ double myPrecision;
};
#endif