mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
Use STLTrigId instead of int in SearchTree
This commit is contained in:
parent
693bc66d49
commit
94671a176a
@ -808,7 +808,7 @@ void STLChart :: BuildInnerSearchTree()
|
||||
}
|
||||
}
|
||||
chart_bbox.Increase (1e-2*chart_bbox.Diam());
|
||||
inner_searchtree = make_unique<BoxTree<2,int>> (chart_bbox);
|
||||
inner_searchtree = make_unique<BoxTree<2,STLTrigId>> (chart_bbox);
|
||||
for (STLTrigId trigid : charttrigs)
|
||||
{
|
||||
Box<2> bbox(Box<2>::EMPTY_BOX);
|
||||
@ -831,7 +831,7 @@ STLTrigId STLChart :: ProjectNormal (Point<3> & p3d) const
|
||||
|
||||
if (inner_searchtree)
|
||||
{
|
||||
NgArray<int> trigs;
|
||||
NgArray<STLTrigId> trigs;
|
||||
Point<2> p2d = Project2d (p3d);
|
||||
inner_searchtree->GetIntersecting(p2d, p2d, trigs);
|
||||
|
||||
|
@ -125,7 +125,7 @@ private:
|
||||
Vec<3> normal;
|
||||
Point<3> pref;
|
||||
Vec<3> t1, t2;
|
||||
unique_ptr<BoxTree<2,int>> inner_searchtree;
|
||||
unique_ptr<BoxTree<2,STLTrigId>> inner_searchtree;
|
||||
public:
|
||||
void SetNormal (const Point<3> & apref, const Vec<3> & anormal);
|
||||
const Vec<3> & GetNormal () const { return normal; }
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
};
|
||||
|
||||
inline void SetInvalid (STLTrigId & id) { id = 0; }
|
||||
inline bool IsInvalid (STLTrigId & id) { return id == 0; }
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user