]> OCCT Git - occt-copy.git/commitdiff
Unify naming of LODs in all classes and methods
authorvpa <vpa@opencascade.com>
Wed, 6 Apr 2016 17:28:05 +0000 (20:28 +0300)
committervpa <vpa@opencascade.com>
Fri, 8 Apr 2016 17:20:06 +0000 (20:20 +0300)
14 files changed:
src/Graphic3d/Graphic3d_CStructure.hxx
src/Graphic3d/Graphic3d_LODManager.cxx
src/Graphic3d/Graphic3d_LODManager.hxx
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Structure.hxx
src/MeshVS/MeshVS_LODBuilder.cxx
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_Mesh.hxx
src/OpenGl/OpenGl_LODManager.cxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/PrsMgr/PrsMgr_PresentableObject.hxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx

index f15acb4f828c214bc539a0ca8e807fab0b2f0d58..4cfaed2f6705025ea7d323e4f30808ac9fdb6846 100644 (file)
@@ -83,7 +83,7 @@ public:
   //! Returns LOD manager for this structure. If the structure
   //! is not represented through LODs, the return value will
   //! be NULL pointer
-  const Handle(Graphic3d_LODManager)& GetLodManager() const
+  const Handle(Graphic3d_LODManager)& GetLODManager() const
   {
     return myLODManager;
   }
@@ -132,10 +132,10 @@ public:
   virtual Standard_Integer NbDetailLevels() const = 0;
 
   //! Sets range of LOD.
-  //! @param theLodIdx corresponds to the index of LOD in map of LOD manager. In case if no LOD was
+  //! @param theLODIdx corresponds to the index of LOD in map of LOD manager. In case if no LOD was
   //! removed, the LODs in map are located in order of addition and IDs are identical to the addition
   //! iteration number
-  virtual void SetDetailLevelRange (const Standard_Integer theLodIdx, const Standard_Real theFrom, const Standard_Real theTo) = 0;
+  virtual void SetDetailLevelRange (const Standard_Integer theLODIdx, const Standard_Real theFrom, const Standard_Real theTo) = 0;
 
 public:
 
index 93db01024591177829fcf784d372ae2f377622ad..c8e696ad67880115033e0faeaf7a2b04be742382 100644 (file)
@@ -23,8 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT (Graphic3d_LODManager, Standard_Transient)
 // purpose  :
 //=======================================================================
 Graphic3d_LODManager::Graphic3d_LODManager (const Handle(Graphic3d_Structure)& theParentStructure)
-  : myLodIndexes (NULL),
-    myIsToSortLods (Standard_False),
+  : myLODIndexes (NULL),
+    myIsToSortLODs (Standard_False),
     myCurrentLODIdx (-1),
     mySelector (new Graphic3d_LODDistanceSelector())
 {
@@ -40,20 +40,20 @@ Graphic3d_LODManager::~Graphic3d_LODManager()
   Clear (Standard_True);
 
   myLODs.Clear();
-  myLodIndexes.Nullify();
+  myLODIndexes.Nullify();
   mySelector.Nullify();
 }
 
 //=======================================================================
-// function : GetCurrentLODIdx
+// function : HasLODToDisplay
 // purpose  :
 //=======================================================================
