]> OCCT Git - occt-copy.git/commitdiff
0025411: BVH package - eliminate warning about hidden overloaded method ::Box
authorkgv <kgv@opencascade.com>
Wed, 22 Oct 2014 11:43:17 +0000 (15:43 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Oct 2014 12:20:51 +0000 (16:20 +0400)
Conflicts:
src/OpenGl/OpenGl_SceneGeometry.hxx

src/BVH/BVH_Geometry.hxx
src/BVH/BVH_ObjectSet.hxx
src/BVH/BVH_Triangulation.hxx
src/OpenGl/OpenGl_SceneGeometry.hxx

index 9c2c322ed8263784344c69222ba16977e943a8c0..ee33154197c68717c993b689edceac3593dc377e 100644 (file)
@@ -39,6 +39,9 @@ public:
   //! Marks geometry as outdated.
   virtual void MarkDirty();
 
+  //! Returns AABB of the given object.
+  using BVH_ObjectSet<T, N>::Box;
+
   //! Returns AABB of the whole geometry.
   virtual BVH_Box<T, N> Box() const;
 
index 20964e19cf11f01b7b51b1dd1ee8b228cf4556d3..e776c088bd0692db6cb1b229fde269a44b238762 100644 (file)
@@ -54,6 +54,9 @@ public:
   //! Return total number of objects.
   virtual Standard_Integer Size() const;
 
+  //! Returns AABB of entire set of objects.
+  using BVH_Set<T, N>::Box;
+
   //! Returns AABB of the given object.
   virtual BVH_Box<T, N> Box (const Standard_Integer theIndex) const;
 
index cd91f9082714f374ffb8cbc319b25fed5fc436ac..ea6bce2b01458195bdaab67ab2fbb6316d4ba3d6 100644 (file)
@@ -49,6 +49,9 @@ public:
   //! Returns total number of triangles.
   virtual Standard_Integer Size() const;
 
+  //! Returns AABB of entire set of objects.
+  using BVH_PrimitiveSet<T, N>::Box;
+
   //! Returns AABB of the given triangle.
   virtual BVH_Box<T, N> Box (const Standard_Integer theIndex) const;
 
index 241e681e678ad0d422e13aea4c904a0d3b420226..4d99186d2bf2152266d52d9444069f845efa898b 100755 (executable)
@@ -174,6 +174,21 @@ public:
   void SetMaterialIndex (Standard_Integer theMatID)
   {
     for (Standard_Size anIdx = 0; anIdx < Elements.size(); ++anIdx)
+      Elements[anIdx].w() = aMatID;
+  }
+
+  //! Returns AABB of the given object.
+  using BVH_Triangulation<Standard_ShortReal, 4>::Box;
+
+  //! Returns AABB of primitive set.
+  BVH_BoxNt Box() const
+  {
+    const BVH_Transform<Standard_ShortReal, 4>* aTransform = 
+      dynamic_cast<const BVH_Transform<Standard_ShortReal, 4>* > (Properties().operator->());
+    BVH_BoxNt aBox = BVH_PrimitiveSet<Standard_ShortReal, 4>::Box(); 
+    if (aTransform)
     {
       Elements[anIdx].w() = theMatID;
     }