mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
Coding - Fix missed Vector type
Fix type of triangle pairs in IntPatch_InterferencePolyhedron to use dynamic array
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#define IntPatch_BVHTraversal_HeaderFile
|
||||
|
||||
#include <BVH_Traverse.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <NCollection_DynamicArray.hxx>
|
||||
|
||||
class IntPatch_PolyhedronBVH;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
bool theSelfInterference = false);
|
||||
|
||||
//! Returns the collected triangle pairs.
|
||||
const NCollection_Vector<TrianglePair>& Pairs() const { return myPairs; }
|
||||
const NCollection_DynamicArray<TrianglePair>& Pairs() const { return myPairs; }
|
||||
|
||||
//! Clears the collected pairs.
|
||||
void Clear() { myPairs.Clear(); }
|
||||
@@ -86,10 +86,10 @@ public: //! @name BVH_PairTraverse interface implementation
|
||||
Standard_EXPORT virtual bool Accept(const int theIndex1, const int theIndex2) override;
|
||||
|
||||
private:
|
||||
IntPatch_PolyhedronBVH* mySet1; //!< First BVH set
|
||||
IntPatch_PolyhedronBVH* mySet2; //!< Second BVH set
|
||||
bool mySelfInterference; //!< Self-interference mode flag
|
||||
NCollection_Vector<TrianglePair> myPairs; //!< Collected triangle pairs
|
||||
IntPatch_PolyhedronBVH* mySet1; //!< First BVH set
|
||||
IntPatch_PolyhedronBVH* mySet2; //!< Second BVH set
|
||||
bool mySelfInterference; //!< Self-interference mode flag
|
||||
NCollection_DynamicArray<TrianglePair> myPairs; //!< Collected triangle pairs
|
||||
};
|
||||
|
||||
#endif // IntPatch_BVHTraversal_HeaderFile
|
||||
|
||||
@@ -130,7 +130,7 @@ void IntPatch_InterferencePolyhedron::Interference(const IntPatch_Polyhedron& th
|
||||
aTraversal.Perform(aSet1, aSet2, SelfIntf);
|
||||
|
||||
// Process each candidate pair
|
||||
const NCollection_Vector<IntPatch_BVHTraversal::TrianglePair>& aPairs = aTraversal.Pairs();
|
||||
const NCollection_DynamicArray<IntPatch_BVHTraversal::TrianglePair>& aPairs = aTraversal.Pairs();
|
||||
for (const auto& aPair : aPairs)
|
||||
{
|
||||
Intersect(aPair.First, theFirstPol, aPair.Second, theSecondPol);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <BVH_PrimitiveSet.hxx>
|
||||
#include <BVH_LinearBuilder.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <NCollection_DynamicArray.hxx>
|
||||
|
||||
class IntPatch_Polyhedron;
|
||||
|
||||
@@ -78,8 +78,8 @@ public: //! @name Additional methods
|
||||
bool IsInitialized() const { return myPoly != nullptr; }
|
||||
|
||||
private:
|
||||
const IntPatch_Polyhedron* myPoly; //!< Reference to the wrapped polyhedron
|
||||
NCollection_Vector<int> myIndexMap; //!< Maps current indices to original 1-based indices
|
||||
const IntPatch_Polyhedron* myPoly; //!< Reference to the wrapped polyhedron
|
||||
NCollection_DynamicArray<int> myIndexMap; //!< Maps current indices to original 1-based indices
|
||||
};
|
||||
|
||||
#endif // IntPatch_PolyhedronBVH_HeaderFile
|
||||
|
||||
Reference in New Issue
Block a user