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 9c2c322..ee33154 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 20964e1..e776c08 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 cd91f90..ea6bce2 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 241e681..4d99186 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;
     }