From: kgv Date: Wed, 22 Oct 2014 11:43:17 +0000 (+0400) Subject: 0025411: BVH package - eliminate warning about hidden overloaded method ::Box X-Git-Tag: V6_8_0~63 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=7c58a2abc0c6f4a2aedd9c4901bd389c68c5370a;p=occt-copy.git 0025411: BVH package - eliminate warning about hidden overloaded method ::Box Conflicts: src/OpenGl/OpenGl_SceneGeometry.hxx --- diff --git a/src/BVH/BVH_Geometry.hxx b/src/BVH/BVH_Geometry.hxx index 9c2c322ed8..ee33154197 100644 --- a/src/BVH/BVH_Geometry.hxx +++ b/src/BVH/BVH_Geometry.hxx @@ -39,6 +39,9 @@ public: //! Marks geometry as outdated. virtual void MarkDirty(); + //! Returns AABB of the given object. + using BVH_ObjectSet::Box; + //! Returns AABB of the whole geometry. virtual BVH_Box Box() const; diff --git a/src/BVH/BVH_ObjectSet.hxx b/src/BVH/BVH_ObjectSet.hxx index 20964e19cf..e776c088bd 100644 --- a/src/BVH/BVH_ObjectSet.hxx +++ b/src/BVH/BVH_ObjectSet.hxx @@ -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::Box; + //! Returns AABB of the given object. virtual BVH_Box Box (const Standard_Integer theIndex) const; diff --git a/src/BVH/BVH_Triangulation.hxx b/src/BVH/BVH_Triangulation.hxx index cd91f90827..ea6bce2b01 100644 --- a/src/BVH/BVH_Triangulation.hxx +++ b/src/BVH/BVH_Triangulation.hxx @@ -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::Box; + //! Returns AABB of the given triangle. virtual BVH_Box Box (const Standard_Integer theIndex) const; diff --git a/src/OpenGl/OpenGl_SceneGeometry.hxx b/src/OpenGl/OpenGl_SceneGeometry.hxx index 241e681e67..4d99186d2b 100755 --- a/src/OpenGl/OpenGl_SceneGeometry.hxx +++ b/src/OpenGl/OpenGl_SceneGeometry.hxx @@ -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::Box; + + //! Returns AABB of primitive set. + BVH_BoxNt Box() const + { + const BVH_Transform* aTransform = + dynamic_cast* > (Properties().operator->()); + + BVH_BoxNt aBox = BVH_PrimitiveSet::Box(); + + if (aTransform) { Elements[anIdx].w() = theMatID; }