mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box
Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.
This commit is contained in:
parent
53219061ca
commit
bc0711a5c3
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <RWGltf_TriangulationReader.hxx>
|
#include <RWGltf_TriangulationReader.hxx>
|
||||||
|
|
||||||
|
#include <RWGltf_GltfLatePrimitiveArray.hxx>
|
||||||
#include <RWMesh_CoordinateSystemConverter.hxx>
|
#include <RWMesh_CoordinateSystemConverter.hxx>
|
||||||
#include <Standard_ReadBuffer.hxx>
|
#include <Standard_ReadBuffer.hxx>
|
||||||
|
|
||||||
@ -85,6 +86,24 @@ Handle(Poly_Triangulation) RWGltf_TriangulationReader::result()
|
|||||||
return myTriangulation;
|
return myTriangulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : load
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
bool RWGltf_TriangulationReader::load (const Handle(RWGltf_GltfLatePrimitiveArray)& theMesh,
|
||||||
|
const Handle(OSD_FileSystem)& theFileSystem)
|
||||||
|
{
|
||||||
|
if (!RWGltf_PrimitiveArrayReader::load (theMesh, theFileSystem))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!theMesh->CachedMinMax().IsVoid())
|
||||||
|
{
|
||||||
|
myTriangulation->SetCachedMinMax (theMesh->CachedMinMax());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// function : readBuffer
|
// function : readBuffer
|
||||||
// purpose :
|
// purpose :
|
||||||
|
@ -34,6 +34,10 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
//! Load primitive array.
|
||||||
|
Standard_EXPORT virtual bool load (const Handle(RWGltf_GltfLatePrimitiveArray)& theMesh,
|
||||||
|
const Handle(OSD_FileSystem)& theFileSystem) Standard_OVERRIDE;
|
||||||
|
|
||||||
//! Create Poly_Triangulation from collected data
|
//! Create Poly_Triangulation from collected data
|
||||||
Standard_EXPORT virtual Handle(Poly_Triangulation) result() Standard_OVERRIDE;
|
Standard_EXPORT virtual Handle(Poly_Triangulation) result() Standard_OVERRIDE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user