Skip to content

Commit

Permalink
Coding - Non-dependency include update #89
Browse files Browse the repository at this point in the history
Removed or reorganized include that are not a part of the project dependency.
The new file for typedef is added because Select is not direct dependency.
  • Loading branch information
dpasukhi committed Oct 7, 2024
1 parent e83a646 commit 8587096
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 33 deletions.
21 changes: 21 additions & 0 deletions src/BVH/BVH_Builder3d.hxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

#ifndef _BVH_Builder3d_Header
#define _BVH_Builder3d_Header

#include <BVH_Builder.hxx>

typedef BVH_Builder<Standard_Real, 3> BVH_Builder3d;

#endif // _BVH_Builder3d_Header
1 change: 1 addition & 0 deletions src/BVH/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BVH_BinnedBuilder.hxx
BVH_Box.hxx
BVH_BoxSet.hxx
BVH_Builder.hxx
BVH_Builder3d.hxx
BVH_BuildQueue.hxx
BVH_BuildQueue.cxx
BVH_BuildThread.hxx
Expand Down
1 change: 0 additions & 1 deletion src/DEBRepCascade/DEBRepCascade_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <DEBRepCascade_Provider.hxx>

#include <BinTools.hxx>
#include <BinXCAFDrivers.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
#include <DEBRepCascade_ConfigurationNode.hxx>
Expand Down
3 changes: 1 addition & 2 deletions src/Geom2d/Geom2d_Ellipse.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Ellipse,Geom2d_Conic)

typedef Geom2d_Ellipse Ellipse;
typedef gp_Ax2d Ax2d;
typedef gp_Dir2d Dir2d;
typedef gp_Pnt2d Pnt2d;
Expand All @@ -48,7 +47,7 @@ typedef gp_XY XY;
Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const
{
Handle(Geom2d_Ellipse) E;
E = new Ellipse (pos, majorRadius, minorRadius);
E = new Geom2d_Ellipse (pos, majorRadius, minorRadius);
return E;
}

Expand Down
1 change: 0 additions & 1 deletion src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//abv 06.01.99 fix of misprint
//:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done

#include <BRepTopAdaptor_TopolTool.hxx>
#include <ElSLib.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_BezierSurface.hxx>
Expand Down
2 changes: 1 addition & 1 deletion src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// function : Graphic3d_BvhCStructureSetTrsfPers
// purpose :
// =======================================================================
Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder)
Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers (const Handle(BVH_Builder3d)& theBuilder)
: myIsDirty (Standard_False),
myBVH (new BVH_Tree<Standard_Real, 3>()),
myBuilder (theBuilder)
Expand Down
10 changes: 5 additions & 5 deletions src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <Graphic3d_WorldViewProjState.hxx>
#include <NCollection_Shared.hxx>
#include <NCollection_IndexedMap.hxx>
#include <Select3D_BVHBuilder3d.hxx>
#include <BVH_Builder3d.hxx>

class Graphic3d_Camera;
class Graphic3d_CStructure;
Expand All @@ -39,7 +39,7 @@ private:
public:

//! Creates an empty primitive set for BVH clipping.
Standard_EXPORT Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder);
Standard_EXPORT Graphic3d_BvhCStructureSetTrsfPers (const Handle(BVH_Builder3d)& theBuilder);

//! Returns total number of structures.
Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
Expand Down Expand Up @@ -87,10 +87,10 @@ public:
const Graphic3d_WorldViewProjState& theWVPState);

//! Returns builder for bottom-level BVH.
const Handle(Select3D_BVHBuilder3d)& Builder() const { return myBuilder; }
const Handle(BVH_Builder3d)& Builder() const { return myBuilder; }

//! Assigns builder for bottom-level BVH.
void SetBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) { myBuilder = theBuilder; }
void SetBuilder (const Handle(BVH_Builder3d)& theBuilder) { myBuilder = theBuilder; }

private:

Expand All @@ -101,7 +101,7 @@ private:
opencascade::handle<BVH_Tree<Standard_Real, 3> > myBVH;

//! Builder for bottom-level BVH.
Handle(Select3D_BVHBuilder3d) myBuilder;
Handle(BVH_Builder3d) myBuilder;