-Standard_Boolean Graphic3d_LODManager::HasLodToDisplay (const Handle(Graphic3d_Camera)& theCamera)
+Standard_Boolean Graphic3d_LODManager::HasLODToDisplay (const Handle(Graphic3d_Camera)& theCamera)
 {
   if (theCamera->WorldViewProjState() == myPrevCameraState && myCurrentLODIdx != -1)
     return Standard_True;
 
-  if (myIsToSortLods)
+  if (myIsToSortLODs)
     sortLODs();
 
   myPrevCameraState = theCamera->WorldViewProjState();
@@ -69,11 +69,11 @@ Standard_Boolean Graphic3d_LODManager::HasLodToDisplay (const Handle(Graphic3d_C
   }
   else
   {
-    for (Standard_Integer aLodIdx = 1; aLodIdx <= myLODs.Extent(); ++aLodIdx)
+    for (Standard_Integer aLODIdx = 1; aLODIdx <= myLODs.Extent(); ++aLODIdx)
     {
-      if (myLODs.FindKey (aLodIdx)->GetRange().IsIn (aMetric))
+      if (myLODs.FindKey (aLODIdx)->GetRange().IsIn (aMetric))
       {
-        myCurrentLODIdx = aLodIdx;
+        myCurrentLODIdx = aLODIdx;
         break;
       }
     }
@@ -86,15 +86,15 @@ Standard_Boolean Graphic3d_LODManager::HasLodToDisplay (const Handle(Graphic3d_C
 // function : SetRange
 // purpose  :
 //=======================================================================
-void Graphic3d_LODManager::SetRange (Standard_Integer theLodIdx,
+void Graphic3d_LODManager::SetRange (Standard_Integer theLODIdx,
                                      const Standard_Real theFrom,
                                      const Standard_Real theTo)
 {
-  if (theLodIdx < 1 || theLodIdx > myLODs.Extent())
+  if (theLODIdx < 1 || theLODIdx > myLODs.Extent())
     return;
 
-  myLODs.FindKey (theLodIdx)->SetRange (theFrom, theTo);
-  myIsToSortLods = Standard_True;
+  myLODs.FindKey (theLODIdx)->SetRange (theFrom, theTo);
+  myIsToSortLODs = Standard_True;
 }
 
 //=======================================================================
@@ -112,9 +112,9 @@ const Graphic3d_SequenceOfGroup& Graphic3d_LODManager::GetCurrentGroups() const
 //=======================================================================
 void Graphic3d_LODManager::GetCombinedBndBox (Graphic3d_BndBox4f& theBndBox) const
 {
-  for (Standard_Integer aLodIdx = 1; aLodIdx <= myLODs.Extent(); ++aLodIdx)
+  for (Standard_Integer aLODIdx = 1; aLODIdx <= myLODs.Extent(); ++aLODIdx)
   {
-    const Graphic3d_SequenceOfGroup& aGroups = myLODs.FindKey (aLodIdx)->GetDrawGroups();
+    const Graphic3d_SequenceOfGroup& aGroups = myLODs.FindKey (aLODIdx)->GetDrawGroups();
     for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aGroups); aGroupIter.More(); aGroupIter.Next())
     {
       theBndBox.Combine (aGroupIter.Value()->BoundingBox());
@@ -128,9 +128,9 @@ void Graphic3d_LODManager::GetCombinedBndBox (Graphic3d_BndBox4f& theBndBox) con
 //=======================================================================
 Standard_Boolean Graphic3d_LODManager::IsEmpty() const
 {
-  for (Standard_Integer aLodIdx = 1; aLodIdx <= myLODs.Extent(); ++aLodIdx)
+  for (Standard_Integer aLODIdx = 1; aLODIdx <= myLODs.Extent(); ++aLODIdx)
   {
-    const Graphic3d_SequenceOfGroup& aGroups = myLODs.FindKey (aLodIdx)->GetDrawGroups();
+    const Graphic3d_SequenceOfGroup& aGroups = myLODs.FindKey (aLODIdx)->GetDrawGroups();
     if (!aGroups.IsEmpty())
       return Standard_False;
   }
@@ -144,25 +144,25 @@ Standard_Boolean Graphic3d_LODManager::IsEmpty() const
 //=======================================================================
 void Graphic3d_LODManager::Clear (const Standard_Boolean theWithDestruction)
 {
-  for (Standard_Integer aLodIdx = 1; aLodIdx <= myLODs.Extent(); ++aLodIdx)
+  for (Standard_Integer aLODIdx = 1; aLODIdx <= myLODs.Extent(); ++aLODIdx)
   {
-    myLODs.FindKey (aLodIdx)->Clear (theWithDestruction);
+    myLODs.FindKey (aLODIdx)->Clear (theWithDestruction);
   }
 }
 
 //=======================================================================
-// function : GetLodById
+// function : GetLODById
 // purpose  :
 //=======================================================================
-const Handle(Graphic3d_LOD)& Graphic3d_LODManager::GetLodById (const Standard_Integer theLodIdx)
+const Handle(Graphic3d_LOD)& Graphic3d_LODManager::GetLODById (const Standard_Integer theLODIdx)
 {
-  Standard_ASSERT_RAISE (theLodIdx > 0 || theLodIdx <= myLODs.Size(),
+  Standard_ASSERT_RAISE (theLODIdx > 0 || theLODIdx <= myLODs.Size(),
     "Index of LOD is out of range");
 
-  return myLODs.FindKey (theLodIdx);
+  return myLODs.FindKey (theLODIdx);
 }
 
-Standard_Boolean Graphic3d_LODManager::HasLod (const Handle(Graphic3d_LOD)& theLod) const
+Standard_Boolean Graphic3d_LODManager::HasLOD (const Handle(Graphic3d_LOD)& theLOD) const
 {
-  return myLODs.Contains (theLod);
+  return myLODs.Contains (theLOD);
 }
index 97fbd149795c79693df52d13a485ec57edc05a7a..2d1e6206c18b6dcfbed2ace560cea55e56e591a6 100644 (file)
@@ -62,13 +62,13 @@ public:
   }
 
   //! For ranged LODs, sets the distance interval where the LOD will be visible.
-  //! @param theLodIdx the index of LOD in sorted list
-  Standard_EXPORT void SetRange (const Standard_Integer theLodIdx,
+  //! @param theLODIdx the index of LOD in sorted list
+  Standard_EXPORT void SetRange (const Standard_Integer theLODIdx,
                                  const Standard_Real theFrom,
                                  const Standard_Real theTo);
 
   //! Returns own index of the LOD that is displayed
-  Standard_EXPORT Standard_Boolean HasLodToDisplay (const Handle(Graphic3d_Camera)& theCamera);
+  Standard_EXPORT Standard_Boolean HasLODToDisplay (const Handle(Graphic3d_Camera)& theCamera);
 
   //! Returns graphic groups of the LOD that must be displayed according to the current
   //! camera state
@@ -94,10 +94,10 @@ public:
   //! to the index of the LOD in the map of LOD manager. Therefore, in case if no LOD was
   //! removed, the LODs in map are located in order of addition and IDs are identical to
   //! the addition iteration number
-  Standard_EXPORT const Handle(Graphic3d_LOD)& GetLodById (const Standard_Integer theLodIdx);
+  Standard_EXPORT const Handle(Graphic3d_LOD)& GetLODById (const Standard_Integer theLODIdx);
 
   //! Checks if the given LOD is added to this manager
-  Standard_EXPORT Standard_Boolean HasLod (const Handle(Graphic3d_LOD)& theLod) const;
+  Standard_EXPORT Standard_Boolean HasLOD (const Handle(Graphic3d_LOD)& theLOD) const;
 
   DEFINE_STANDARD_RTTIEXT (Graphic3d_LODManager, Standard_Transient)
 
@@ -107,13 +107,13 @@ protected:
   Standard_EXPORT Graphic3d_LODManager (const Handle(Graphic3d_Structure)& theParentStructure);
 
   //! Sorts LODs in the map according to its ranges to improve search for LOD to display.
-  //! After the sort is done, flag myIsToSortLods will be set to false.
+  //! After the sort is done, flag myIsToSortLODs will be set to false.
   Standard_EXPORT virtual void sortLODs() {};
 
 protected:
   Graphic3d_MapOfLODs              myLODs;          //!< Map of LODs
-  Handle(TColStd_HArray1OfInteger) myLodIndexes;    //!< Array of LOD indexes, for sorting purposes
-  Standard_Boolean                 myIsToSortLods;  //!< Is true when LODs must be sorted before picking procedure. For example, when new LOD was added
+  Handle(TColStd_HArray1OfInteger) myLODIndexes;    //!< Array of LOD indexes, for sorting purposes
+  Standard_Boolean                 myIsToSortLODs;  //!< Is true when LODs must be sorted before picking procedure. For example, when new LOD was added
 
 private:
   Standard_Integer              myCurrentLODIdx;    //!< Index of current LOD that should be rendered; is -1 by default.
index a00e02e25a742507fce829404afd57c3bbc287ed..848a33ca1c01170060d4cf5e97880e8ef1a41389 100644 (file)
@@ -188,9 +188,9 @@ void Graphic3d_Structure::Remove()
   }
 
   // Clear LODs graphic groups if there are any
-  if (!myCStructure->GetLodManager().IsNull())
+  if (!myCStructure->GetLODManager().IsNull())
   {
-    myCStructure->GetLodManager()->Clear (Standard_False);
+    myCStructure->GetLODManager()->Clear (Standard_False);
   }
 
   // Destruction of me in the graphic library
@@ -496,9 +496,9 @@ Standard_Boolean Graphic3d_Structure::IsEmpty() const
   // - if all these groups are empty
   // - or if all groups are empty and all their descendants are empty
   // - or if all its descendants are empty
-  if (!myCStructure->GetLodManager().IsNull())
+  if (!myCStructure->GetLODManager().IsNull())
   {
-    return myCStructure->GetLodManager()->IsEmpty();
+    return myCStructure->GetLODManager()->IsEmpty();
   }
 
   for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (myCStructure->Groups()); aGroupIter.More(); aGroupIter.Next())
@@ -647,9 +647,9 @@ void Graphic3d_Structure::GraphicClear (const Standard_Boolean theWithDestructio
     return;
   }
 
-  if (!myCStructure->GetLodManager().IsNull())
+  if (!myCStructure->GetLODManager().IsNull())
   {
-    myCStructure->GetLodManager()->Clear (theWithDestruction);
+    myCStructure->GetLODManager()->Clear (theWithDestruction);
     if (theWithDestruction)
       myCStructure->Clear();
   }
@@ -1788,7 +1788,7 @@ Handle(Graphic3d_StructureManager) Graphic3d_Structure::StructureManager() const
 Graphic3d_BndBox4f Graphic3d_Structure::minMaxCoord() const
 {
   Graphic3d_BndBox4f aBnd;
-  if (myCStructure->GetLodManager().IsNull())
+  if (myCStructure->GetLODManager().IsNull())
   {
     for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (myCStructure->Groups()); aGroupIter.More(); aGroupIter.Next())
     {
@@ -1797,7 +1797,7 @@ Graphic3d_BndBox4f Graphic3d_Structure::minMaxCoord() const
   }
   else
   {
-    myCStructure->GetLodManager()->GetCombinedBndBox (aBnd);
+    myCStructure->GetLODManager()->GetCombinedBndBox (aBnd);
   }
   return aBnd;
 }
index ed4bffb059648e1f0fdd806453be77b589cdbc6a..932d547d54cec974bf7cf005edff15cb29d777ce 100644 (file)
@@ -488,10 +488,10 @@ public:
   Standard_EXPORT Standard_Integer NbDetailLevels() const;
 
   //! Sets range of LOD.
-  //! @param theLodIdx corresponds to the index of LOD in map of LOD manager. In case if no LOD was
+  //! @param theLODIdx corresponds to the index of LOD in map of LOD manager. In case if no LOD was
   //! removed, the LODs in map are located in order of addition and IDs are identical to the addition
   //! iteration number
-  Standard_EXPORT void SetDetailLevelRange (const Standard_Integer theIdOfLOD, const Standard_Real theFrom, const Standard_Real theTo);
+  Standard_EXPORT void SetDetailLevelRange (const Standard_Integer theLODIdx, const Standard_Real theFrom, const Standard_Real theTo);
 
 friend class Graphic3d_Group;
 
index c821d211e0ef6ae41da359da12f08acc4f8c19b9..933f5ac19fdfc04edb9aa9d8d1e34f10b4fdaa9c 100644 (file)
@@ -75,12 +75,12 @@ void MeshVS_LODBuilder::DrawArrays (const Handle(Prs3d_Presentation)& theBasePrs
   Aspect_TypeOfLine aType;
   Standard_Real aWidth;
 
-  Handle(Graphic3d_LOD) aNewLod = theBasePrs->NewLOD();
+  Handle(Graphic3d_LOD) aNewLOD = theBasePrs->NewLOD();
   theFillAsp->Values (aStyle, anIntColor, aBackColor, anEdgeColor, aType, aWidth);
 
   if (isPolygons && theFillAsp->FrontMaterial().Transparency() < 0.01)
   {
-    Handle (Graphic3d_Group) aGroup = aNewLod->NewGroup (theBasePrs);
+    Handle (Graphic3d_Group) aGroup = aNewLOD->NewGroup (theBasePrs);
 
     theFillAsp->SetEdgeOff();
 
@@ -110,7 +110,7 @@ void MeshVS_LODBuilder::DrawArrays (const Handle(Prs3d_Presentation)& theBasePrs
 
   if (isPolylines && !theIsPolygonsEdgesOff)
   {
-    Handle (Graphic3d_Group) aLGroup = aNewLod->NewGroup (theBasePrs);
+    Handle (Graphic3d_Group) aLGroup = aNewLOD->NewGroup (theBasePrs);
 
     theFillAsp->SetEdgeOff();
     if (theIsSelected)
@@ -126,7 +126,7 @@ void MeshVS_LODBuilder::DrawArrays (const Handle(Prs3d_Presentation)& theBasePrs
 
   if (isLinkPolylines)
   {
-    Handle (Graphic3d_Group) aBeamGroup = aNewLod->NewGroup (theBasePrs);
+    Handle (Graphic3d_Group) aBeamGroup = aNewLOD->NewGroup (theBasePrs);
 
     theFillAsp->SetEdgeOff();
     if (!theIsSelected)
@@ -138,7 +138,7 @@ void MeshVS_LODBuilder::DrawArrays (const Handle(Prs3d_Presentation)& theBasePrs
 
   if (isPolygons && theFillAsp->FrontMaterial().Transparency() >= 0.01)
   {
-    Handle (Graphic3d_Group) aGroup = aNewLod->NewGroup (theBasePrs);
+    Handle (Graphic3d_Group) aGroup = aNewLOD->NewGroup (theBasePrs);
 
     theFillAsp->SetEdgeOff();
 
index e1ebb90c326af330b5f8b845e5e77958115c2be9..bc7f048e8c776e49adbb3971f8f1ab93ab0e48f2 100644 (file)
@@ -148,24 +148,24 @@ Standard_Boolean MeshVS_Mesh::HasLevelsOfDetail() const
 }
 
 //================================================================
-// Function : ComputeLods
+// Function : ComputeLODs
 // Purpose  :
 //================================================================
-void MeshVS_Mesh::ComputeLods (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
+void MeshVS_Mesh::ComputeLODs (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
                                const Handle(Prs3d_Presentation)& thePrs,
                                const Standard_Integer theMode)
 {
   TColStd_PackedMapOfInteger aDummy;
-  for (Standard_Integer aLodBldrIdx = 1; aLodBldrIdx <= myBuilders.Length(); ++aLodBldrIdx)
+  for (Standard_Integer aLODBldrIdx = 1; aLODBldrIdx <= myBuilders.Length(); ++aLODBldrIdx)
   {
-    const Handle(MeshVS_LODBuilder) aLodBldr = Handle(MeshVS_LODBuilder)::DownCast (myBuilders.Value (aLodBldrIdx));
-    if (aLodBldr.IsNull())
+    const Handle(MeshVS_LODBuilder) aLODBldr = Handle(MeshVS_LODBuilder)::DownCast (myBuilders.Value (aLODBldrIdx));
+    if (aLODBldr.IsNull())
       continue;
 
-    aLodBldr->SetPresentationManager (thePrsMgr);
-    const TColStd_PackedMapOfInteger aTrgIdxs = aLodBldr->GetDataSource()->GetAllElements();
+    aLODBldr->SetPresentationManager (thePrsMgr);
+    const TColStd_PackedMapOfInteger aTrgIdxs = aLODBldr->GetDataSource()->GetAllElements();
     if (!aTrgIdxs.IsEmpty())
-      aLodBldr->Build (thePrs, aTrgIdxs, aDummy, Standard_True,  theMode);
+      aLODBldr->Build (thePrs, aTrgIdxs, aDummy, Standard_True,  theMode);
   }
 }
 
index b5c914392e2b65f0b06c5d7740e089be2eef7b08..7d649cada7b53c98016a822bd886f35025f89e59 100644 (file)
@@ -190,7 +190,7 @@ friend class MeshVS_PrsBuilder;
 
 protected:
 
-  Standard_EXPORT virtual void ComputeLods (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
+  Standard_EXPORT virtual void ComputeLODs (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
                                             const Handle(Prs3d_Presentation)& thePrs,
                                             const Standard_Integer theMode = 0) Standard_OVERRIDE;
 
index 21b2b53581f98b7799cf98936ceb288f1a52a968..a0d3ee140e83193e8b55eb12c8b3a1be2ac081ff 100644 (file)
@@ -63,7 +63,7 @@ Handle(Graphic3d_LOD) OpenGl_LODManager::AddNewLOD()
 {
   Handle(Graphic3d_LOD) aNewLOD = new OpenGl_LOD();
   myLODs.Add (aNewLOD);
-  myIsToSortLods = Standard_True;
+  myIsToSortLODs = Standard_True;
   return aNewLOD;
 }
 
@@ -73,14 +73,14 @@ Handle(Graphic3d_LOD) OpenGl_LODManager::AddNewLOD()
 //=======================================================================
 void OpenGl_LODManager::sortLODs()
 {
-  Standard_Integer aIndArrSize = myLODs.Extent();
-  myLodIndexes.Nullify();
-  myLodIndexes = new TColStd_HArray1OfInteger (0, aIndArrSize - 1);
-  for (Standard_Integer aIdx = 0; aIdx < aIndArrSize; ++aIdx)
+  Standard_Integer anIndArrSize = myLODs.Extent();
+  myLODIndexes.Nullify();
+  myLODIndexes = new TColStd_HArray1OfInteger (0, anIndArrSize - 1);
+  for (Standard_Integer anIdx = 0; anIdx < anIndArrSize; ++anIdx)
   {
-    myLodIndexes->SetValue (aIdx, aIdx + 1);
+    myLODIndexes->SetValue (anIdx, anIdx + 1);
   }
-  TColStd_Array1OfInteger& anIdxArr = myLodIndexes->ChangeArray1();
+  TColStd_Array1OfInteger& anIdxArr = myLODIndexes->ChangeArray1();
   std::sort (anIdxArr.begin(), anIdxArr.end(), CompareLODS (myLODs));
-  myIsToSortLods = Standard_False;
+  myIsToSortLODs = Standard_False;
 }
index 27ea268fea812876ceabeaed1e7f2fd519fb0060..fda97d06c95bb14e2caa1cf36b9c641f398532dc 100644 (file)
@@ -560,7 +560,7 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
     return;
   }
 
-  if (!myLODManager.IsNull() && !myLODManager->HasLodToDisplay (theWorkspace->View()->Camera()))
+  if (!myLODManager.IsNull() && !myLODManager->HasLODToDisplay (theWorkspace->View()->Camera()))
     return;
 
   const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext();
@@ -755,10 +755,10 @@ void OpenGl_Structure::ReleaseGlResources (const Handle(OpenGl_Context)& theGlCt
   }
   if (!myLODManager.IsNull())
   {
-    for (Standard_Integer aLodIdx = 1; aLodIdx <= myLODManager->NbOfDetailLevels(); ++aLodIdx)
+    for (Standard_Integer aLODIdx = 1; aLODIdx <= myLODManager->NbOfDetailLevels(); ++aLODIdx)
     {
-      Handle(OpenGl_LOD) aLod = Handle(OpenGl_LOD)::DownCast (myLODManager->GetLodById (aLodIdx));
-      aLod->ReleaseGraphicResources (theGlCtx);
+      Handle(OpenGl_LOD) aLOD = Handle(OpenGl_LOD)::DownCast (myLODManager->GetLODById (aLODIdx));
+      aLOD->ReleaseGraphicResources (theGlCtx);
     }
   }
   if (myAspectLine != NULL)
@@ -796,17 +796,17 @@ Handle(Graphic3d_CStructure) OpenGl_Structure::ShadowLink (const Handle(Graphic3
 //function : SetDetailLevelRange
 //purpose  :
 //=======================================================================
-void OpenGl_Structure::SetDetailLevelRange (const Standard_Integer theLodIdx,
+void OpenGl_Structure::SetDetailLevelRange (const Standard_Integer theLODIdx,
                                             const Standard_Real theFrom,
                                             const Standard_Real theTo)
 {
   Standard_ASSERT_RAISE (theFrom < theTo,
     "The upper boundary of the interval must be greater than lower one!");
 
-  if (myLODManager.IsNull() || theLodIdx < 1 || theLodIdx > myLODManager->NbOfDetailLevels())
+  if (myLODManager.IsNull() || theLODIdx < 1 || theLODIdx > myLODManager->NbOfDetailLevels())
     return;
 
-  myLODManager->SetRange (theLodIdx, theFrom, theTo);
+  myLODManager->SetRange (theLODIdx, theFrom, theTo);
 }
 
 //=======================================================================
index b6d1a40345b8dc2ea068928a799648fadbedfb56..aee75dcd596b07306be55d8e4fe5548e7c583607 100644 (file)
@@ -106,7 +106,7 @@ public:
   //! Remove group from this structure
   Standard_EXPORT virtual void RemoveGroup (const Handle(Graphic3d_Group)& theGroup) Standard_OVERRIDE;
 
-  Standard_EXPORT virtual void SetDetailLevelRange (const Standard_Integer theLodIdx,
+  Standard_EXPORT virtual void SetDetailLevelRange (const Standard_Integer theLODIdx,
                                                     const Standard_Real theFrom,
                                                     const Standard_Real theTo) Standard_OVERRIDE;
 
index 3998044d32fd96d917b9436cb9960f70b97903ae..8028a8af466935a15ebdd416f94e575c401f92af 100644 (file)
@@ -74,7 +74,7 @@ void PrsMgr_PresentableObject::Fill (const Handle(PrsMgr_PresentationManager)& t
   if (!HasLevelsOfDetail())
     Compute (thePrsMgr, aStruct3d, theMode);
   else
-    ComputeLods (thePrsMgr, aStruct3d, theMode);
+    ComputeLODs (thePrsMgr, aStruct3d, theMode);
   UpdateTransformation (aStruct3d);
   aStruct3d->SetClipPlanes (myClipPlanes);
   aStruct3d->SetTransformPersistence (GetTransformPersistenceMode(), GetTransformPersistencePoint());
@@ -528,10 +528,10 @@ Standard_Boolean PrsMgr_PresentableObject::IsMutable() const
 }
 
 // =======================================================================
-// function : ComputeLods
+// function : ComputeLODs
 // purpose  :
 // =======================================================================
-void PrsMgr_PresentableObject::ComputeLods (const Handle(PrsMgr_PresentationManager3d)& /*thePrsMgr*/,
+void PrsMgr_PresentableObject::ComputeLODs (const Handle(PrsMgr_PresentationManager3d)& /*thePrsMgr*/,
                                             const Handle(Prs3d_Presentation)& /*thePrs*/,
                                             const Standard_Integer /*theMode*/)
 {
index da1684386741526228e781b6997a28e7ecb3f084..cb7ef365507c5bd3f6a8a42da9d014e989350140 100644 (file)
@@ -226,7 +226,7 @@ protected:
 Standard_EXPORT virtual ~PrsMgr_PresentableObject();
 
   //! Computes levels of detail for the presentation.
-  Standard_EXPORT virtual void ComputeLods (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
+  Standard_EXPORT virtual void ComputeLODs (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
                                             const Handle(Prs3d_Presentation)& thePrs,
                                             const Standard_Integer theMode = 0);
 
index bc67ce1e362581492136b91378922caa41ef2110..2865f3bf4b9761d09bb36d2147c2af83e16ff886 100644 (file)
@@ -1213,10 +1213,10 @@ static Standard_Integer meshinfo(Draw_Interpretor& di,
 #include <TopoDS.hxx>
 #include <ViewerTest_AutoUpdater.hxx>
 //=======================================================================
-//function : VGenLods
+//function : MeshGenLODs
 //purpose  : Generates sequence of LODs for the shape given
 //=======================================================================
-static int MeshGenLods (Draw_Interpretor& theDI,
+static int MeshGenLODs (Draw_Interpretor& theDI,
                         Standard_Integer  theArgNum,
                         const char**      theArgs)
 {
@@ -1241,10 +1241,10 @@ static int MeshGenLods (Draw_Interpretor& theDI,
     std::cout << "Error! No shape with the name " << aShapeName << "." << std::endl;
     return 1;
   }
-  const Standard_Integer aLodsNb = Draw::Atoi (theArgs[2]);
-  if (aLodsNb <= 0)
+  const Standard_Integer aLODsNb = Draw::Atoi (theArgs[2]);
+  if (aLODsNb <= 0)
   {
-    std::cout << "Error! Incorrect amount of LODs passed: " << aLodsNb << "." << std::endl;
+    std::cout << "Error! Incorrect amount of LODs passed: " << aLODsNb << "." << std::endl;
     std::cout << "Must be greater than zero." << std::endl;
     return 1;
   }
@@ -1303,19 +1303,19 @@ static int MeshGenLods (Draw_Interpretor& theDI,
 
 
   // compute the shape for each LOD
-  TopoDS_Shape* aLodShapes = new TopoDS_Shape[aLodsNb];
+  TopoDS_Shape* aLODShapes = new TopoDS_Shape[aLODsNb];
   BRepBuilderAPI_Copy aMainCopyAlgo;
   aMainCopyAlgo.Perform (aShape, Standard_True, Standard_True);
-  aLodShapes[0] = aMainCopyAlgo.Shape();
-  Standard_Real aDeflDecrFactor = aMaxDefl / aLodsNb;
-  for (Standard_Integer aLodIdx = 1; aLodIdx < aLodsNb; ++aLodIdx)
+  aLODShapes[0] = aMainCopyAlgo.Shape();
+  Standard_Real aDeflDecrFactor = aMaxDefl / aLODsNb;
+  for (Standard_Integer aLODIdx = 1; aLODIdx < aLODsNb; ++aLODIdx)
   {
     BRepBuilderAPI_Copy aCopyAlgo;
     aCopyAlgo.Perform (aShape, Standard_True, Standard_True);
-    aLodShapes[aLodIdx] = aCopyAlgo.Shape();
-    BRepTools::Clean (aLodShapes[aLodIdx]);
+    aLODShapes[aLODIdx] = aCopyAlgo.Shape();
+    BRepTools::Clean (aLODShapes[aLODIdx]);
     BRepMesh_FastDiscret::Parameters aParams;
-    aParams.Deflection = aMaxDefl - aLodIdx * aDeflDecrFactor;
+    aParams.Deflection = aMaxDefl - aLODIdx * aDeflDecrFactor;
     aParams.Angle = 0.5;
     aParams.Relative =  Standard_False;
     aParams.InParallel = Standard_False;
@@ -1323,12 +1323,12 @@ static int MeshGenLods (Draw_Interpretor& theDI,
     aParams.InternalVerticesMode = Standard_True;
     aParams.ControlSurfaceDeflection = Standard_True;
     aParams.AdaptiveMin = Standard_False;
-    BRepMesh_IncrementalMesh aMesher (aLodShapes[aLodIdx], aParams);
+    BRepMesh_IncrementalMesh aMesher (aLODShapes[aLODIdx], aParams);
     aMesher.Perform();
     if (toPrintInfo)
     {
       Standard_Integer aStatus = aMesher.GetStatusFlags();
-      std::cout << "LOD #" << aLodIdx << " meshing status: ";
+      std::cout << "LOD #" << aLODIdx << " meshing status: ";
       if (!aStatus)
         std::cout << " OK" << std::endl;
       else
@@ -1362,10 +1362,10 @@ static int MeshGenLods (Draw_Interpretor& theDI,
   if (toPrintInfo)
   {
     std::cout << std::endl;
-    for (Standard_Integer aLodIdx = 0; aLodIdx < aLodsNb; ++aLodIdx)
+    for (Standard_Integer aLODIdx = 0; aLODIdx < aLODsNb; ++aLODIdx)
     {
-      std::cout << "LOD #" << aLodIdx + 1 << " info:" << std::endl;
-      if (aLodShapes[aLodIdx].IsNull())
+      std::cout << "LOD #" << aLODIdx + 1 << " info:" << std::endl;
+      if (aLODShapes[aLODIdx].IsNull())
       {
         std::cout << "The shape is null!" << std::endl;
       }
@@ -1374,7 +1374,7 @@ static int MeshGenLods (Draw_Interpretor& theDI,
       TopLoc_Location aCurLoc;
       Standard_Real aDefl = 0.0;
       Standard_Integer aTrgsNb = 0, aNodesNb = 0;
-      for (TopExp_Explorer aShapeExp (aLodShapes[aLodIdx], TopAbs_FACE); aShapeExp.More(); aShapeExp.Next())
+      for (TopExp_Explorer aShapeExp (aLODShapes[aLODIdx], TopAbs_FACE); aShapeExp.More(); aShapeExp.Next())
       {
         TopoDS_Face aCurFace = TopoDS::Face (aShapeExp.Current());
         aCurTrg = BRep_Tool::Triangulation (aCurFace, aCurLoc);
@@ -1400,12 +1400,12 @@ static int MeshGenLods (Draw_Interpretor& theDI,
       aSavePath = aSavePath + "/";
     }
     aSavePath = aSavePath + aShapeName + "_LOD";
-    for (Standard_Integer aLodIdx = 0; aLodIdx < aLodsNb; ++aLodIdx)
+    for (Standard_Integer aLODIdx = 0; aLODIdx < aLODsNb; ++aLODIdx)
     {
       StlAPI_Writer aWriter;
       aWriter.ASCIIMode() = Standard_False;
-      TCollection_AsciiString aPath = aSavePath + aLodIdx + ".stl";
-      StlAPI_ErrorStatus aStatus = aWriter.Write (aLodShapes[aLodIdx], aPath.ToCString());
+      TCollection_AsciiString aPath = aSavePath + aLODIdx + ".stl";
+      StlAPI_ErrorStatus aStatus = aWriter.Write (aLODShapes[aLODIdx], aPath.ToCString());
       switch (aStatus)
       {
       case StlAPI_CannotOpenFile:
@@ -1413,7 +1413,7 @@ static int MeshGenLods (Draw_Interpretor& theDI,
         break;
       case StlAPI_StatusOK:
       default:
-        std::cout << "LOD" << aLodIdx << " was written sucessfully to the file " << aPath << std::endl;
+        std::cout << "LOD" << aLODIdx << " was written sucessfully to the file " << aPath << std::endl;
       }
     }
   }
@@ -1422,7 +1422,7 @@ static int MeshGenLods (Draw_Interpretor& theDI,
 }
 
 #include <MeshVS_LODBuilder.hxx>
-static int MeshLod (Draw_Interpretor& theDI,
+static int MeshLOD (Draw_Interpretor& theDI,
                     Standard_Integer  theArgNum,
                     const char**      theArgs)
 {
@@ -1515,12 +1515,12 @@ static int MeshLod (Draw_Interpretor& theDI,
   }
 
   Handle(MeshVS_Mesh) anOriginMesh = new MeshVS_Mesh();
-  for (NCollection_List<DetailLevelData>::Iterator aLodDataIter (myLODDataList); aLodDataIter.More(); aLodDataIter.Next())
+  for (NCollection_List<DetailLevelData>::Iterator aLODDataIter (myLODDataList); aLODDataIter.More(); aLODDataIter.Next())
   {
-    Handle(MeshVS_LODDataSource) aLod = new MeshVS_LODDataSource (aLodDataIter.Value().myMesh);
-    anOriginMesh->AddDataSource (aLod);
+    Handle(MeshVS_LODDataSource) aLOD = new MeshVS_LODDataSource (aLODDataIter.Value().myMesh);
+    anOriginMesh->AddDataSource (aLOD);
     Handle(MeshVS_LODBuilder) aLODBuilder = new MeshVS_LODBuilder (anOriginMesh.operator->());
-    aLODBuilder->SetDataSource (aLod);
+    aLODBuilder->SetDataSource (aLOD);
     aLODBuilder->GetDrawer()->SetColor (MeshVS_DA_EdgeColor, Quantity_NOC_YELLOW);
     anOriginMesh->AddBuilder (aLODBuilder);
   }
@@ -1536,11 +1536,11 @@ static int MeshLod (Draw_Interpretor& theDI,
   VDisplayAISObject (aShapeName, anOriginMesh);
   aCtx->Deactivate (anOriginMesh);
 
-  Standard_Integer aLodIdx = 1;
-  for (NCollection_List<DetailLevelData>::Iterator aLodDataIter (myLODDataList); aLodDataIter.More(); aLodDataIter.Next())
+  Standard_Integer aLODIdx = 1;
+  for (NCollection_List<DetailLevelData>::Iterator aLODDataIter (myLODDataList); aLODDataIter.More(); aLODDataIter.Next())
   {
-    anOriginMesh->Presentation()->SetDetailLevelRange (aLodIdx, aLodDataIter.Value().myFrom, aLodDataIter.Value().myTo);
-    aLodIdx++;
+    anOriginMesh->Presentation()->SetDetailLevelRange (aLODIdx, aLODDataIter.Value().myFrom, aLODDataIter.Value().myTo);
+    aLODIdx++;
   }
 
   Draw::Set (aShapeName, new XSDRAWSTLVRML_DrawableMesh (anOriginMesh));
@@ -1587,18 +1587,18 @@ void  XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
                    "\n\t\t: lodsNb means the exact amount of physical LODs to generate, e.g. the main"
                    "\n\t\t: object's presentation is not considered as a separate level of detail here."
                    "\n\t\t: [-debug] enables printing of meshing status and each LOD's info.",
-                   __FILE__, MeshGenLods, g);
+                   __FILE__, MeshGenLODs, g);
   theCommands.Add ("meshlod",
-                   "meshlod shapeName pathToFileWithLodInfo"
+                   "meshlod shapeName pathToFileWithLODInfo"
                    "\n\t\t: Creates an object with the name shapeName that has LODs described in file stored at"
-                   "\n\t\t: pathToFileWithLodInfo. Each string in the file is a full description of LOD. It must"
+                   "\n\t\t: pathToFileWithLODInfo. Each string in the file is a full description of LOD. It must"
                    "\n\t\t: be filled using the following form:"
                    "\n\t\t: -path pathToLOD [-from fromRange] [-to toRange], where"
                    "\n\t\t: pathToLOD is a path to STL file with LOD mesh, fromRange and toRange define a depth"
                    "\n\t\t: range where the LOD will be visible. Each of range parameters is optional, but in this"
                    "\n\t\t: case, it will be equal to positive and negative max double correspondingly."
                    "\n\t\t: It is assumed that ranges are non-overlapping segments of the real axis."
-                   __FILE__, MeshLod, g);
+                   __FILE__, MeshLOD, g);
 }
 
 //==============================================================================