//! Indexed map of structures.
NCollection_IndexedMap<const Graphic3d_CStructure*> myStructs;
Expand Down
14 changes: 7 additions & 7 deletions src/Graphic3d/Graphic3d_GraphicDriver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon
aSettings.SetEnableDepthWrite (Standard_False);
aSettings.SetClearDepth (Standard_False);
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, Handle(BVH_Builder3d)());
aLayer->SetLayerSettings (aSettings);
myLayers.Append (aLayer);
myLayerIds.Bind (aLayer->LayerId(), aLayer);
Expand All @@ -54,7 +54,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon
aSettings.SetEnableDepthWrite (Standard_True);
aSettings.SetClearDepth (Standard_False);
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, Handle(BVH_Builder3d)());
aLayer->SetLayerSettings (aSettings);
myLayers.Append (aLayer);
myLayerIds.Bind (aLayer->LayerId(), aLayer);
Expand All @@ -70,7 +70,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon
aSettings.SetEnableDepthWrite (Standard_True);
aSettings.SetClearDepth (Standard_False);
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, Handle(BVH_Builder3d)());
aLayer->SetLayerSettings (aSettings);
myLayers.Append (aLayer);
myLayerIds.Bind (aLayer->LayerId(), aLayer);
Expand All @@ -86,7 +86,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon
aSettings.SetEnableDepthWrite (Standard_True);
aSettings.SetClearDepth (Standard_True);
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, Handle(BVH_Builder3d)());
aLayer->SetLayerSettings (aSettings);
myLayers.Append (aLayer);
myLayerIds.Bind (aLayer->LayerId(), aLayer);
Expand All @@ -102,7 +102,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon
aSettings.SetEnableDepthWrite (Standard_False);
aSettings.SetClearDepth (Standard_False);
aSettings.SetPolygonOffset (Graphic3d_PolygonOffset());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, Handle(BVH_Builder3d)());
aLayer->SetLayerSettings (aSettings);
myLayers.Append (aLayer);
myLayerIds.Bind (aLayer->LayerId(), aLayer);
Expand Down Expand Up @@ -192,7 +192,7 @@ void Graphic3d_GraphicDriver::InsertLayerBefore (const Graphic3d_ZLayerId theNew
Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId),
"Graphic3d_GraphicDriver::InsertLayerBefore, Layer with theLayerId already exists");

Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(BVH_Builder3d)());
aNewLayer->SetLayerSettings (theSettings);

Handle(Graphic3d_Layer) anOtherLayer;
Expand Down Expand Up @@ -228,7 +228,7 @@ void Graphic3d_GraphicDriver::InsertLayerAfter (const Graphic3d_ZLayerId theNewL
Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId),
"Graphic3d_GraphicDriver::InsertLayerAfter, Layer with theLayerId already exists");

Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)());
Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(BVH_Builder3d)());
aNewLayer->SetLayerSettings (theSettings);

Handle(Graphic3d_Layer) anOtherLayer;
Expand Down
2 changes: 1 addition & 1 deletion src/Graphic3d/Graphic3d_Layer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient)
// purpose :
// =======================================================================
Graphic3d_Layer::Graphic3d_Layer (Graphic3d_ZLayerId theId,
const Handle(Select3D_BVHBuilder3d)& theBuilder)
const Handle(BVH_Builder3d)& theBuilder)
: myNbStructures (0),
myNbStructuresNotCulled (0),
myLayerId (theId),
Expand Down
6 changes: 3 additions & 3 deletions src/Graphic3d/Graphic3d_Layer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public:

//! Initializes associated priority list and layer properties
Standard_EXPORT Graphic3d_Layer (Graphic3d_ZLayerId theId,
const Handle(Select3D_BVHBuilder3d)& theBuilder);
const Handle(BVH_Builder3d)& theBuilder);

//! Destructor.
Standard_EXPORT virtual ~Graphic3d_Layer();
Expand All @@ -50,10 +50,10 @@ public:
Graphic3d_ZLayerId LayerId() const { return myLayerId; }

//! Returns BVH tree builder for frustum culling.
const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHPrimitivesTrsfPers.Builder(); }
const Handle(BVH_Builder3d)& FrustumCullingBVHBuilder() const { return myBVHPrimitivesTrsfPers.Builder(); }

//! Assigns BVH tree builder for frustum culling.
void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) { myBVHPrimitivesTrsfPers.SetBuilder (theBuilder); }
void SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder) { myBVHPrimitivesTrsfPers.SetBuilder (theBuilder); }

//! Return true if layer was marked with immediate flag.
Standard_Boolean IsImmediate() const { return myLayerSettings.IsImmediate(); }
Expand Down
1 change: 0 additions & 1 deletion src/IGESCAFControl/IGESCAFControl_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <IGESCAFControl_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <IGESCAFControl_ConfigurationNode.hxx>
#include <IGESCAFControl_Reader.hxx>
#include <IGESCAFControl_Writer.hxx>
Expand Down
2 changes: 1 addition & 1 deletion src/OpenGl/OpenGl_LayerList.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ OpenGl_LayerList::~OpenGl_LayerList()
//function : SetFrustumCullingBVHBuilder
//purpose :
//=======================================================================
void OpenGl_LayerList::SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder)
void OpenGl_LayerList::SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder)
{
myBVHBuilder = theBuilder;
for (NCollection_List<Handle(Graphic3d_Layer)>::Iterator aLayerIter (myLayers); aLayerIter.More(); aLayerIter.Next())
Expand Down
6 changes: 3 additions & 3 deletions src/OpenGl/OpenGl_LayerList.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ public:
Standard_Size ModificationStateOfRaytracable() const { return myModifStateOfRaytraceable; }

//! Returns BVH tree builder for frustum culling.
const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHBuilder; }
const Handle(BVH_Builder3d)& FrustumCullingBVHBuilder() const { return myBVHBuilder; }

//! Assigns BVH tree builder for frustum culling.
Standard_EXPORT void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder);
Standard_EXPORT void SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder);

//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
Expand Down Expand Up @@ -207,7 +207,7 @@ protected:

NCollection_List<Handle(Graphic3d_Layer)> myLayers;
NCollection_DataMap<Graphic3d_ZLayerId, Handle(Graphic3d_Layer)> myLayerIds;
Handle(Select3D_BVHBuilder3d) myBVHBuilder; //!< BVH tree builder for frustum culling
Handle(BVH_Builder3d) myBVHBuilder; //!< BVH tree builder for frustum culling

Standard_Integer myNbStructures;
Standard_Integer myImmediateNbStructures; //!< number of structures within immediate layers
Expand Down
1 change: 0 additions & 1 deletion src/RWGltf/RWGltf_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <RWGltf_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <Message.hxx>
#include <RWGltf_CafWriter.hxx>
#include <TDocStd_Document.hxx>
Expand Down
1 change: 0 additions & 1 deletion src/RWObj/RWObj_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <RWObj_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <BRep_Builder.hxx>
#include <RWObj_ConfigurationNode.hxx>
#include <RWObj_CafReader.hxx>
Expand Down
1 change: 0 additions & 1 deletion src/RWStl/RWStl_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <RWStl_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <BRep_Builder.hxx>
#include <Message.hxx>
#include <RWStl.hxx>
Expand Down
1 change: 0 additions & 1 deletion src/STEPCAFControl/STEPCAFControl_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <STEPCAFControl_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <Interface_Static.hxx>
#include <Message.hxx>
#include <StepData_StepModel.hxx>
Expand Down
2 changes: 2 additions & 0 deletions src/TKDE/EXTERNLIB
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
TKernel
TKMath
TKBRep
1 change: 0 additions & 1 deletion src/Vrml/Vrml_Provider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <Vrml_Provider.hxx>

#include <BinXCAFDrivers.hxx>
#include <Message.hxx>
#include <OSD_Path.hxx>
#include <TDocStd_Document.hxx>
Expand Down
2 changes: 0 additions & 2 deletions src/XDEDRAW/XDEDRAW.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@
#include <XDEDRAW_GDTs.hxx>
#include <XDEDRAW_Views.hxx>
#include <XDEDRAW_Notes.hxx>
#include <XSDRAWIGES.hxx>
#include <XSDRAWSTEP.hxx>
#include <UnitsMethods.hxx>

#include <BinXCAFDrivers.hxx>
Expand Down

0 comments on commit 8587096

Please sign in to comment.