diff --git a/.github/actions/clang-format-check/action.yml b/.github/actions/clang-format-check/action.yml index cfff1adf0b..4eabdf02a5 100644 --- a/.github/actions/clang-format-check/action.yml +++ b/.github/actions/clang-format-check/action.yml @@ -61,9 +61,7 @@ runs: run: | git diff > format.patch if ((Get-Item format.patch).length -gt 0) { - echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push" echo "has_changes=true" >> $env:GITHUB_OUTPUT - exit 1 } - name: Upload patch @@ -73,6 +71,13 @@ runs: name: format-patch path: format.patch + - name: Failing step for formatting issues + if: steps.git-check.outputs.has_changes == 'true' + shell: pwsh + run: | + echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push" + exit 1 + branding: icon: 'check-square' color: 'green' diff --git a/src/AIS/AIS_GlobalStatus.cxx b/src/AIS/AIS_GlobalStatus.cxx index a56192f58a..223b7fbb80 100644 --- a/src/AIS/AIS_GlobalStatus.cxx +++ b/src/AIS/AIS_GlobalStatus.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient) -// ======================================================================= -// function : AIS_GlobalStatus -// purpose : -// ======================================================================= +//================================================================================================= + AIS_GlobalStatus::AIS_GlobalStatus() : myDispMode(0), myIsHilit(Standard_False), diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 31ef42a643..6ebd93a3ab 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -3282,10 +3282,8 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const Handle(SelectMgr_EntityOw } } -// ======================================================================= -// function : SetSelectedState -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean AIS_InteractiveContext::SetSelectedState( const Handle(SelectMgr_EntityOwner)& theEntity, const Standard_Boolean theIsSelected) @@ -3676,10 +3674,8 @@ void AIS_InteractiveContext::SetSelectionModeActive( (*aStat)->AddSelectionMode(theMode); } -// ============================================================================ -// function : Activate -// purpose : -// ============================================================================ +//================================================================================================= + void AIS_InteractiveContext::Activate(const Standard_Integer theMode, const Standard_Boolean theIsForce) { @@ -3692,10 +3688,8 @@ void AIS_InteractiveContext::Activate(const Standard_Integer theMode, } } -// ============================================================================ -// function : Deactivate -// purpose : -// ============================================================================ +//================================================================================================= + void AIS_InteractiveContext::Deactivate(const Standard_Integer theMode) { AIS_ListOfInteractive aDisplayedObjects; @@ -3706,10 +3700,8 @@ void AIS_InteractiveContext::Deactivate(const Standard_Integer theMode) } } -// ============================================================================ -// function : Deactivate -// purpose : -// ============================================================================ +//================================================================================================= + void AIS_InteractiveContext::Deactivate() { AIS_ListOfInteractive aDisplayedObjects; diff --git a/src/AIS/AIS_LightSource.cxx b/src/AIS/AIS_LightSource.cxx index 78eac44efc..d433299ae3 100644 --- a/src/AIS/AIS_LightSource.cxx +++ b/src/AIS/AIS_LightSource.cxx @@ -34,10 +34,8 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSource, AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSourceOwner, SelectMgr_EntityOwner) -// ======================================================================= -// function : AIS_LightSourceOwner -// purpose : -// ======================================================================= +//================================================================================================= + AIS_LightSourceOwner::AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObject, Standard_Integer thePriority) : SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)theObject, thePriority) @@ -45,10 +43,8 @@ AIS_LightSourceOwner::AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObj // } -// ======================================================================= -// function : HandleMouseClick -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean AIS_LightSourceOwner::HandleMouseClick(const Graphic3d_Vec2i&, Aspect_VKeyMouse theKey, Aspect_VKeyFlags theFlags, @@ -167,10 +163,8 @@ Standard_Boolean AIS_LightSourceOwner::IsForcedHilight() const return Standard_False; } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + AIS_LightSource::AIS_LightSource(const Handle(Graphic3d_CLight)& theLight) : myLightSource(theLight), myCodirMarkerType(Aspect_TOM_X), @@ -295,10 +289,8 @@ Standard_Boolean AIS_LightSource::ProcessDragging(const Handle(AIS_InteractiveCo return Standard_False; } -// ======================================================================= -// function : updateLightAspects -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::updateLightAspects() { const Quantity_Color aBaseColor = myLightSource->Color(); @@ -333,10 +325,8 @@ void AIS_LightSource::updateLightAspects() SynchronizeAspects(); } -// ======================================================================= -// function : updateLightTransformPersistence -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::updateLightTransformPersistence() { Handle(Graphic3d_TransformPers) aTrsfPers = myTransformPersistence; @@ -421,10 +411,8 @@ void AIS_LightSource::updateLightTransformPersistence() SetTransformPersistence(aTrsfPers); } -// ======================================================================= -// function : updateLightLocalTransformation -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::updateLightLocalTransformation() { myLocalTransformation.Nullify(); @@ -470,10 +458,8 @@ void AIS_LightSource::updateLightLocalTransformation() UpdateTransformation(); } -// ======================================================================= -// function : setLocalTransformation -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::setLocalTransformation(const Handle(TopLoc_Datum3D)& theTrsf) { const gp_Trsf aTrsf = !theTrsf.IsNull() ? theTrsf->Transformation() : gp_Trsf(); @@ -513,10 +499,8 @@ void AIS_LightSource::setLocalTransformation(const Handle(TopLoc_Datum3D)& theTr updateLightTransformPersistence(); } -// ======================================================================= -// function : Compute -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::Compute(const Handle(PrsMgr_PresentationManager)&, const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) @@ -559,10 +543,8 @@ void AIS_LightSource::Compute(const Handle(PrsMgr_PresentationManager)&, } } -// ======================================================================= -// function : computeAmbient -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::computeAmbient(const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { @@ -635,10 +617,8 @@ void AIS_LightSource::computeAmbient(const Handle(Prs3d_Presentation)& thePrs, } } -// ======================================================================= -// function : computeDirectional -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::computeDirectional(const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { @@ -763,10 +743,8 @@ void AIS_LightSource::computeDirectional(const Handle(Prs3d_Presentation)& thePr } } -// ======================================================================= -// function : computePositional -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::computePositional(const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { @@ -792,10 +770,8 @@ void AIS_LightSource::computePositional(const Handle(Prs3d_Presentation)& thePrs } } -// ======================================================================= -// function : computeSpot -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::computeSpot(const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { @@ -851,10 +827,8 @@ void AIS_LightSource::computeSpot(const Handle(Prs3d_Presentation)& thePrs, } } -// ======================================================================= -// function : ComputeSelection -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_LightSource::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, const Standard_Integer theMode) { diff --git a/src/AIS/AIS_MediaPlayer.cxx b/src/AIS/AIS_MediaPlayer.cxx index ed9abda164..ee1c609a1c 100644 --- a/src/AIS/AIS_MediaPlayer.cxx +++ b/src/AIS/AIS_MediaPlayer.cxx @@ -71,10 +71,8 @@ AIS_MediaPlayer::~AIS_MediaPlayer() myFramePair.Nullify(); } -// ======================================================================= -// function : OpenInput -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_MediaPlayer::OpenInput(const TCollection_AsciiString& thePath, Standard_Boolean theToWait) { if (myFramePair->PlayerContext().IsNull() && thePath.IsEmpty()) @@ -86,10 +84,8 @@ void AIS_MediaPlayer::OpenInput(const TCollection_AsciiString& thePath, Standard SynchronizeAspects(); } -// ======================================================================= -// function : PresentFrame -// purpose : -// ======================================================================= +//================================================================================================= + bool AIS_MediaPlayer::PresentFrame(const Graphic3d_Vec2i& theLeftCorner, const Graphic3d_Vec2i& theMaxSize) { @@ -128,10 +124,8 @@ bool AIS_MediaPlayer::PresentFrame(const Graphic3d_Vec2i& theLeftCorner, return toRedraw; } -// ======================================================================= -// function : updateSize -// purpose : -// ======================================================================= +//================================================================================================= + bool AIS_MediaPlayer::updateSize(const Graphic3d_Vec2i& theLeftCorner, const Graphic3d_Vec2i& theMaxSize) { @@ -185,10 +179,8 @@ bool AIS_MediaPlayer::updateSize(const Graphic3d_Vec2i& theLeftCorner, return true; } -// ======================================================================= -// function : PlayPause -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_MediaPlayer::PlayPause() { if (myFramePair->PlayerContext().IsNull()) @@ -201,10 +193,8 @@ void AIS_MediaPlayer::PlayPause() myFramePair->PlayerContext()->PlayPause(isPaused, aProgress, aDuration); } -// ======================================================================= -// function : Compute -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_MediaPlayer::Compute(const Handle(PrsMgr_PresentationManager)&, const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) @@ -227,10 +217,8 @@ void AIS_MediaPlayer::Compute(const Handle(PrsMgr_PresentationManager)&, } } -// ======================================================================= -// function : ComputeSelection -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_MediaPlayer::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, const Standard_Integer theMode) { diff --git a/src/AIS/AIS_Trihedron.cxx b/src/AIS/AIS_Trihedron.cxx index f3dbc662e6..315290c4cb 100644 --- a/src/AIS/AIS_Trihedron.cxx +++ b/src/AIS/AIS_Trihedron.cxx @@ -738,10 +738,8 @@ Handle(Select3D_SensitiveEntity) AIS_Trihedron::createSensitiveEntity( return Handle(Select3D_SensitiveEntity)(); } -// ======================================================================= -// function : updatePrimitives -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect, Prs3d_DatumMode theMode, const gp_Pnt& theOrigin, diff --git a/src/AIS/AIS_TrihedronOwner.cxx b/src/AIS/AIS_TrihedronOwner.cxx index f3a65f28a5..3781a1f18a 100644 --- a/src/AIS/AIS_TrihedronOwner.cxx +++ b/src/AIS/AIS_TrihedronOwner.cxx @@ -16,10 +16,8 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_TrihedronOwner, SelectMgr_EntityOwner) -// ======================================================================= -// function : AIS_TrihedronOwner -// purpose : -// ======================================================================= +//================================================================================================= + AIS_TrihedronOwner::AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, const Prs3d_DatumParts thePart, const Standard_Integer thePriority) @@ -28,10 +26,8 @@ AIS_TrihedronOwner::AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)& { } -// ======================================================================= -// function : HilightWithColor -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_TrihedronOwner::HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePM, const Handle(Prs3d_Drawer)& theStyle, const Standard_Integer /*theMode*/) @@ -39,10 +35,8 @@ void AIS_TrihedronOwner::HilightWithColor(const Handle(PrsMgr_PresentationManage Selectable()->HilightOwnerWithColor(thePM, theStyle, this); } -// ======================================================================= -// function : IsHilighted -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean AIS_TrihedronOwner::IsHilighted(const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode) const { @@ -54,10 +48,8 @@ Standard_Boolean AIS_TrihedronOwner::IsHilighted(const Handle(PrsMgr_Presentatio return thePM->IsHighlighted(Selectable(), theMode); } -// ======================================================================= -// function : Unhilight -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_TrihedronOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode) { diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 74181291dd..157ef52336 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -27,10 +27,8 @@ #include #include -// ======================================================================= -// function : AIS_ViewController -// purpose : -// ======================================================================= +//================================================================================================= + AIS_ViewController::AIS_ViewController() : myLastEventsTime(0.0), myToAskNextFrame(false), @@ -174,19 +172,15 @@ AIS_ViewController::AIS_ViewController() myXRSelectHaptic.Amplitude = 0.5f; } -// ======================================================================= -// function : ~AIS_ViewController -// purpose : -// ======================================================================= +//================================================================================================= + AIS_ViewController::~AIS_ViewController() { // } -// ======================================================================= -// function : ResetViewInput -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::ResetViewInput() { myKeys.Reset(); @@ -199,10 +193,8 @@ void AIS_ViewController::ResetViewInput() myMouseClickCounter = 0; } -// ======================================================================= -// function : FlushViewEvents -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::FlushViewEvents(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, Standard_Boolean theToHandle) @@ -262,10 +254,8 @@ void AIS_ViewController::FlushViewEvents(const Handle(AIS_InteractiveContext)& t } } -// ======================================================================= -// function : flushBuffers -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::flushBuffers(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)&) { @@ -393,10 +383,8 @@ void AIS_ViewController::flushBuffers(const Handle(AIS_InteractiveContext)&, } } -// ======================================================================= -// function : flushGestures -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::flushGestures(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)& theView) { @@ -543,10 +531,8 @@ void AIS_ViewController::flushGestures(const Handle(AIS_InteractiveContext)&, } } -// ======================================================================= -// function : UpdateViewOrientation -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::UpdateViewOrientation(V3d_TypeOfOrientation theOrientation, bool theToFitAll) { @@ -555,10 +541,8 @@ void AIS_ViewController::UpdateViewOrientation(V3d_TypeOfOrientation theOrientat myUI.Orientation.ViewOrient = theOrientation; } -// ======================================================================= -// function : SelectInViewer -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::SelectInViewer(const Graphic3d_Vec2i& thePnt, const AIS_SelectionScheme theScheme) { @@ -572,10 +556,8 @@ void AIS_ViewController::SelectInViewer(const Graphic3d_Vec2i& thePnt, myUI.Selection.Points.Append(thePnt); } -// ======================================================================= -// function : SelectInViewer -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::SelectInViewer(const NCollection_Sequence& thePnts, const AIS_SelectionScheme theScheme) { @@ -596,10 +578,8 @@ void AIS_ViewController::SelectInViewer(const NCollection_SequenceIsStopped()) @@ -1469,10 +1415,8 @@ void AIS_ViewController::AbortViewAnimation() } } -// ======================================================================= -// function : handlePanning -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handlePanning(const Handle(V3d_View)& theView) { if (!myGL.Panning.ToPan || !myToAllowPanning) @@ -1513,10 +1457,8 @@ void AIS_ViewController::handlePanning(const Handle(V3d_View)& theView) theView->View()->SynchronizeXRPosedToBaseCamera(); } -// ======================================================================= -// function : handleZRotate -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleZRotate(const Handle(V3d_View)& theView) { if (!myGL.ZRotate.ToRotate || !myToAllowRotation) @@ -1536,10 +1478,8 @@ void AIS_ViewController::handleZRotate(const Handle(V3d_View)& theView) theView->View()->SynchronizeXRPosedToBaseCamera(); } -// ======================================================================= -// function : handleZoom -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleZoom(const Handle(V3d_View)& theView, const Aspect_ScrollDelta& theParams, const gp_Pnt* thePnt) @@ -1643,10 +1583,8 @@ void AIS_ViewController::handleZoom(const Handle(V3d_View)& theView, theView->View()->SynchronizeXRPosedToBaseCamera(); } -// ======================================================================= -// function : handleZFocusScroll -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleZFocusScroll(const Handle(V3d_View)& theView, const Aspect_ScrollDelta& theParams) { @@ -1663,10 +1601,8 @@ void AIS_ViewController::handleZFocusScroll(const Handle(V3d_View)& theView, } } -// ======================================================================= -// function : handleOrbitRotation -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleOrbitRotation(const Handle(V3d_View)& theView, const gp_Pnt& thePnt, bool theToLockZUp) @@ -1815,10 +1751,8 @@ void AIS_ViewController::handleOrbitRotation(const Handle(V3d_View)& theView, theView->View()->SynchronizeXRBaseToPosedCamera(); } -// ======================================================================= -// function : handleViewRotation -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleViewRotation(const Handle(V3d_View)& theView, double theYawExtra, double thePitchExtra, @@ -1891,10 +1825,8 @@ void AIS_ViewController::handleViewRotation(const Handle(V3d_View)& theView, theView->Invalidate(); } -// ======================================================================= -// function : PickPoint -// purpose : -// ======================================================================= +//================================================================================================= + bool AIS_ViewController::PickPoint(gp_Pnt& thePnt, const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, @@ -1923,10 +1855,8 @@ bool AIS_ViewController::PickPoint(gp_Pnt& thePnt, && !Precision::IsInfinite(thePnt.Z()); } -// ======================================================================= -// function : PickAxis -// purpose : -// ======================================================================= +//================================================================================================= + bool AIS_ViewController::PickAxis(gp_Pnt& theTopPnt, const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, @@ -1947,10 +1877,8 @@ bool AIS_ViewController::PickAxis(gp_Pnt& theTopPn && !Precision::IsInfinite(theTopPnt.Z()); } -// ======================================================================= -// function : GravityPoint -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt AIS_ViewController::GravityPoint(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -1993,10 +1921,8 @@ gp_Pnt AIS_ViewController::GravityPoint(const Handle(AIS_InteractiveContext)& th return theCtx->GravityPoint(theView); } -// ======================================================================= -// function : FitAllAuto -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -2031,10 +1957,8 @@ void AIS_ViewController::FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx } } -// ======================================================================= -// function : handleViewOrientationKeys -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleViewOrientationKeys(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -2123,10 +2047,8 @@ void AIS_ViewController::handleViewOrientationKeys(const Handle(AIS_InteractiveC } } -// ======================================================================= -// function : handleNavigationKeys -// purpose : -// ======================================================================= +//================================================================================================= + AIS_WalkDelta AIS_ViewController::handleNavigationKeys(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)& theView) { @@ -2256,10 +2178,8 @@ AIS_WalkDelta AIS_ViewController::handleNavigationKeys(const Handle(AIS_Interact return aWalk; } -// ======================================================================= -// function : handleCameraActions -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleCameraActions(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, const AIS_WalkDelta& theWalk) @@ -2472,10 +2392,8 @@ void AIS_ViewController::handleCameraActions(const Handle(AIS_InteractiveContext } } -// ======================================================================= -// function : handleXRInput -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRInput(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, const AIS_WalkDelta&) @@ -2490,10 +2408,8 @@ void AIS_ViewController::handleXRInput(const Handle(AIS_InteractiveContext)& the handleXRPicking(theCtx, theView); } -// ======================================================================= -// function : handleXRTurnPad -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRTurnPad(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)& theView) { @@ -2533,10 +2449,8 @@ void AIS_ViewController::handleXRTurnPad(const Handle(AIS_InteractiveContext)&, } } -// ======================================================================= -// function : handleXRTeleport -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRTeleport(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -2670,10 +2584,8 @@ void AIS_ViewController::handleXRTeleport(const Handle(AIS_InteractiveContext)& } } -// ======================================================================= -// function : handleXRPicking -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRPicking(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -2726,20 +2638,16 @@ void AIS_ViewController::handleXRPicking(const Handle(AIS_InteractiveContext)& t } } -// ======================================================================= -// function : OnSelectionChanged -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::OnSelectionChanged(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)&) { // } -// ======================================================================= -// function : OnSubviewChanged -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::OnSubviewChanged(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)&, const Handle(V3d_View)&) @@ -2747,10 +2655,8 @@ void AIS_ViewController::OnSubviewChanged(const Handle(AIS_InteractiveContext)&, // } -// ======================================================================= -// function : OnObjectDragged -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::OnObjectDragged(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, AIS_DragAction theAction) @@ -2857,10 +2763,8 @@ void AIS_ViewController::OnObjectDragged(const Handle(AIS_InteractiveContext)& t } } -// ======================================================================= -// function : contextLazyMoveTo -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::contextLazyMoveTo(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, const Graphic3d_Vec2i& thePnt) @@ -2914,10 +2818,8 @@ void AIS_ViewController::contextLazyMoveTo(const Handle(AIS_InteractiveContext)& } } -// ======================================================================= -// function : handleSelectionPick -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleSelectionPick(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -2946,10 +2848,8 @@ void AIS_ViewController::handleSelectionPick(const Handle(AIS_InteractiveContext } } -// ======================================================================= -// function : handleSelectionPoly -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleSelectionPoly(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -3074,10 +2974,8 @@ void AIS_ViewController::handleSelectionPoly(const Handle(AIS_InteractiveContext } } -// ======================================================================= -// function : handleDynamicHighlight -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleDynamicHighlight(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -3142,10 +3040,8 @@ void AIS_ViewController::handleDynamicHighlight(const Handle(AIS_InteractiveCont } } -// ======================================================================= -// function : handleMoveTo -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleMoveTo(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -3154,10 +3050,8 @@ void AIS_ViewController::handleMoveTo(const Handle(AIS_InteractiveContext)& theC handleSelectionPoly(theCtx, theView); } -// ======================================================================= -// function : handleViewRedraw -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleViewRedraw(const Handle(AIS_InteractiveContext)&, const Handle(V3d_View)& theView) { @@ -3265,10 +3159,8 @@ void AIS_ViewController::handleViewRedraw(const Handle(AIS_InteractiveContext)&, } } -// ======================================================================= -// function : handleXRMoveTo -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer AIS_ViewController::handleXRMoveTo(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView, const gp_Trsf& thePose, @@ -3297,10 +3189,8 @@ Standard_Integer AIS_ViewController::handleXRMoveTo(const Handle(AIS_Interactive return aPickResult; } -// ======================================================================= -// function : handleXRHighlight -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRHighlight(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -3347,10 +3237,8 @@ void AIS_ViewController::handleXRHighlight(const Handle(AIS_InteractiveContext)& } } -// ======================================================================= -// function : handleXRPresentations -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::handleXRPresentations(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { @@ -3509,10 +3397,8 @@ void AIS_ViewController::handleXRPresentations(const Handle(AIS_InteractiveConte } } -// ======================================================================= -// function : HandleViewEvents -// purpose : -// ======================================================================= +//================================================================================================= + void AIS_ViewController::HandleViewEvents(const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { diff --git a/src/Aspect/Aspect_Background.cxx b/src/Aspect/Aspect_Background.cxx index 24d528da97..57ffaaf568 100644 --- a/src/Aspect/Aspect_Background.cxx +++ b/src/Aspect/Aspect_Background.cxx @@ -58,10 +58,8 @@ Quantity_Color Aspect_Background::Color() const return (MyColor); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_Background::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, Aspect_Background) diff --git a/src/Aspect/Aspect_DisplayConnection.cxx b/src/Aspect/Aspect_DisplayConnection.cxx index d8c2af36f9..ce6ee9ac4f 100755 --- a/src/Aspect/Aspect_DisplayConnection.cxx +++ b/src/Aspect/Aspect_DisplayConnection.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient) -// ======================================================================= -// function : Aspect_DisplayConnection -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_DisplayConnection::Aspect_DisplayConnection() { #if defined(HAVE_XLIB) @@ -40,10 +38,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection() #endif } -// ======================================================================= -// function : ~Aspect_DisplayConnection -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_DisplayConnection::~Aspect_DisplayConnection() { #if defined(HAVE_XLIB) @@ -58,10 +54,8 @@ Aspect_DisplayConnection::~Aspect_DisplayConnection() #endif } -// ======================================================================= -// function : Aspect_DisplayConnection -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_DisplayConnection::Aspect_DisplayConnection(const TCollection_AsciiString& theDisplayName) : myDisplay(NULL), myDefVisualInfo(NULL), @@ -72,10 +66,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection(const TCollection_AsciiString Init(NULL); } -// ======================================================================= -// function : Aspect_DisplayConnection -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_DisplayConnection::Aspect_DisplayConnection(Aspect_XDisplay* theDisplay) : myDisplay(NULL), myDefVisualInfo(NULL), @@ -85,10 +77,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection(Aspect_XDisplay* theDisplay) Init(theDisplay); } -// ======================================================================= -// function : SetDefaultVisualInfo -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_DisplayConnection::SetDefaultVisualInfo(Aspect_XVisualInfo* theVisual, Aspect_FBConfig theFBConfig) { @@ -102,10 +92,8 @@ void Aspect_DisplayConnection::SetDefaultVisualInfo(Aspect_XVisualInfo* theVisua myDefFBConfig = theFBConfig; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_DisplayConnection::Init(Aspect_XDisplay* theDisplay) { #if defined(HAVE_XLIB) diff --git a/src/Aspect/Aspect_GenId.cxx b/src/Aspect/Aspect_GenId.cxx index f6e99f121c..2bfe5ef985 100644 --- a/src/Aspect/Aspect_GenId.cxx +++ b/src/Aspect/Aspect_GenId.cxx @@ -19,10 +19,8 @@ #include -// ======================================================================= -// function : Aspect_GenId -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_GenId::Aspect_GenId() : myFreeCount(INT_MAX / 2 + 1), myLength(INT_MAX / 2 + 1), @@ -32,10 +30,8 @@ Aspect_GenId::Aspect_GenId() // } -// ======================================================================= -// function : Aspect_GenId -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_GenId::Aspect_GenId(const Standard_Integer theLow, const Standard_Integer theUpper) : myFreeCount(theUpper - theLow + 1), myLength(theUpper - theLow + 1), @@ -48,20 +44,16 @@ Aspect_GenId::Aspect_GenId(const Standard_Integer theLow, const Standard_Integer } } -// ======================================================================= -// function : Free -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_GenId::Free() { myFreeCount = myLength; myFreeIds.Clear(); } -// ======================================================================= -// function : Free -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_GenId::Free(const Standard_Integer theId) { if (theId >= myLowerBound && theId <= myUpperBound) @@ -78,10 +70,8 @@ void Aspect_GenId::Free(const Standard_Integer theId) } } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Aspect_GenId::Next() { Standard_Integer aNewId = 0; @@ -92,10 +82,8 @@ Standard_Integer Aspect_GenId::Next() return aNewId; } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Aspect_GenId::Next(Standard_Integer& theId) { if (!myFreeIds.IsEmpty()) @@ -114,10 +102,8 @@ Standard_Boolean Aspect_GenId::Next(Standard_Integer& theId) return Standard_True; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_GenId::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFreeCount) diff --git a/src/Aspect/Aspect_GradientBackground.cxx b/src/Aspect/Aspect_GradientBackground.cxx index e5386522e8..e733b9e418 100644 --- a/src/Aspect/Aspect_GradientBackground.cxx +++ b/src/Aspect/Aspect_GradientBackground.cxx @@ -54,10 +54,8 @@ Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod() cons return MyGradientMethod; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_GradientBackground::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Aspect/Aspect_NeutralWindow.cxx b/src/Aspect/Aspect_NeutralWindow.cxx index 62c74f38f5..04615bdd87 100644 --- a/src/Aspect/Aspect_NeutralWindow.cxx +++ b/src/Aspect/Aspect_NeutralWindow.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_NeutralWindow, Aspect_Window) -// ======================================================================= -// function : Aspect_NeutralWindow -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_NeutralWindow::Aspect_NeutralWindow() : myHandle(0), myParentHandle(0), @@ -31,10 +29,8 @@ Aspect_NeutralWindow::Aspect_NeutralWindow() { } -// ======================================================================= -// function : SetNativeHandles -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Aspect_NeutralWindow::SetNativeHandles(Aspect_Drawable theWindow, Aspect_Drawable theParentWindow, Aspect_FBConfig theFbConfig) @@ -50,10 +46,8 @@ Standard_Boolean Aspect_NeutralWindow::SetNativeHandles(Aspect_Drawable theWindo return Standard_True; } -// ======================================================================= -// function : SetPosition -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Standard_Integer theY1) { if (myPosX == theX1 && myPosY == theY1) @@ -66,10 +60,8 @@ Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Stand return Standard_True; } -// ======================================================================= -// function : SetPosition -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Standard_Integer theY1, Standard_Integer theX2, @@ -89,10 +81,8 @@ Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, return Standard_True; } -// ======================================================================= -// function : SetSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Aspect_NeutralWindow::SetSize(const Standard_Integer theWidth, const Standard_Integer theHeight) { diff --git a/src/Aspect/Aspect_OpenVRSession.cxx b/src/Aspect/Aspect_OpenVRSession.cxx index e367ef6156..8a56007e85 100644 --- a/src/Aspect/Aspect_OpenVRSession.cxx +++ b/src/Aspect/Aspect_OpenVRSession.cxx @@ -341,10 +341,8 @@ private: }; #endif -// ======================================================================= -// function : IsHmdPresent -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::IsHmdPresent() { #ifdef HAVE_OPENVR @@ -354,10 +352,8 @@ bool Aspect_OpenVRSession::IsHmdPresent() #endif } -// ======================================================================= -// function : defaultActionsManifest -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Aspect_OpenVRSession::defaultActionsManifest() { #ifdef HAVE_OPENVR @@ -368,10 +364,8 @@ TCollection_AsciiString Aspect_OpenVRSession::defaultActionsManifest() #endif } -// ======================================================================= -// function : Aspect_OpenVRSession -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_OpenVRSession::Aspect_OpenVRSession() : myContext(new VRContext()) { @@ -491,20 +485,16 @@ Aspect_OpenVRSession::Aspect_OpenVRSession() #endif } -// ======================================================================= -// function : ~Aspect_OpenVRSession -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_OpenVRSession::~Aspect_OpenVRSession() { closeVR(); delete myContext; } -// ======================================================================= -// function : closeVR -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::closeVR() { #ifdef HAVE_OPENVR @@ -516,10 +506,8 @@ void Aspect_OpenVRSession::closeVR() #endif } -// ======================================================================= -// function : getVRSystem -// purpose : -// ======================================================================= +//================================================================================================= + void* Aspect_OpenVRSession::getVRSystem() const { #ifdef HAVE_OPENVR @@ -529,19 +517,15 @@ void* Aspect_OpenVRSession::getVRSystem() const #endif } -// ======================================================================= -// function : Close -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::Close() { closeVR(); } -// ======================================================================= -// function : IsOpen -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::IsOpen() const { #ifdef HAVE_OPENVR @@ -551,10 +535,8 @@ bool Aspect_OpenVRSession::IsOpen() const #endif } -// ======================================================================= -// function : Open -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::Open() { #ifdef HAVE_OPENVR @@ -600,10 +582,8 @@ bool Aspect_OpenVRSession::Open() #endif } -// ======================================================================= -// function : initInput -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::initInput() { #ifdef HAVE_OPENVR @@ -670,10 +650,8 @@ bool Aspect_OpenVRSession::initInput() #endif } -// ======================================================================= -// function : GetString -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Aspect_OpenVRSession::GetString(InfoString theInfo) const { #ifdef HAVE_OPENVR @@ -706,10 +684,8 @@ TCollection_AsciiString Aspect_OpenVRSession::GetString(InfoString theInfo) cons return TCollection_AsciiString(); } -// ======================================================================= -// function : NamedTrackedDevice -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Aspect_OpenVRSession::NamedTrackedDevice( Aspect_XRTrackedDeviceRole theDevice) const { @@ -745,10 +721,8 @@ Standard_Integer Aspect_OpenVRSession::NamedTrackedDevice( return -1; } -// ======================================================================= -// function : loadRenderModel -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfTriangles) Aspect_OpenVRSession::loadRenderModel( Standard_Integer theDevice, Standard_Boolean theToApplyUnitFactor, @@ -823,10 +797,8 @@ Handle(Graphic3d_ArrayOfTriangles) Aspect_OpenVRSession::loadRenderModel( #endif } -// ======================================================================= -// function : EyeToHeadTransform -// purpose : -// ======================================================================= +//================================================================================================= + NCollection_Mat4 Aspect_OpenVRSession::EyeToHeadTransform(Aspect_Eye theEye) const { #ifdef HAVE_OPENVR @@ -849,10 +821,8 @@ NCollection_Mat4 Aspect_OpenVRSession::EyeToHeadTransform(Aspect_Eye the return NCollection_Mat4(); } -// ======================================================================= -// function : ProjectionMatrix -// purpose : -// ======================================================================= +//================================================================================================= + NCollection_Mat4 Aspect_OpenVRSession::ProjectionMatrix(Aspect_Eye theEye, double theZNear, double theZFar) const @@ -874,10 +844,8 @@ NCollection_Mat4 Aspect_OpenVRSession::ProjectionMatrix(Aspect_Eye theEy return NCollection_Mat4(); } -// ======================================================================= -// function : updateProjectionFrustums -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::updateProjectionFrustums() { #ifdef HAVE_OPENVR @@ -913,10 +881,8 @@ void Aspect_OpenVRSession::updateProjectionFrustums() #endif } -// ======================================================================= -// function : SetTrackingOrigin -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::SetTrackingOrigin(TrackingUniverseOrigin theOrigin) { #ifdef HAVE_OPENVR @@ -938,10 +904,8 @@ void Aspect_OpenVRSession::SetTrackingOrigin(TrackingUniverseOrigin theOrigin) myTrackOrigin = theOrigin; } -// ======================================================================= -// function : WaitPoses -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::WaitPoses() { #ifdef HAVE_OPENVR @@ -990,10 +954,8 @@ bool Aspect_OpenVRSession::WaitPoses() #endif } -// ======================================================================= -// function : GetDigitalActionData -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_XRDigitalActionData Aspect_OpenVRSession::GetDigitalActionData( const Handle(Aspect_XRAction)& theAction) const { @@ -1030,10 +992,8 @@ Aspect_XRDigitalActionData Aspect_OpenVRSession::GetDigitalActionData( return anActionData; } -// ======================================================================= -// function : GetAnalogActionData -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_XRAnalogActionData Aspect_OpenVRSession::GetAnalogActionData( const Handle(Aspect_XRAction)& theAction) const { @@ -1069,10 +1029,8 @@ Aspect_XRAnalogActionData Aspect_OpenVRSession::GetAnalogActionData( return anActionData; } -// ======================================================================= -// function : GetPoseActionDataForNextFrame -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_XRPoseActionData Aspect_OpenVRSession::GetPoseActionDataForNextFrame( const Handle(Aspect_XRAction)& theAction) const { @@ -1118,10 +1076,8 @@ Aspect_XRPoseActionData Aspect_OpenVRSession::GetPoseActionDataForNextFrame( return anActionData; } -// ======================================================================= -// function : triggerHapticVibrationAction -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::triggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, const Aspect_XRHapticActionData& theParams) { @@ -1160,10 +1116,8 @@ void Aspect_OpenVRSession::triggerHapticVibrationAction(const Handle(Aspect_XRAc #endif } -// ======================================================================= -// function : ProcessEvents -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::ProcessEvents() { #ifdef HAVE_OPENVR @@ -1247,37 +1201,29 @@ void Aspect_OpenVRSession::ProcessEvents() #endif } -// ======================================================================= -// function : onTrackedDeviceActivated -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::onTrackedDeviceActivated(Standard_Integer theDeviceIndex) { Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " attached"); } -// ======================================================================= -// function : onTrackedDeviceDeactivated -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::onTrackedDeviceDeactivated(Standard_Integer theDeviceIndex) { Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " detached"); } -// ======================================================================= -// function : onTrackedDeviceUpdated -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_OpenVRSession::onTrackedDeviceUpdated(Standard_Integer theDeviceIndex) { Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " updated"); } -// ======================================================================= -// function : SubmitEye -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_OpenVRSession::SubmitEye(void* theTexture, Aspect_GraphicsLibrary theGraphicsLib, Aspect_ColorSpace theColorSpace, diff --git a/src/Aspect/Aspect_SkydomeBackground.cxx b/src/Aspect/Aspect_SkydomeBackground.cxx index 081682836b..b4a3a603dd 100644 --- a/src/Aspect/Aspect_SkydomeBackground.cxx +++ b/src/Aspect/Aspect_SkydomeBackground.cxx @@ -17,10 +17,8 @@ #include -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_SkydomeBackground::Aspect_SkydomeBackground() : mySunDirection(0.0f, 1.0f, 0.0f), myCloudiness(0.2f), @@ -31,10 +29,8 @@ Aspect_SkydomeBackground::Aspect_SkydomeBackground() // } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_SkydomeBackground::Aspect_SkydomeBackground(const gp_Dir& theSunDirection, Standard_ShortReal theCloudiness, Standard_ShortReal theTime, @@ -57,19 +53,15 @@ Aspect_SkydomeBackground::Aspect_SkydomeBackground(const gp_Dir& theSunDire "Aspect_SkydomeBackground::Aspect_SkydomeBackground() theSize must be > 0"); } -// ======================================================================= -// function : ~Aspect_SkydomeBackground -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_SkydomeBackground::~Aspect_SkydomeBackground() { // } -// ======================================================================= -// function : SetCloudiness -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_SkydomeBackground::SetCloudiness(Standard_ShortReal theCloudiness) { Standard_RangeError_Raise_if( @@ -78,10 +70,8 @@ void Aspect_SkydomeBackground::SetCloudiness(Standard_ShortReal theCloudiness) myCloudiness = theCloudiness; } -// ======================================================================= -// function : SetFogginess -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_SkydomeBackground::SetFogginess(Standard_ShortReal theFogginess) { Standard_RangeError_Raise_if(theFogginess < 0, @@ -89,10 +79,8 @@ void Aspect_SkydomeBackground::SetFogginess(Standard_ShortReal theFogginess) myFogginess = theFogginess; } -// ======================================================================= -// function : SetSize -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_SkydomeBackground::SetSize(Standard_Integer theSize) { Standard_RangeError_Raise_if(theSize <= 0, @@ -100,10 +88,8 @@ void Aspect_SkydomeBackground::SetSize(Standard_Integer theSize) mySize = theSize; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_SkydomeBackground::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Aspect/Aspect_VKeySet.cxx b/src/Aspect/Aspect_VKeySet.cxx index 7f854853ff..48d7301a6d 100644 --- a/src/Aspect/Aspect_VKeySet.cxx +++ b/src/Aspect/Aspect_VKeySet.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_VKeySet, Standard_Transient) -// ================================================================ -// Function : As1pect_VKeySet -// Purpose : -// ================================================================ +//================================================================================================= + Aspect_VKeySet::Aspect_VKeySet() : myKeys(0, Aspect_VKey_MAX), myModifiers(Aspect_VKeyFlags_NONE) @@ -26,10 +24,8 @@ Aspect_VKeySet::Aspect_VKeySet() // } -// ================================================================ -// Function : Reset -// Purpose : -// ================================================================ +//================================================================================================= + void Aspect_VKeySet::Reset() { Standard_Mutex::Sentry aLock(myLock); @@ -40,10 +36,8 @@ void Aspect_VKeySet::Reset() } } -// ================================================================ -// Function : KeyDown -// Purpose : -// ================================================================ +//================================================================================================= + void Aspect_VKeySet::KeyDown(Aspect_VKey theKey, double theTime, double thePressure) { Standard_Mutex::Sentry aLock(myLock); @@ -58,10 +52,8 @@ void Aspect_VKeySet::KeyDown(Aspect_VKey theKey, double theTime, double thePress myModifiers = myModifiers | aModif; } -// ================================================================ -// Function : KeyUp -// Purpose : -// ================================================================ +//================================================================================================= + void Aspect_VKeySet::KeyUp(Aspect_VKey theKey, double theTime) { Standard_Mutex::Sentry aLock(myLock); @@ -78,10 +70,8 @@ void Aspect_VKeySet::KeyUp(Aspect_VKey theKey, double theTime) } } -// ================================================================ -// Function : KeyFromAxis -// Purpose : -// ================================================================ +//================================================================================================= + void Aspect_VKeySet::KeyFromAxis(Aspect_VKey theNegative, Aspect_VKey thePositive, double theTime, @@ -112,10 +102,8 @@ void Aspect_VKeySet::KeyFromAxis(Aspect_VKey theNegative, } } -// ================================================================ -// Function : HoldDuration -// Purpose : -// ================================================================ +//================================================================================================= + bool Aspect_VKeySet::HoldDuration(Aspect_VKey theKey, double theTime, double& theDuration, diff --git a/src/Aspect/Aspect_WindowInputListener.cxx b/src/Aspect/Aspect_WindowInputListener.cxx index 97233249be..fbb8f08ac9 100644 --- a/src/Aspect/Aspect_WindowInputListener.cxx +++ b/src/Aspect/Aspect_WindowInputListener.cxx @@ -15,10 +15,8 @@ #include -// ======================================================================= -// function : Aspect_WindowInputListener -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_WindowInputListener::Aspect_WindowInputListener() : myMousePressed(Aspect_VKeyMouse_NONE), myMouseModifiers(Aspect_VKeyFlags_NONE), @@ -33,37 +31,29 @@ Aspect_WindowInputListener::Aspect_WindowInputListener() myEventTimer.Start(); } -// ======================================================================= -// function : ~Aspect_WindowInputListener -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_WindowInputListener::~Aspect_WindowInputListener() { // } -// ======================================================================= -// function : KeyDown -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_WindowInputListener::KeyDown(Aspect_VKey theKey, double theTime, double thePressure) { myKeys.KeyDown(theKey, theTime, thePressure); } -// ======================================================================= -// function : KeyUp -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_WindowInputListener::KeyUp(Aspect_VKey theKey, double theTime) { myKeys.KeyUp(theKey, theTime); } -// ======================================================================= -// function : KeyFromAxis -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_WindowInputListener::KeyFromAxis(Aspect_VKey theNegative, Aspect_VKey thePositive, double theTime, @@ -72,10 +62,8 @@ void Aspect_WindowInputListener::KeyFromAxis(Aspect_VKey theNegative, myKeys.KeyFromAxis(theNegative, thePositive, theTime, thePressure); } -// ======================================================================= -// function : AddTouchPoint -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_WindowInputListener::AddTouchPoint(Standard_Size theId, const Graphic3d_Vec2d& thePnt, Standard_Boolean theClearBefore) @@ -88,10 +76,8 @@ void Aspect_WindowInputListener::AddTouchPoint(Standard_Size theId, myTouchPoints.Add(theId, Aspect_Touch(thePnt, false)); } -// ======================================================================= -// function : RemoveTouchPoint -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_WindowInputListener::RemoveTouchPoint(Standard_Size theId, Standard_Boolean theClearSelectPnts) { @@ -119,10 +105,8 @@ bool Aspect_WindowInputListener::RemoveTouchPoint(Standard_Size theId, return true; } -// ======================================================================= -// function : UpdateTouchPoint -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_WindowInputListener::UpdateTouchPoint(Standard_Size theId, const Graphic3d_Vec2d& thePnt) { @@ -136,10 +120,8 @@ void Aspect_WindowInputListener::UpdateTouchPoint(Standard_Size theId, } } -// ======================================================================= -// function : update3dMouseTranslation -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_WindowInputListener::update3dMouseTranslation(const WNT_HIDSpaceMouse& theEvent) { if (!theEvent.IsTranslation()) @@ -157,10 +139,8 @@ bool Aspect_WindowInputListener::update3dMouseTranslation(const WNT_HIDSpaceMous return true; } -// ======================================================================= -// function : update3dMouseRotation -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_WindowInputListener::update3dMouseRotation(const WNT_HIDSpaceMouse& theEvent) { if (!theEvent.IsRotation()) @@ -199,10 +179,8 @@ bool Aspect_WindowInputListener::update3dMouseRotation(const WNT_HIDSpaceMouse& return toUpdate; } -// ======================================================================= -// function : update3dMouseKeys -// purpose : -// ======================================================================= +//================================================================================================= + bool Aspect_WindowInputListener::update3dMouseKeys(const WNT_HIDSpaceMouse& theEvent) { bool toUpdate = false; diff --git a/src/Aspect/Aspect_XRSession.cxx b/src/Aspect/Aspect_XRSession.cxx index b4b05a843e..492293376c 100644 --- a/src/Aspect/Aspect_XRSession.cxx +++ b/src/Aspect/Aspect_XRSession.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRSession, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRAction, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRActionSet, Standard_Transient) -// ======================================================================= -// function : Aspect_XRSession -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_XRSession::Aspect_XRSession() : myTrackOrigin(TrackingUniverseOrigin_Standing), myTrackedPoses(0, 0), @@ -36,19 +34,15 @@ Aspect_XRSession::Aspect_XRSession() } } -// ======================================================================= -// function : AbortHapticVibrationAction -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_XRSession::AbortHapticVibrationAction(const Handle(Aspect_XRAction)& theAction) { triggerHapticVibrationAction(theAction, Aspect_XRHapticActionData()); } -// ======================================================================= -// function : TriggerHapticVibrationAction -// purpose : -// ======================================================================= +//================================================================================================= + void Aspect_XRSession::TriggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, const Aspect_XRHapticActionData& theParams) { diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx index 5f0f512ee8..152462b920 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx @@ -41,10 +41,8 @@ #include #include -// ================================================================================ -// function: Constructor -// purpose: -// ================================================================================ +//================================================================================================= + BOPAlgo_ArgumentAnalyzer::BOPAlgo_ArgumentAnalyzer() : BOPAlgo_Algo(), myStopOnFirst(Standard_False), @@ -70,64 +68,50 @@ BOPAlgo_ArgumentAnalyzer::~BOPAlgo_ArgumentAnalyzer() myResult.Clear(); } -// ================================================================================ -// function: SetShape1 -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::SetShape1(const TopoDS_Shape& TheShape) { myShape1 = TheShape; } -// ================================================================================ -// function: SetShape2 -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::SetShape2(const TopoDS_Shape& TheShape) { myShape2 = TheShape; } -// ================================================================================ -// function: GetShape1 -// purpose: -// ================================================================================ +//================================================================================================= + const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape1() const { return myShape1; } -// ================================================================================ -// function: GetShape2 -// purpose: -// ================================================================================ +//================================================================================================= + const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape2() const { return myShape2; } -// ================================================================================ -// function: OperationType -// purpose: -// ================================================================================ +//================================================================================================= + BOPAlgo_Operation& BOPAlgo_ArgumentAnalyzer::OperationType() { return myOperation; } -// ================================================================================ -// function: StopOnFirstFaulty -// purpose: -// ================================================================================ +//================================================================================================= + Standard_Boolean& BOPAlgo_ArgumentAnalyzer::StopOnFirstFaulty() { return myStopOnFirst; } -// ================================================================================ -// function: Prepare -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::Prepare() { Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull(); @@ -141,10 +125,8 @@ void BOPAlgo_ArgumentAnalyzer::Prepare() } } -// ================================================================================ -// function: Perform -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange) { Message_ProgressScope aPS(theRange, "Analyze shapes", 10); @@ -262,28 +244,22 @@ void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange) } } -// ================================================================================ -// function: HasFaulty -// purpose: -// ================================================================================ +//================================================================================================= + Standard_Boolean BOPAlgo_ArgumentAnalyzer::HasFaulty() const { return (!myResult.IsEmpty()); } -// ================================================================================ -// function: GetCheckResult -// purpose: -// ================================================================================ +//================================================================================================= + const BOPAlgo_ListOfCheckResult& BOPAlgo_ArgumentAnalyzer::GetCheckResult() const { return myResult; } -// ================================================================================ -// function: TestTypes -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestTypes() { Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull(); @@ -448,10 +424,8 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange } // for(ii = 0; ii < 2; ii++) { } -// ================================================================================ -// function: TestSmallEdge -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestSmallEdge() { Standard_Integer i = 0; @@ -570,10 +544,8 @@ void BOPAlgo_ArgumentAnalyzer::TestSmallEdge() } } -// ================================================================================ -// function: TestRebuildFace -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestRebuildFace() { if ((myOperation == BOPAlgo_SECTION) || (myOperation == BOPAlgo_UNKNOWN)) @@ -671,19 +643,15 @@ void BOPAlgo_ArgumentAnalyzer::TestRebuildFace() } } -// ================================================================================ -// function: TestTangent -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestTangent() { // not implemented } -// ================================================================================ -// function: TestMergeSubShapes -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestMergeSubShapes(const TopAbs_ShapeEnum theType) { if (myShape1.IsNull() || myShape2.IsNull()) @@ -869,28 +837,22 @@ void BOPAlgo_ArgumentAnalyzer::TestMergeSubShapes(const TopAbs_ShapeEnum theType } } -// ================================================================================ -// function: TestMergeVertex -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestMergeVertex() { TestMergeSubShapes(TopAbs_VERTEX); } -// ================================================================================ -// function: TestMergeEdge -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestMergeEdge() { TestMergeSubShapes(TopAbs_EDGE); } -// ================================================================================ -// function: TestContinuity -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestContinuity() { Standard_Integer i, j, aNbS; @@ -955,10 +917,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity() } } -// ================================================================================ -// function: TestCurveOnSurface -// purpose: -// ================================================================================ +//================================================================================================= + void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface() { Standard_Integer i; diff --git a/src/BRepExtrema/BRepExtrema_OverlapTool.cxx b/src/BRepExtrema/BRepExtrema_OverlapTool.cxx index dcebacb10b..62a867b0c2 100644 --- a/src/BRepExtrema/BRepExtrema_OverlapTool.cxx +++ b/src/BRepExtrema/BRepExtrema_OverlapTool.cxx @@ -164,10 +164,8 @@ public: } }; -// ======================================================================= -// function : sign -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real sign(const BVH_Vec3d& theVertex0, const BVH_Vec3d& theVertex1, const BVH_Vec3d& theVertex2, @@ -178,10 +176,8 @@ Standard_Real sign(const BVH_Vec3d& theVertex0, - (theVertex1[theX] - theVertex2[theX]) * (theVertex0[theY] - theVertex2[theY]); } -// ======================================================================= -// function : pointInTriangle -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean pointInTriangle(const BVH_Vec3d& theTestPnt, const BVH_Vec3d& theTrgVtx0, const BVH_Vec3d& theTrgVtx1, diff --git a/src/BRepExtrema/BRepExtrema_SelfIntersection.cxx b/src/BRepExtrema/BRepExtrema_SelfIntersection.cxx index 647972016b..f18ea9bd60 100644 --- a/src/BRepExtrema/BRepExtrema_SelfIntersection.cxx +++ b/src/BRepExtrema/BRepExtrema_SelfIntersection.cxx @@ -99,10 +99,8 @@ Standard_Boolean rayInsideAngle(const BVH_Vec3d& theDirec, && ccw(ZERO_VEC, theDirec, theEdge1, theX, theY) == aCCW; } -// ======================================================================= -// function : getProjectionAxes -// purpose : -// ======================================================================= +//================================================================================================= + void getProjectionAxes(const BVH_Vec3d& theNorm, Standard_Integer& theAxisX, Standard_Integer& theAxisY) diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index 8df23683f2..8b930898ff 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -189,10 +189,8 @@ static void UpdateSectionEdge(TopoDS_Edge& theEdge, TopoDS_Vertex& theVertex, const Standard_Real theParam); -// =========================================================================================== -// function: Constructor -// purpose: -// =========================================================================================== +//================================================================================================= + BRepFill_TrimShellCorner::BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, const BRepFill_TransitionStyle theTransition, const gp_Ax2& theAxeOfBisPlane, @@ -210,10 +208,8 @@ BRepFill_TrimShellCorner::BRepFill_TrimShellCorner(const Handle(TopTools_HArray2 myFaces->ChangeArray2() = theFaces->Array2(); } -// =========================================================================================== -// function: AddBounds -// purpose: -// =========================================================================================== +//================================================================================================= + void BRepFill_TrimShellCorner::AddBounds(const Handle(TopTools_HArray2OfShape)& theBounds) { myBounds = new TopTools_HArray2OfShape(theBounds->LowerRow(), @@ -223,10 +219,8 @@ void BRepFill_TrimShellCorner::AddBounds(const Handle(TopTools_HArray2OfShape)& myBounds->ChangeArray2() = theBounds->Array2(); } -// =========================================================================================== -// function: AddUEdges -// purpose: -// =========================================================================================== +//================================================================================================= + void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)& theUEdges) { myUEdges = new TopTools_HArray2OfShape(theUEdges->LowerRow(), @@ -236,10 +230,8 @@ void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)& myUEdges->ChangeArray2() = theUEdges->Array2(); } -// =========================================================================================== -// function: AddVEdges -// purpose: -// =========================================================================================== +//================================================================================================= + void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)& theVEdges, const Standard_Integer theIndex) { @@ -249,10 +241,8 @@ void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)& myVEdges->SetValue(i, theVEdges->Value(i, theIndex)); } -// =========================================================================================== -// function: Perform -// purpose: -// =========================================================================================== +//================================================================================================= + void BRepFill_TrimShellCorner::Perform() { Standard_Integer anIndex1, anIndex2, nF1, nF2, i, j, aNbP, aNbC; @@ -395,28 +385,22 @@ void BRepFill_TrimShellCorner::Perform() myDone = Standard_True; } -// =========================================================================================== -// function: IsDone -// purpose: -// =========================================================================================== +//================================================================================================= + Standard_Boolean BRepFill_TrimShellCorner::IsDone() const { return myDone; } -// =========================================================================================== -// function: HasSection -// purpose: -// =========================================================================================== +//================================================================================================= + Standard_Boolean BRepFill_TrimShellCorner::HasSection() const { return myHasSection; } -// =========================================================================================== -// function: Modified -// purpose: -// =========================================================================================== +//================================================================================================= + void BRepFill_TrimShellCorner::Modified(const TopoDS_Shape& theShape, TopTools_ListOfShape& theModified) { diff --git a/src/BRepLib/BRepLib_PointCloudShape.cxx b/src/BRepLib/BRepLib_PointCloudShape.cxx index fc8ff3dd76..de4197b16f 100644 --- a/src/BRepLib/BRepLib_PointCloudShape.cxx +++ b/src/BRepLib/BRepLib_PointCloudShape.cxx @@ -30,10 +30,8 @@ #include -// ======================================================================= -// function : BRepLib_PointCloudShape -// purpose : -// ======================================================================= +//================================================================================================= + BRepLib_PointCloudShape::BRepLib_PointCloudShape(const TopoDS_Shape& theShape, const Standard_Real theTol) : myShape(theShape), @@ -44,19 +42,15 @@ BRepLib_PointCloudShape::BRepLib_PointCloudShape(const TopoDS_Shape& theShape, // } -// ======================================================================= -// function : ~BRepLib_PointCloudShape -// purpose : -// ======================================================================= +//================================================================================================= + BRepLib_PointCloudShape::~BRepLib_PointCloudShape() { // } -// ======================================================================= -// function : NbPointsByDensity -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity(const Standard_Real theDensity) { clear(); @@ -78,10 +72,8 @@ Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity(const Standard_Real return aNbPoints; } -// ======================================================================= -// function : GeneratePointsByDensity -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity(const Standard_Real theDensity) { if (myFacePoints.IsEmpty()) @@ -103,10 +95,8 @@ Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity(const Standard return (aNbAdded > 0); } -// ======================================================================= -// function : GeneratePointsByTriangulation -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation() { clear(); @@ -122,10 +112,8 @@ Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation() return (aNbAdded > 0); } -// ======================================================================= -// function : faceArea -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real BRepLib_PointCloudShape::faceArea(const TopoDS_Shape& theShape) { Standard_Real anArea = 0.0; @@ -141,10 +129,8 @@ Standard_Real BRepLib_PointCloudShape::faceArea(const TopoDS_Shape& theShape) return anArea; } -// ======================================================================= -// function : computeDensity -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real BRepLib_PointCloudShape::computeDensity() { // at first step find the face with smallest area @@ -165,10 +151,8 @@ Standard_Real BRepLib_PointCloudShape::computeDensity() return anAreaMin * 0.1; } -// ======================================================================= -// function : NbPointsByTriangulation -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const { // at first step find the face with smallest area @@ -188,10 +172,8 @@ Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const return aNbPoints; } -// ======================================================================= -// function : addDensityPoints -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean BRepLib_PointCloudShape::addDensityPoints(const TopoDS_Shape& theFace) { // addition of the points with specified density on the face by random way @@ -261,10 +243,8 @@ Standard_Boolean BRepLib_PointCloudShape::addDensityPoints(const TopoDS_Shape& t return Standard_True; } -// ======================================================================= -// function : addTriangulationPoints -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints(const TopoDS_Shape& theFace) { TopLoc_Location aLoc; @@ -297,10 +277,8 @@ Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints(const TopoDS_Sh return Standard_True; } -// ======================================================================= -// function : clear -// purpose : -// ======================================================================= +//================================================================================================= + void BRepLib_PointCloudShape::clear() { myFaceArea.Clear(); diff --git a/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx index d847604515..dccbfdd048 100644 --- a/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx +++ b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx @@ -22,10 +22,8 @@ #include #include -// ======================================================================= -// function : ComputeNormals -// purpose : -// ======================================================================= +//================================================================================================= + void BRepLib_ToolTriangulatedShape::ComputeNormals(const TopoDS_Face& theFace, const Handle(Poly_Triangulation)& theTris, Poly_Connect& thePolyConnect) diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx index df3a331e2f..16371015be 100644 --- a/src/BRepMesh/BRepMesh_Delaun.cxx +++ b/src/BRepMesh/BRepMesh_Delaun.cxx @@ -2501,10 +2501,8 @@ Standard_Real BRepMesh_Delaun::polyArea(const IMeshData::SequenceOfInteger& theP } #ifdef OCCT_DEBUG - //======================================================================= - // function : BRepMesh_DumpPoly - // purpose : - //======================================================================= +//================================================================================================= + #include #include #include diff --git a/src/BVH/BVH_Properties.cxx b/src/BVH/BVH_Properties.cxx index ff84b40dbf..bcc3edb3ed 100644 --- a/src/BVH/BVH_Properties.cxx +++ b/src/BVH/BVH_Properties.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(BVH_Properties, Standard_Transient) -// ======================================================================= -// function : ~BVH_Properties -// purpose : -// ======================================================================= +//================================================================================================= + BVH_Properties::~BVH_Properties() { // diff --git a/src/Bnd/Bnd_OBB.cxx b/src/Bnd/Bnd_OBB.cxx index 180ac9ea0c..5199f43bb9 100644 --- a/src/Bnd/Bnd_OBB.cxx +++ b/src/Bnd/Bnd_OBB.cxx @@ -814,10 +814,8 @@ void Bnd_OBB::ReBuild(const TColgp_Array1OfPnt& theListOfPoints, aTool.BuildBox(*this); } -// ======================================================================= -// function : IsOut -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Bnd_OBB::IsOut(const Bnd_OBB& theOther) const { if (IsVoid() || theOther.IsVoid()) @@ -919,10 +917,8 @@ Standard_Boolean Bnd_OBB::IsOut(const Bnd_OBB& theOther) const return Standard_False; } -// ======================================================================= -// function : IsOut -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Bnd_OBB::IsOut(const gp_Pnt& theP) const { // 1. Project the point to myAxes[i] (i=0...2). @@ -956,10 +952,8 @@ Standard_Boolean Bnd_OBB::IsCompletelyInside(const Bnd_OBB& theOther) const return Standard_True; } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void Bnd_OBB::Add(const gp_Pnt& theP) { if (IsVoid()) @@ -982,10 +976,8 @@ void Bnd_OBB::Add(const gp_Pnt& theP) } } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void Bnd_OBB::Add(const Bnd_OBB& theOther) { if (!theOther.IsVoid()) diff --git a/src/Bnd/Bnd_Range.cxx b/src/Bnd/Bnd_Range.cxx index 3cd0b73c51..fa8eac9053 100644 --- a/src/Bnd/Bnd_Range.cxx +++ b/src/Bnd/Bnd_Range.cxx @@ -166,10 +166,8 @@ void Bnd_Range::Split(const Standard_Real theVal, } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Bnd_Range::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_CLASS_BEGIN(theOStream, Bnd_Range) diff --git a/src/D3DHost/D3DHost_FrameBuffer.cxx b/src/D3DHost/D3DHost_FrameBuffer.cxx index cf8bff9f06..b99c650a97 100644 --- a/src/D3DHost/D3DHost_FrameBuffer.cxx +++ b/src/D3DHost/D3DHost_FrameBuffer.cxx @@ -25,10 +25,8 @@ IMPLEMENT_STANDARD_RTTIEXT(D3DHost_FrameBuffer, OpenGl_FrameBuffer) -// ======================================================================= -// function : D3DHost_FrameBuffer -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_FrameBuffer::D3DHost_FrameBuffer() : myD3dSurf(NULL), myD3dSurfShare(NULL), @@ -41,19 +39,15 @@ D3DHost_FrameBuffer::D3DHost_FrameBuffer() // } -// ======================================================================= -// function : ~D3DHost_FrameBuffer -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_FrameBuffer::~D3DHost_FrameBuffer() { Release(NULL); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_FrameBuffer::Release(OpenGl_Context* theCtx) { if (myGlD3dDevice != NULL) @@ -86,10 +80,8 @@ void D3DHost_FrameBuffer::Release(OpenGl_Context* theCtx) OpenGl_FrameBuffer::Release(theCtx); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean D3DHost_FrameBuffer::Init(const Handle(OpenGl_Context)& theCtx, IDirect3DDevice9* theD3DDevice, const Standard_Boolean theIsD3dEx, @@ -103,10 +95,8 @@ Standard_Boolean D3DHost_FrameBuffer::Init(const Handle(OpenGl_Context)& theCtx, return InitD3dFallback(theCtx, theD3DDevice, theIsD3dEx, theSizeX, theSizeY, GL_DEPTH24_STENCIL8); } -// ======================================================================= -// function : InitD3dFallback -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean D3DHost_FrameBuffer::InitD3dFallback(const Handle(OpenGl_Context)& theCtx, IDirect3DDevice9* theD3DDevice, const Standard_Boolean theIsD3dEx, @@ -146,10 +136,8 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dFallback(const Handle(OpenGl_Contex return isGlInit; } -// ======================================================================= -// function : InitD3dInterop -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop(const Handle(OpenGl_Context)& theCtx, IDirect3DDevice9* theD3DDevice, const Standard_Boolean theIsD3dEx, @@ -248,10 +236,8 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop(const Handle(OpenGl_Context return Standard_True; } -// ======================================================================= -// function : registerD3dBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer(const Handle(OpenGl_Context)& theCtx) { const OpenGl_GlFunctions* aFuncs = theCtx->Functions(); @@ -302,10 +288,8 @@ Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer(const Handle(OpenGl_Cont return Standard_True; } -// ======================================================================= -// function : BindBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theCtx) { Standard_ProgramError_Raise_if( @@ -376,10 +360,8 @@ void D3DHost_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theCtx) } } -// ======================================================================= -// function : LockSurface -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_FrameBuffer::LockSurface(const Handle(OpenGl_Context)& theCtx) { if (++myLockCount > 1) @@ -402,10 +384,8 @@ void D3DHost_FrameBuffer::LockSurface(const Handle(OpenGl_Context)& theCtx) } } -// ======================================================================= -// function : UnlockSurface -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_FrameBuffer::UnlockSurface(const Handle(OpenGl_Context)& theCtx) { if (--myLockCount != 0) diff --git a/src/D3DHost/D3DHost_GraphicDriver.cxx b/src/D3DHost/D3DHost_GraphicDriver.cxx index 5e31c4942f..f7f3905116 100644 --- a/src/D3DHost/D3DHost_GraphicDriver.cxx +++ b/src/D3DHost/D3DHost_GraphicDriver.cxx @@ -24,29 +24,23 @@ IMPLEMENT_STANDARD_RTTIEXT(D3DHost_GraphicDriver, OpenGl_GraphicDriver) #pragma comment(lib, "D3D9.lib") #endif -// ======================================================================= -// function : D3DHost_GraphicDriver -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_GraphicDriver::D3DHost_GraphicDriver() : OpenGl_GraphicDriver(Handle(Aspect_DisplayConnection)(), Standard_True) { // } -// ======================================================================= -// function : ~D3DHost_GraphicDriver -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_GraphicDriver::~D3DHost_GraphicDriver() { // } -// ======================================================================= -// function : CreateView -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_CView) D3DHost_GraphicDriver::CreateView( const Handle(Graphic3d_StructureManager)& theMgr) { diff --git a/src/D3DHost/D3DHost_GraphicDriverFactory.cxx b/src/D3DHost/D3DHost_GraphicDriverFactory.cxx index d17f3b936f..abffa64de1 100644 --- a/src/D3DHost/D3DHost_GraphicDriverFactory.cxx +++ b/src/D3DHost/D3DHost_GraphicDriverFactory.cxx @@ -17,19 +17,15 @@ IMPLEMENT_STANDARD_RTTIEXT(D3DHost_GraphicDriverFactory, OpenGl_GraphicDriverFactory) -// ======================================================================= -// function : D3DHost_GraphicDriverFactory -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_GraphicDriverFactory::D3DHost_GraphicDriverFactory() { myName = "TKD3DHost"; } -// ======================================================================= -// function : CreateDriver -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_GraphicDriver) D3DHost_GraphicDriverFactory::CreateDriver( const Handle(Aspect_DisplayConnection)&) { diff --git a/src/D3DHost/D3DHost_View.cxx b/src/D3DHost/D3DHost_View.cxx index bd7a9bf19d..e7da82079d 100644 --- a/src/D3DHost/D3DHost_View.cxx +++ b/src/D3DHost/D3DHost_View.cxx @@ -35,10 +35,8 @@ enum D3DHost_VendorId }; } // namespace -// ======================================================================= -// function : d3dFormatError -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString D3DHost_View::d3dFormatError(const long theErrCode) { switch (theErrCode) @@ -60,10 +58,8 @@ TCollection_AsciiString D3DHost_View::d3dFormatError(const long theErrCode) } } -// ======================================================================= -// function : D3DHost_View -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_View::D3DHost_View(const Handle(Graphic3d_StructureManager)& theMgr, const Handle(D3DHost_GraphicDriver)& theDriver, const Handle(OpenGl_Caps)& theCaps, @@ -89,10 +85,8 @@ D3DHost_View::D3DHost_View(const Handle(Graphic3d_StructureManager)& theMgr, myD3dParams->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; } -// ======================================================================= -// function : ~D3DHost_View -// purpose : -// ======================================================================= +//================================================================================================= + D3DHost_View::~D3DHost_View() { ReleaseGlResources(NULL); @@ -108,10 +102,8 @@ D3DHost_View::~D3DHost_View() } } -// ======================================================================= -// function : ReleaseGlResources -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx) { if (!myD3dWglFbo.IsNull()) @@ -122,19 +114,15 @@ void D3DHost_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx) OpenGl_View::ReleaseGlResources(theCtx); } -// ======================================================================= -// function : D3dColorSurface -// purpose : -// ======================================================================= +//================================================================================================= + IDirect3DSurface9* D3DHost_View::D3dColorSurface() const { return myD3dWglFbo->D3dColorSurface(); } -// ======================================================================= -// function : SetWindow -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew, const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) @@ -159,10 +147,8 @@ void D3DHost_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew, } } -// ======================================================================= -// function : DiagnosticInformation -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& theDict, Graphic3d_DiagnosticInfo theFlags) const { @@ -210,10 +196,8 @@ void D3DHost_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& t : "WGL_NV_DX_interop"); } -// ======================================================================= -// function : d3dInitLib -// purpose : -// ======================================================================= +//================================================================================================= + bool D3DHost_View::d3dInitLib() { if (myD3dLib == NULL) @@ -242,10 +226,8 @@ bool D3DHost_View::d3dInitLib() return myD3dLib != NULL; } -// ======================================================================= -// function : d3dInit -// purpose : -// ======================================================================= +//================================================================================================= + bool D3DHost_View::d3dInit() { if (!d3dInitLib()) @@ -289,10 +271,8 @@ bool D3DHost_View::d3dInit() return myD3dDevice != NULL; } -// ======================================================================= -// function : d3dReset -// purpose : -// ======================================================================= +//================================================================================================= + bool D3DHost_View::d3dReset() { if (myD3dDevice == NULL) @@ -310,10 +290,8 @@ bool D3DHost_View::d3dReset() return isOK == D3D_OK; } -// ======================================================================= -// function : d3dCreateRenderTarget -// purpose : -// ======================================================================= +//================================================================================================= + bool D3DHost_View::d3dCreateRenderTarget() { bool toD3dFallback = false; @@ -355,10 +333,8 @@ bool D3DHost_View::d3dCreateRenderTarget() return true; } -// ======================================================================= -// function : d3dBeginRender -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::d3dBeginRender() { if (myD3dDevice == NULL) @@ -371,10 +347,8 @@ void D3DHost_View::d3dBeginRender() myD3dDevice->BeginScene(); } -// ======================================================================= -// function : d3dEndRender -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::d3dEndRender() { if (myD3dDevice != NULL) @@ -383,10 +357,8 @@ void D3DHost_View::d3dEndRender() } } -// ======================================================================= -// function : d3dSwap -// purpose : -// ======================================================================= +//================================================================================================= + bool D3DHost_View::d3dSwap() { if (myD3dDevice == NULL) @@ -407,10 +379,8 @@ bool D3DHost_View::d3dSwap() return isOK == D3D_OK; } -// ======================================================================= -// function : Redraw -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::Redraw() { if (!myWorkspace->Activate() || myD3dDevice == NULL) @@ -470,10 +440,8 @@ void D3DHost_View::Redraw() d3dSwap(); } -// ======================================================================= -// function : RedrawImmediate -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::RedrawImmediate() { Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext(); @@ -520,10 +488,8 @@ void D3DHost_View::RedrawImmediate() d3dSwap(); } -// ======================================================================= -// function : Resize -// purpose : -// ======================================================================= +//================================================================================================= + void D3DHost_View::Resized() { const Standard_Integer aWidthOld = myWindow->Width(); diff --git a/src/D3DHostTest/D3DHostTest.cxx b/src/D3DHostTest/D3DHostTest.cxx index 8f70c5d5f1..a693356092 100644 --- a/src/D3DHostTest/D3DHostTest.cxx +++ b/src/D3DHostTest/D3DHostTest.cxx @@ -16,10 +16,8 @@ #include #include -// ====================================================================== -// function : Factory -// purpose : -// ====================================================================== +//================================================================================================= + void D3DHostTest::Factory(Draw_Interpretor&) { static const Handle(D3DHost_GraphicDriverFactory) aFactory = new D3DHost_GraphicDriverFactory(); diff --git a/src/DsgPrs/DsgPrs_DatumPrs.cxx b/src/DsgPrs/DsgPrs_DatumPrs.cxx index c3eede0b5b..8d60195311 100644 --- a/src/DsgPrs/DsgPrs_DatumPrs.cxx +++ b/src/DsgPrs/DsgPrs_DatumPrs.cxx @@ -21,10 +21,8 @@ #include #include -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void DsgPrs_DatumPrs::Add(const Handle(Prs3d_Presentation)& thePresentation, const gp_Ax2& theDatum, const Handle(Prs3d_Drawer)& theDrawer) diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index 729139bc8c..d130cbab5f 100644 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -129,10 +129,8 @@ Extrema_GenExtCS::Extrema_GenExtCS() { } -// ======================================================================= -// function : ~Extrema_GenExtCS -// purpose : -// ======================================================================= +//================================================================================================= + Extrema_GenExtCS::~Extrema_GenExtCS() { // diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 4b0317fc96..4ea2424d91 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -215,19 +215,15 @@ Extrema_GenExtPS::Extrema_GenExtPS() myAlgo = Extrema_ExtAlgo_Grad; } -// ======================================================================= -// function : ~Extrema_GenExtPS -// purpose : -// ======================================================================= +//================================================================================================= + Extrema_GenExtPS::~Extrema_GenExtPS() { // } -// ======================================================================= -// function : Extrema_GenExtPS -// purpose : -// ======================================================================= +//================================================================================================= + Extrema_GenExtPS::Extrema_GenExtPS(const gp_Pnt& P, const Adaptor3d_Surface& S, const Standard_Integer NbU, diff --git a/src/Extrema/Extrema_GenExtSS.cxx b/src/Extrema/Extrema_GenExtSS.cxx index 73f36e626b..91c58dd5fc 100644 --- a/src/Extrema/Extrema_GenExtSS.cxx +++ b/src/Extrema/Extrema_GenExtSS.cxx @@ -111,10 +111,8 @@ Extrema_GenExtSS::Extrema_GenExtSS() myInit = Standard_False; } -// ======================================================================= -// function : ~Extrema_GenExtSS -// purpose : -// ======================================================================= +//================================================================================================= + Extrema_GenExtSS::~Extrema_GenExtSS() { // diff --git a/src/Font/Font_FTFont.cxx b/src/Font/Font_FTFont.cxx index 737d8f200a..5dfc7d9b81 100755 --- a/src/Font/Font_FTFont.cxx +++ b/src/Font/Font_FTFont.cxx @@ -30,10 +30,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Font_FTFont, Standard_Transient) -// ======================================================================= -// function : Font_FTFont -// purpose : -// ======================================================================= +//================================================================================================= + Font_FTFont::Font_FTFont(const Handle(Font_FTLibrary)& theFTLib) : myFTLib(theFTLib), myFTFace(NULL), @@ -54,19 +52,15 @@ Font_FTFont::Font_FTFont(const Handle(Font_FTLibrary)& theFTLib) } } -// ======================================================================= -// function : Font_FTFont -// purpose : -// ======================================================================= +//================================================================================================= + Font_FTFont::~Font_FTFont() { Release(); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void Font_FTFont::Release() { myGlyphImg.Clear(); @@ -83,10 +77,8 @@ void Font_FTFont::Release() myBuffer.Nullify(); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::Init(const Handle(NCollection_Buffer)& theData, const TCollection_AsciiString& theFileName, const Font_FTFontParams& theParams, @@ -200,10 +192,8 @@ bool Font_FTFont::Init(const Handle(NCollection_Buffer)& theData, #endif } -// ======================================================================= -// function : FindAndCreate -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Font_FTFont) Font_FTFont::FindAndCreate(const TCollection_AsciiString& theFontName, const Font_FontAspect theFontAspect, const Font_FTFontParams& theParams, @@ -257,10 +247,8 @@ Handle(Font_FTFont) Font_FTFont::FindAndCreate(const TCollection_AsciiString& th return Handle(Font_FTFont)(); } -// ======================================================================= -// function : FindAndInit -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::FindAndInit(const TCollection_AsciiString& theFontName, Font_FontAspect theFontAspect, const Font_FTFontParams& theParams, @@ -296,10 +284,8 @@ bool Font_FTFont::FindAndInit(const TCollection_AsciiString& theFontName, return false; } -// ======================================================================= -// function : findAndInitFallback -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::findAndInitFallback(Font_UnicodeSubset theSubset) { if (!myFallbackFaces[theSubset].IsNull()) @@ -331,10 +317,8 @@ bool Font_FTFont::findAndInitFallback(Font_UnicodeSubset theSubset) return myFallbackFaces[theSubset]->IsValid(); } -// ======================================================================= -// function : HasSymbol -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::HasSymbol(Standard_Utf32Char theUChar) const { #ifdef HAVE_FREETYPE @@ -345,10 +329,8 @@ bool Font_FTFont::HasSymbol(Standard_Utf32Char theUChar) const #endif } -// ======================================================================= -// function : loadGlyph -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::loadGlyph(const Standard_Utf32Char theUChar) { if (myUChar == theUChar) @@ -388,10 +370,8 @@ bool Font_FTFont::loadGlyph(const Standard_Utf32Char theUChar) #endif } -// ======================================================================= -// function : RenderGlyph -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::RenderGlyph(const Standard_Utf32Char theUChar) { myGlyphImg.Clear(); @@ -466,10 +446,8 @@ bool Font_FTFont::RenderGlyph(const Standard_Utf32Char theUChar) #endif } -// ======================================================================= -// function : GlyphMaxSizeX -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int Font_FTFont::GlyphMaxSizeX(bool theToIncludeFallback) const { #ifdef HAVE_FREETYPE @@ -500,10 +478,8 @@ unsigned int Font_FTFont::GlyphMaxSizeX(bool theToIncludeFallback) const #endif } -// ======================================================================= -// function : GlyphMaxSizeY -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int Font_FTFont::GlyphMaxSizeY(bool theToIncludeFallback) const { #ifdef HAVE_FREETYPE @@ -534,10 +510,8 @@ unsigned int Font_FTFont::GlyphMaxSizeY(bool theToIncludeFallback) const #endif } -// ======================================================================= -// function : Ascender -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::Ascender() const { #ifdef HAVE_FREETYPE @@ -548,10 +522,8 @@ float Font_FTFont::Ascender() const #endif } -// ======================================================================= -// function : Descender -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::Descender() const { #ifdef HAVE_FREETYPE @@ -562,10 +534,8 @@ float Font_FTFont::Descender() const #endif } -// ======================================================================= -// function : LineSpacing -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::LineSpacing() const { #ifdef HAVE_FREETYPE @@ -576,30 +546,24 @@ float Font_FTFont::LineSpacing() const #endif } -// ======================================================================= -// function : AdvanceX -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::AdvanceX(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext) { loadGlyph(theUChar); return AdvanceX(theUCharNext); } -// ======================================================================= -// function : AdvanceY -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::AdvanceY(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext) { loadGlyph(theUChar); return AdvanceY(theUCharNext); } -// ======================================================================= -// function : getKerning -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FTFont::getKerning(FT_Vector& theKern, Standard_Utf32Char theUCharCurr, Standard_Utf32Char theUCharNext) const @@ -628,10 +592,8 @@ bool Font_FTFont::getKerning(FT_Vector& theKern, return false; } -// ======================================================================= -// function : AdvanceX -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::AdvanceX(Standard_Utf32Char theUCharNext) const { if (myUChar == 0) @@ -652,10 +614,8 @@ float Font_FTFont::AdvanceX(Standard_Utf32Char theUCharNext) const #endif } -// ======================================================================= -// function : AdvanceY -// purpose : -// ======================================================================= +//================================================================================================= + float Font_FTFont::AdvanceY(Standard_Utf32Char theUCharNext) const { if (myUChar == 0) @@ -673,10 +633,8 @@ float Font_FTFont::AdvanceY(Standard_Utf32Char theUCharNext) const #endif } -// ======================================================================= -// function : GlyphsNumber -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Font_FTFont::GlyphsNumber(bool theToIncludeFallback) const { #ifdef HAVE_FREETYPE @@ -698,10 +656,8 @@ Standard_Integer Font_FTFont::GlyphsNumber(bool theToIncludeFallback) const #endif } -// ======================================================================= -// function : GlyphRect -// purpose : -// ======================================================================= +//================================================================================================= + void Font_FTFont::GlyphRect(Font_Rect& theRect) const { #ifdef HAVE_FREETYPE @@ -715,10 +671,8 @@ void Font_FTFont::GlyphRect(Font_Rect& theRect) const #endif } -// ======================================================================= -// function : BoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + Font_Rect Font_FTFont::BoundingBox(const NCollection_String& theString, const Graphic3d_HorizontalTextAlignment theAlignX, const Graphic3d_VerticalTextAlignment theAlignY) @@ -735,10 +689,8 @@ Font_Rect Font_FTFont::BoundingBox(const NCollection_String& theSt return aBndBox; } -// ======================================================================= -// function : renderGlyphOutline -// purpose : -// ======================================================================= +//================================================================================================= + const FT_Outline* Font_FTFont::renderGlyphOutline(const Standard_Utf32Char theChar) { #ifdef HAVE_FREETYPE diff --git a/src/Font/Font_FTLibrary.cxx b/src/Font/Font_FTLibrary.cxx index b9103bf490..b8ac4e89d2 100755 --- a/src/Font/Font_FTLibrary.cxx +++ b/src/Font/Font_FTLibrary.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Font_FTLibrary, Standard_Transient) -// ======================================================================= -// function : Font_FTLibrary -// purpose : -// ======================================================================= +//================================================================================================= + Font_FTLibrary::Font_FTLibrary() : myFTLib(NULL) { @@ -37,10 +35,8 @@ Font_FTLibrary::Font_FTLibrary() #endif } -// ======================================================================= -// function : ~Font_FTLibrary -// purpose : -// ======================================================================= +//================================================================================================= + Font_FTLibrary::~Font_FTLibrary() { if (IsValid()) diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx index a536f8a8dc..10c1ce08f5 100644 --- a/src/Font/Font_FontMgr.cxx +++ b/src/Font/Font_FontMgr.cxx @@ -281,10 +281,8 @@ static bool checkFont(NCollection_Sequence& theFonts, #endif } -// ======================================================================= -// function : GetInstance -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Font_FontMgr) Font_FontMgr::GetInstance() { static Handle(Font_FontMgr) _mgr; @@ -296,20 +294,16 @@ Handle(Font_FontMgr) Font_FontMgr::GetInstance() return _mgr; } -// ======================================================================= -// function : ToUseUnicodeSubsetFallback -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean& Font_FontMgr::ToUseUnicodeSubsetFallback() { static Standard_Boolean TheToUseUnicodeSubsetFallback = true; return TheToUseUnicodeSubsetFallback; } -// ======================================================================= -// function : AddFontAlias -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FontMgr::AddFontAlias(const TCollection_AsciiString& theAliasName, const TCollection_AsciiString& theFontName) { @@ -335,10 +329,8 @@ bool Font_FontMgr::AddFontAlias(const TCollection_AsciiString& theAliasName, return true; } -// ======================================================================= -// function : RemoveFontAlias -// purpose : -// ======================================================================= +//================================================================================================= + bool Font_FontMgr::RemoveFontAlias(const TCollection_AsciiString& theAliasName, const TCollection_AsciiString& theFontName) { @@ -381,10 +373,8 @@ bool Font_FontMgr::RemoveFontAlias(const TCollection_AsciiString& theAliasName, return false; } -// ======================================================================= -// function : GetAllAliases -// purpose : -// ======================================================================= +//================================================================================================= + void Font_FontMgr::GetAllAliases(TColStd_SequenceOfHAsciiString& theAliases) const { for (NCollection_DataMap::Iterator @@ -396,10 +386,8 @@ void Font_FontMgr::GetAllAliases(TColStd_SequenceOfHAsciiString& theAliases) con } } -// ======================================================================= -// function : GetFontAliases -// purpose : -// ======================================================================= +//================================================================================================= + void Font_FontMgr::GetFontAliases(TColStd_SequenceOfHAsciiString& theFontNames, const TCollection_AsciiString& theAliasName) const { @@ -417,10 +405,8 @@ void Font_FontMgr::GetFontAliases(TColStd_SequenceOfHAsciiString& theFontNames, } } -// ======================================================================= -// function : addFontAlias -// purpose : -// ======================================================================= +//================================================================================================= + void Font_FontMgr::addFontAlias(const TCollection_AsciiString& theAliasName, const Handle(Font_FontAliasSequence)& theAliases, Font_FontAspect theAspect) @@ -447,10 +433,8 @@ void Font_FontMgr::addFontAlias(const TCollection_AsciiString& theAliasNa myFontAliases.Bind(anAliasName, anAliases); } -// ======================================================================= -// function : Font_FontMgr -// purpose : -// ======================================================================= +//================================================================================================= + Font_FontMgr::Font_FontMgr() : myToTraceAliases(Standard_False) { @@ -553,10 +537,8 @@ Font_FontMgr::Font_FontMgr() InitFontDataBase(); } -// ======================================================================= -// function : CheckFont -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Font_FontMgr::CheckFont(NCollection_Sequence& theFonts, const TCollection_AsciiString& theFontPath) const { @@ -564,10 +546,8 @@ Standard_Boolean Font_FontMgr::CheckFont(NCollection_SequencemyFontKey); } -// ======================================================================= -// function : ToString -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Font_SystemFont::ToString() const { TCollection_AsciiString aDesc; diff --git a/src/Font/Font_TextFormatter.cxx b/src/Font/Font_TextFormatter.cxx index 349e41edba..ab5ac3dbb1 100644 --- a/src/Font/Font_TextFormatter.cxx +++ b/src/Font/Font_TextFormatter.cxx @@ -51,10 +51,8 @@ inline void moveY(NCollection_Vector& theCorners, } // namespace -// ======================================================================= -// function : Font_TextFormatter -// purpose : -// ======================================================================= +//================================================================================================= + Font_TextFormatter::Font_TextFormatter() : myAlignX(Graphic3d_HTA_LEFT), myAlignY(Graphic3d_VTA_TOP), @@ -80,10 +78,8 @@ Font_TextFormatter::Font_TextFormatter() // } -// ======================================================================= -// function : SetupAlignment -// purpose : -// ======================================================================= +//================================================================================================= + void Font_TextFormatter::SetupAlignment(const Graphic3d_HorizontalTextAlignment theAlignX, const Graphic3d_VerticalTextAlignment theAlignY) { @@ -91,10 +87,8 @@ void Font_TextFormatter::SetupAlignment(const Graphic3d_HorizontalTextAlignment myAlignY = theAlignY; } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void Font_TextFormatter::Reset() { myIsFormatted = false; @@ -108,10 +102,8 @@ void Font_TextFormatter::Reset() myMaxSymbolWidth = 0.0f; } -// ======================================================================= -// function : Append -// purpose : -// ======================================================================= +//================================================================================================= + void Font_TextFormatter::Append(const NCollection_String& theString, Font_FTFont& theFont) { if (theString.IsEmpty()) @@ -164,10 +156,8 @@ void Font_TextFormatter::Append(const NCollection_String& theString, Font_FTFont myLastSymbolWidth = myPen.x() - myCorners.Last().x(); } -// ======================================================================= -// function : newLine -// purpose : -// ======================================================================= +//================================================================================================= + void Font_TextFormatter::newLine(const Standard_Integer theLastRect, const Standard_ShortReal theMaxLineWidth) { @@ -208,10 +198,8 @@ void Font_TextFormatter::newLine(const Standard_Integer theLastRect, myRectLineStart = theLastRect + 1; } -// ======================================================================= -// function : Format -// purpose : -// ======================================================================= +//================================================================================================= + void Font_TextFormatter::Format() { if (myCorners.Length() == 0 || myIsFormatted) @@ -326,10 +314,8 @@ void Font_TextFormatter::Format() } } -// ======================================================================= -// function : GlyphBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Font_TextFormatter::GlyphBoundingBox(const Standard_Integer theIndex, Font_Rect& theBndBox) const { @@ -375,10 +361,8 @@ Standard_Boolean Font_TextFormatter::GlyphBoundingBox(const Standard_Integer the return Standard_True; } -// ======================================================================= -// function : IsLFSymbol -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Font_TextFormatter::IsLFSymbol(const Standard_Integer theIndex) const { Font_Rect aBndBox; @@ -390,10 +374,8 @@ Standard_Boolean Font_TextFormatter::IsLFSymbol(const Standard_Integer theIndex) return Abs(aBndBox.Right - aBndBox.Left) < Precision::Confusion(); } -// ======================================================================= -// function : FirstPosition -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Font_TextFormatter::FirstPosition() const { switch (myAlignX) @@ -408,10 +390,8 @@ Standard_ShortReal Font_TextFormatter::FirstPosition() const } } -// ======================================================================= -// function : LinePositionIndex -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Font_TextFormatter::LinePositionIndex(const Standard_Integer theIndex) const { Standard_Integer anIndex = 0; @@ -428,10 +408,8 @@ Standard_Integer Font_TextFormatter::LinePositionIndex(const Standard_Integer th return anIndex; } -// ======================================================================= -// function : LineIndex -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Font_TextFormatter::LineIndex(const Standard_Integer theIndex) const { if (myLineSpacing < 0.0f) @@ -442,10 +420,8 @@ Standard_Integer Font_TextFormatter::LineIndex(const Standard_Integer theIndex) return (Standard_Integer)Abs((BottomLeft(theIndex).y() + myAscender) / myLineSpacing); } -// ======================================================================= -// function : LineWidth -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Font_TextFormatter::LineWidth(const Standard_Integer theIndex) const { if (theIndex < 0) diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx index 92b1019f32..967911de12 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx @@ -43,10 +43,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimit IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangleStrips, Graphic3d_ArrayOfPrimitives) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfPolygons, Graphic3d_ArrayOfPrimitives) -// ======================================================================= -// function : CreateArray -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_ArrayOfPrimitives::CreateArray( Graphic3d_TypeOfPrimitiveArray theType, Standard_Integer theMaxVertexs, @@ -92,10 +90,8 @@ Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_ArrayOfPrimitives::CreateArray( return Handle(Graphic3d_ArrayOfPrimitives)(); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ArrayOfPrimitives::init(Graphic3d_TypeOfPrimitiveArray theType, Standard_Integer theMaxVertexs, Standard_Integer theMaxBounds, @@ -217,10 +213,8 @@ void Graphic3d_ArrayOfPrimitives::init(Graphic3d_TypeOfPrimitiveArray theType, } } -// ======================================================================= -// function : ~Graphic3d_ArrayOfPrimitives -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives() { myIndices.Nullify(); @@ -228,10 +222,8 @@ Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives() myBounds.Nullify(); } -// ======================================================================= -// function : AddBound -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber) { Standard_OutOfRange_Raise_if(myBounds.IsNull() || myBounds->NbBounds >= myBounds->NbMaxBounds, @@ -240,10 +232,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer th return ++myBounds->NbBounds; } -// ======================================================================= -// function : AddBound -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber, const Standard_Real theR, const Standard_Real theG, @@ -257,10 +247,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer th return myBounds->NbBounds; } -// ======================================================================= -// function : AddEdge -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer theVertexIndex) { Standard_OutOfRange_Raise_if(myIndices.IsNull() @@ -273,10 +261,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer the return ++myIndices->NbElements; } -// ======================================================================= -// function : AddTriangleStripEdges -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ArrayOfPrimitives::AddTriangleStripEdges(Standard_Integer theVertexLower, Standard_Integer theVertexUpper) { @@ -300,10 +286,8 @@ void Graphic3d_ArrayOfPrimitives::AddTriangleStripEdges(Standard_Integer theVert } } -// ======================================================================= -// function : AddTriangleFanEdges -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ArrayOfPrimitives::AddTriangleFanEdges(Standard_Integer theVertexLower, Standard_Integer theVertexUpper, Standard_Boolean theToClose) @@ -323,10 +307,8 @@ void Graphic3d_ArrayOfPrimitives::AddTriangleFanEdges(Standard_Integer theVertex } } -// ======================================================================= -// function : AddPolylineEdges -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ArrayOfPrimitives::AddPolylineEdges(Standard_Integer theVertexLower, Standard_Integer theVertexUpper, Standard_Boolean theToClose) @@ -346,10 +328,8 @@ void Graphic3d_ArrayOfPrimitives::AddPolylineEdges(Standard_Integer theVertexLow } } -// ======================================================================= -// function : StringType -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const { switch (myType) @@ -386,10 +366,8 @@ Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const return "UndefinedArray"; } -// ======================================================================= -// function : ItemNumber -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const { if (myAttribs.IsNull()) @@ -440,10 +418,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const return -1; } -// ======================================================================= -// function : IsValid -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid() { if (myAttribs.IsNull()) diff --git a/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx b/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx index 9145b8325b..0de26d8e92 100644 --- a/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectFillArea3d.cxx @@ -17,19 +17,15 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectFillArea3d, Graphic3d_Aspects) -// ======================================================================= -// function : Graphic3d_AspectFillArea3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d() { myInteriorStyle = Aspect_IS_EMPTY; } -// ======================================================================= -// function : Graphic3d_AspectFillArea3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d( const Aspect_InteriorStyle theInteriorStyle, const Quantity_Color& theInteriorColor, diff --git a/src/Graphic3d/Graphic3d_AspectLine3d.cxx b/src/Graphic3d/Graphic3d_AspectLine3d.cxx index bb2183993c..6ecb9f0f8b 100644 --- a/src/Graphic3d/Graphic3d_AspectLine3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectLine3d.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectLine3d, Graphic3d_Aspects) -// ======================================================================= -// function : Graphic3d_AspectLine3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectLine3d::Graphic3d_AspectLine3d() { myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; @@ -29,10 +27,8 @@ Graphic3d_AspectLine3d::Graphic3d_AspectLine3d() myLineWidth = 1.0f; } -// ======================================================================= -// function : Graphic3d_AspectLine3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectLine3d::Graphic3d_AspectLine3d(const Quantity_Color& theColor, Aspect_TypeOfLine theType, Standard_Real theWidth) diff --git a/src/Graphic3d/Graphic3d_AspectMarker3d.cxx b/src/Graphic3d/Graphic3d_AspectMarker3d.cxx index f6822882c3..512a116dcd 100644 --- a/src/Graphic3d/Graphic3d_AspectMarker3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectMarker3d.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectMarker3d, Graphic3d_Aspects) -// ======================================================================= -// function : Graphic3d_AspectMarker3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d() { myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; @@ -29,10 +27,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d() myMarkerScale = 1.0f; } -// ======================================================================= -// function : Graphic3d_AspectMarker3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Aspect_TypeOfMarker theType, const Quantity_Color& theColor, const Standard_Real theScale) @@ -43,10 +39,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Aspect_TypeOfMarker the SetMarkerScale((float)theScale); } -// ======================================================================= -// function : Graphic3d_AspectMarker3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d( const Quantity_Color& theColor, const Standard_Integer theWidth, @@ -59,10 +53,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d( myMarkerScale = 1.0f; } -// ======================================================================= -// function : Graphic3d_AspectMarker3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& theTextureImage) { myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; @@ -72,10 +64,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& t myMarkerScale = 1.0f; } -// ======================================================================= -// function : GetTextureSize -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& theWidth, Standard_Integer& theHeight) const { @@ -90,10 +80,8 @@ void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& theWidth, } } -// ======================================================================= -// function : SetBitMap -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AspectMarker3d::SetBitMap(const Standard_Integer theWidth, const Standard_Integer theHeight, const Handle(TColStd_HArray1OfByte)& theTextureBitMap) diff --git a/src/Graphic3d/Graphic3d_AspectText3d.cxx b/src/Graphic3d/Graphic3d_AspectText3d.cxx index c94a70c5e4..bb94e29593 100644 --- a/src/Graphic3d/Graphic3d_AspectText3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectText3d.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Graphic3d_Aspects) -// ======================================================================= -// function : Graphic3d_AspectText3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectText3d::Graphic3d_AspectText3d() { SetAlphaMode(Graphic3d_AlphaMode_MaskBlend, 0.285f); @@ -29,10 +27,8 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d() myEdgeColor.SetRGB(Quantity_NOC_WHITE); } -// ======================================================================= -// function : Graphic3d_AspectText3d -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AspectText3d::Graphic3d_AspectText3d(const Quantity_Color& theColor, Standard_CString theFont, Standard_Real, @@ -52,10 +48,8 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d(const Quantity_Color& theColor, } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AspectText3d::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Graphic3d/Graphic3d_Aspects.cxx b/src/Graphic3d/Graphic3d_Aspects.cxx index 5985d3ff22..d829fae15f 100644 --- a/src/Graphic3d/Graphic3d_Aspects.cxx +++ b/src/Graphic3d/Graphic3d_Aspects.cxx @@ -16,10 +16,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Aspects, Standard_Transient) -// ======================================================================= -// function : Graphic3d_Aspects -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Aspects::Graphic3d_Aspects() : myInteriorColor(Quantity_NOC_CYAN1), myBackInteriorColor(Quantity_NOC_CYAN1), @@ -49,10 +47,8 @@ Graphic3d_Aspects::Graphic3d_Aspects() // } -// ======================================================================= -// function : SetTextureMap -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Aspects::SetTextureMap(const Handle(Graphic3d_TextureMap)& theTexture) { if (theTexture.IsNull()) diff --git a/src/Graphic3d/Graphic3d_AttribBuffer.cxx b/src/Graphic3d/Graphic3d_AttribBuffer.cxx index 62c37332b7..f240b9c827 100644 --- a/src/Graphic3d/Graphic3d_AttribBuffer.cxx +++ b/src/Graphic3d/Graphic3d_AttribBuffer.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AttribBuffer, Graphic3d_Buffer) -// ======================================================================= -// function : Graphic3d_AttribBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_AttribBuffer::Graphic3d_AttribBuffer(const Handle(NCollection_BaseAllocator)& theAlloc) : Graphic3d_Buffer(theAlloc), myIsInterleaved(Standard_True), @@ -26,10 +24,8 @@ Graphic3d_AttribBuffer::Graphic3d_AttribBuffer(const Handle(NCollection_BaseAllo { } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_AttribBuffer::Init(const Standard_Integer theNbElems, const Graphic3d_Attribute* theAttribs, const Standard_Integer theNbAttribs) @@ -47,10 +43,8 @@ bool Graphic3d_AttribBuffer::Init(const Standard_Integer theNbElems, return true; } -// ======================================================================= -// function : SetMutable -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::SetMutable(Standard_Boolean theMutable) { if (mySize > (Standard_Size)IntegerLast() && theMutable) @@ -61,10 +55,8 @@ void Graphic3d_AttribBuffer::SetMutable(Standard_Boolean theMutable) myIsMutable = theMutable; } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::SetInterleaved(Standard_Boolean theIsInterleaved) { if (NbMaxElements() != 0) @@ -75,10 +67,8 @@ void Graphic3d_AttribBuffer::SetInterleaved(Standard_Boolean theIsInterleaved) myIsInterleaved = theIsInterleaved; } -// ======================================================================= -// function : invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::invalidate(const Graphic3d_BufferRange& theRange) { if (mySize > (Standard_Size)IntegerLast()) @@ -90,10 +80,8 @@ void Graphic3d_AttribBuffer::invalidate(const Graphic3d_BufferRange& theRange) myInvalidatedRange.Unite(theRange); } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::Invalidate() { if (mySize > (Standard_Size)IntegerLast()) @@ -105,10 +93,8 @@ void Graphic3d_AttribBuffer::Invalidate() invalidate(Graphic3d_BufferRange(0, (Standard_Integer)mySize)); } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex) { Standard_OutOfRange_Raise_if(theAttributeIndex < 0 || theAttributeIndex >= NbAttributes, @@ -136,10 +122,8 @@ void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex) } } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex, Standard_Integer theVertexLower, Standard_Integer theVertexUpper) @@ -172,10 +156,8 @@ void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex, } } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theVertexLower, Standard_Integer theVertexUpper) { diff --git a/src/Graphic3d/Graphic3d_BSDF.cxx b/src/Graphic3d/Graphic3d_BSDF.cxx index e59822d4c1..da5ef6bbb3 100644 --- a/src/Graphic3d/Graphic3d_BSDF.cxx +++ b/src/Graphic3d/Graphic3d_BSDF.cxx @@ -19,10 +19,8 @@ #include -// ======================================================================= -// function : Serialize -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const { Graphic3d_Vec4 aData = Graphic3d_Vec4(myFresnelData, 0.f); @@ -35,19 +33,15 @@ Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const return aData; } -// ======================================================================= -// function : fresnelNormal -// purpose : -// ======================================================================= +//================================================================================================= + inline float fresnelNormal(float theN, float theK) { return ((theN - 1.f) * (theN - 1.f) + theK * theK) / ((theN + 1.f) * (theN + 1.f) + theK * theK); } -// ======================================================================= -// function : CreateConductor -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor(const Graphic3d_Vec3& theRefractionIndex, const Graphic3d_Vec3& theAbsorptionIndex) { @@ -66,10 +60,8 @@ void Graphic3d_Fresnel::DumpJson(Standard_OStream& theOStream, Standard_Integer OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFresnelType) OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &myFresnelData)} -// ======================================================================= -// function : Graphic3d_BSDF -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF::Graphic3d_BSDF() : Ks(Graphic3d_Vec3(0.f), 1.f) { @@ -88,10 +80,8 @@ bool Graphic3d_BSDF::operator==(const Graphic3d_BSDF& theOther) const && FresnelCoat == theOther.FresnelCoat && FresnelBase == theOther.FresnelBase; } -// ======================================================================= -// function : Normalize -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_BSDF::Normalize() { float aMax = 0.f; @@ -112,10 +102,8 @@ void Graphic3d_BSDF::Normalize() } } -// ======================================================================= -// function : CreateDiffuse -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse(const Graphic3d_Vec3& theWeight) { Graphic3d_BSDF aBSDF; @@ -125,10 +113,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse(const Graphic3d_Vec3& theWeight) return aBSDF; } -// ======================================================================= -// function : CreateMetallic -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic(const Graphic3d_Vec3& theWeight, const Graphic3d_Fresnel& theFresnel, const float theRoughness) @@ -144,10 +130,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic(const Graphic3d_Vec3& theWeight return aBSDF; } -// ======================================================================= -// function : CreateTransparent -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent(const Graphic3d_Vec3& theWeight, const Graphic3d_Vec3& theAbsorptionColor, const float theAbsorptionCoeff) @@ -170,10 +154,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent(const Graphic3d_Vec3& theWeight return aBSDF; } -// ======================================================================= -// function : CreateGlass -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF Graphic3d_BSDF::CreateGlass(const Graphic3d_Vec3& theWeight, const Graphic3d_Vec3& theAbsorptionColor, const float theAbsorptionCoeff, @@ -195,10 +177,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateGlass(const Graphic3d_Vec3& theWeight, return aBSDF; } -// ======================================================================= -// function : CreateMetallicRoughness -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BSDF Graphic3d_BSDF::CreateMetallicRoughness(const Graphic3d_PBRMaterial& thePbr) { const Graphic3d_Vec3 aDiff = (Graphic3d_Vec3)thePbr.Color().GetRGB() * thePbr.Alpha(); diff --git a/src/Graphic3d/Graphic3d_Buffer.cxx b/src/Graphic3d/Graphic3d_Buffer.cxx index 4df753d295..5e3c8a2444 100644 --- a/src/Graphic3d/Graphic3d_Buffer.cxx +++ b/src/Graphic3d/Graphic3d_Buffer.cxx @@ -22,20 +22,16 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_IndexBuffer, Graphic3d_Buffer) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer) -// ======================================================================= -// function : DefaultAllocator -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(NCollection_BaseAllocator)& Graphic3d_Buffer::DefaultAllocator() { static const Handle(NCollection_BaseAllocator) THE_ALLOC = new NCollection_AlignedAllocator(16); return THE_ALLOC; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Buffer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Graphic3d/Graphic3d_BvhCStructureSet.cxx b/src/Graphic3d/Graphic3d_BvhCStructureSet.cxx index 9c507da07f..0dcf49913f 100644 --- a/src/Graphic3d/Graphic3d_BvhCStructureSet.cxx +++ b/src/Graphic3d/Graphic3d_BvhCStructureSet.cxx @@ -20,38 +20,30 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BvhCStructureSet, BVH_PrimitiveSet3d) -// ======================================================================= -// function : Graphic3d_BvhCStructureSet -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BvhCStructureSet::Graphic3d_BvhCStructureSet() { myBuilder = new BVH_BinnedBuilder(BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_BvhCStructureSet::Size() const { return myStructs.Size(); } -// ======================================================================= -// function : Box -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BndBox3d Graphic3d_BvhCStructureSet::Box(const Standard_Integer theIdx) const { return myStructs.FindKey(theIdx + 1)->BoundingBox(); } -// ======================================================================= -// function : Center -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_BvhCStructureSet::Center(const Standard_Integer theIdx, const Standard_Integer theAxis) const { @@ -63,20 +55,16 @@ Standard_Real Graphic3d_BvhCStructureSet::Center(const Standard_Integer theIdx, return aCenter; } -// ======================================================================= -// function : Swap -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_BvhCStructureSet::Swap(const Standard_Integer theIdx1, const Standard_Integer theIdx2) { myStructs.Swap(theIdx1 + 1, theIdx2 + 1); } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_BvhCStructureSet::Add(const Graphic3d_CStructure* theStruct) { const Standard_Integer aSize = myStructs.Size(); @@ -91,10 +79,8 @@ Standard_Boolean Graphic3d_BvhCStructureSet::Add(const Graphic3d_CStructure* the return Standard_False; } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_BvhCStructureSet::Remove(const Graphic3d_CStructure* theStruct) { const Standard_Integer anIndex = myStructs.FindIndex(theStruct); @@ -111,20 +97,16 @@ Standard_Boolean Graphic3d_BvhCStructureSet::Remove(const Graphic3d_CStructure* return Standard_False; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_BvhCStructureSet::Clear() { myStructs.Clear(); MarkDirty(); } -// ======================================================================= -// function : GetStructureById -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_CStructure* Graphic3d_BvhCStructureSet::GetStructureById(Standard_Integer theId) { return myStructs.FindKey(theId + 1); diff --git a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx index e821c4829d..9d2951e869 100644 --- a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx +++ b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx @@ -17,10 +17,8 @@ #include -// ======================================================================= -// function : Graphic3d_BvhCStructureSetTrsfPers -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers( const Handle(BVH_Builder3d)& theBuilder) : myIsDirty(Standard_False), @@ -30,28 +28,22 @@ Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers( // } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_BvhCStructureSetTrsfPers::Size() const { return myStructs.Size(); } -// ======================================================================= -// function : Box -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_BndBox3d Graphic3d_BvhCStructureSetTrsfPers::Box(const Standard_Integer theIdx) const { return *myStructBoxes(theIdx + 1); } -// ======================================================================= -// function : Center -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center(const Standard_Integer theIdx, const Standard_Integer theAxis) const { @@ -59,10 +51,8 @@ Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center(const Standard_Integer return (aBndBox.CornerMin()[theAxis] + aBndBox.CornerMax()[theAxis]) * 0.5; } -// ======================================================================= -// function : Swap -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_BvhCStructureSetTrsfPers::Swap(const Standard_Integer theIdx1, const Standard_Integer theIdx2) { @@ -73,10 +63,8 @@ void Graphic3d_BvhCStructureSetTrsfPers::Swap(const Standard_Integer theIdx1, myStructBoxes.Swap(aStructIdx1, aStructIdx2); } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add(const Graphic3d_CStructure* theStruct) { const Standard_Integer aSize = myStructs.Size(); @@ -91,10 +79,8 @@ Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add(const Graphic3d_CStruct return Standard_False; } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove(const Graphic3d_CStructure* theStruct) { const Standard_Integer anIndex = myStructs.FindIndex(theStruct); @@ -111,20 +97,16 @@ Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove(const Graphic3d_CStr return Standard_False; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_BvhCStructureSetTrsfPers::Clear() { myStructs.Clear(); MarkDirty(); } -// ======================================================================= -// function : GetStructureById -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_CStructure* Graphic3d_BvhCStructureSetTrsfPers::GetStructureById( Standard_Integer theId) { diff --git a/src/Graphic3d/Graphic3d_CLight.cxx b/src/Graphic3d/Graphic3d_CLight.cxx index 6e47cc721f..84247680fc 100644 --- a/src/Graphic3d/Graphic3d_CLight.cxx +++ b/src/Graphic3d/Graphic3d_CLight.cxx @@ -24,10 +24,8 @@ namespace static volatile Standard_Integer THE_LIGHT_COUNTER = 0; } -// ======================================================================= -// function : makeId -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::makeId() { TCollection_AsciiString aTypeSuffix; @@ -51,10 +49,8 @@ void Graphic3d_CLight::makeId() + TCollection_AsciiString(Standard_Atomic_Increment(&THE_LIGHT_COUNTER)); } -// ======================================================================= -// function : Graphic3d_CLight -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CLight::Graphic3d_CLight(Graphic3d_TypeOfLightSource theType) : myPosition(0.0, 0.0, 0.0), myColor(1.0f, 1.0f, 1.0f, 1.0f), @@ -94,10 +90,8 @@ Graphic3d_CLight::Graphic3d_CLight(Graphic3d_TypeOfLightSource theType) makeId(); } -// ======================================================================= -// function : CopyFrom -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::CopyFrom(const Handle(Graphic3d_CLight)& theLight) { myName = theLight->myName; @@ -127,30 +121,24 @@ void Graphic3d_CLight::CopyFrom(const Handle(Graphic3d_CLight)& theLight) } } -// ======================================================================= -// function : SetColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetColor(const Quantity_Color& theColor) { updateRevisionIf(myColor.GetRGB().IsDifferent(theColor)); myColor.SetRGB(theColor); } -// ======================================================================= -// function : SetEnabled -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetEnabled(Standard_Boolean theIsOn) { updateRevisionIf(myIsEnabled != theIsOn); myIsEnabled = theIsOn; } -// ======================================================================= -// function : SetCastShadows -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetCastShadows(Standard_Boolean theToCast) { if (myType != Graphic3d_TypeOfLightSource_Directional @@ -163,10 +151,8 @@ void Graphic3d_CLight::SetCastShadows(Standard_Boolean theToCast) myToCastShadows = theToCast; } -// ======================================================================= -// function : SetHeadlight -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetHeadlight(Standard_Boolean theValue) { if (myType == Graphic3d_TypeOfLightSource_Ambient) @@ -178,10 +164,8 @@ void Graphic3d_CLight::SetHeadlight(Standard_Boolean theValue) myIsHeadlight = theValue; } -// ======================================================================= -// function : SetDirection -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetDirection(const gp_Dir& theDir) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot @@ -197,10 +181,8 @@ void Graphic3d_CLight::SetDirection(const gp_Dir& theDir) myDirection.z() = static_cast(theDir.Z()); } -// ======================================================================= -// function : SetPosition -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetPosition(const gp_Pnt& thePosition) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot @@ -210,10 +192,8 @@ void Graphic3d_CLight::SetPosition(const gp_Pnt& thePosition) myPosition = thePosition; } -// ======================================================================= -// function : SetDisplayPosition -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetDisplayPosition(const gp_Pnt& thePosition) { Standard_ProgramError_Raise_if(myType == Graphic3d_TypeOfLightSource_Ambient, @@ -222,10 +202,8 @@ void Graphic3d_CLight::SetDisplayPosition(const gp_Pnt& thePosition) myPosition = thePosition; } -// ======================================================================= -// function : SetIntensity -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetIntensity(Standard_ShortReal theValue) { Standard_OutOfRange_Raise_if(theValue <= 0.0f, @@ -234,10 +212,8 @@ void Graphic3d_CLight::SetIntensity(Standard_ShortReal theValue) myIntensity = theValue; } -// ======================================================================= -// function : SetAngle -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetAngle(Standard_ShortReal theAngle) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot, @@ -248,10 +224,8 @@ void Graphic3d_CLight::SetAngle(Standard_ShortReal theAngle) changeAngle() = theAngle; } -// ======================================================================= -// function : SetAttenuation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetAttenuation(Standard_ShortReal theConstAttenuation, Standard_ShortReal theLinearAttenuation) { @@ -267,10 +241,8 @@ void Graphic3d_CLight::SetAttenuation(Standard_ShortReal theConstAttenuation, changeLinearAttenuation() = theLinearAttenuation; } -// ======================================================================= -// function : SetConcentration -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetConcentration(Standard_ShortReal theConcentration) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot, @@ -281,10 +253,8 @@ void Graphic3d_CLight::SetConcentration(Standard_ShortReal theConcentration) changeConcentration() = theConcentration; } -// ======================================================================= -// function : SetSmoothRadius -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetSmoothRadius(Standard_ShortReal theValue) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional @@ -297,10 +267,8 @@ void Graphic3d_CLight::SetSmoothRadius(Standard_ShortReal theValue) mySmoothness = theValue; } -// ======================================================================= -// function : SetSmoothAngle -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetSmoothAngle(Standard_ShortReal theValue) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Directional, @@ -311,10 +279,8 @@ void Graphic3d_CLight::SetSmoothAngle(Standard_ShortReal theValue) mySmoothness = theValue; } -// ======================================================================= -// function : SetRange -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CLight::SetRange(Standard_ShortReal theValue) { Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index ee2edb2f20..d79534b014 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -63,10 +63,8 @@ Graphic3d_CView::~Graphic3d_CView() } } -// ======================================================================= -// function : SetBackgroundSkydome -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::SetBackgroundSkydome(const Aspect_SkydomeBackground& theAspect, Standard_Boolean theToUpdatePBREnv) { @@ -81,10 +79,8 @@ void Graphic3d_CView::SetBackgroundSkydome(const Aspect_SkydomeBackground& theAs } } -// ======================================================================= -// function : Activate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Activate() { if (!IsActive()) @@ -120,10 +116,8 @@ void Graphic3d_CView::Activate() Update(); } -// ======================================================================= -// function : Deactivate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Deactivate() { if (IsActive()) @@ -157,10 +151,8 @@ void Graphic3d_CView::Deactivate() } } -// ======================================================================== -// function : Remove -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_CView::Remove() { if (IsRemoved()) @@ -202,19 +194,15 @@ void Graphic3d_CView::Remove() myIsRemoved = Standard_True; } -// ======================================================================== -// function : AddSubview -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_CView::AddSubview(const Handle(Graphic3d_CView)& theView) { mySubviews.Append(theView); } -// ======================================================================== -// function : RemoveSubview -// purpose : -// ======================================================================== +//================================================================================================= + bool Graphic3d_CView::RemoveSubview(const Graphic3d_CView* theView) { for (NCollection_Sequence::Iterator aViewIter(mySubviews); @@ -230,10 +218,8 @@ bool Graphic3d_CView::RemoveSubview(const Graphic3d_CView* theView) return false; } -// ======================================================================== -// function : Resized -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_CView::Resized() { if (IsSubview()) @@ -256,10 +242,8 @@ static int getSubViewOffset(double theOffset, int theWinSize) } } -// ======================================================================== -// function : SubviewResized -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_CView::SubviewResized(const Handle(Aspect_NeutralWindow)& theWindow) { if (!IsSubview() || theWindow.IsNull()) @@ -311,10 +295,8 @@ void Graphic3d_CView::SubviewResized(const Handle(Aspect_NeutralWindow)& theWind theWindow->SetSize(aViewSize.x(), aViewSize.y()); } -// ======================================================================== -// function : SetComputedMode -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_CView::SetComputedMode(const Standard_Boolean theMode) { if ((theMode && myIsInComputedMode) || (!theMode && !myIsInComputedMode)) @@ -428,10 +410,8 @@ void Graphic3d_CView::SetComputedMode(const Standard_Boolean theMode) Update(); } -// ======================================================================= -// function : ReCompute -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::ReCompute(const Handle(Graphic3d_Structure)& theStruct) { theStruct->CalculateBoundBox(); @@ -512,19 +492,15 @@ void Graphic3d_CView::ReCompute(const Handle(Graphic3d_Structure)& theStruct) myStructsComputed.Remove(anIndex); } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Update(const Graphic3d_ZLayerId theLayerId) { InvalidateZLayerBoundingBox(theLayerId); } -// ======================================================================= -// function : InvalidateZLayerBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::InvalidateZLayerBoundingBox(const Graphic3d_ZLayerId theLayerId) { if (Handle(Graphic3d_Layer) aLayer = Layer(theLayerId)) @@ -544,10 +520,8 @@ void Graphic3d_CView::InvalidateZLayerBoundingBox(const Graphic3d_ZLayerId theLa } } -// ======================================================================= -// function : DisplayedStructures -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::DisplayedStructures(Graphic3d_MapOfStructure& theStructures) const { for (Graphic3d_MapOfStructure::Iterator aStructIter(myStructsDisplayed); aStructIter.More(); @@ -557,10 +531,8 @@ void Graphic3d_CView::DisplayedStructures(Graphic3d_MapOfStructure& theStructure } } -// ======================================================================= -// function : MinMaxValues -// purpose : -// ======================================================================= +//================================================================================================= + Bnd_Box Graphic3d_CView::MinMaxValues(const Standard_Boolean theToIncludeAuxiliary) const { if (!IsDefined()) @@ -587,10 +559,8 @@ Bnd_Box Graphic3d_CView::MinMaxValues(const Standard_Boolean theToIncludeAuxilia return aResult; } -// ======================================================================= -// function : ConsiderZoomPersistenceObjects -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_CView::ConsiderZoomPersistenceObjects() { if (!IsDefined()) @@ -617,10 +587,8 @@ Standard_Real Graphic3d_CView::ConsiderZoomPersistenceObjects() return aMaxCoef; } -// ======================================================================= -// function : MinMaxValues -// purpose : -// ======================================================================= +//================================================================================================= + Bnd_Box Graphic3d_CView::MinMaxValues(const Graphic3d_MapOfStructure& theSet, const Standard_Boolean theToIgnoreInfiniteFlag) const { @@ -687,10 +655,8 @@ Bnd_Box Graphic3d_CView::MinMaxValues(const Graphic3d_MapOfStructure& theSet, return aResult; } -// ======================================================================= -// function : acceptDisplay -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay( const Graphic3d_TypeOfStructure theStructType) const { @@ -715,10 +681,8 @@ Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay( return Graphic3d_TOA_NO; } -// ======================================================================= -// function : Compute -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Compute() { // force HLRValidation to False on all structures calculated in the view @@ -763,10 +727,8 @@ void Graphic3d_CView::Compute() } } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Clear(Graphic3d_Structure* theStructure, const Standard_Boolean theWithDestruction) { @@ -779,10 +741,8 @@ void Graphic3d_CView::Clear(Graphic3d_Structure* theStructure, } } -// ======================================================================= -// function : Connect -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Connect(const Graphic3d_Structure* theMother, const Graphic3d_Structure* theDaughter) { @@ -796,10 +756,8 @@ void Graphic3d_CView::Connect(const Graphic3d_Structure* theMother, } } -// ======================================================================= -// function : Disconnect -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Disconnect(const Graphic3d_Structure* theMother, const Graphic3d_Structure* theDaughter) { @@ -813,10 +771,8 @@ void Graphic3d_CView::Disconnect(const Graphic3d_Structure* theMother, } } -// ======================================================================= -// function : Display -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Display(const Handle(Graphic3d_Structure)& theStructure) { if (!IsActive()) @@ -977,10 +933,8 @@ void Graphic3d_CView::Display(const Handle(Graphic3d_Structure)& theStructure) Update(aStruct->GetZLayer()); } -// ======================================================================= -// function : Erase -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Erase(const Handle(Graphic3d_Structure)& theStructure) { if (!IsDisplayed(theStructure)) @@ -1011,10 +965,8 @@ void Graphic3d_CView::Erase(const Handle(Graphic3d_Structure)& theStructure) Update(theStructure->GetZLayer()); } -// ======================================================================= -// function : Highlight -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::Highlight(const Handle(Graphic3d_Structure)& theStructure) { const Standard_Integer anIndex = IsComputed(theStructure); @@ -1025,10 +977,8 @@ void Graphic3d_CView::Highlight(const Handle(Graphic3d_Structure)& theStructure) } } -// ======================================================================= -// function : SetTransform -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::SetTransform(const Handle(Graphic3d_Structure)& theStructure, const Handle(TopLoc_Datum3D)& theTrsf) { @@ -1061,10 +1011,8 @@ void Graphic3d_CView::SetTransform(const Handle(Graphic3d_Structure)& theStructu } } -// ======================================================================= -// function : UnHighlight -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::UnHighlight(const Handle(Graphic3d_Structure)& theStructure) { Standard_Integer anIndex = IsComputed(theStructure); @@ -1075,10 +1023,8 @@ void Graphic3d_CView::UnHighlight(const Handle(Graphic3d_Structure)& theStructur } } -// ======================================================================== -// function : IsComputed -// purpose : -// ======================================================================== +//================================================================================================= + Standard_Boolean Graphic3d_CView::IsComputed(const Standard_Integer theStructId, Handle(Graphic3d_Structure)& theComputedStruct) const { @@ -1098,10 +1044,8 @@ Standard_Boolean Graphic3d_CView::IsComputed(const Standard_Integer theStr return Standard_False; } -// ======================================================================= -// function : IsComputed -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_CView::IsComputed(const Graphic3d_Structure* theStructure) const { const Standard_Integer aStructId = theStructure->Identification(); @@ -1118,19 +1062,15 @@ Standard_Integer Graphic3d_CView::IsComputed(const Graphic3d_Structure* theStruc return 0; } -// ======================================================================= -// function : IsDisplayed -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_CView::IsDisplayed(const Handle(Graphic3d_Structure)& theStructure) const { return myStructsDisplayed.Contains(theStructure); } -// ======================================================================= -// function : ChangePriority -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::ChangePriority(const Handle(Graphic3d_Structure)& theStructure, const Graphic3d_DisplayPriority /*theOldPriority*/, const Graphic3d_DisplayPriority theNewPriority) @@ -1153,10 +1093,8 @@ void Graphic3d_CView::ChangePriority(const Handle(Graphic3d_Structure)& theStruc changePriority(aCStruct, theNewPriority); } -// ======================================================================= -// function : ChangeZLayer -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::ChangeZLayer(const Handle(Graphic3d_Structure)& theStructure, const Graphic3d_ZLayerId theLayerId) { @@ -1178,10 +1116,8 @@ void Graphic3d_CView::ChangeZLayer(const Handle(Graphic3d_Structure)& theStructu changeZLayer(aCStruct, theLayerId); } -// ======================================================================= -// function : HaveTheSameOwner -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_CView::HaveTheSameOwner( const Handle(Graphic3d_Structure)& theStructure) const { @@ -1206,10 +1142,8 @@ Standard_Integer Graphic3d_CView::HaveTheSameOwner( return 0; } -// ======================================================================= -// function : CopySettings -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::CopySettings(const Handle(Graphic3d_CView)& theOther) { ChangeRenderingParams() = theOther->RenderingParams(); @@ -1225,10 +1159,8 @@ void Graphic3d_CView::CopySettings(const Handle(Graphic3d_CView)& theOther) SetClipPlanes(theOther->ClipPlanes()); } -// ======================================================================= -// function : SetShadingModel -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::SetShadingModel(Graphic3d_TypeOfShadingModel theModel) { if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT) @@ -1240,10 +1172,8 @@ void Graphic3d_CView::SetShadingModel(Graphic3d_TypeOfShadingModel theModel) myRenderParams.ShadingModel = theModel; } -// ======================================================================= -// function : SetUnitFactor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::SetUnitFactor(Standard_Real theFactor) { if (theFactor <= 0.0) @@ -1257,19 +1187,15 @@ void Graphic3d_CView::SetUnitFactor(Standard_Real theFactor) } } -// ======================================================================= -// function : IsActiveXR -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CView::IsActiveXR() const { return !myXRSession.IsNull() && myXRSession->IsOpen(); } -// ======================================================================= -// function : InitXR -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CView::InitXR() { if (myXRSession.IsNull()) @@ -1289,10 +1215,8 @@ bool Graphic3d_CView::InitXR() return myXRSession->IsOpen(); } -// ======================================================================= -// function : ReleaseXR -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CView::ReleaseXR() { if (!myXRSession.IsNull()) diff --git a/src/Graphic3d/Graphic3d_Camera.cxx b/src/Graphic3d/Graphic3d_Camera.cxx index 7b97b1acd5..b457591d87 100644 --- a/src/Graphic3d/Graphic3d_Camera.cxx +++ b/src/Graphic3d/Graphic3d_Camera.cxx @@ -69,10 +69,8 @@ gp_Ax3 cameraToAx3(const Graphic3d_Camera& theCamera) } } // namespace -// ======================================================================= -// function : Graphic3d_Camera -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Camera::Graphic3d_Camera() : myUp(0.0, 1.0, 0.0), myDirection(0.0, 0.0, 1.0), @@ -102,10 +100,8 @@ Graphic3d_Camera::Graphic3d_Camera() this); } -// ======================================================================= -// function : Graphic3d_Camera -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther) : myUp(0.0, 1.0, 0.0), myDirection(0.0, 0.0, 1.0), @@ -135,10 +131,8 @@ Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther) Copy(theOther); } -// ======================================================================= -// function : CopyMappingData -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::CopyMappingData(const Handle(Graphic3d_Camera)& theOtherCamera) { SetZeroToOneDepth(theOtherCamera->IsZeroToOneDepth()); @@ -170,10 +164,8 @@ void Graphic3d_Camera::CopyMappingData(const Handle(Graphic3d_Camera)& theOtherC } } -// ======================================================================= -// function : CopyOrientationData -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::CopyOrientationData(const Handle(Graphic3d_Camera)& theOtherCamera) { if (!myEye.IsEqual(theOtherCamera->Eye(), 0.0) || !myUp.IsEqual(theOtherCamera->Up(), 0.0) @@ -189,30 +181,24 @@ void Graphic3d_Camera::CopyOrientationData(const Handle(Graphic3d_Camera)& theOt SetAxialScale(theOtherCamera->AxialScale()); } -// ======================================================================= -// function : Copy -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::Copy(const Handle(Graphic3d_Camera)& theOther) { CopyMappingData(theOther); CopyOrientationData(theOther); } -// ======================================================================= -// function : SetIdentityOrientation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetIdentityOrientation() { SetEyeAndCenter(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.0, 0.0, -1.0)); SetUp(gp_Dir(0.0, 1.0, 0.0)); } -// ======================================================================= -// function : MoveEyeTo -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::MoveEyeTo(const gp_Pnt& theEye) { if (myEye.IsEqual(theEye, 0.0)) @@ -224,10 +210,8 @@ void Graphic3d_Camera::MoveEyeTo(const gp_Pnt& theEye) InvalidateOrientation(); } -// ======================================================================= -// function : SetEyeAndCenter -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetEyeAndCenter(const gp_Pnt& theEye, const gp_Pnt& theCenter) { if (Eye().IsEqual(theEye, 0.0) && Center().IsEqual(theCenter, 0.0)) @@ -244,10 +228,8 @@ void Graphic3d_Camera::SetEyeAndCenter(const gp_Pnt& theEye, const gp_Pnt& theCe InvalidateOrientation(); } -// ======================================================================= -// function : SetEye -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetEye(const gp_Pnt& theEye) { if (Eye().IsEqual(theEye, 0.0)) @@ -265,10 +247,8 @@ void Graphic3d_Camera::SetEye(const gp_Pnt& theEye) InvalidateOrientation(); } -// ======================================================================= -// function : SetCenter -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetCenter(const gp_Pnt& theCenter) { const Standard_Real aDistance = myEye.Distance(theCenter); @@ -285,10 +265,8 @@ void Graphic3d_Camera::SetCenter(const gp_Pnt& theCenter) InvalidateOrientation(); } -// ======================================================================= -// function : SetUp -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetUp(const gp_Dir& theUp) { if (Up().IsEqual(theUp, 0.0)) @@ -300,10 +278,8 @@ void Graphic3d_Camera::SetUp(const gp_Dir& theUp) InvalidateOrientation(); } -// ======================================================================= -// function : SetAxialScale -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetAxialScale(const gp_XYZ& theAxialScale) { Standard_OutOfRange_Raise_if(theAxialScale.X() <= 0.0 || theAxialScale.Y() <= 0.0 @@ -318,10 +294,8 @@ void Graphic3d_Camera::SetAxialScale(const gp_XYZ& theAxialScale) InvalidateOrientation(); } -// ======================================================================= -// function : SetDistance -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetDistance(const Standard_Real theDistance) { if (myDistance == theDistance) @@ -335,10 +309,8 @@ void Graphic3d_Camera::SetDistance(const Standard_Real theDistance) InvalidateOrientation(); } -// ======================================================================= -// function : SetDirectionFromEye -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetDirectionFromEye(const gp_Dir& theDir) { if (myDirection.IsEqual(theDir, 0.0)) @@ -350,10 +322,8 @@ void Graphic3d_Camera::SetDirectionFromEye(const gp_Dir& theDir) InvalidateOrientation(); } -// ======================================================================= -// function : SetDirection -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetDirection(const gp_Dir& theDir) { if (myDirection.IsEqual(theDir, 0.0)) @@ -367,10 +337,8 @@ void Graphic3d_Camera::SetDirection(const gp_Dir& theDir) InvalidateOrientation(); } -// ======================================================================= -// function : SetScale -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetScale(const Standard_Real theScale) { if (Scale() == theScale) @@ -397,10 +365,8 @@ void Graphic3d_Camera::SetScale(const Standard_Real theScale) InvalidateProjection(); } -// ======================================================================= -// function : Scale -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_Camera::Scale() const { switch (myProjType) @@ -417,10 +383,8 @@ Standard_Real Graphic3d_Camera::Scale() const } } -// ======================================================================= -// function : SetProjectionType -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetProjectionType(const Projection theProjectionType) { Projection anOldType = ProjectionType(); @@ -447,10 +411,8 @@ void Graphic3d_Camera::SetProjectionType(const Projection theProjectionType) InvalidateProjection(); } -// ======================================================================= -// function : SetFOVy -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetFOVy(const Standard_Real theFOVy) { if (FOVy() == theFOVy) @@ -465,10 +427,8 @@ void Graphic3d_Camera::SetFOVy(const Standard_Real theFOVy) InvalidateProjection(); } -// ======================================================================= -// function : SetFOV2d -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetFOV2d(const Standard_Real theFOV) { if (FOV2d() == theFOV) @@ -480,10 +440,8 @@ void Graphic3d_Camera::SetFOV2d(const Standard_Real theFOV) InvalidateProjection(); } -// ======================================================================= -// function : SetZRange -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetZRange(const Standard_Real theZNear, const Standard_Real theZFar) { Standard_ASSERT_RAISE(theZFar > theZNear, "ZFar should be greater than ZNear"); @@ -504,10 +462,8 @@ void Graphic3d_Camera::SetZRange(const Standard_Real theZNear, const Standard_Re InvalidateProjection(); } -// ======================================================================= -// function : SetAspect -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetAspect(const Standard_Real theAspect) { if (Aspect() == theAspect) @@ -521,10 +477,8 @@ void Graphic3d_Camera::SetAspect(const Standard_Real theAspect) InvalidateProjection(); } -// ======================================================================= -// function : SetZFocus -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetZFocus(const FocusType theType, const Standard_Real theZFocus) { if (ZFocusType() == theType && ZFocus() == theZFocus) @@ -538,10 +492,8 @@ void Graphic3d_Camera::SetZFocus(const FocusType theType, const Standard_Real th InvalidateProjection(); } -// ======================================================================= -// function : SetIOD -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetIOD(const IODType theType, const Standard_Real theIOD) { if (GetIODType() == theType && IOD() == theIOD) @@ -555,10 +507,8 @@ void Graphic3d_Camera::SetIOD(const IODType theType, const Standard_Real theIOD) InvalidateProjection(); } -// ======================================================================= -// function : SetTile -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetTile(const Graphic3d_CameraTile& theTile) { if (myTile == theTile) @@ -570,19 +520,15 @@ void Graphic3d_Camera::SetTile(const Graphic3d_CameraTile& theTile) InvalidateProjection(); } -// ======================================================================= -// function : OrthogonalizeUp -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::OrthogonalizeUp() { SetUp(OrthogonalizedUp()); } -// ======================================================================= -// function : OrthogonalizedUp -// purpose : -// ======================================================================= +//================================================================================================= + gp_Dir Graphic3d_Camera::OrthogonalizedUp() const { gp_Dir aDir = Direction(); @@ -592,10 +538,8 @@ gp_Dir Graphic3d_Camera::OrthogonalizedUp() const return aLeft.Crossed(aDir); } -// ======================================================================= -// function : Transform -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::Transform(const gp_Trsf& theTrsf) { if (theTrsf.Form() == gp_Identity) @@ -609,10 +553,8 @@ void Graphic3d_Camera::Transform(const gp_Trsf& theTrsf) InvalidateOrientation(); } -// ======================================================================= -// function : safePointCast -// purpose : -// ======================================================================= +//================================================================================================= + static Graphic3d_Vec4d safePointCast(const gp_Pnt& thePnt) { Standard_Real aLim = 1e15f; @@ -633,10 +575,8 @@ static Graphic3d_Vec4d safePointCast(const gp_Pnt& thePnt) return aPnt; } -// ======================================================================= -// function : Project -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::Project(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); @@ -653,10 +593,8 @@ gp_Pnt Graphic3d_Camera::Project(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : UnProject -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::UnProject(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); @@ -682,10 +620,8 @@ gp_Pnt Graphic3d_Camera::UnProject(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : ConvertView2Proj -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::ConvertView2Proj(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aProjMx = ProjectionMatrix(); @@ -700,10 +636,8 @@ gp_Pnt Graphic3d_Camera::ConvertView2Proj(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : ConvertProj2View -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::ConvertProj2View(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aProjMx = ProjectionMatrix(); @@ -726,10 +660,8 @@ gp_Pnt Graphic3d_Camera::ConvertProj2View(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : ConvertWorld2View -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::ConvertWorld2View(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); @@ -744,10 +676,8 @@ gp_Pnt Graphic3d_Camera::ConvertWorld2View(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : ConvertView2World -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt Graphic3d_Camera::ConvertView2World(const gp_Pnt& thePnt) const { const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); @@ -769,10 +699,8 @@ gp_Pnt Graphic3d_Camera::ConvertView2World(const gp_Pnt& thePnt) const return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); } -// ======================================================================= -// function : ViewDimensions -// purpose : -// ======================================================================= +//================================================================================================= + gp_XYZ Graphic3d_Camera::ViewDimensions(const Standard_Real theZValue) const { // view plane dimensions @@ -793,10 +721,8 @@ gp_XYZ Graphic3d_Camera::ViewDimensions(const Standard_Real theZValue) const return gp_XYZ(aSizeX, aSizeY, myZFar - myZNear); } -// ======================================================================= -// function : Frustum -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::Frustum(gp_Pln& theLeft, gp_Pln& theRight, gp_Pln& theBottom, @@ -851,82 +777,64 @@ void Graphic3d_Camera::Frustum(gp_Pln& theLeft, theTop = gp_Pln(aPntTop, aDirTop); } -// ======================================================================= -// function : OrientationMatrix -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4d& Graphic3d_Camera::OrientationMatrix() const { return UpdateOrientation(myMatricesD).Orientation; } -// ======================================================================= -// function : OrientationMatrixF -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4& Graphic3d_Camera::OrientationMatrixF() const { return UpdateOrientation(myMatricesF).Orientation; } -// ======================================================================= -// function : ProjectionMatrix -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionMatrix() const { return UpdateProjection(myMatricesD).MProjection; } -// ======================================================================= -// function : ProjectionMatrixF -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4& Graphic3d_Camera::ProjectionMatrixF() const { return UpdateProjection(myMatricesF).MProjection; } -// ======================================================================= -// function : ProjectionStereoLeft -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoLeft() const { return UpdateProjection(myMatricesD).LProjection; } -// ======================================================================= -// function : ProjectionStereoLeftF -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoLeftF() const { return UpdateProjection(myMatricesF).LProjection; } -// ======================================================================= -// function : ProjectionStereoRight -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoRight() const { return UpdateProjection(myMatricesD).RProjection; } -// ======================================================================= -// function : ProjectionStereoRightF -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoRightF() const { return UpdateProjection(myMatricesF).RProjection; } -// ======================================================================= -// function : ResetCustomProjection -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::ResetCustomProjection() { if (myIsCustomFrustomLR || myIsCustomProjMatLR || myIsCustomProjMatM) @@ -938,10 +846,8 @@ void Graphic3d_Camera::ResetCustomProjection() } } -// ======================================================================= -// function : StereoProjection -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::StereoProjection(Graphic3d_Mat4d& theProjL, Graphic3d_Mat4d& theHeadToEyeL, Graphic3d_Mat4d& theProjR, @@ -950,10 +856,8 @@ void Graphic3d_Camera::StereoProjection(Graphic3d_Mat4d& theProjL, stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR); } -// ======================================================================= -// function : StereoProjectionF -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::StereoProjectionF(Graphic3d_Mat4& theProjL, Graphic3d_Mat4& theHeadToEyeL, Graphic3d_Mat4& theProjR, @@ -962,10 +866,8 @@ void Graphic3d_Camera::StereoProjectionF(Graphic3d_Mat4& theProjL, stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR); } -// ======================================================================= -// function : stereoProjection -// purpose : -// ======================================================================= +//================================================================================================= + template void Graphic3d_Camera::stereoProjection(NCollection_Mat4& theProjL, NCollection_Mat4& theHeadToEyeL, @@ -998,10 +900,8 @@ void Graphic3d_Camera::stereoProjection(NCollection_Mat4& theProjL, } } -// ======================================================================= -// function : SetCustomStereoFrustums -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::SetCustomStereoFrustums(const Aspect_FrustumLRBT& theFrustumL, const Aspect_FrustumLRBT& theFrustumR) { @@ -1012,10 +912,8 @@ void Graphic3d_Camera::SetCustomStereoFrustums(const Aspect_FrustumLRBT void Graphic3d_Camera::computeProjection(NCollection_Mat4& theProjM, NCollection_Mat4& theProjL, @@ -1184,10 +1078,8 @@ void Graphic3d_Camera::computeProjection(NCollection_Mat4& theProjM, } } -// ======================================================================= -// function : UpdateOrientation -// purpose : -// ======================================================================= +//================================================================================================= + template Graphic3d_Camera::TransformMatrices& Graphic3d_Camera::UpdateOrientation( TransformMatrices& theMatrices) const @@ -1220,10 +1112,8 @@ Graphic3d_Camera::TransformMatrices& Graphic3d_Camera::UpdateOrientation return theMatrices; // for inline accessors } -// ======================================================================= -// function : InvalidateProjection -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::InvalidateProjection() { myMatricesD.ResetProjection(); @@ -1232,10 +1122,8 @@ void Graphic3d_Camera::InvalidateProjection() (Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER); } -// ======================================================================= -// function : InvalidateOrientation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Camera::InvalidateOrientation() { myMatricesD.ResetOrientation(); @@ -1244,10 +1132,8 @@ void Graphic3d_Camera::InvalidateOrientation() (Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER); } -// ======================================================================= -// function : orthoProj -// purpose : -// ======================================================================= +//================================================================================================= + template void Graphic3d_Camera::orthoProj(NCollection_Mat4& theOutMx, const Aspect_FrustumLRBT& theLRBT, @@ -1287,10 +1173,8 @@ void Graphic3d_Camera::orthoProj(NCollection_Mat4& theOutMx, theOutMx.ChangeValue(3, 3) = Elem_t(1.0); } -// ======================================================================= -// function : PerspectiveProj -// purpose : -// ======================================================================= +//================================================================================================= + template void Graphic3d_Camera::perspectiveProj(NCollection_Mat4& theOutMx, const Aspect_FrustumLRBT& theLRBT, @@ -1336,10 +1220,8 @@ void Graphic3d_Camera::perspectiveProj(NCollection_Mat4& theOutM theOutMx.ChangeValue(3, 3) = Elem_t(0.0); } -// ======================================================================= -// function : StereoEyeProj -// purpose : -// ======================================================================= +//================================================================================================= + template void Graphic3d_Camera::stereoEyeProj(NCollection_Mat4& theOutMx, const Aspect_FrustumLRBT& theLRBT, @@ -1359,10 +1241,8 @@ void Graphic3d_Camera::stereoEyeProj(NCollection_Mat4& theOutMx, perspectiveProj(theOutMx, aLRBT, theNear, theFar); } -// ======================================================================= -// function : LookOrientation -// purpose : -// ======================================================================= +//================================================================================================= + template void Graphic3d_Camera::LookOrientation(const NCollection_Vec3& theEye, const NCollection_Vec3& theFwdDir, @@ -1397,10 +1277,8 @@ void Graphic3d_Camera::LookOrientation(const NCollection_Vec3& theEye, theOutMx.Multiply(anAxialScaleMx); } -// ======================================================================= -// function : FitMinMax -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_Camera::FitMinMax(const Bnd_Box& theBox, const Standard_Real theResolution, const bool theToEnlargeIfLine) diff --git a/src/Graphic3d/Graphic3d_ClipPlane.cxx b/src/Graphic3d/Graphic3d_ClipPlane.cxx index 66daf2788a..eb5a677ee2 100755 --- a/src/Graphic3d/Graphic3d_ClipPlane.cxx +++ b/src/Graphic3d/Graphic3d_ClipPlane.cxx @@ -39,10 +39,8 @@ static Handle(Graphic3d_AspectFillArea3d) defaultAspect() } } // namespace -// ======================================================================= -// function : Graphic3d_ClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ClipPlane::Graphic3d_ClipPlane() : myAspect(defaultAspect()), myPrevInChain(NULL), @@ -59,10 +57,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane() makeId(); } -// ======================================================================= -// function : Graphic3d_ClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_Vec4d& theEquation) : myAspect(defaultAspect()), myPrevInChain(NULL), @@ -80,10 +76,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_Vec4d& theEquation) updateInversedPlane(); } -// ======================================================================= -// function : Graphic3d_ClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther) : Standard_Transient(theOther), myAspect(defaultAspect()), @@ -102,10 +96,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther) *myAspect = *theOther.CappingAspect(); } -// ======================================================================= -// function : Graphic3d_ClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane) : myAspect(defaultAspect()), myPrevInChain(NULL), @@ -122,10 +114,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane) makeId(); } -// ======================================================================= -// function : SetEquation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetEquation(const Graphic3d_Vec4d& theEquation) { myPlane = gp_Pln(theEquation.x(), theEquation.y(), theEquation.z(), theEquation.w()); @@ -134,10 +124,8 @@ void Graphic3d_ClipPlane::SetEquation(const Graphic3d_Vec4d& theEquation) myEquationMod++; } -// ======================================================================= -// function : SetPlane -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetEquation(const gp_Pln& thePlane) { myPlane = thePlane; @@ -146,10 +134,8 @@ void Graphic3d_ClipPlane::SetEquation(const gp_Pln& thePlane) myEquationMod++; } -// ======================================================================= -// function : SetOn -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetOn(const Standard_Boolean theIsOn) { if (myPrevInChain != NULL) @@ -160,28 +146,22 @@ void Graphic3d_ClipPlane::SetOn(const Standard_Boolean theIsOn) myIsOn = theIsOn; } -// ======================================================================= -// function : SetCapping -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCapping(const Standard_Boolean theIsOn) { myIsCapping = theIsOn; } -// ======================================================================= -// function : Clone -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const { return new Graphic3d_ClipPlane(*this); } -// ======================================================================= -// function : SetCappingColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingColor(const Quantity_Color& theColor) { myAspect->SetInteriorColor(theColor); @@ -189,10 +169,8 @@ void Graphic3d_ClipPlane::SetCappingColor(const Quantity_Color& theColor) ++myAspectMod; } -// ======================================================================= -// function : SetCappingMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingMaterial(const Graphic3d_MaterialAspect& theMat) { myAspect->SetFrontMaterial(theMat); @@ -203,10 +181,8 @@ void Graphic3d_ClipPlane::SetCappingMaterial(const Graphic3d_MaterialAspect& the ++myAspectMod; } -// ======================================================================= -// function : SetCappingTexture -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingTexture(const Handle(Graphic3d_TextureMap)& theTexture) { if (!theTexture.IsNull()) @@ -231,60 +207,48 @@ void Graphic3d_ClipPlane::SetCappingTexture(const Handle(Graphic3d_TextureMap)& ++myAspectMod; } -// ======================================================================= -// function : SetCappingHatch -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingHatch(const Aspect_HatchStyle theStyle) { myAspect->SetHatchStyle(theStyle); ++myAspectMod; } -// ======================================================================= -// function : SetCappingCustomHatch -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingCustomHatch(const Handle(Graphic3d_HatchStyle)& theStyle) { myAspect->SetHatchStyle(theStyle); ++myAspectMod; } -// ======================================================================= -// function : SetCappingHatchOn -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingHatchOn() { myAspect->SetInteriorStyle(Aspect_IS_HATCH); ++myAspectMod; } -// ======================================================================= -// function : SetCappingHatchOff -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingHatchOff() { myAspect->SetInteriorStyle(Aspect_IS_SOLID); ++myAspectMod; } -// ======================================================================= -// function : SetCappingAspect -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetCappingAspect(const Handle(Graphic3d_AspectFillArea3d)& theAspect) { myAspect = theAspect; ++myAspectMod; } -// ======================================================================= -// function : setCappingFlag -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::setCappingFlag(bool theToUse, int theFlag) { if (theToUse) @@ -298,20 +262,16 @@ void Graphic3d_ClipPlane::setCappingFlag(bool theToUse, int theFlag) ++myAspectMod; } -// ======================================================================= -// function : makeId -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::makeId() { myId = TCollection_AsciiString("Graphic3d_ClipPlane_") // DynamicType()->Name() + TCollection_AsciiString(Standard_Atomic_Increment(&THE_CLIP_PLANE_COUNTER)); } -// ======================================================================= -// function : updateChainLen -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::updateChainLen() { myChainLenFwd = !myNextInChain.IsNull() ? (myNextInChain->myChainLenFwd + 1) : 1; @@ -321,10 +281,8 @@ void Graphic3d_ClipPlane::updateChainLen() } } -// ======================================================================= -// function : SetChainNextPlane -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::SetChainNextPlane(const Handle(Graphic3d_ClipPlane)& thePlane) { ++myEquationMod; @@ -340,10 +298,8 @@ void Graphic3d_ClipPlane::SetChainNextPlane(const Handle(Graphic3d_ClipPlane)& t updateChainLen(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ClipPlane::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Graphic3d/Graphic3d_CubeMap.cxx b/src/Graphic3d/Graphic3d_CubeMap.cxx index 6530f992b5..4740f7cd35 100644 --- a/src/Graphic3d/Graphic3d_CubeMap.cxx +++ b/src/Graphic3d/Graphic3d_CubeMap.cxx @@ -16,10 +16,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMap, Graphic3d_TextureMap) -// ======================================================================= -// function : Graphic3d_CubeMap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMap::Graphic3d_CubeMap(const TCollection_AsciiString& theFileName, Standard_Boolean theToGenerateMipmaps) : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_CUBEMAP), @@ -30,10 +28,8 @@ Graphic3d_CubeMap::Graphic3d_CubeMap(const TCollection_AsciiString& theFileName, myHasMipmaps = theToGenerateMipmaps; } -// ======================================================================= -// function : Graphic3d_CubeMap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMap::Graphic3d_CubeMap(const Handle(Image_PixMap)& thePixmap, Standard_Boolean theToGenerateMipmaps) : Graphic3d_TextureMap(thePixmap, Graphic3d_TypeOfTexture_CUBEMAP), @@ -44,10 +40,8 @@ Graphic3d_CubeMap::Graphic3d_CubeMap(const Handle(Image_PixMap)& thePixmap, myHasMipmaps = theToGenerateMipmaps; } -// ======================================================================= -// function : ~Graphic3d_CubeMap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMap::~Graphic3d_CubeMap() { // diff --git a/src/Graphic3d/Graphic3d_CubeMapOrder.cxx b/src/Graphic3d/Graphic3d_CubeMapOrder.cxx index deb9899a1d..0fca81f69d 100644 --- a/src/Graphic3d/Graphic3d_CubeMapOrder.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapOrder.cxx @@ -18,20 +18,16 @@ #include -// ======================================================================= -// function : Graphic3d_CubeMapOrder -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder() : myConvolution(0), myHasOverflows(false) { } -// ======================================================================= -// function : Graphic3d_CubeMapOrder -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(unsigned char thePosXLocation, unsigned char theNegXLocation, unsigned char thePosYLocation, @@ -49,20 +45,16 @@ Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(unsigned char thePosXLocation, Set(Graphic3d_CMS_NEG_Z, theNegZLocation); } -// ======================================================================= -// function : Graphic3d_CubeMapOrder -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(const Graphic3d_ValidatedCubeMapOrder& theOrder) : myConvolution(theOrder.Order.myConvolution), myHasOverflows(theOrder.Order.myHasOverflows) { } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(const Graphic3d_CubeMapOrder& theOrder) { myConvolution = theOrder.myConvolution; @@ -85,10 +77,8 @@ Graphic3d_ValidatedCubeMapOrder Graphic3d_CubeMapOrder::Validated() const return *this; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue) { @@ -101,10 +91,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(Graphic3d_CubeMapSide theCub return *this; } -// ======================================================================= -// function : Get -// purpose : -// ======================================================================= +//================================================================================================= + unsigned char Graphic3d_CubeMapOrder::Get(Graphic3d_CubeMapSide theCubeMapSide) const { return get(static_cast(theCubeMapSide)); @@ -119,10 +107,8 @@ unsigned char Graphic3d_CubeMapOrder::operator[](Graphic3d_CubeMapSide theCubeMa return Get(theCubeMapSide); } -// ======================================================================= -// function : SetDefault -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault() { for (unsigned char i = 0; i < 6; ++i) @@ -132,10 +118,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault() return *this; } -// ======================================================================= -// function : Permute -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute( const Graphic3d_ValidatedCubeMapOrder& thePermutation) { @@ -147,10 +131,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute( return *this; } -// ======================================================================= -// function : Permuted -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted( const Graphic3d_ValidatedCubeMapOrder& thePermutation) const { @@ -159,10 +141,8 @@ Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted( return anOrder; } -// ======================================================================= -// function : Swap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap(Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide) { @@ -172,10 +152,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap(Graphic3d_CubeMapSide theFi return *this; } -// ======================================================================= -// function : Swapped -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped(Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide) const { @@ -184,10 +162,8 @@ Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped(Graphic3d_CubeMapSide the return anOrder; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear() { myConvolution = 0; @@ -195,19 +171,15 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear() return *this; } -// ======================================================================= -// function : IsEmpty -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CubeMapOrder::IsEmpty() const { return myConvolution == 0; } -// ======================================================================= -// function : HasRepetitions -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CubeMapOrder::HasRepetitions() const { std::bitset<6> aBitSet; @@ -223,37 +195,29 @@ bool Graphic3d_CubeMapOrder::HasRepetitions() const return false; } -// ======================================================================= -// function : HasOverflows -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CubeMapOrder::HasOverflows() const { return myHasOverflows; } -// ======================================================================= -// function : IsValid -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_CubeMapOrder::IsValid() const { return !HasRepetitions() && !HasOverflows(); } -// ======================================================================= -// function : get -// purpose : -// ======================================================================= +//================================================================================================= + unsigned char Graphic3d_CubeMapOrder::get(unsigned char theCubeMapSide) const { return (myConvolution / (1 << (theCubeMapSide * 3))) % (1 << 3); } -// ======================================================================= -// function : set -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CubeMapOrder::set(unsigned char theCubeMapSide, unsigned char theValue) { unsigned int aValuePlace = 1 << (theCubeMapSide * 3); @@ -261,19 +225,15 @@ void Graphic3d_CubeMapOrder::set(unsigned char theCubeMapSide, unsigned char the myConvolution += aValuePlace * theValue; } -// ======================================================================= -// function : set -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CubeMapOrder::set(Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue) { set(static_cast(theCubeMapSide), theValue); } -// ======================================================================= -// function : Default -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_ValidatedCubeMapOrder& Graphic3d_CubeMapOrder::Default() { static const Graphic3d_ValidatedCubeMapOrder aCubeMapOrder = diff --git a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx index 7c932fb29c..bf8e377b69 100644 --- a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx @@ -19,10 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap) -// ======================================================================= -// function : Graphic3d_CubeMapPacked -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const TCollection_AsciiString& theFilePath, const Graphic3d_ValidatedCubeMapOrder& theOrder) : Graphic3d_CubeMap(theFilePath), @@ -31,10 +29,8 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const TCollection_AsciiString& { } -// ======================================================================= -// function : Graphic3d_CubeMapPacked -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const Handle(Image_PixMap)& theImage, const Graphic3d_ValidatedCubeMapOrder& theOrder) : Graphic3d_CubeMap(Handle(Image_PixMap)()), @@ -47,10 +43,8 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const Handle(Image_PixMap)& } } -// ======================================================================= -// function : CompressedValue -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Graphic3d_CubeMapPacked::CompressedValue( const Handle(Image_SupportedFormats)& theSupported) { @@ -75,10 +69,8 @@ Handle(Image_CompressedPixMap) Graphic3d_CubeMapPacked::CompressedValue( return Handle(Image_CompressedPixMap)(); } -// ======================================================================= -// function : Value -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_PixMap) Graphic3d_CubeMapPacked::Value( const Handle(Image_SupportedFormats)& theSupported) { @@ -135,10 +127,8 @@ Handle(Image_PixMap) Graphic3d_CubeMapPacked::Value( return Handle(Image_PixMap)(); } -// ======================================================================= -// function : checkOrder -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_CubeMapPacked::checkOrder( const NCollection_Array1& theOrder) { @@ -177,10 +167,8 @@ Standard_Boolean Graphic3d_CubeMapPacked::checkOrder( return anOrderIsValid; } -// ======================================================================= -// function : checkImage -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_CubeMapPacked::checkImage(const Handle(Image_PixMap)& theImage, unsigned int& theTileNumberX) { @@ -211,10 +199,8 @@ Standard_Boolean Graphic3d_CubeMapPacked::checkImage(const Handle(Image_PixMap)& return Standard_True; } -// ======================================================================= -// function : tryLoadImage -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CubeMapPacked::tryLoadImage(const Handle(Image_SupportedFormats)& theSupported, const TCollection_AsciiString& theFilePath) { diff --git a/src/Graphic3d/Graphic3d_CubeMapSeparate.cxx b/src/Graphic3d/Graphic3d_CubeMapSeparate.cxx index 5727410e7e..0dc6fee79c 100644 --- a/src/Graphic3d/Graphic3d_CubeMapSeparate.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapSeparate.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapSeparate, Graphic3d_CubeMap) -// ======================================================================= -// function : Graphic3d_CubeMapSeparate -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( const NCollection_Array1& thePaths) { @@ -42,10 +40,8 @@ Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( } } -// ======================================================================= -// function : Graphic3d_CubeMapSeparate -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( const NCollection_Array1& theImages) { @@ -87,10 +83,8 @@ Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( } } -// ======================================================================= -// function : CompressedValue -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Graphic3d_CubeMapSeparate::CompressedValue( const Handle(Image_SupportedFormats)& theSupported) { @@ -131,10 +125,8 @@ Handle(Image_CompressedPixMap) Graphic3d_CubeMapSeparate::CompressedValue( return Handle(Image_CompressedPixMap)(); } -// ======================================================================= -// function : Value -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_PixMap) Graphic3d_CubeMapSeparate::Value( const Handle(Image_SupportedFormats)& theSupported) { @@ -199,10 +191,8 @@ Handle(Image_PixMap) Graphic3d_CubeMapSeparate::Value( return Handle(Image_PixMap)(); } -// ======================================================================= -// function : IsDone -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_CubeMapSeparate::IsDone() const { if (!myImages[0].IsNull()) @@ -222,10 +212,8 @@ Standard_Boolean Graphic3d_CubeMapSeparate::IsDone() const return Standard_True; } -// ======================================================================= -// function : resetImages -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CubeMapSeparate::resetImages() { for (unsigned int i = 0; i < 6; ++i) diff --git a/src/Graphic3d/Graphic3d_CullingTool.cxx b/src/Graphic3d/Graphic3d_CullingTool.cxx index a4dd9b1e5b..f654b0b04c 100644 --- a/src/Graphic3d/Graphic3d_CullingTool.cxx +++ b/src/Graphic3d/Graphic3d_CullingTool.cxx @@ -19,10 +19,8 @@ #include -// ======================================================================= -// function : Graphic3d_CullingTool -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_CullingTool::Graphic3d_CullingTool() : myClipVerts(0, Graphic3d_Camera::FrustumVerticesNB), myIsProjectionParallel(Standard_True), @@ -32,10 +30,8 @@ Graphic3d_CullingTool::Graphic3d_CullingTool() // } -// ======================================================================= -// function : SetViewVolume -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CullingTool::SetViewVolume(const Handle(Graphic3d_Camera)& theCamera, const Graphic3d_Mat4d& theModelWorld) { @@ -102,10 +98,8 @@ void Graphic3d_CullingTool::SetViewVolume(const Handle(Graphic3d_Camera)& theCam } } -// ======================================================================= -// function : SetViewportSize -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CullingTool::SetViewportSize(Standard_Integer theViewportWidth, Standard_Integer theViewportHeight, Standard_Real theResolutionRatio) @@ -115,10 +109,8 @@ void Graphic3d_CullingTool::SetViewportSize(Standard_Integer theViewportWidth, myPixelSize = Max(theResolutionRatio / myViewportHeight, theResolutionRatio / myViewportWidth); } -// ======================================================================= -// function : SignedPlanePointDistance -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_CullingTool::SignedPlanePointDistance(const Graphic3d_Vec4d& theNormal, const Graphic3d_Vec4d& thePnt) { @@ -136,10 +128,8 @@ Standard_Real Graphic3d_CullingTool::SignedPlanePointDistance(const Graphic3d_Ve return aD + (anA * thePnt.x() + aB * thePnt.y() + aC * thePnt.z()); } -// ======================================================================= -// function : SetCullingDistance -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CullingTool::SetCullingDistance(CullingContext& theCtx, Standard_Real theDistance) const { @@ -150,10 +140,8 @@ void Graphic3d_CullingTool::SetCullingDistance(CullingContext& theCtx, } } -// ======================================================================= -// function : SetCullingSize -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CullingTool::SetCullingSize(CullingContext& theCtx, Standard_Real theSize) const { theCtx.SizeCull2 = -1.0; @@ -165,10 +153,8 @@ void Graphic3d_CullingTool::SetCullingSize(CullingContext& theCtx, Standard_Real } } -// ======================================================================= -// function : CacheClipPtsProjections -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_CullingTool::CacheClipPtsProjections() { // project frustum onto its own normals diff --git a/src/Graphic3d/Graphic3d_FrameStats.cxx b/src/Graphic3d/Graphic3d_FrameStats.cxx index 3b97dd1575..f4c110ba14 100644 --- a/src/Graphic3d/Graphic3d_FrameStats.cxx +++ b/src/Graphic3d/Graphic3d_FrameStats.cxx @@ -237,10 +237,8 @@ static void addTimeInfo(TColStd_IndexedDataMapOfStringString& theDict, } } // namespace -// ======================================================================= -// function : Graphic3d_FrameStats -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStats::Graphic3d_FrameStats() : myFpsTimer(Standard_True), myFrameStartTime(0.0), @@ -254,19 +252,15 @@ Graphic3d_FrameStats::Graphic3d_FrameStats() // } -// ======================================================================= -// function : ~Graphic3d_FrameStats -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStats::~Graphic3d_FrameStats() { // } -// ======================================================================= -// function : FormatStats -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_FrameStats::FormatStats( Graphic3d_RenderingParams::PerfCounters theFlags) const { @@ -558,10 +552,8 @@ TCollection_AsciiString Graphic3d_FrameStats::FormatStats( return TCollection_AsciiString(aBuf.str().c_str()); } -// ======================================================================= -// function : FormatStats -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStats::FormatStats(TColStd_IndexedDataMapOfStringString& theDict, Graphic3d_RenderingParams::PerfCounters theFlags) const { @@ -676,10 +668,8 @@ void Graphic3d_FrameStats::FormatStats(TColStd_IndexedDataMapOfStringString& t } } -// ======================================================================= -// function : FrameStart -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStats::FrameStart(const Handle(Graphic3d_CView)& theView, bool theIsImmediateOnly) { @@ -713,10 +703,8 @@ void Graphic3d_FrameStats::FrameStart(const Handle(Graphic3d_CView)& theView, } } -// ======================================================================= -// function : FrameEnd -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStats::FrameEnd(const Handle(Graphic3d_CView)& theView, bool theIsImmediateOnly) { const Graphic3d_RenderingParams::PerfCounters aBits = diff --git a/src/Graphic3d/Graphic3d_FrameStatsData.cxx b/src/Graphic3d/Graphic3d_FrameStatsData.cxx index f33d7ee218..471209d88c 100644 --- a/src/Graphic3d/Graphic3d_FrameStatsData.cxx +++ b/src/Graphic3d/Graphic3d_FrameStatsData.cxx @@ -13,10 +13,8 @@ #include -// ======================================================================= -// function : Graphic3d_FrameStatsData -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStatsData::Graphic3d_FrameStatsData() : myFps(-1.0), myFpsCpu(-1.0), @@ -30,10 +28,8 @@ Graphic3d_FrameStatsData::Graphic3d_FrameStatsData() Reset(); } -// ======================================================================= -// function : Graphic3d_FrameStatsData -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsData& theOther) : myCounters(theOther.myCounters), myTimers(theOther.myTimers), @@ -46,10 +42,8 @@ Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsDat { } -// ======================================================================= -// function : Graphic3d_FrameStatsData -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(Graphic3d_FrameStatsData&& theOther) noexcept : myCounters(std::move(theOther.myCounters)), myTimers(std::move(theOther.myTimers)), @@ -106,10 +100,8 @@ Graphic3d_FrameStatsData& Graphic3d_FrameStatsData::operator=( return *this; } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStatsData::Reset() { myFps = -1.0; @@ -122,10 +114,8 @@ void Graphic3d_FrameStatsData::Reset() myTimersMax.assign(myTimersMax.size(), 0.0); } -// ======================================================================= -// function : FillMax -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStatsData::FillMax(const Graphic3d_FrameStatsData& theOther) { myFps = Max(myFps, theOther.myFps); @@ -146,20 +136,16 @@ void Graphic3d_FrameStatsData::FillMax(const Graphic3d_FrameStatsData& theOther) } } -// ======================================================================= -// function : Graphic3d_FrameStatsDataTmp -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_FrameStatsDataTmp::Graphic3d_FrameStatsDataTmp() { myOsdTimers.resize(Graphic3d_FrameStatsTimer_NB, OSD_Timer(true)); myTimersPrev.resize(Graphic3d_FrameStatsTimer_NB, 0.0); } -// ======================================================================= -// function : FlushTimers -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStatsDataTmp::FlushTimers(Standard_Size theNbFrames, bool theIsFinal) { for (size_t aTimerIter = 0; aTimerIter < myTimers.size(); ++aTimerIter) @@ -180,10 +166,8 @@ void Graphic3d_FrameStatsDataTmp::FlushTimers(Standard_Size theNbFrames, bool th } } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_FrameStatsDataTmp::Reset() { Graphic3d_FrameStatsData::Reset(); diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.cxx b/src/Graphic3d/Graphic3d_GraphicDriver.cxx index 8432cd99ca..1087a36c9f 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriver.cxx +++ b/src/Graphic3d/Graphic3d_GraphicDriver.cxx @@ -20,10 +20,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_GraphicDriver, Standard_Transient) -// ======================================================================= -// function : Graphic3d_GraphicDriver -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_GraphicDriver::Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConnection)& theDisp) : myDisplayConnection(theDisp) { @@ -114,28 +112,22 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConn } } -// ======================================================================= -// function : GetDisplayConnection -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Aspect_DisplayConnection)& Graphic3d_GraphicDriver::GetDisplayConnection() const { return myDisplayConnection; } -// ======================================================================= -// function : NewIdentification -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_GraphicDriver::NewIdentification() { return myStructGenId.Next(); } -// ======================================================================= -// function : RemoveIdentification -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_GraphicDriver::RemoveIdentification(const Standard_Integer theId) { myStructGenId.Free(theId); @@ -288,10 +280,8 @@ void Graphic3d_GraphicDriver::SetZLayerSettings(const Graphic3d_ZLayerId aLayerDef->SetLayerSettings(theSettings); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_GraphicDriver::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Graphic3d/Graphic3d_GraphicDriverFactory.cxx b/src/Graphic3d/Graphic3d_GraphicDriverFactory.cxx index 02f68f53c6..ebe858a6e3 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriverFactory.cxx +++ b/src/Graphic3d/Graphic3d_GraphicDriverFactory.cxx @@ -26,19 +26,15 @@ static Graphic3d_GraphicDriverFactoryList& getDriverFactories() } } // namespace -// ======================================================================= -// function : DriverFactories -// purpose : -// ======================================================================= +//================================================================================================= + const Graphic3d_GraphicDriverFactoryList& Graphic3d_GraphicDriverFactory::DriverFactories() { return getDriverFactories(); } -// ======================================================================= -// function : RegisterFactory -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_GraphicDriverFactory::RegisterFactory( const Handle(Graphic3d_GraphicDriverFactory)& theFactory, bool theIsPreferred) @@ -63,10 +59,8 @@ void Graphic3d_GraphicDriverFactory::RegisterFactory( aFactories.Append(theFactory); } -// ======================================================================= -// function : UnregisterFactory -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_GraphicDriverFactory::UnregisterFactory(const TCollection_AsciiString& theName) { Graphic3d_GraphicDriverFactoryList& aFactories = getDriverFactories(); @@ -83,20 +77,16 @@ void Graphic3d_GraphicDriverFactory::UnregisterFactory(const TCollection_AsciiSt } } -// ======================================================================= -// function : DefaultDriverFactory -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_GraphicDriverFactory) Graphic3d_GraphicDriverFactory::DefaultDriverFactory() { const Graphic3d_GraphicDriverFactoryList& aMap = getDriverFactories(); return !aMap.IsEmpty() ? aMap.First() : Handle(Graphic3d_GraphicDriverFactory)(); } -// ======================================================================= -// function : Graphic3d_GraphicDriverFactory -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_GraphicDriverFactory::Graphic3d_GraphicDriverFactory( const TCollection_AsciiString& theName) : myName(theName) diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index 79dc6196e1..35c1820d78 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -30,10 +30,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient) -// ======================================================================= -// function : Graphic3d_Group -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Group::Graphic3d_Group(const Handle(Graphic3d_Structure)& theStruct) : myStructure(theStruct.operator->()), myIsClosed(false) @@ -41,20 +39,16 @@ Graphic3d_Group::Graphic3d_Group(const Handle(Graphic3d_Structure)& theStruct) // } -// ======================================================================= -// function : ~Graphic3d_Group -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Group::~Graphic3d_Group() { // tell graphics driver to clear internal resources of the group Clear(Standard_False); } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Clear(Standard_Boolean theUpdateStructureMgr) { if (IsDeleted()) @@ -73,10 +67,8 @@ void Graphic3d_Group::Clear(Standard_Boolean theUpdateStructureMgr) } } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Remove() { if (IsDeleted()) @@ -91,19 +83,15 @@ void Graphic3d_Group::Remove() myBounds.Clear(); } -// ======================================================================= -// function : IsDeleted -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_Group::IsDeleted() const { return myStructure == NULL || myStructure->IsDeleted(); } -// ======================================================================= -// function : IsEmpty -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_Group::IsEmpty() const { if (IsDeleted()) @@ -114,10 +102,8 @@ Standard_Boolean Graphic3d_Group::IsEmpty() const return !myStructure->IsInfinite() && !myBounds.IsValid(); } -// ======================================================================= -// function : SetTransformPersistence -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::SetTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers) { if (myTrsfPers != theTrsfPers) @@ -130,10 +116,8 @@ void Graphic3d_Group::SetTransformPersistence(const Handle(Graphic3d_TransformPe } } -// ======================================================================= -// function : SetMinMaxValues -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::SetMinMaxValues(const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin, @@ -151,19 +135,15 @@ void Graphic3d_Group::SetMinMaxValues(const Standard_Real theXMin, 1.0f)); } -// ======================================================================= -// function : Structure -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_Structure) Graphic3d_Group::Structure() const { return myStructure; } -// ======================================================================= -// function : MinMaxValues -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::MinMaxValues(Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, @@ -196,10 +176,8 @@ void Graphic3d_Group::MinMaxValues(Standard_Real& theXMin, } } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Update() const { if (IsDeleted()) @@ -210,10 +188,8 @@ void Graphic3d_Group::Update() const myStructure->StructureManager()->Update(); } -// ======================================================================= -// function : AddPrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::AddPrimitiveArray(const Handle(Graphic3d_ArrayOfPrimitives)& thePrim, const Standard_Boolean theToEvalMinMax) { @@ -229,10 +205,8 @@ void Graphic3d_Group::AddPrimitiveArray(const Handle(Graphic3d_ArrayOfPrimitives theToEvalMinMax); } -// ======================================================================= -// function : AddPrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray theType, const Handle(Graphic3d_IndexBuffer)&, const Handle(Graphic3d_Buffer)& theAttribs, @@ -289,10 +263,8 @@ void Graphic3d_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray the Update(); } -// ======================================================================= -// function : Marker -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint, const Standard_Boolean theToEvalMinMax) { @@ -301,10 +273,8 @@ void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint, AddPrimitiveArray(aPoints, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const Standard_CString theText, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, @@ -322,10 +292,8 @@ void Graphic3d_Group::Text(const Standard_CString theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const Standard_CString theText, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, @@ -337,10 +305,8 @@ void Graphic3d_Group::Text(const Standard_CString theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, @@ -358,10 +324,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, const gp_Ax2& theOrientation, const Standard_Real theHeight, @@ -381,10 +345,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const Standard_CString theText, const gp_Ax2& theOrientation, const Standard_Real theHeight, @@ -404,10 +366,8 @@ void Graphic3d_Group::Text(const Standard_CString theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : Text -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, const Graphic3d_Vertex& thePoint, const Standard_Real theHeight, @@ -419,10 +379,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, AddText(aText, theToEvalMinMax); } -// ======================================================================= -// function : AddText -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::AddText(const Handle(Graphic3d_Text)& theTextParams, const Standard_Boolean theToEvalMinMax) { @@ -445,10 +403,8 @@ void Graphic3d_Group::AddText(const Handle(Graphic3d_Text)& theTextParams, Update(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Group::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Graphic3d/Graphic3d_Layer.cxx b/src/Graphic3d/Graphic3d_Layer.cxx index af7d48fc00..9999456708 100644 --- a/src/Graphic3d/Graphic3d_Layer.cxx +++ b/src/Graphic3d/Graphic3d_Layer.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient) -// ======================================================================= -// function : Graphic3d_Layer -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Layer::Graphic3d_Layer(Graphic3d_ZLayerId theId, const Handle(BVH_Builder3d)& theBuilder) : myNbStructures(0), myNbStructuresNotCulled(0), @@ -33,19 +31,15 @@ Graphic3d_Layer::Graphic3d_Layer(Graphic3d_ZLayerId theId, const Handle(BVH_Buil myIsBoundingBoxNeedsReset[0] = myIsBoundingBoxNeedsReset[1] = true; } -// ======================================================================= -// function : ~Graphic3d_Layer -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Layer::~Graphic3d_Layer() { // } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Layer::Add(const Graphic3d_CStructure* theStruct, Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority) @@ -80,10 +74,8 @@ void Graphic3d_Layer::Add(const Graphic3d_CStructure* theStruct, ++myNbStructures; } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_Layer::Remove(const Graphic3d_CStructure* theStruct, Graphic3d_DisplayPriority& thePriority, Standard_Boolean isForChangePriority) @@ -140,10 +132,8 @@ bool Graphic3d_Layer::Remove(const Graphic3d_CStructure* theStruct, return false; } -// ======================================================================= -// function : InvalidateBVHData -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Layer::InvalidateBVHData() { myIsBVHPrimitivesNeedsReset = Standard_True; @@ -181,10 +171,8 @@ static void addBox3dToBndBox(Bnd_Box& theResBox, const Graphic3d_BndBox3d& theBo } } -// ======================================================================= -// function : BoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + Bnd_Box Graphic3d_Layer::BoundingBox(Standard_Integer theViewId, const Handle(Graphic3d_Camera)& theCamera, Standard_Integer theWindowWidth, @@ -339,10 +327,8 @@ Bnd_Box Graphic3d_Layer::BoundingBox(Standard_Integer theViewId, return aResBox; } -// ======================================================================= -// function : considerZoomPersistenceObjects -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects( Standard_Integer theViewId, const Handle(Graphic3d_Camera)& theCamera, @@ -477,10 +463,8 @@ Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects( return (aMaxCoef > 0.0) ? aMaxCoef : 1.0; } -// ======================================================================= -// function : updateBVH -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Layer::updateBVH() const { if (!myIsBVHPrimitivesNeedsReset) @@ -534,10 +518,8 @@ struct NodeInStack }; } // namespace -// ======================================================================= -// function : UpdateCulling -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Layer::UpdateCulling( Standard_Integer theViewId, const Graphic3d_CullingTool& theSelector, @@ -706,10 +688,8 @@ void Graphic3d_Layer::UpdateCulling( } } -// ======================================================================= -// function : Append -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_Layer::Append(const Graphic3d_Layer& theOther) { // add all structures to destination priority list @@ -754,10 +734,8 @@ void Graphic3d_Layer::SetLayerSettings(const Graphic3d_ZLayerSettings& theSettin } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Layer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Graphic3d/Graphic3d_LightSet.cxx b/src/Graphic3d/Graphic3d_LightSet.cxx index 3c5115fcaf..d6800242e7 100644 --- a/src/Graphic3d/Graphic3d_LightSet.cxx +++ b/src/Graphic3d/Graphic3d_LightSet.cxx @@ -28,10 +28,8 @@ static const char THE_LIGHT_KEY_LETTERS[Graphic3d_TypeOfLightSource_NB] = { }; } // namespace -// ======================================================================= -// function : Graphic3d_LightSet -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_LightSet::Graphic3d_LightSet() : myAmbient(0.0f, 0.0f, 0.0f, 0.0f), myNbEnabled(0), @@ -43,10 +41,8 @@ Graphic3d_LightSet::Graphic3d_LightSet() memset(myLightTypesEnabled, 0, sizeof(myLightTypesEnabled)); } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_LightSet::Add(const Handle(Graphic3d_CLight)& theLight) { if (theLight.IsNull()) @@ -67,10 +63,8 @@ Standard_Boolean Graphic3d_LightSet::Add(const Handle(Graphic3d_CLight)& theLigh return Standard_True; } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_LightSet::Remove(const Handle(Graphic3d_CLight)& theLight) { const Standard_Integer anIndToRemove = myLights.FindIndex(theLight); @@ -85,10 +79,8 @@ Standard_Boolean Graphic3d_LightSet::Remove(const Handle(Graphic3d_CLight)& theL return Standard_True; } -// ======================================================================= -// function : UpdateRevision -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size Graphic3d_LightSet::UpdateRevision() { if (myCacheRevision == myRevision) diff --git a/src/Graphic3d/Graphic3d_MarkerImage.cxx b/src/Graphic3d/Graphic3d_MarkerImage.cxx index a5326786b7..837076d770 100755 --- a/src/Graphic3d/Graphic3d_MarkerImage.cxx +++ b/src/Graphic3d/Graphic3d_MarkerImage.cxx @@ -169,10 +169,8 @@ static Handle(Graphic3d_MarkerImage) getTextureImage(const Aspect_TypeOfMarker t } } // namespace -// ======================================================================= -// function : Graphic3d_MarkerImage -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(Image_PixMap)& theImage, const Handle(Image_PixMap)& theImageAlpha) : myImage(theImage), @@ -201,10 +199,8 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(Image_PixMap)& theImag } } -// ======================================================================= -// function : Graphic3d_MarkerImage -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_MarkerImage::Graphic3d_MarkerImage(const TCollection_AsciiString& theId, const TCollection_AsciiString& theAlphaId, const Handle(Image_PixMap)& theImage, @@ -231,10 +227,8 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const TCollection_AsciiString& theI } } -// ======================================================================= -// function : Graphic3d_MarkerImage -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(TColStd_HArray1OfByte)& theBitMap, const Standard_Integer theWidth, const Standard_Integer theHeight) @@ -250,20 +244,16 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(TColStd_HArray1OfByte) + TCollection_AsciiString(THE_MARKER_IMAGE_COUNTER); } -// ======================================================================= -// function : IsColoredImage -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_MarkerImage::IsColoredImage() const { return !myImage.IsNull() && myImage->Format() != Image_Format_Alpha && myImage->Format() != Image_Format_Gray; } -// ======================================================================= -// function : GetBitMapArray -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray( const Standard_Real theAlphaValue, const Standard_Boolean theIsTopDown) const @@ -306,10 +296,8 @@ Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray( return aBitMap; } -// ======================================================================= -// function : GetImage -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage() { if (!myImage.IsNull() || myBitMap.IsNull()) @@ -344,10 +332,8 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage() return myImage; } -// ======================================================================= -// function : GetImageAlpha -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha() { if (!myImageAlpha.IsNull()) @@ -382,28 +368,22 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha() return myImageAlpha; } -// ======================================================================= -// function : GetImageId -// purpose : -// ======================================================================= +//================================================================================================= + const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageId() const { return myImageId; } -// ======================================================================= -// function : GetImageAlphaId -// purpose : -// ======================================================================= +//================================================================================================= + const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageAlphaId() const { return myImageAlphaId; } -// ======================================================================= -// function : GetTextureSize -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MarkerImage::GetTextureSize(Standard_Integer& theWidth, Standard_Integer& theHeight) const { @@ -411,10 +391,8 @@ void Graphic3d_MarkerImage::GetTextureSize(Standard_Integer& theWidth, theHeight = myHeight; } -// ======================================================================= -// function : GetMarkerImage -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_MarkerImage) Graphic3d_MarkerImage::StandardMarker( const Aspect_TypeOfMarker theMarkerType, const Standard_ShortReal theScale, diff --git a/src/Graphic3d/Graphic3d_MaterialAspect.cxx b/src/Graphic3d/Graphic3d_MaterialAspect.cxx index 613506c01c..ae8bde79a3 100644 --- a/src/Graphic3d/Graphic3d_MaterialAspect.cxx +++ b/src/Graphic3d/Graphic3d_MaterialAspect.cxx @@ -69,10 +69,8 @@ static const RawMaterial THE_MATERIALS[] = { RawMaterial(Graphic3d_NameOfMaterial_UserDefined, "UserDefined")}; } // namespace -// ======================================================================= -// function : RawMaterial -// purpose : -// ======================================================================= +//================================================================================================= + RawMaterial::RawMaterial(Graphic3d_NameOfMaterial theName, const char* theStringName) : StringName(theStringName), BSDF(Graphic3d_BSDF::CreateDiffuse(Graphic3d_Vec3(0.0f))), @@ -471,30 +469,24 @@ RawMaterial::RawMaterial(Graphic3d_NameOfMaterial theName, const char* theString PBRMaterial.SetBSDF(BSDF); } -// ======================================================================= -// function : Graphic3d_MaterialAspect -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_MaterialAspect::Graphic3d_MaterialAspect() : myRequestedMaterialName(Graphic3d_NameOfMaterial_DEFAULT) { init(Graphic3d_NameOfMaterial_DEFAULT); } -// ======================================================================= -// function : Graphic3d_MaterialAspect -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_MaterialAspect::Graphic3d_MaterialAspect(const Graphic3d_NameOfMaterial theName) : myRequestedMaterialName(theName) { init(theName); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::init(const Graphic3d_NameOfMaterial theName) { const RawMaterial& aMat = THE_MATERIALS[theName]; @@ -513,10 +505,8 @@ void Graphic3d_MaterialAspect::init(const Graphic3d_NameOfMaterial theName) myRequestedMaterialName = theName; } -// ======================================================================= -// function : IncreaseShine -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::IncreaseShine(const Standard_ShortReal theDelta) { const Standard_ShortReal anOldShine = myShininess; @@ -527,10 +517,8 @@ void Graphic3d_MaterialAspect::IncreaseShine(const Standard_ShortReal theDelta) } } -// ======================================================================= -// function : SetMaterialType -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetMaterialType(const Graphic3d_TypeOfMaterial theType) { myMaterialType = theType; @@ -540,10 +528,8 @@ void Graphic3d_MaterialAspect::SetMaterialType(const Graphic3d_TypeOfMaterial th } } -// ======================================================================= -// function : SetColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetColor(const Quantity_Color& theColor) { if (myMaterialType == Graphic3d_MATERIAL_ASPECT) @@ -566,10 +552,8 @@ void Graphic3d_MaterialAspect::SetColor(const Quantity_Color& theColor) myColors[Graphic3d_TOR_DIFFUSE] = aDiffuse; } -// ======================================================================= -// function : SetAmbientColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetAmbientColor(const Quantity_Color& theColor) { if (myMaterialType == Graphic3d_MATERIAL_PHYSIC @@ -581,10 +565,8 @@ void Graphic3d_MaterialAspect::SetAmbientColor(const Quantity_Color& theColor) myColors[Graphic3d_TOR_AMBIENT] = theColor; } -// ======================================================================= -// function : SetDiffuseColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetDiffuseColor(const Quantity_Color& theColor) { if (myMaterialType == Graphic3d_MATERIAL_PHYSIC @@ -596,10 +578,8 @@ void Graphic3d_MaterialAspect::SetDiffuseColor(const Quantity_Color& theColor) myColors[Graphic3d_TOR_DIFFUSE] = theColor; } -// ======================================================================= -// function : SetSpecularColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetSpecularColor(const Quantity_Color& theColor) { if (myMaterialType == Graphic3d_MATERIAL_PHYSIC @@ -611,10 +591,8 @@ void Graphic3d_MaterialAspect::SetSpecularColor(const Quantity_Color& theColor) myColors[Graphic3d_TOR_SPECULAR] = theColor; } -// ======================================================================= -// function : SetEmissiveColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetEmissiveColor(const Quantity_Color& theColor) { if (myMaterialType == Graphic3d_MATERIAL_PHYSIC @@ -626,10 +604,8 @@ void Graphic3d_MaterialAspect::SetEmissiveColor(const Quantity_Color& theColor) myColors[Graphic3d_TOR_EMISSION] = theColor; } -// ======================================================================= -// function : SetTransparency -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetTransparency(const Standard_ShortReal theValue) { if (theValue < 0.0f || theValue > 1.0f) @@ -641,10 +617,8 @@ void Graphic3d_MaterialAspect::SetTransparency(const Standard_ShortReal theValue myPBRMaterial.SetAlpha(1.0f - theValue); } -// ======================================================================= -// function : SetRefractionIndex -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetRefractionIndex(const Standard_ShortReal theValue) { if (theValue < 1.0f) @@ -655,10 +629,8 @@ void Graphic3d_MaterialAspect::SetRefractionIndex(const Standard_ShortReal theVa myRefractionIndex = theValue; } -// ======================================================================= -// function : SetShininess -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MaterialAspect::SetShininess(const Standard_ShortReal theValue) { if (theValue < 0.0f || theValue > 1.0f) @@ -673,10 +645,8 @@ void Graphic3d_MaterialAspect::SetShininess(const Standard_ShortReal theValue) } } -// ======================================================================= -// function : MaterialName -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Graphic3d_MaterialAspect::MaterialName(const Standard_Integer theRank) { if (theRank < 1 || theRank > NumberOfMaterials()) @@ -687,10 +657,8 @@ Standard_CString Graphic3d_MaterialAspect::MaterialName(const Standard_Integer t return aMat.StringName; } -// ======================================================================= -// function : MaterialFromName -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName(const Standard_CString theName, Graphic3d_NameOfMaterial& theMat) { @@ -742,10 +710,8 @@ Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName(const Standard_CStri return Standard_False; } -// ======================================================================= -// function : MaterialType -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType(const Standard_Integer theRank) { if (theRank < 1 || theRank > NumberOfMaterials()) diff --git a/src/Graphic3d/Graphic3d_MediaTexture.cxx b/src/Graphic3d/Graphic3d_MediaTexture.cxx index 1d75f5fd46..0f47156e57 100644 --- a/src/Graphic3d/Graphic3d_MediaTexture.cxx +++ b/src/Graphic3d/Graphic3d_MediaTexture.cxx @@ -36,10 +36,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D) -// ================================================================ -// Function : Graphic3d_MediaTexture -// Purpose : -// ================================================================ +//================================================================================================= + Graphic3d_MediaTexture::Graphic3d_MediaTexture(const Handle(Standard_HMutex)& theMutex, Standard_Integer thePlane) : Graphic3d_Texture2D("", Graphic3d_TypeOfTexture_2D), @@ -52,10 +50,8 @@ Graphic3d_MediaTexture::Graphic3d_MediaTexture(const Handle(Standard_HMutex)& th myParams->SetTextureUnit(Graphic3d_TextureUnit(int(Graphic3d_TextureUnit_0) + thePlane)); } -// ================================================================ -// Function : GetImage -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_PixMap) Graphic3d_MediaTexture::GetImage(const Handle(Image_SupportedFormats)&) { Standard_Mutex::Sentry aLock(myMutex.get()); diff --git a/src/Graphic3d/Graphic3d_MediaTextureSet.cxx b/src/Graphic3d/Graphic3d_MediaTextureSet.cxx index b966a71cee..212bef5d19 100644 --- a/src/Graphic3d/Graphic3d_MediaTextureSet.cxx +++ b/src/Graphic3d/Graphic3d_MediaTextureSet.cxx @@ -35,10 +35,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTextureSet, Graphic3d_TextureSet) -// ================================================================ -// Function : Graphic3d_MediaTexture -// Purpose : -// ================================================================ +//================================================================================================= + Graphic3d_MediaTextureSet::Graphic3d_MediaTextureSet() : Graphic3d_TextureSet(4), myMutex(new Standard_HMutex()), @@ -111,10 +109,8 @@ Graphic3d_MediaTextureSet::Graphic3d_MediaTextureSet() aSrcFrag + F_SHADER_YUV2RGB_FULL)); } -// ======================================================================= -// function : SetCallback -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MediaTextureSet::SetCallback(CallbackOnUpdate_t theCallbackFunction, void* theCallbackUserPtr) { @@ -122,10 +118,8 @@ void Graphic3d_MediaTextureSet::SetCallback(CallbackOnUpdate_t theCallbackFuncti myCallbackUserPtr = theCallbackUserPtr; } -// ======================================================================= -// function : Notify -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MediaTextureSet::Notify() { if (myCallbackFunction != NULL) @@ -134,10 +128,8 @@ void Graphic3d_MediaTextureSet::Notify() } } -// ======================================================================= -// function : OpenInput -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MediaTextureSet::OpenInput(const TCollection_AsciiString& thePath, Standard_Boolean theToWait) { @@ -159,10 +151,8 @@ void Graphic3d_MediaTextureSet::OpenInput(const TCollection_AsciiString& thePath myInput = thePath; } -// ======================================================================= -// function : LockFrame -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Media_Frame) Graphic3d_MediaTextureSet::LockFrame() { { @@ -184,10 +174,8 @@ Handle(Media_Frame) Graphic3d_MediaTextureSet::LockFrame() return Handle(Media_Frame)(); } -// ======================================================================= -// function : ReleaseFrame -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_MediaTextureSet::ReleaseFrame(const Handle(Media_Frame)& theFrame) { { @@ -202,10 +190,8 @@ void Graphic3d_MediaTextureSet::ReleaseFrame(const Handle(Media_Frame)& theFrame } } -// ================================================================ -// Function : SwapFrames -// Purpose : -// ================================================================ +//================================================================================================= + Standard_Boolean Graphic3d_MediaTextureSet::SwapFrames() { if (myPlayerCtx.IsNull()) diff --git a/src/Graphic3d/Graphic3d_PBRMaterial.cxx b/src/Graphic3d/Graphic3d_PBRMaterial.cxx index 0af5700a8a..9712489994 100644 --- a/src/Graphic3d/Graphic3d_PBRMaterial.cxx +++ b/src/Graphic3d/Graphic3d_PBRMaterial.cxx @@ -18,10 +18,8 @@ #include -// ======================================================================= -// function : RoughnessFromSpecular -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Graphic3d_PBRMaterial::RoughnessFromSpecular(const Quantity_Color& theSpecular, const Standard_Real theShiness) { @@ -37,10 +35,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::RoughnessFromSpecular(const Quantity_C return (Standard_ShortReal)aRoughnessFactor; } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_PBRMaterial::Graphic3d_PBRMaterial() : myColor(0.f, 0.f, 0.f, 1.f), myMetallic(0.f), @@ -50,19 +46,15 @@ Graphic3d_PBRMaterial::Graphic3d_PBRMaterial() { } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_PBRMaterial::Graphic3d_PBRMaterial(const Graphic3d_BSDF& theBSDF) { SetBSDF(theBSDF); } -// ======================================================================= -// function : SetMetallic -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetMetallic(Standard_ShortReal theMetallic) { Graphic3d_MaterialDefinitionError_Raise_if( @@ -70,19 +62,15 @@ void Graphic3d_PBRMaterial::SetMetallic(Standard_ShortReal theMetallic) "'metallic' parameter of PBR material must be in range [0, 1]") myMetallic = theMetallic; } -// ======================================================================= -// function : Roughness -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Graphic3d_PBRMaterial::Roughness(Standard_ShortReal theNormalizedRoughness) { return theNormalizedRoughness * (1.f - MinRoughness()) + MinRoughness(); } -// ======================================================================= -// function : SetRoughness -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetRoughness(Standard_ShortReal theRoughness) { Graphic3d_MaterialDefinitionError_Raise_if( @@ -90,10 +78,8 @@ void Graphic3d_PBRMaterial::SetRoughness(Standard_ShortReal theRoughness) "'roughness' parameter of PBR material must be in range [0, 1]") myRoughness = theRoughness; } -// ======================================================================= -// function : SetIOR -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetIOR(Standard_ShortReal theIOR) { Graphic3d_MaterialDefinitionError_Raise_if( @@ -101,29 +87,23 @@ void Graphic3d_PBRMaterial::SetIOR(Standard_ShortReal theIOR) "'IOR' parameter of PBR material must be in range [1, 3]") myIOR = theIOR; } -// ======================================================================= -// function : SetColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetColor(const Quantity_ColorRGBA& theColor) { myColor.SetRGB(theColor.GetRGB()); SetAlpha(theColor.Alpha()); } -// ======================================================================= -// function : SetColor -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetColor(const Quantity_Color& theColor) { myColor.SetRGB(theColor); } -// ======================================================================= -// function : SetAlpha -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetAlpha(Standard_ShortReal theAlpha) { Graphic3d_MaterialDefinitionError_Raise_if( @@ -131,10 +111,8 @@ void Graphic3d_PBRMaterial::SetAlpha(Standard_ShortReal theAlpha) "'alpha' parameter of PBR material must be in range [0, 1]") myColor.SetAlpha(theAlpha); } -// ======================================================================= -// function : SetEmission -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetEmission(const Graphic3d_Vec3& theEmission) { Graphic3d_MaterialDefinitionError_Raise_if( @@ -143,10 +121,8 @@ void Graphic3d_PBRMaterial::SetEmission(const Graphic3d_Vec3& theEmission) theEmission; } -// ======================================================================= -// function : SetBSDF -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::SetBSDF(const Graphic3d_BSDF& theBSDF) { SetEmission(theBSDF.Le); @@ -195,10 +171,8 @@ void Graphic3d_PBRMaterial::SetBSDF(const Graphic3d_BSDF& theBSDF) } } -// ======================================================================= -// function : GenerateEnvLUT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PBRMaterial::GenerateEnvLUT(const Handle(Image_PixMap)& theLUT, unsigned int theNbIntegralSamples) { @@ -242,10 +216,8 @@ void Graphic3d_PBRMaterial::GenerateEnvLUT(const Handle(Image_PixMap)& theLUT, } } -// ======================================================================= -// function : SpecIBLMapSamplesFactor -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Graphic3d_PBRMaterial::SpecIBLMapSamplesFactor(Standard_ShortReal theProbability, Standard_ShortReal theRoughness) { @@ -253,10 +225,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::SpecIBLMapSamplesFactor(Standard_Short / Standard_ShortReal(M_PI); } -// ======================================================================= -// function : lutGenGeometryFactor -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Graphic3d_PBRMaterial::lutGenGeometryFactor(Standard_ShortReal theCosL, Standard_ShortReal theCosV, Standard_ShortReal theRoughness) @@ -270,10 +240,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::lutGenGeometryFactor(Standard_ShortRea return aGeometryFactor; } -// ======================================================================= -// function : lutGenHammersley -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec2 Graphic3d_PBRMaterial::lutGenHammersley(unsigned int theNumber, unsigned int theCount) { @@ -290,10 +258,8 @@ Graphic3d_Vec2 Graphic3d_PBRMaterial::lutGenHammersley(unsigned int theNumber, return Graphic3d_Vec2(theNumber / Standard_ShortReal(theCount), aPhi2); } -// ======================================================================= -// function : lutGenImportanceSampleCosTheta -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal Graphic3d_PBRMaterial::lutGenImportanceSampleCosTheta( Standard_ShortReal theHammersleyPointComponent, Standard_ShortReal theRoughness) @@ -313,10 +279,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::lutGenImportanceSampleCosTheta( } } -// ======================================================================= -// function : lutGenImportanceSample -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenImportanceSample( const Graphic3d_Vec2& theHammerslayPoint, Standard_ShortReal theRoughness) @@ -330,19 +294,15 @@ Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenImportanceSample( return Graphic3d_Vec3(aSinTheta * cosf(aPhi), aSinTheta * sinf(aPhi), aCosTheta); } -// ======================================================================= -// function : lutGenView -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenView(Standard_ShortReal theCosV) { return Graphic3d_Vec3(0.f, sqrtf(1.f - theCosV * theCosV), theCosV); } -// ======================================================================= -// function : lutGenReflect -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenReflect(const Graphic3d_Vec3& theVector, const Graphic3d_Vec3& theAxis) { diff --git a/src/Graphic3d/Graphic3d_PresentationAttributes.cxx b/src/Graphic3d/Graphic3d_PresentationAttributes.cxx index b0f272547f..17dc6178bd 100644 --- a/src/Graphic3d/Graphic3d_PresentationAttributes.cxx +++ b/src/Graphic3d/Graphic3d_PresentationAttributes.cxx @@ -19,10 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_PresentationAttributes, Standard_Transient) -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_PresentationAttributes::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.cxx b/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.cxx index 4cb5acdcd1..425fe5985f 100644 --- a/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.cxx +++ b/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.cxx @@ -15,20 +15,16 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_SequenceOfHClipPlane, Standard_Transient) -// ======================================================================= -// function : Graphic3d_SequenceOfHClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_SequenceOfHClipPlane::Graphic3d_SequenceOfHClipPlane() : myToOverrideGlobal(Standard_False) { // } -// ======================================================================= -// function : Append -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_SequenceOfHClipPlane::Append(const Handle(Graphic3d_ClipPlane)& theItem) { for (NCollection_Sequence::Iterator anItemIter(myItems); @@ -44,10 +40,8 @@ bool Graphic3d_SequenceOfHClipPlane::Append(const Handle(Graphic3d_ClipPlane)& t return true; } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_SequenceOfHClipPlane::Remove(const Handle(Graphic3d_ClipPlane)& theItem) { for (NCollection_Sequence::Iterator anItemIter(myItems); @@ -63,10 +57,8 @@ bool Graphic3d_SequenceOfHClipPlane::Remove(const Handle(Graphic3d_ClipPlane)& t return false; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_SequenceOfHClipPlane::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Graphic3d/Graphic3d_ShaderAttribute.cxx b/src/Graphic3d/Graphic3d_ShaderAttribute.cxx index e2e5e7e09c..4eaa35f485 100644 --- a/src/Graphic3d/Graphic3d_ShaderAttribute.cxx +++ b/src/Graphic3d/Graphic3d_ShaderAttribute.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderAttribute, Standard_Transient) -// ======================================================================= -// function : Graphic3d_ShaderAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ShaderAttribute::Graphic3d_ShaderAttribute(const TCollection_AsciiString& theName, const int theLocation) : myName(theName), @@ -29,10 +27,8 @@ Graphic3d_ShaderAttribute::Graphic3d_ShaderAttribute(const TCollection_AsciiStri // } -// ======================================================================= -// function : ~Graphic3d_ShaderAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ShaderAttribute::~Graphic3d_ShaderAttribute() { // diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index 9787ed72a9..5d963fc901 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -187,10 +187,8 @@ const char THE_VERT_gl_Position_OUTLINE[] = EOL } // namespace -// ======================================================================= -// function : genLightKey -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_ShaderManager::genLightKey( const Handle(Graphic3d_LightSet)& theLights, const bool theHasShadowMap) const @@ -205,10 +203,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::genLightKey( return TCollection_AsciiString("l_") + theLights->KeyEnabledShort() + aMaxLimit; } -// ======================================================================= -// function : Graphic3d_ShaderManager -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ShaderManager::Graphic3d_ShaderManager(Aspect_GraphicsLibrary theGapi) : myGapi(theGapi), // desktop defines a dedicated API for point size, with gl_PointSize added later to GLSL @@ -222,19 +218,15 @@ Graphic3d_ShaderManager::Graphic3d_ShaderManager(Aspect_GraphicsLibrary theGapi) memset(myGlslExtensions, 0, sizeof(myGlslExtensions)); } -// ======================================================================= -// function : ~Graphic3d_ShaderManager -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ShaderManager::~Graphic3d_ShaderManager() { // } -// ======================================================================= -// function : hasGlslBitwiseOps -// purpose : -// ======================================================================= +//================================================================================================= + bool Graphic3d_ShaderManager::hasGlslBitwiseOps() const { switch (myGapi) @@ -250,10 +242,8 @@ bool Graphic3d_ShaderManager::hasGlslBitwiseOps() const return false; } -// ======================================================================= -// function : defaultGlslVersion -// purpose : -// ======================================================================= +//================================================================================================= + int Graphic3d_ShaderManager::defaultGlslVersion(const Handle(Graphic3d_ShaderProgram)& theProgram, const TCollection_AsciiString& theName, int theBits, @@ -385,10 +375,8 @@ int Graphic3d_ShaderManager::defaultGlslVersion(const Handle(Graphic3d_ShaderPro return aBits; } -// ======================================================================= -// function : defaultOitGlslVersion -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ShaderManager::defaultOitGlslVersion( const Handle(Graphic3d_ShaderProgram)& theProgram, const TCollection_AsciiString& theName, @@ -438,10 +426,8 @@ void Graphic3d_ShaderManager::defaultOitGlslVersion( theProgram->SetId(TCollection_AsciiString("occt_") + theName + (theMsaa ? "_msaa" : "")); } -// ======================================================================= -// function : getStdProgramFont -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() const { Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts; @@ -482,10 +468,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() con return aProgramSrc; } -// ======================================================================= -// function : getStdProgramFboBlit -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit( Standard_Integer theNbSamples, Standard_Boolean theIsFallback_sRGB) const @@ -605,10 +589,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit( return aProgramSrc; } -// ======================================================================= -// function : getStdProgramOitCompositing -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitCompositing( const Standard_Boolean theMsaa) const { @@ -664,10 +646,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitComposi return aProgramSrc; } -// ======================================================================= -// function : getStdProgramOitDepthPeelingBlend -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingBlend( Standard_Boolean theMsaa) const { @@ -701,10 +681,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPe return aProgramSrc; } -// ======================================================================= -// function : getStdProgramOitDepthPeelingFlush -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingFlush( Standard_Boolean theMsaa) const { @@ -747,10 +725,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPe return aProgramSrc; } -// ======================================================================= -// function : pointSpriteAlphaSrc -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteAlphaSrc(Standard_Integer theBits) const { const bool isAlpha = @@ -762,10 +738,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteAlphaSrc(Standard_In "occTexture2D(occSamplerPointSprite, " THE_VEC2_glPointCoord ").a; }"; } -// ======================================================================= -// function : pointSpriteShadingSrc -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteShadingSrc( const TCollection_AsciiString& theBaseColorSrc, Standard_Integer theBits) const @@ -893,10 +867,8 @@ static TCollection_AsciiString prepareGeomMainSrc( return aSrcMainGeom; } -// ======================================================================= -// function : getStdProgramUnlit -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit( Standard_Integer theBits, Standard_Boolean theIsOutline) const @@ -1145,10 +1117,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit( return aProgramSrc; } -// ======================================================================= -// function : stdComputeLighting -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting( Standard_Integer& theNbLights, const Handle(Graphic3d_LightSet)& theLights, @@ -1366,10 +1336,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting( } } -// ======================================================================= -// function : getStdProgramGouraud -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud( const Handle(Graphic3d_LightSet)& theLights, Standard_Integer theBits) const @@ -1534,10 +1502,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud( return aProgramSrc; } -// ======================================================================= -// function : getStdProgramPhong -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong( const Handle(Graphic3d_LightSet)& theLights, const Standard_Integer theBits, @@ -1799,10 +1765,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong( return aProgramSrc; } -// ======================================================================= -// function : getStdProgramStereo -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo( Graphic3d_StereoMode theStereoMode) const { @@ -1938,10 +1902,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo( return aProgramSrc; } -// ======================================================================= -// function : getStdProgramBoundBox -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox() const { Handle(Graphic3d_ShaderProgram) aProgramSrc = new Graphic3d_ShaderProgram(); @@ -1978,10 +1940,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox() return aProgramSrc; } -// ======================================================================= -// function : getPBREnvBakingProgram -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram( Standard_Integer theIndex) const { @@ -2045,10 +2005,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram( return aProgramSrc; } -// ======================================================================= -// function : getBgCubeMapProgram -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() const { Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); @@ -2116,10 +2074,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() c return aProgSrc; } -// ======================================================================= -// function : getBgSkydomeProgram -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() const { Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); @@ -2159,10 +2115,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() c return aProgSrc; } -// ======================================================================= -// function : getColoredQuadProgram -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram() const { Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); diff --git a/src/Graphic3d/Graphic3d_ShaderObject.cxx b/src/Graphic3d/Graphic3d_ShaderObject.cxx index 51248a4002..4ccfb15a8f 100755 --- a/src/Graphic3d/Graphic3d_ShaderObject.cxx +++ b/src/Graphic3d/Graphic3d_ShaderObject.cxx @@ -93,10 +93,8 @@ Standard_Boolean Graphic3d_ShaderObject::IsDone() const return !mySource.IsEmpty(); } -// ======================================================================= -// function : CreateFromSource -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ShaderObject) Graphic3d_ShaderObject::CreateFromSource( TCollection_AsciiString& theSource, Graphic3d_TypeOfShaderObject theType, diff --git a/src/Graphic3d/Graphic3d_ShaderProgram.cxx b/src/Graphic3d/Graphic3d_ShaderProgram.cxx index d7ba38d748..980f2ef19e 100755 --- a/src/Graphic3d/Graphic3d_ShaderProgram.cxx +++ b/src/Graphic3d/Graphic3d_ShaderProgram.cxx @@ -31,10 +31,8 @@ namespace static volatile Standard_Integer THE_PROGRAM_OBJECT_COUNTER = 0; } -// ======================================================================= -// function : ShadersFolder -// purpose : -// ======================================================================= +//================================================================================================= + const TCollection_AsciiString& Graphic3d_ShaderProgram::ShadersFolder() { static Standard_Boolean THE_IS_DEFINED = Standard_False; @@ -176,10 +174,8 @@ void Graphic3d_ShaderProgram::ClearVariables() myVariables.Clear(); } -// ======================================================================= -// function : SetAttributes -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ShaderProgram::SetVertexAttributes( const Graphic3d_ShaderAttributeList& theAttributes) { diff --git a/src/Graphic3d/Graphic3d_StructureManager.cxx b/src/Graphic3d/Graphic3d_StructureManager.cxx index c766a6118f..463657f478 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.cxx +++ b/src/Graphic3d/Graphic3d_StructureManager.cxx @@ -24,10 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_StructureManager, Standard_Transient) #include #include -// ======================================================================== -// function : Graphic3d_StructureManager -// purpose : -// ======================================================================== +//================================================================================================= + Graphic3d_StructureManager::Graphic3d_StructureManager( const Handle(Graphic3d_GraphicDriver)& theDriver) : myViewGenId(0, 31), @@ -37,10 +35,8 @@ Graphic3d_StructureManager::Graphic3d_StructureManager( // } -// ======================================================================== -// function : ~Graphic3d_StructureManager -// purpose : -// ======================================================================== +//================================================================================================= + Graphic3d_StructureManager::~Graphic3d_StructureManager() { for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next()) @@ -53,10 +49,8 @@ Graphic3d_StructureManager::~Graphic3d_StructureManager() myDefinedViews.Clear(); } -// ======================================================================== -// function : Update -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Update(const Graphic3d_ZLayerId theLayerId) const { for (Graphic3d_IndexedMapOfView::Iterator aViewIt(myDefinedViews); aViewIt.More(); aViewIt.Next()) @@ -65,10 +59,8 @@ void Graphic3d_StructureManager::Update(const Graphic3d_ZLayerId theLayerId) con } } -// ======================================================================== -// function : Remove -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Remove() { // clear all structures whilst views are alive for correct GPU memory management @@ -83,10 +75,8 @@ void Graphic3d_StructureManager::Remove() myDefinedViews.Clear(); } -// ======================================================================== -// function : Erase -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Erase() { for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next()) @@ -189,10 +179,8 @@ void Graphic3d_StructureManager::RecomputeStructures( } } -// ======================================================================== -// function : RegisterObject -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::RegisterObject(const Handle(Standard_Transient)& theObject, const Handle(Graphic3d_ViewAffinity)& theAffinity) { @@ -205,19 +193,15 @@ void Graphic3d_StructureManager::RegisterObject(const Handle(Standard_Transient) myRegisteredObjects.Bind(theObject.operator->(), theAffinity); } -// ======================================================================== -// function : UnregisterObject -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::UnregisterObject(const Handle(Standard_Transient)& theObject) { myRegisteredObjects.UnBind(theObject.operator->()); } -// ======================================================================== -// function : ObjectAffinity -// purpose : -// ======================================================================== +//================================================================================================= + const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity( const Handle(Standard_Transient)& theObject) const { @@ -230,10 +214,8 @@ const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity return *aResult; } -// ======================================================================== -// function : Identification -// purpose : -// ======================================================================== +//================================================================================================= + Standard_Integer Graphic3d_StructureManager::Identification(Graphic3d_CView* theView) { if (myDefinedViews.Contains(theView)) @@ -245,10 +227,8 @@ Standard_Integer Graphic3d_StructureManager::Identification(Graphic3d_CView* the return myViewGenId.Next(); } -// ======================================================================== -// function : UnIdentification -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::UnIdentification(Graphic3d_CView* theView) { if (myDefinedViews.Contains(theView)) @@ -259,28 +239,22 @@ void Graphic3d_StructureManager::UnIdentification(Graphic3d_CView* theView) } } -// ======================================================================== -// function : DefinedViews -// purpose : -// ======================================================================== +//================================================================================================= + const Graphic3d_IndexedMapOfView& Graphic3d_StructureManager::DefinedViews() const { return myDefinedViews; } -// ======================================================================== -// function : MaxNumOfViews -// purpose : -// ======================================================================== +//================================================================================================= + Standard_Integer Graphic3d_StructureManager::MaxNumOfViews() const { return myViewGenId.Upper() - myViewGenId.Lower() + 1; } -// ======================================================================== -// function : ReCompute -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::ReCompute(const Handle(Graphic3d_Structure)& theStructure) { if (!myDisplayedStructure.Contains(theStructure)) @@ -295,10 +269,8 @@ void Graphic3d_StructureManager::ReCompute(const Handle(Graphic3d_Structure)& th } } -// ======================================================================== -// function : ReCompute -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::ReCompute( const Handle(Graphic3d_Structure)& theStructure, const Handle(Graphic3d_DataStructureManager)& theProjector) @@ -314,10 +286,8 @@ void Graphic3d_StructureManager::ReCompute( aView->ReCompute(theStructure); } -// ======================================================================== -// function : Clear -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Clear(Graphic3d_Structure* theStructure, const Standard_Boolean theWithDestruction) { @@ -327,10 +297,8 @@ void Graphic3d_StructureManager::Clear(Graphic3d_Structure* theStructure, } } -// ======================================================================== -// function : Connect -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Connect(const Graphic3d_Structure* theMother, const Graphic3d_Structure* theDaughter) { @@ -340,10 +308,8 @@ void Graphic3d_StructureManager::Connect(const Graphic3d_Structure* theMother, } } -// ======================================================================== -// function : Disconnect -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Disconnect(const Graphic3d_Structure* theMother, const Graphic3d_Structure* theDaughter) { @@ -353,10 +319,8 @@ void Graphic3d_StructureManager::Disconnect(const Graphic3d_Structure* theMother } } -// ======================================================================== -// function : Display -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Display(const Handle(Graphic3d_Structure)& theStructure) { myDisplayedStructure.Add(theStructure); @@ -367,10 +331,8 @@ void Graphic3d_StructureManager::Display(const Handle(Graphic3d_Structure)& theS } } -// ======================================================================== -// function : Erase -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Erase(const Handle(Graphic3d_Structure)& theStructure) { myDisplayedStructure.Remove(theStructure); @@ -383,10 +345,8 @@ void Graphic3d_StructureManager::Erase(const Handle(Graphic3d_Structure)& theStr } } -// ======================================================================== -// function : Erase -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::Highlight(const Handle(Graphic3d_Structure)& theStructure) { myHighlightedStructure.Add(theStructure); @@ -398,10 +358,8 @@ void Graphic3d_StructureManager::Highlight(const Handle(Graphic3d_Structure)& th } } -// ======================================================================== -// function : UnHighlight -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::UnHighlight(const Handle(Graphic3d_Structure)& theStructure) { myHighlightedStructure.Remove(theStructure); @@ -413,10 +371,8 @@ void Graphic3d_StructureManager::UnHighlight(const Handle(Graphic3d_Structure)& } } -// ======================================================================== -// function : UnHighlight -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::UnHighlight() { for (Graphic3d_MapIteratorOfMapOfStructure anIt(myHighlightedStructure); anIt.More(); anIt.Next()) @@ -425,10 +381,8 @@ void Graphic3d_StructureManager::UnHighlight() } } -// ======================================================================== -// function : SetTransform -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::SetTransform(const Handle(Graphic3d_Structure)& theStructure, const Handle(TopLoc_Datum3D)& theTrsf) { @@ -438,10 +392,8 @@ void Graphic3d_StructureManager::SetTransform(const Handle(Graphic3d_Structure)& } } -// ======================================================================== -// function : ChangeDisplayPriority -// purpose : -// ======================================================================== +//================================================================================================= + void Graphic3d_StructureManager::ChangeDisplayPriority( const Handle(Graphic3d_Structure)& theStructure, const Graphic3d_DisplayPriority theOldPriority, @@ -469,10 +421,8 @@ void Graphic3d_StructureManager::ChangeZLayer(const Handle(Graphic3d_Structure)& } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_StructureManager::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Graphic3d/Graphic3d_Text.cxx b/src/Graphic3d/Graphic3d_Text.cxx index 9e843ac4cc..6145921112 100644 --- a/src/Graphic3d/Graphic3d_Text.cxx +++ b/src/Graphic3d/Graphic3d_Text.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Text, Standard_Transient) -// ======================================================================= -// function : Graphic3d_Text -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Text::Graphic3d_Text(const Standard_ShortReal theHeight) : myHeight(theHeight), myHAlign(Graphic3d_HTA_LEFT), @@ -28,20 +26,16 @@ Graphic3d_Text::Graphic3d_Text(const Standard_ShortReal theHeight) { } -// ======================================================================= -// function : SetOrientation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Text::SetOrientation(const gp_Ax2& theOrientation) { myOrientation = theOrientation; myHasPlane = Standard_True; } -// ======================================================================= -// function : ResetOrientation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Text::ResetOrientation() { myOrientation = gp_Ax2(); diff --git a/src/Graphic3d/Graphic3d_Texture1D.cxx b/src/Graphic3d/Graphic3d_Texture1D.cxx index 02f1414c96..7345b713b4 100644 --- a/src/Graphic3d/Graphic3d_Texture1D.cxx +++ b/src/Graphic3d/Graphic3d_Texture1D.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1D, Graphic3d_TextureMap) static const char* NameOfTexture1d_to_FileName[] = {"1d_elevation.rgb"}; -// ======================================================================= -// function : Graphic3d_Texture1D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1D::Graphic3d_Texture1D(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(theFileName, theType), @@ -34,10 +32,8 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const TCollection_AsciiString& theFileN { } -// ======================================================================= -// function : Graphic3d_Texture1D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1D::Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theNOT, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(NameOfTexture1d_to_FileName[theNOT], theType), @@ -47,10 +43,8 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theNOT, myTexId = TCollection_AsciiString("Graphic3d_Texture1D_") + NameOfTexture1d_to_FileName[theNOT]; } -// ======================================================================= -// function : Graphic3d_Texture1D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1D::Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(thePixMap, theType), @@ -58,28 +52,22 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap { } -// ======================================================================= -// function : Name -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_NameOfTexture1D Graphic3d_Texture1D::Name() const { return myName; } -// ======================================================================= -// function : NumberOfTextures -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_Texture1D::NumberOfTextures() { return sizeof(NameOfTexture1d_to_FileName) / sizeof(char*); } -// ======================================================================= -// function : TextureName -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_Texture1D::TextureName(const Standard_Integer theRank) { if (theRank < 1 || theRank > NumberOfTextures()) diff --git a/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx b/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx index 61ce44e720..198c7cdee1 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx +++ b/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx @@ -20,30 +20,24 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual, Graphic3d_Texture1D) -// ======================================================================= -// function : Graphic3d_Texture1Dmanual -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const TCollection_AsciiString& theFileName) : Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D) { // } -// ======================================================================= -// function : Graphic3d_Texture1Dmanual -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Graphic3d_NameOfTexture1D theNOT) : Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D) { // } -// ======================================================================= -// function : Graphic3d_Texture1Dmanual -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Handle(Image_PixMap)& thePixMap) : Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D) { diff --git a/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx b/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx index 3ae76a9277..c27c9c7365 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx +++ b/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment, Graphic3d_Texture1D) -// ======================================================================= -// function : Graphic3d_Texture1Dsegment -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const TCollection_AsciiString& theFileName) : Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D), myX1(0.0f), @@ -41,10 +39,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const TCollection_AsciiSt Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_Texture1Dsegment -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT) : Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D), myX1(0.0f), @@ -60,10 +56,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTex Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_Texture1Dsegment -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Handle(Image_PixMap)& thePixMap) : Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D), myX1(0.0f), @@ -79,10 +73,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Handle(Image_PixMap Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : SetSegment -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture1Dsegment::SetSegment(const Standard_ShortReal X1, const Standard_ShortReal Y1, const Standard_ShortReal Z1, @@ -108,10 +100,8 @@ void Graphic3d_Texture1Dsegment::SetSegment(const Standard_ShortReal X1, myParams->SetGenMode(Graphic3d_TOTM_OBJECT, aPlaneX, Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Segment -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture1Dsegment::Segment(Standard_ShortReal& X1, Standard_ShortReal& Y1, Standard_ShortReal& Z1, diff --git a/src/Graphic3d/Graphic3d_Texture2D.cxx b/src/Graphic3d/Graphic3d_Texture2D.cxx index 2f7e3c581d..166b08f62d 100644 --- a/src/Graphic3d/Graphic3d_Texture2D.cxx +++ b/src/Graphic3d/Graphic3d_Texture2D.cxx @@ -44,10 +44,8 @@ static const char* NameOfTexture2d_to_FileName[] = {"2d_MatraDatavision.rgb", "2d_rain.rgb", "2d_chess.rgba"}; -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName) : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_2D), myName(Graphic3d_NOT_2D_UNKNOWN) @@ -58,10 +56,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileN myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(theFileName, theType), @@ -70,10 +66,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileN // } -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT) : Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), myName(theNOT) @@ -87,10 +81,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT) myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], theType), @@ -100,10 +92,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT, myTexId = TCollection_AsciiString("Graphic3d_Texture2D_") + NameOfTexture2d_to_FileName[theNOT]; } -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap) : Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_2D), myName(Graphic3d_NOT_2D_UNKNOWN) @@ -114,10 +104,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap) myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : Graphic3d_Texture2D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureMap(thePixMap, theType), @@ -126,28 +114,22 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap // } -// ======================================================================= -// function : NumberOfTextures -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_Texture2D::NumberOfTextures() { return sizeof(NameOfTexture2d_to_FileName) / sizeof(char*); } -// ======================================================================= -// function : Name -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_NameOfTexture2D Graphic3d_Texture2D::Name() const { return myName; } -// ======================================================================= -// function : TextureName -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_Texture2D::TextureName(const Standard_Integer theRank) { if (theRank < 1 || theRank > NumberOfTextures()) @@ -160,10 +142,8 @@ TCollection_AsciiString Graphic3d_Texture2D::TextureName(const Standard_Integer return aFileName.SubString(4, i - 1); } -// ======================================================================= -// function : SetImage -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2D::SetImage(const Handle(Image_PixMap)& thePixMap) { myPixMap = thePixMap; diff --git a/src/Graphic3d/Graphic3d_Texture2Dplane.cxx b/src/Graphic3d/Graphic3d_Texture2Dplane.cxx index e3c94f7737..8a6a7e3e18 100644 --- a/src/Graphic3d/Graphic3d_Texture2Dplane.cxx +++ b/src/Graphic3d/Graphic3d_Texture2Dplane.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2Dplane, Graphic3d_Texture2D) -// ======================================================================= -// function : Graphic3d_Texture2Dplane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const TCollection_AsciiString& theFileName) : Graphic3d_Texture2D(theFileName) { @@ -34,10 +32,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const TCollection_AsciiString Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_Texture2Dplane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture2D theNOT) : Graphic3d_Texture2D(theNOT) { @@ -46,10 +42,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_Texture2Dplane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& thePixMap) : Graphic3d_Texture2D(thePixMap) { @@ -58,10 +52,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& t Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : SetPlaneS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetPlaneS(const Standard_ShortReal theA, const Standard_ShortReal theB, const Standard_ShortReal theC, @@ -73,10 +65,8 @@ void Graphic3d_Texture2Dplane::SetPlaneS(const Standard_ShortReal theA, myPlaneName = Graphic3d_NOTP_UNKNOWN; } -// ======================================================================= -// function : SetPlaneT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetPlaneT(const Standard_ShortReal theA, const Standard_ShortReal theB, const Standard_ShortReal theC, @@ -88,10 +78,8 @@ void Graphic3d_Texture2Dplane::SetPlaneT(const Standard_ShortReal theA, myPlaneName = Graphic3d_NOTP_UNKNOWN; } -// ======================================================================= -// function : SetPlane -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetPlane(const Graphic3d_NameOfTexturePlane thePlane) { switch (thePlane) @@ -121,10 +109,8 @@ void Graphic3d_Texture2Dplane::SetPlane(const Graphic3d_NameOfTexturePlane thePl myPlaneName = thePlane; } -// ======================================================================= -// function : SetScaleS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetScaleS(const Standard_ShortReal theVal) { Graphic3d_Vec2 aScale = myParams->Scale(); @@ -132,10 +118,8 @@ void Graphic3d_Texture2Dplane::SetScaleS(const Standard_ShortReal theVal) myParams->SetScale(aScale); } -// ======================================================================= -// function : SetScaleT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetScaleT(const Standard_ShortReal theVal) { Graphic3d_Vec2 aScale = myParams->Scale(); @@ -143,10 +127,8 @@ void Graphic3d_Texture2Dplane::SetScaleT(const Standard_ShortReal theVal) myParams->SetScale(aScale); } -// ======================================================================= -// function : SetTranslateS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetTranslateS(const Standard_ShortReal theVal) { Graphic3d_Vec2 aVec = myParams->Translation(); @@ -154,10 +136,8 @@ void Graphic3d_Texture2Dplane::SetTranslateS(const Standard_ShortReal theVal) myParams->SetTranslation(aVec); } -// ======================================================================= -// function : SetTranslateT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetTranslateT(const Standard_ShortReal theVal) { Graphic3d_Vec2 aVec = myParams->Translation(); @@ -165,19 +145,15 @@ void Graphic3d_Texture2Dplane::SetTranslateT(const Standard_ShortReal theVal) myParams->SetTranslation(aVec); } -// ======================================================================= -// function : SetRotation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::SetRotation(const Standard_ShortReal theAngleDegrees) { myParams->SetRotation(theAngleDegrees); } -// ======================================================================= -// function : PlaneS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::PlaneS(Standard_ShortReal& theA, Standard_ShortReal& theB, Standard_ShortReal& theC, @@ -190,10 +166,8 @@ void Graphic3d_Texture2Dplane::PlaneS(Standard_ShortReal& theA, theD = aPlaneS.w(); } -// ======================================================================= -// function : PlaneT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::PlaneT(Standard_ShortReal& theA, Standard_ShortReal& theB, Standard_ShortReal& theC, @@ -206,55 +180,43 @@ void Graphic3d_Texture2Dplane::PlaneT(Standard_ShortReal& theA, theD = aPlaneT.w(); } -// ======================================================================= -// function : TranslateS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::TranslateS(Standard_ShortReal& theVal) const { theVal = myParams->Translation().x(); } -// ======================================================================= -// function : TranslateT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::TranslateT(Standard_ShortReal& theVal) const { theVal = myParams->Translation().y(); } -// ======================================================================= -// function : Rotation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::Rotation(Standard_ShortReal& theVal) const { theVal = myParams->Rotation(); } -// ======================================================================= -// function : Plane -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_NameOfTexturePlane Graphic3d_Texture2Dplane::Plane() const { return myPlaneName; } -// ======================================================================= -// function : ScaleS -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::ScaleS(Standard_ShortReal& theVal) const { theVal = myParams->Scale().x(); } -// ======================================================================= -// function : ScaleT -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture2Dplane::ScaleT(Standard_ShortReal& theVal) const { theVal = myParams->Scale().y(); diff --git a/src/Graphic3d/Graphic3d_Texture3D.cxx b/src/Graphic3d/Graphic3d_Texture3D.cxx index 91375caa37..dcf0aeb196 100644 --- a/src/Graphic3d/Graphic3d_Texture3D.cxx +++ b/src/Graphic3d/Graphic3d_Texture3D.cxx @@ -19,30 +19,24 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap) -// ======================================================================= -// function : Graphic3d_Texture3D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture3D::Graphic3d_Texture3D(const TCollection_AsciiString& theFileName) : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_3D) { myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : Graphic3d_Texture3D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture3D::Graphic3d_Texture3D(const Handle(Image_PixMap)& thePixMap) : Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_3D) { myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : Graphic3d_Texture3D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture3D::Graphic3d_Texture3D( const NCollection_Array1& theFiles) : Graphic3d_TextureMap("", Graphic3d_TypeOfTexture_3D) @@ -52,19 +46,15 @@ Graphic3d_Texture3D::Graphic3d_Texture3D( myPaths.Assign(theFiles); } -// ======================================================================= -// function : ~Graphic3d_Texture3D -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Texture3D::~Graphic3d_Texture3D() { // } -// ======================================================================= -// function : SetImage -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Texture3D::SetImage(const Handle(Image_PixMap)& thePixMap) { myPixMap = thePixMap; @@ -74,10 +64,8 @@ void Graphic3d_Texture3D::SetImage(const Handle(Image_PixMap)& thePixMap) myPaths.Move(anArr); } -// ======================================================================= -// function : GetImage -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_PixMap) Graphic3d_Texture3D::GetImage( const Handle(Image_SupportedFormats)& theSupported) { diff --git a/src/Graphic3d/Graphic3d_TextureEnv.cxx b/src/Graphic3d/Graphic3d_TextureEnv.cxx index cb02eeff35..34c3175ac4 100644 --- a/src/Graphic3d/Graphic3d_TextureEnv.cxx +++ b/src/Graphic3d/Graphic3d_TextureEnv.cxx @@ -33,10 +33,8 @@ static const char* NameOfTextureEnv_to_FileName[] = {"env_clouds.rgb", "env_lines.rgb", "env_road.rgb"}; -// ======================================================================= -// function : Graphic3d_TextureEnv -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureEnv::Graphic3d_TextureEnv(const TCollection_AsciiString& theFileName) : Graphic3d_TextureRoot(theFileName, Graphic3d_TypeOfTexture_2D), myName(Graphic3d_NOT_ENV_UNKNOWN) @@ -48,10 +46,8 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const TCollection_AsciiString& theFil Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_TextureEnv -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theNOT) : Graphic3d_TextureRoot(NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), myName(theNOT) @@ -66,10 +62,8 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theN Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Graphic3d_TextureEnv -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap) : Graphic3d_TextureRoot(thePixMap, Graphic3d_TypeOfTexture_2D), myName(Graphic3d_NOT_ENV_UNKNOWN) @@ -81,28 +75,22 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : Name -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_NameOfTextureEnv Graphic3d_TextureEnv::Name() const { return myName; } -// ======================================================================= -// function : NumberOfTextures -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Graphic3d_TextureEnv::NumberOfTextures() { return sizeof(NameOfTextureEnv_to_FileName) / sizeof(char*); } -// ======================================================================= -// function : TextureName -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_TextureEnv::TextureName(const Standard_Integer theRank) { if (theRank < 1 || theRank > NumberOfTextures()) diff --git a/src/Graphic3d/Graphic3d_TextureMap.cxx b/src/Graphic3d/Graphic3d_TextureMap.cxx index 59bcfda9a9..13fb8f22b7 100644 --- a/src/Graphic3d/Graphic3d_TextureMap.cxx +++ b/src/Graphic3d/Graphic3d_TextureMap.cxx @@ -21,120 +21,94 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot) -// ======================================================================= -// function : Graphic3d_TextureMap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureMap::Graphic3d_TextureMap(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureRoot(theFileName, theType) { } -// ======================================================================= -// function : Graphic3d_TextureMap -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureMap::Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType) : Graphic3d_TextureRoot(thePixMap, theType) { } -// ======================================================================= -// function : EnableSmooth -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::EnableSmooth() { myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); } -// ======================================================================= -// function : DisableSmooth -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::DisableSmooth() { myParams->SetFilter(Graphic3d_TOTF_NEAREST); } -// ======================================================================= -// function : IsSmoothed -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const { return myParams->Filter() != Graphic3d_TOTF_NEAREST; } -// ======================================================================= -// function : EnableModulate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::EnableModulate() { myParams->SetModulate(Standard_True); } -// ======================================================================= -// function : DisableModulate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::DisableModulate() { myParams->SetModulate(Standard_False); } -// ======================================================================= -// function : IsModulate -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_TextureMap::IsModulate() const { return myParams->IsModulate(); } -// ======================================================================= -// function : EnableRepeat -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::EnableRepeat() { myParams->SetRepeat(Standard_True); } -// ======================================================================= -// function : DisableRepeat -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::DisableRepeat() { myParams->SetRepeat(Standard_False); } -// ======================================================================= -// function : IsRepeat -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_TextureMap::IsRepeat() const { return myParams->IsRepeat(); } -// ======================================================================= -// function : AnisoFilter -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_LevelOfTextureAnisotropy Graphic3d_TextureMap::AnisoFilter() const { return myParams->AnisoFilter(); } -// ======================================================================= -// function : SetAnisoFilter -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureMap::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel) { myParams->SetAnisoFilter(theLevel); diff --git a/src/Graphic3d/Graphic3d_TextureParams.cxx b/src/Graphic3d/Graphic3d_TextureParams.cxx index fcb709c615..e0274df871 100644 --- a/src/Graphic3d/Graphic3d_TextureParams.cxx +++ b/src/Graphic3d/Graphic3d_TextureParams.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureParams, Standard_Transient) -// ======================================================================= -// function : Graphic3d_TextureParams -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureParams::Graphic3d_TextureParams() : myGenPlaneS(0.0f, 0.0f, 0.0f, 0.0f), myGenPlaneT(0.0f, 0.0f, 0.0f, 0.0f), @@ -38,28 +36,22 @@ Graphic3d_TextureParams::Graphic3d_TextureParams() // } -// ======================================================================= -// function : ~Graphic3d_TextureParams -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureParams::~Graphic3d_TextureParams() { // } -// ======================================================================= -// function : SetModulate -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetModulate(const Standard_Boolean theToModulate) { myToModulate = theToModulate; } -// ======================================================================= -// function : SetRepeat -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetRepeat(const Standard_Boolean theToRepeat) { if (myToRepeat != theToRepeat) @@ -69,10 +61,8 @@ void Graphic3d_TextureParams::SetRepeat(const Standard_Boolean theToRepeat) } } -// ======================================================================= -// function : SetFilter -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetFilter(const Graphic3d_TypeOfTextureFilter theFilter) { if (myFilter != theFilter) @@ -82,10 +72,8 @@ void Graphic3d_TextureParams::SetFilter(const Graphic3d_TypeOfTextureFilter theF } } -// ======================================================================= -// function : SetAnisoFilter -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel) { if (myAnisoLevel != theLevel) @@ -95,37 +83,29 @@ void Graphic3d_TextureParams::SetAnisoFilter(const Graphic3d_LevelOfTextureAniso } } -// ======================================================================= -// function : SetRotation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetRotation(const Standard_ShortReal theAngleDegrees) { myRotAngle = theAngleDegrees; } -// ======================================================================= -// function : SetScale -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetScale(const Graphic3d_Vec2 theScale) { myScale = theScale; } -// ======================================================================= -// function : SetTranslation -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetTranslation(const Graphic3d_Vec2 theVec) { myTranslation = theVec; } -// ======================================================================= -// function : SetGenMode -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureParams::SetGenMode(const Graphic3d_TypeOfTextureMode theMode, const Graphic3d_Vec4 thePlaneS, const Graphic3d_Vec4 thePlaneT) diff --git a/src/Graphic3d/Graphic3d_TextureRoot.cxx b/src/Graphic3d/Graphic3d_TextureRoot.cxx index 1db31e8d68..a16817c673 100644 --- a/src/Graphic3d/Graphic3d_TextureRoot.cxx +++ b/src/Graphic3d/Graphic3d_TextureRoot.cxx @@ -34,10 +34,8 @@ namespace static volatile Standard_Integer THE_TEXTURE_COUNTER = 0; } -// ======================================================================= -// function : TexturesFolder -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder() { static Standard_Boolean IsDefined = Standard_False; @@ -83,10 +81,8 @@ TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder() return VarName; } -// ======================================================================= -// function : Graphic3d_TextureRoot -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureRoot::Graphic3d_TextureRoot(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType) : myParams(new Graphic3d_TextureParams()), @@ -100,10 +96,8 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot(const TCollection_AsciiString& theF generateId(); } -// ======================================================================= -// function : Graphic3d_TextureRoot -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureRoot::Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType) : myParams(new Graphic3d_TextureParams()), @@ -117,29 +111,23 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePi generateId(); } -// ======================================================================= -// function : ~Graphic3d_TextureRoot -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TextureRoot::~Graphic3d_TextureRoot() { // } -// ======================================================================= -// function : generateId -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureRoot::generateId() { myTexId = TCollection_AsciiString("Graphic3d_TextureRoot_") + TCollection_AsciiString(Standard_Atomic_Increment(&THE_TEXTURE_COUNTER)); } -// ======================================================================= -// function : GetCompressedImage -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Graphic3d_TextureRoot::GetCompressedImage( const Handle(Image_SupportedFormats)& theSupported) { @@ -172,10 +160,8 @@ Handle(Image_CompressedPixMap) Graphic3d_TextureRoot::GetCompressedImage( return Handle(Image_CompressedPixMap)(); } -// ======================================================================= -// function : GetImage -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage( const Handle(Image_SupportedFormats)& theSupported) { @@ -211,10 +197,8 @@ Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage( return Handle(Image_PixMap)(); } -// ======================================================================= -// function : convertToCompatible -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TextureRoot::convertToCompatible(const Handle(Image_SupportedFormats)& theSupported, const Handle(Image_PixMap)& theImage) { @@ -241,10 +225,8 @@ void Graphic3d_TextureRoot::convertToCompatible(const Handle(Image_SupportedForm } } -// ======================================================================= -// function : IsDone -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Graphic3d_TextureRoot::IsDone() const { // Case 1: texture source is specified as pixmap diff --git a/src/Graphic3d/Graphic3d_TransformPers.cxx b/src/Graphic3d/Graphic3d_TransformPers.cxx index f6fad3ccd3..861b0ef7d6 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.cxx +++ b/src/Graphic3d/Graphic3d_TransformPers.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPers, Standard_Transient) -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TransformPers::PersParams3d::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { @@ -26,10 +24,8 @@ void Graphic3d_TransformPers::PersParams3d::DumpJson(Standard_OStream& theOStrea OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &anAttachPoint) } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TransformPers::PersParams2d::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { @@ -38,10 +34,8 @@ void Graphic3d_TransformPers::PersParams2d::DumpJson(Standard_OStream& theOStrea OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, Corner) } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_TransformPers::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Graphic3d/Graphic3d_TransformPersScaledAbove.cxx b/src/Graphic3d/Graphic3d_TransformPersScaledAbove.cxx index dc53412615..6e965aef86 100644 --- a/src/Graphic3d/Graphic3d_TransformPersScaledAbove.cxx +++ b/src/Graphic3d/Graphic3d_TransformPersScaledAbove.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPersScaledAbove, Graphic3d_TransformPers) -// ======================================================================= -// function : Graphic3d_TransformPersScaledAbove -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_TransformPersScaledAbove::Graphic3d_TransformPersScaledAbove(const Standard_Real theScale, const gp_Pnt& thePnt) : Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, thePnt), @@ -26,10 +24,8 @@ Graphic3d_TransformPersScaledAbove::Graphic3d_TransformPersScaledAbove(const Sta { } -// ======================================================================= -// function : persistentScale -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Graphic3d_TransformPersScaledAbove::persistentScale( const Handle(Graphic3d_Camera)& theCamera, const Standard_Integer theViewportWidth, diff --git a/src/Graphic3d/Graphic3d_Vertex.cxx b/src/Graphic3d/Graphic3d_Vertex.cxx index 76f87dcdac..486593dcd6 100644 --- a/src/Graphic3d/Graphic3d_Vertex.cxx +++ b/src/Graphic3d/Graphic3d_Vertex.cxx @@ -26,10 +26,8 @@ Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) co + (Z() - AOther.Z()) * (Z() - AOther.Z())); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_Vertex::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { gp_XYZ aCoord(xyz[0], xyz[1], xyz[2]); diff --git a/src/Graphic3d/Graphic3d_ViewAffinity.cxx b/src/Graphic3d/Graphic3d_ViewAffinity.cxx index a9c7012b4a..12349ce6b3 100644 --- a/src/Graphic3d/Graphic3d_ViewAffinity.cxx +++ b/src/Graphic3d/Graphic3d_ViewAffinity.cxx @@ -19,10 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ViewAffinity, Standard_Transient) -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Graphic3d_ViewAffinity::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/IVtk/IVtk_IShapeMesher.cxx b/src/IVtk/IVtk_IShapeMesher.cxx index 31104f6d5e..5ad35a6826 100644 --- a/src/IVtk/IVtk_IShapeMesher.cxx +++ b/src/IVtk/IVtk_IShapeMesher.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(IVtk_IShapeMesher, IVtk_Interface) -// ================================================================ -// Function : initialize -// Purpose : -// ================================================================ +//================================================================================================= + void IVtk_IShapeMesher::initialize(const IVtk_IShape::Handle& theShape, const IVtk_IShapeData::Handle& theData) { @@ -28,10 +26,8 @@ void IVtk_IShapeMesher::initialize(const IVtk_IShape::Handle& theShape, myShapeData = theData; } -// ================================================================ -// Function : Build -// Purpose : -// ================================================================ +//================================================================================================= + void IVtk_IShapeMesher::Build(const IVtk_IShape::Handle& theShape, const IVtk_IShapeData::Handle& theData) { diff --git a/src/IVtkDraw/IVtkDraw_Interactor.cxx b/src/IVtkDraw/IVtkDraw_Interactor.cxx index 65af4051d8..c2e7aababc 100644 --- a/src/IVtkDraw/IVtkDraw_Interactor.cxx +++ b/src/IVtkDraw/IVtkDraw_Interactor.cxx @@ -86,10 +86,8 @@ static void ClearHighlightAndSelection(const Handle(ShapePipelineMap)& theMap, vtkStandardNewMacro(IVtkDraw_Interactor) - //=========================================================== - // Function : Constructor - // Purpose : - //=========================================================== + //================================================================================================= + IVtkDraw_Interactor::IVtkDraw_Interactor() : #ifdef _WIN32 diff --git a/src/IVtkTools/IVtkTools_ShapeDataSource.cxx b/src/IVtkTools/IVtkTools_ShapeDataSource.cxx index 9e31c7ae73..62916bac20 100644 --- a/src/IVtkTools/IVtkTools_ShapeDataSource.cxx +++ b/src/IVtkTools/IVtkTools_ShapeDataSource.cxx @@ -36,10 +36,8 @@ vtkStandardNewMacro(IVtkTools_ShapeDataSource) - //================================================================ - // Function : Constructor - // Purpose : - //================================================================ + //================================================================================================= + IVtkTools_ShapeDataSource::IVtkTools_ShapeDataSource() : myPolyData(new IVtkVTK_ShapeData()), myIsFastTransformMode(Standard_False), diff --git a/src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx b/src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx index d5a00816f2..db4d92e6dd 100644 --- a/src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx +++ b/src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx @@ -109,10 +109,8 @@ static void copyCells(vtkPolyData* theDst, vtkPolyData* theSrc, vtkIdList* theId vtkStandardNewMacro(IVtkTools_SubPolyDataFilter) - //================================================================ - // Function : Constructor - // Purpose : - //================================================================ + //================================================================================================= + IVtkTools_SubPolyDataFilter::IVtkTools_SubPolyDataFilter() : myIdsArrayName(IVtkVTK_ShapeData::ARRNAME_SUBSHAPE_IDS()), myDoFiltering(true), diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index fe63a6b940..81289d953b 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -445,10 +445,8 @@ static WICPixelFormatGUID convertToWicFormat(Image_Format theFormat) #endif } // namespace -// ======================================================================= -// function : Image_AlienPixMap -// purpose : -// ======================================================================= +//================================================================================================= + Image_AlienPixMap::Image_AlienPixMap() #ifdef HAVE_WINCODEC : myPalette(NULL) @@ -459,19 +457,15 @@ Image_AlienPixMap::Image_AlienPixMap() SetTopDown(false); } -// ======================================================================= -// function : ~Image_AlienPixMap -// purpose : -// ======================================================================= +//================================================================================================= + Image_AlienPixMap::~Image_AlienPixMap() { Clear(); } -// ======================================================================= -// function : InitWrapper -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::InitWrapper(Image_Format, Standard_Byte*, const Standard_Size, @@ -482,10 +476,8 @@ bool Image_AlienPixMap::InitWrapper(Image_Format, return false; } -// ======================================================================= -// function : InitTrash -// purpose : -// ======================================================================= +//================================================================================================= + #ifdef HAVE_FREEIMAGE bool Image_AlienPixMap::InitTrash(Image_Format thePixelFormat, const Standard_Size theSizeX, @@ -562,10 +554,8 @@ bool Image_AlienPixMap::InitTrash(Image_Format thePixelFormat, } #endif -// ======================================================================= -// function : InitCopy -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::InitCopy(const Image_PixMap& theCopy) { if (&theCopy == this) @@ -601,10 +591,8 @@ bool Image_AlienPixMap::InitCopy(const Image_PixMap& theCopy) return false; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Image_AlienPixMap::Clear() { Image_PixMap::Clear(); @@ -629,10 +617,8 @@ void Image_AlienPixMap::Clear() #endif } -// ======================================================================= -// function : IsTopDownDefault -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::IsTopDownDefault() { #ifdef HAVE_FREEIMAGE @@ -644,10 +630,8 @@ bool Image_AlienPixMap::IsTopDownDefault() #endif } -// ======================================================================= -// function : Load -// purpose : -// ======================================================================= +//================================================================================================= + #ifdef HAVE_FREEIMAGE bool Image_AlienPixMap::Load(const Standard_Byte* theData, const Standard_Size theLength, @@ -1031,10 +1015,8 @@ bool Image_AlienPixMap::Load(const Standard_Byte*, } #endif -// ======================================================================= -// function : savePPM -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::savePPM(const TCollection_AsciiString& theFileName) const { if (IsEmpty()) @@ -1075,10 +1057,8 @@ bool Image_AlienPixMap::savePPM(const TCollection_AsciiString& theFileName) cons return true; } -// ======================================================================= -// function : convertData -// purpose : -// ======================================================================= +//================================================================================================= + #ifdef HAVE_WINCODEC static bool convertData(const Image_AlienPixMap& theSrcPixMapData, const WICPixelFormatGUID& theFormat, @@ -1132,10 +1112,8 @@ static bool convertData(const Image_AlienPixMap& theSrcPixMapData, } #endif -// ======================================================================= -// function : Save -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::Save(Standard_Byte* theBuffer, const Standard_Size theLength, const TCollection_AsciiString& theFileName) @@ -1557,10 +1535,8 @@ bool Image_AlienPixMap::Save(std::ostream& theStream, const TCollection_AsciiStr #endif } -// ======================================================================= -// function : AdjustGamma -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_AlienPixMap::AdjustGamma(const Standard_Real theGammaCorr) { #ifdef HAVE_FREEIMAGE @@ -1572,10 +1548,8 @@ bool Image_AlienPixMap::AdjustGamma(const Standard_Real theGammaCorr) } #ifdef HAVE_FREEIMAGE -// ======================================================================= -// function : GetImageToDump -// purpose : -// ======================================================================= +//================================================================================================= + FIBITMAP* Image_AlienPixMap::getImageToDump(const Standard_Integer theFormat) { FIBITMAP* anImageToDump = myLibImage; diff --git a/src/Image/Image_DDSParser.cxx b/src/Image/Image_DDSParser.cxx index 9a63880889..2b30fd7942 100644 --- a/src/Image/Image_DDSParser.cxx +++ b/src/Image/Image_DDSParser.cxx @@ -64,10 +64,8 @@ struct Image_DDSParser::DDSFileHeader uint32_t Reserved2; }; -// ======================================================================= -// function : Load -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Image_DDSParser::Load( const Handle(Image_SupportedFormats)& theSupported, const TCollection_AsciiString& theFile, @@ -135,10 +133,8 @@ Handle(Image_CompressedPixMap) Image_DDSParser::Load( return aDef; } -// ======================================================================= -// function : Load -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Image_DDSParser::Load( const Handle(Image_SupportedFormats)& theSupported, const Handle(NCollection_Buffer)& theBuffer, @@ -187,10 +183,8 @@ Handle(Image_CompressedPixMap) Image_DDSParser::Load( return aDef; } -// ======================================================================= -// function : parseHeader -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Image_CompressedPixMap) Image_DDSParser::parseHeader(const DDSFileHeader& theHeader) { if (theHeader.Size != 124 || theHeader.Width == 0 || theHeader.Height == 0 diff --git a/src/Image/Image_Diff.cxx b/src/Image/Image_Diff.cxx index 604e8bc704..73a7131893 100644 --- a/src/Image/Image_Diff.cxx +++ b/src/Image/Image_Diff.cxx @@ -62,10 +62,8 @@ static bool isBlackPixel(const Image_PixMap& theData, Standard_Size theY, Standa } // namespace -// ======================================================================= -// function : Image_Diff -// purpose : -// ======================================================================= +//================================================================================================= + Image_Diff::Image_Diff() : myColorTolerance(0.0), myIsBorderFilterOn(Standard_False) @@ -73,19 +71,15 @@ Image_Diff::Image_Diff() // } -// ======================================================================= -// function : ~Image_Diff -// purpose : -// ======================================================================= +//================================================================================================= + Image_Diff::~Image_Diff() { releaseGroupsOfDiffPixels(); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Image_Diff::Init(const Handle(Image_PixMap)& theImageRef, const Handle(Image_PixMap)& theImageNew, const Standard_Boolean theToBlackWhite) @@ -118,10 +112,8 @@ Standard_Boolean Image_Diff::Init(const Handle(Image_PixMap)& theImageRef, return Standard_True; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Image_Diff::Init(const TCollection_AsciiString& theImgPathRef, const TCollection_AsciiString& theImgPathNew, const Standard_Boolean theToBlackWhite) @@ -136,10 +128,8 @@ Standard_Boolean Image_Diff::Init(const TCollection_AsciiString& theImgPathRef, return Init(anImgRef, anImgNew, theToBlackWhite); } -// ======================================================================= -// function : Compare -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Image_Diff::Compare() { // Number of different pixels (by color) @@ -249,10 +239,8 @@ Standard_Integer Image_Diff::Compare() return aNbDiffColors; } -// ======================================================================= -// function : SaveDiffImage -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Image_Diff::SaveDiffImage(Image_PixMap& theDiffImage) const { if (myImageRef.IsNull() || myImageNew.IsNull()) @@ -380,10 +368,8 @@ Standard_Boolean Image_Diff::SaveDiffImage(Image_PixMap& theDiffImage) const return Standard_True; } -// ======================================================================= -// function : SaveDiffImage -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Image_Diff::SaveDiffImage(const TCollection_AsciiString& theDiffPath) const { if (myImageRef.IsNull() || myImageNew.IsNull() || theDiffPath.IsEmpty()) @@ -402,10 +388,8 @@ Standard_Boolean Image_Diff::SaveDiffImage(const TCollection_AsciiString& theDif return aDiff.Save(theDiffPath); } -// ======================================================================= -// function : ignoreBorderEffect -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Image_Diff::ignoreBorderEffect() { if (myImageRef.IsNull() || myImageNew.IsNull()) @@ -557,10 +541,8 @@ Standard_Integer Image_Diff::ignoreBorderEffect() return aNbDiffColors; } -// ======================================================================= -// function : releaseGroupsOfDiffPixels -// purpose : -// ======================================================================= +//================================================================================================= + void Image_Diff::releaseGroupsOfDiffPixels() { myGroupsOfDiffPixels.Clear(); diff --git a/src/Image/Image_PixMap.cxx b/src/Image/Image_PixMap.cxx index 1b22a245bb..560eb7fedf 100644 --- a/src/Image/Image_PixMap.cxx +++ b/src/Image/Image_PixMap.cxx @@ -94,66 +94,52 @@ static const Image_FormatInfo Image_Table_ImageFormats[Image_CompressedFormat_NB IMPLEMENT_STANDARD_RTTIEXT(Image_PixMapData, NCollection_Buffer) IMPLEMENT_STANDARD_RTTIEXT(Image_PixMap, Standard_Transient) -// ======================================================================= -// function : DefaultAllocator -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(NCollection_BaseAllocator)& Image_PixMap::DefaultAllocator() { static const Handle(NCollection_BaseAllocator) THE_ALLOC = new NCollection_AlignedAllocator(16); return THE_ALLOC; } -// ======================================================================= -// function : ImageFormatToString -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Image_PixMap::ImageFormatToString(Image_Format theFormat) { return Image_Table_ImageFormats[theFormat].Name; } -// ======================================================================= -// function : ImageFormatToString -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Image_PixMap::ImageFormatToString(Image_CompressedFormat theFormat) { return Image_Table_ImageFormats[theFormat].Name; } -// ======================================================================= -// function : Image_PixMap -// purpose : -// ======================================================================= +//================================================================================================= + Image_PixMap::Image_PixMap() : myImgFormat(Image_Format_Gray) { // } -// ======================================================================= -// function : ~Image_PixMap -// purpose : -// ======================================================================= +//================================================================================================= + Image_PixMap::~Image_PixMap() { Clear(); } -// ======================================================================= -// function : SizePixelBytes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size Image_PixMap::SizePixelBytes(const Image_Format thePixelFormat) { return Image_Table_ImageFormats[thePixelFormat].PixelSize; } -// ======================================================================= -// function : SetFormat -// purpose : -// ======================================================================= +//================================================================================================= + void Image_PixMap::SetFormat(Image_Format thePixelFormat) { if (myImgFormat == thePixelFormat) @@ -170,10 +156,8 @@ void Image_PixMap::SetFormat(Image_Format thePixelFormat) myImgFormat = thePixelFormat; } -// ======================================================================= -// function : InitWrapper3D -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitWrapper3D(Image_Format thePixelFormat, Standard_Byte* theDataPtr, const NCollection_Vec3& theSizeXYZ, @@ -195,10 +179,8 @@ bool Image_PixMap::InitWrapper3D(Image_Format thePixel return true; } -// ======================================================================= -// function : InitWrapper -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitWrapper(Image_Format thePixelFormat, Standard_Byte* theDataPtr, const Standard_Size theSizeX, @@ -211,10 +193,8 @@ bool Image_PixMap::InitWrapper(Image_Format thePixelFormat, theSizeRowBytes); } -// ======================================================================= -// function : InitTrash3D -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitTrash3D(Image_Format thePixelFormat, const NCollection_Vec3& theSizeXYZ, const Standard_Size theSizeRowBytes) @@ -237,10 +217,8 @@ bool Image_PixMap::InitTrash3D(Image_Format thePixelFo return !myData.IsEmpty(); } -// ======================================================================= -// function : InitTrash -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitTrash(Image_Format thePixelFormat, const Standard_Size theSizeX, const Standard_Size theSizeY, @@ -251,10 +229,8 @@ bool Image_PixMap::InitTrash(Image_Format thePixelFormat, theSizeRowBytes); } -// ======================================================================= -// function : InitZero3D -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitZero3D(Image_Format thePixelFormat, const NCollection_Vec3& theSizeXYZ, const Standard_Size theSizeRowBytes, @@ -278,10 +254,8 @@ bool Image_PixMap::InitZero3D(Image_Format thePixelFor return true; } -// ======================================================================= -// function : InitCopy -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::InitCopy(const Image_PixMap& theCopy) { if (&theCopy == this) @@ -309,10 +283,8 @@ bool Image_PixMap::InitCopy(const Image_PixMap& theCopy) return true; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void Image_PixMap::Clear() { Handle(NCollection_BaseAllocator) anEmptyAlloc; @@ -323,10 +295,8 @@ void Image_PixMap::Clear() nullptr); } -// ======================================================================= -// function : ColorFromRawPixel -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_ColorRGBA Image_PixMap::ColorFromRawPixel(const Standard_Byte* theRawValue, const Image_Format theFormat, const Standard_Boolean theToLinearize) @@ -490,10 +460,8 @@ Quantity_ColorRGBA Image_PixMap::ColorFromRawPixel(const Standard_Byte* theRaw return Quantity_ColorRGBA(0.0f, 0.0f, 0.0f, 0.0f); // transparent } -// ======================================================================= -// function : ColorToRawPixel -// purpose : -// ======================================================================= +//================================================================================================= + void Image_PixMap::ColorToRawPixel(Standard_Byte* theRawValue, const Image_Format theFormat, const Quantity_ColorRGBA& theColor, @@ -685,10 +653,8 @@ void Image_PixMap::ColorToRawPixel(Standard_Byte* theRawValue, } } -// ======================================================================= -// function : SwapRgbaBgra -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::SwapRgbaBgra(Image_PixMap& theImage) { switch (theImage.Format()) @@ -762,10 +728,8 @@ bool Image_PixMap::SwapRgbaBgra(Image_PixMap& theImage) } } -// ======================================================================= -// function : ToBlackWhite -// purpose : -// ======================================================================= +//================================================================================================= + void Image_PixMap::ToBlackWhite(Image_PixMap& theImage) { switch (theImage.Format()) @@ -852,10 +816,8 @@ void Image_PixMap::ToBlackWhite(Image_PixMap& theImage) } } -// ======================================================================= -// function : FlipY -// purpose : -// ======================================================================= +//================================================================================================= + bool Image_PixMap::FlipY(Image_PixMap& theImage) { if (theImage.IsEmpty() || theImage.SizeX() == 0 || theImage.SizeY() == 0) diff --git a/src/Image/Image_SupportedFormats.cxx b/src/Image/Image_SupportedFormats.cxx index adfc2dacdb..624352f850 100644 --- a/src/Image/Image_SupportedFormats.cxx +++ b/src/Image/Image_SupportedFormats.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Image_SupportedFormats, Standard_Transient) -// ======================================================================= -// function : Image_SupportedFormats -// purpose : -// ======================================================================= +//================================================================================================= + Image_SupportedFormats::Image_SupportedFormats() : myFormats(Image_Format_UNKNOWN, Image_CompressedFormat_NB - 1), myHasCompressed(false) diff --git a/src/Image/Image_Texture.cxx b/src/Image/Image_Texture.cxx index acd7a2cc0a..223dfcf7cf 100644 --- a/src/Image/Image_Texture.cxx +++ b/src/Image/Image_Texture.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Image_Texture, Standard_Transient) -// ================================================================ -// Function : Image_Texture -// Purpose : -// ================================================================ +//================================================================================================= + Image_Texture::Image_Texture(const TCollection_AsciiString& theFileName) : myImagePath(theFileName), myOffset(-1), @@ -39,10 +37,8 @@ Image_Texture::Image_Texture(const TCollection_AsciiString& theFileName) } } -// ================================================================ -// Function : Image_Texture -// Purpose : -// ================================================================ +//================================================================================================= + Image_Texture::Image_Texture(const TCollection_AsciiString& theFileName, int64_t theOffset, int64_t theLength) @@ -59,10 +55,8 @@ Image_Texture::Image_Texture(const TCollection_AsciiString& theFileName, } } -// ================================================================ -// Function : Image_Texture -// Purpose : -// ================================================================ +//================================================================================================= + Image_Texture::Image_Texture(const Handle(NCollection_Buffer)& theBuffer, const TCollection_AsciiString& theId) : myBuffer(theBuffer), @@ -75,10 +69,8 @@ Image_Texture::Image_Texture(const Handle(NCollection_Buffer)& theBuffer, } } -// ================================================================ -// Function : ReadCompressedImage -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_CompressedPixMap) Image_Texture::ReadCompressedImage( const Handle(Image_SupportedFormats)& theSupported) const { @@ -106,10 +98,8 @@ Handle(Image_CompressedPixMap) Image_Texture::ReadCompressedImage( return Image_DDSParser::Load(theSupported, myImagePath, 0); } -// ================================================================ -// Function : ReadImage -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_PixMap) Image_Texture::ReadImage(const Handle(Image_SupportedFormats)&) const { Handle(Image_PixMap) anImage; @@ -133,10 +123,8 @@ Handle(Image_PixMap) Image_Texture::ReadImage(const Handle(Image_SupportedFormat return anImage; } -// ================================================================ -// Function : loadImageFile -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_PixMap) Image_Texture::loadImageFile(const TCollection_AsciiString& thePath) const { Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap(); @@ -147,10 +135,8 @@ Handle(Image_PixMap) Image_Texture::loadImageFile(const TCollection_AsciiString& return anImage; } -// ================================================================ -// Function : loadImageBuffer -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_PixMap) Image_Texture::loadImageBuffer(const Handle(NCollection_Buffer)& theBuffer, const TCollection_AsciiString& theId) const { @@ -172,10 +158,8 @@ Handle(Image_PixMap) Image_Texture::loadImageBuffer(const Handle(NCollection_Buf return anImage; } -// ================================================================ -// Function : loadImageOffset -// Purpose : -// ================================================================ +//================================================================================================= + Handle(Image_PixMap) Image_Texture::loadImageOffset(const TCollection_AsciiString& thePath, int64_t theOffset, int64_t theLength) const @@ -212,10 +196,8 @@ Handle(Image_PixMap) Image_Texture::loadImageOffset(const TCollection_AsciiStrin return anImage; } -// ================================================================ -// Function : MimeType -// Purpose : -// ================================================================ +//================================================================================================= + TCollection_AsciiString Image_Texture::MimeType() const { const TCollection_AsciiString aType = ProbeImageFileFormat(); @@ -238,10 +220,8 @@ TCollection_AsciiString Image_Texture::MimeType() const return TCollection_AsciiString(); } -// ================================================================ -// Function : ProbeImageFileFormat -// Purpose : -// ================================================================ +//================================================================================================= + TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const { static const Standard_Size THE_PROBE_SIZE = 20; @@ -320,10 +300,8 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const return ""; } -// ================================================================ -// Function : WriteImage -// Purpose : -// ================================================================ +//================================================================================================= + Standard_Boolean Image_Texture::WriteImage(const TCollection_AsciiString& theFile) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); @@ -350,10 +328,8 @@ Standard_Boolean Image_Texture::WriteImage(const TCollection_AsciiString& theFil return true; } -// ================================================================ -// Function : WriteImage -// Purpose : -// ================================================================ +//================================================================================================= + Standard_Boolean Image_Texture::WriteImage(std::ostream& theStream, const TCollection_AsciiString& theFile) { diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index fe6c364803..46fe4a9e04 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -97,10 +97,8 @@ static void CheckSampling(const IntTools_CurveRangeSample& theCurveRange Standard_Boolean& bAllowSamplingU, Standard_Boolean& bAllowSamplingV); -// ================================================================================== -// function: IntTools_BeanFaceIntersector -// purpose: -// ================================================================================== +//================================================================================================= + IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector() : myFirstParameter(0.), myLastParameter(0.), @@ -117,10 +115,8 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector() myCurveResolution = Precision::PConfusion(); } -// ================================================================================== -// function: IntTools_BeanFaceIntersector -// purpose: -// ================================================================================== +//================================================================================================= + IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace) : myFirstParameter(0.), @@ -137,10 +133,8 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const TopoDS_Edge& th Init(theEdge, theFace); } -// ================================================================================== -// function: IntTools_BeanFaceIntersector -// purpose: -// ================================================================================== +//================================================================================================= + IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, @@ -157,10 +151,8 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Cur Init(theCurve, theSurface, theBeanTolerance, theFaceTolerance); } -// ================================================================================== -// function: IntTools_BeanFaceIntersector -// purpose: -// ================================================================================== +//================================================================================================= + IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, @@ -192,10 +184,8 @@ IntTools_BeanFaceIntersector::IntTools_BeanFaceIntersector(const BRepAdaptor_Cur Handle(Geom_Surface)::DownCast(mySurface.Surface().Surface()->Transformed(mySurface.Trsf())); } -// ================================================================================== -// function: Init -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::Init(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace) { if (myContext.IsNull()) @@ -220,10 +210,8 @@ void IntTools_BeanFaceIntersector::Init(const TopoDS_Edge& theEdge, const TopoDS myResults.Clear(); } -// ================================================================================== -// function: Init -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::Init(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, @@ -246,10 +234,8 @@ void IntTools_BeanFaceIntersector::Init(const BRepAdaptor_Curve& theCurve, myResults.Clear(); } -// ================================================================================== -// function: Init -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::Init(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, @@ -266,28 +252,22 @@ void IntTools_BeanFaceIntersector::Init(const BRepAdaptor_Curve& theCurve, SetSurfaceParameters(theUMinParameter, theUMaxParameter, theVMinParameter, theVMaxParameter); } -// ================================================================================== -// function: SetContext -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::SetContext(const Handle(IntTools_Context)& theContext) { myContext = theContext; } -// ================================================================================== -// function: Context -// purpose: -// ================================================================================== +//================================================================================================= + const Handle(IntTools_Context)& IntTools_BeanFaceIntersector::Context() const { return myContext; } -// ================================================================================== -// function: SetBeanParameters -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::SetBeanParameters(const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve) { @@ -295,10 +275,8 @@ void IntTools_BeanFaceIntersector::SetBeanParameters(const Standard_Real theFirs myLastParameter = theLastParOnCurve; } -// ================================================================================== -// function: SetSurfaceParameters -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::SetSurfaceParameters(const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, @@ -310,10 +288,8 @@ void IntTools_BeanFaceIntersector::SetSurfaceParameters(const Standard_Real theU myVMaxParameter = theVMaxParameter; } -// ================================================================================== -// function: Perform -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::Perform() { myIsDone = Standard_False; @@ -403,28 +379,22 @@ void IntTools_BeanFaceIntersector::Perform() } } -// ================================================================================== -// function: Result -// purpose: -// ================================================================================== +//================================================================================================= + const IntTools_SequenceOfRanges& IntTools_BeanFaceIntersector::Result() const { return myResults; } -// ================================================================================== -// function: Result -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::Result(IntTools_SequenceOfRanges& theResults) const { theResults = myResults; } -// ================================================================================== -// function: Distance -// purpose: -// ================================================================================== +//================================================================================================= + Standard_Real IntTools_BeanFaceIntersector::Distance(const Standard_Real theArg) { gp_Pnt aPoint = myCurve.Value(theArg); @@ -489,10 +459,8 @@ Standard_Real IntTools_BeanFaceIntersector::Distance(const Standard_Real theArg) return aDistance; } -// ================================================================================== -// function: Distance -// purpose: -// ================================================================================== +//================================================================================================= + Standard_Real IntTools_BeanFaceIntersector::Distance(const Standard_Real theArg, Standard_Real& theUParameter, Standard_Real& theVParameter) @@ -590,10 +558,8 @@ Standard_Real IntTools_BeanFaceIntersector::Distance(const Standard_Real theArg, return aDistance; } -// ================================================================================== -// function: ComputeAroundExactIntersection -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection() { IntCurveSurface_HInter anExactIntersector; @@ -722,10 +688,8 @@ void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection() } } -// ================================================================================== -// function: FastComputeExactIntersection -// purpose: -// ================================================================================== +//================================================================================================= + Standard_Boolean IntTools_BeanFaceIntersector::FastComputeAnalytic() { GeomAbs_CurveType aCT = myCurve.GetType(); @@ -844,10 +808,8 @@ Standard_Boolean IntTools_BeanFaceIntersector::FastComputeAnalytic() return isCoincide || !hasIntersection; } -// ================================================================================== -// function: ComputeLinePlane -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::ComputeLinePlane() { Standard_Real Tolang = 1.e-9; @@ -941,10 +903,8 @@ void IntTools_BeanFaceIntersector::ComputeLinePlane() return; } -// ================================================================================== -// function: ComputeUsingExtremum -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::ComputeUsingExtremum() { Standard_Real Tol, af, al; @@ -1121,10 +1081,8 @@ void IntTools_BeanFaceIntersector::ComputeUsingExtremum() } } -// ================================================================================== -// function: ComputeNearRangeBoundaries -// purpose: -// ================================================================================== +//================================================================================================= + void IntTools_BeanFaceIntersector::ComputeNearRangeBoundaries() { Standard_Real U = myUMinParameter; @@ -1455,10 +1413,8 @@ static Standard_Boolean SetEmptyResultRange(const Standard_Real theParamete // return close; // } -// ====================================================================================================================== -// function: LocalizeSolutions -// purpose: -// ====================================================================================================================== +//================================================================================================= + Standard_Boolean IntTools_BeanFaceIntersector::LocalizeSolutions( const IntTools_CurveRangeSample& theCurveRange, const Bnd_Box& theBoxCurve, @@ -1907,10 +1863,8 @@ Standard_Boolean IntTools_BeanFaceIntersector::LocalizeSolutions( return Standard_True; } -// ====================================================================================================================== -// function: ComputeLocalized -// purpose: -// ====================================================================================================================== +//================================================================================================= + Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() { Standard_Real Tol = Precision::PConfusion(); @@ -2194,10 +2148,8 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() return Standard_True; } -// ====================================================================================================================== -// function: TestComputeCoinside -// purpose: -// ====================================================================================================================== +//================================================================================================= + Standard_Boolean IntTools_BeanFaceIntersector::TestComputeCoinside() { Standard_Real cfp = myFirstParameter, clp = myLastParameter; diff --git a/src/IntTools/IntTools_TopolTool.cxx b/src/IntTools/IntTools_TopolTool.cxx index 2a8ebe02f0..d0ade9bd78 100644 --- a/src/IntTools/IntTools_TopolTool.cxx +++ b/src/IntTools/IntTools_TopolTool.cxx @@ -32,10 +32,8 @@ static void Analyse(const TColgp_Array2OfPnt& array2, Standard_Integer& theNbSamplesU, Standard_Integer& theNbSamplesV); -// ===================================================================================== -// function: Constructor -// purpose: -// ===================================================================================== +//================================================================================================= + IntTools_TopolTool::IntTools_TopolTool() { myNbSmplU = 0; @@ -44,10 +42,8 @@ IntTools_TopolTool::IntTools_TopolTool() myDV = 1.; } -// ===================================================================================== -// function: Constructor -// purpose: -// ===================================================================================== +//================================================================================================= + IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface) { Initialize(theSurface); @@ -57,19 +53,15 @@ IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurfa myDV = 1.; } -// ===================================================================================== -// function: Initialize -// purpose: -// ===================================================================================== +//================================================================================================= + void IntTools_TopolTool::Initialize() { throw Standard_NotImplemented("IntTools_TopolTool::Initialize ()"); } -// ===================================================================================== -// function: Initialize -// purpose: -// ===================================================================================== +//================================================================================================= + void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& theSurface) { Adaptor3d_TopolTool::Initialize(theSurface); @@ -80,10 +72,8 @@ void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& theSurface) myDV = 1.; } -// ===================================================================================== -// function: ComputeSamplePoints -// purpose: -// ===================================================================================== +//================================================================================================= + void IntTools_TopolTool::ComputeSamplePoints() { Standard_Real uinf, usup, vinf, vsup; @@ -362,10 +352,8 @@ void IntTools_TopolTool::ComputeSamplePoints() myDV = (vsup - vinf) / (myNbSmplV + 1); } -// ===================================================================================== -// function: NbSamplesU -// purpose: -// ===================================================================================== +//================================================================================================= + Standard_Integer IntTools_TopolTool::NbSamplesU() { if (myNbSmplU <= 0) @@ -375,10 +363,8 @@ Standard_Integer IntTools_TopolTool::NbSamplesU() return myNbSmplU; } -// ===================================================================================== -// function: NbSamplesV -// purpose: -// ===================================================================================== +//================================================================================================= + Standard_Integer IntTools_TopolTool::NbSamplesV() { if (myNbSmplV <= 0) @@ -388,10 +374,8 @@ Standard_Integer IntTools_TopolTool::NbSamplesV() return myNbSmplV; } -// ===================================================================================== -// function: NbSamples -// purpose: -// ===================================================================================== +//================================================================================================= + Standard_Integer IntTools_TopolTool::NbSamples() { if (myNbSmplU <= 0) @@ -401,10 +385,8 @@ Standard_Integer IntTools_TopolTool::NbSamples() return (myNbSmplU * myNbSmplV); } -// ===================================================================================== -// function: SamplePoint -// purpose: -// ===================================================================================== +//================================================================================================= + void IntTools_TopolTool::SamplePoint(const Standard_Integer Index, gp_Pnt2d& P2d, gp_Pnt& P3d) { if (myUPars.IsNull()) diff --git a/src/Media/Media_BufferPool.cxx b/src/Media/Media_BufferPool.cxx index 4396db67fc..f73ef73603 100644 --- a/src/Media/Media_BufferPool.cxx +++ b/src/Media/Media_BufferPool.cxx @@ -33,10 +33,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Media_BufferPool, Standard_Transient) -// ======================================================================= -// function : Media_BufferPool -// purpose : -// ======================================================================= +//================================================================================================= + Media_BufferPool::Media_BufferPool() : myPool(NULL), myBufferSize(0) @@ -44,19 +42,15 @@ Media_BufferPool::Media_BufferPool() // } -// ======================================================================= -// function : ~Media_BufferPool -// purpose : -// ======================================================================= +//================================================================================================= + Media_BufferPool::~Media_BufferPool() { Release(); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void Media_BufferPool::Release() { if (myPool != NULL) @@ -69,10 +63,8 @@ void Media_BufferPool::Release() } } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_BufferPool::Init(int theBufferSize) { if (myBufferSize == theBufferSize) @@ -93,10 +85,8 @@ bool Media_BufferPool::Init(int theBufferSize) return myPool != NULL; } -// ======================================================================= -// function : GetBuffer -// purpose : -// ======================================================================= +//================================================================================================= + AVBufferRef* Media_BufferPool::GetBuffer() { #ifdef HAVE_FFMPEG diff --git a/src/Media/Media_CodecContext.cxx b/src/Media/Media_CodecContext.cxx index 9f0cff5a18..224e4f97e9 100644 --- a/src/Media/Media_CodecContext.cxx +++ b/src/Media/Media_CodecContext.cxx @@ -37,10 +37,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Media_CodecContext, Standard_Transient) -// ======================================================================= -// function : Media_CodecContext -// purpose : -// ======================================================================= +//================================================================================================= + Media_CodecContext::Media_CodecContext() : myCodecCtx(NULL), myCodec(NULL), @@ -55,19 +53,15 @@ Media_CodecContext::Media_CodecContext() #endif } -// ======================================================================= -// function : ~Media_CodecContext -// purpose : -// ======================================================================= +//================================================================================================= + Media_CodecContext::~Media_CodecContext() { Close(); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_CodecContext::Init(const AVStream& theStream, double thePtsStartBase, int theNbThreads) { #ifdef HAVE_FFMPEG @@ -77,10 +71,8 @@ bool Media_CodecContext::Init(const AVStream& theStream, double thePtsStartBase, #endif } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_CodecContext::Init(const AVStream& theStream, double thePtsStartBase, int theNbThreads, @@ -163,10 +155,8 @@ bool Media_CodecContext::Init(const AVStream& theStream, #endif } -// ======================================================================= -// function : Close -// purpose : -// ======================================================================= +//================================================================================================= + void Media_CodecContext::Close() { if (myCodecCtx != NULL) @@ -177,10 +167,8 @@ void Media_CodecContext::Close() } } -// ======================================================================= -// function : Flush -// purpose : -// ======================================================================= +//================================================================================================= + void Media_CodecContext::Flush() { if (myCodecCtx != NULL) @@ -191,10 +179,8 @@ void Media_CodecContext::Flush() } } -// ======================================================================= -// function : SizeX -// purpose : -// ======================================================================= +//================================================================================================= + int Media_CodecContext::SizeX() const { #ifdef HAVE_FFMPEG @@ -204,10 +190,8 @@ int Media_CodecContext::SizeX() const #endif } -// ======================================================================= -// function : SizeY -// purpose : -// ======================================================================= +//================================================================================================= + int Media_CodecContext::SizeY() const { #ifdef HAVE_FFMPEG @@ -217,19 +201,15 @@ int Media_CodecContext::SizeY() const #endif } -// ======================================================================= -// function : CanProcessPacket -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_CodecContext::CanProcessPacket(const Handle(Media_Packet)& thePacket) const { return !thePacket.IsNull() && myStreamIndex == thePacket->StreamIndex(); } -// ======================================================================= -// function : SendPacket -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_CodecContext::SendPacket(const Handle(Media_Packet)& thePacket) { if (!CanProcessPacket(thePacket)) @@ -249,10 +229,8 @@ bool Media_CodecContext::SendPacket(const Handle(Media_Packet)& thePacket) #endif } -// ======================================================================= -// function : ReceiveFrame -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_CodecContext::ReceiveFrame(const Handle(Media_Frame)& theFrame) { if (theFrame.IsNull()) diff --git a/src/Media/Media_FormatContext.cxx b/src/Media/Media_FormatContext.cxx index 10052f6241..4e495fbea5 100644 --- a/src/Media/Media_FormatContext.cxx +++ b/src/Media/Media_FormatContext.cxx @@ -70,10 +70,8 @@ static TCollection_AsciiString formatFps(double theVal) #endif } // namespace -// ======================================================================= -// function : FormatAVErrorDescription -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Media_FormatContext::FormatAVErrorDescription(int theErrCodeAV) { #ifdef HAVE_FFMPEG @@ -105,10 +103,8 @@ TCollection_AsciiString Media_FormatContext::FormatAVErrorDescription(int theErr #endif } -// ======================================================================= -// function : FormatUnitsToSeconds -// purpose : -// ======================================================================= +//================================================================================================= + double Media_FormatContext::FormatUnitsToSeconds(int64_t theTimeUnits) { #ifdef HAVE_FFMPEG @@ -119,10 +115,8 @@ double Media_FormatContext::FormatUnitsToSeconds(int64_t theTimeUnits) #endif } -// ======================================================================= -// function : UnitsToSeconds -// purpose : -// ======================================================================= +//================================================================================================= + double Media_FormatContext::UnitsToSeconds(const AVRational& theTimeBase, int64_t theTimeUnits) { #ifdef HAVE_FFMPEG @@ -134,10 +128,8 @@ double Media_FormatContext::UnitsToSeconds(const AVRational& theTimeBase, int64_ #endif } -// ======================================================================= -// function : StreamUnitsToSeconds -// purpose : -// ======================================================================= +//================================================================================================= + double Media_FormatContext::StreamUnitsToSeconds(const AVStream& theStream, int64_t theTimeUnits) { #ifdef HAVE_FFMPEG @@ -149,10 +141,8 @@ double Media_FormatContext::StreamUnitsToSeconds(const AVStream& theStream, int6 #endif } -// ======================================================================= -// function : SecondsToUnits -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_FormatContext::SecondsToUnits(double theTimeSeconds) { #ifdef HAVE_FFMPEG @@ -163,10 +153,8 @@ int64_t Media_FormatContext::SecondsToUnits(double theTimeSeconds) #endif } -// ======================================================================= -// function : SecondsToUnits -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_FormatContext::SecondsToUnits(const AVRational& theTimeBase, double theTimeSeconds) { #ifdef HAVE_FFMPEG @@ -178,10 +166,8 @@ int64_t Media_FormatContext::SecondsToUnits(const AVRational& theTimeBase, doubl #endif } -// ======================================================================= -// function : Media_FormatContext -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_FormatContext::StreamSecondsToUnits(const AVStream& theStream, double theTimeSeconds) { #ifdef HAVE_FFMPEG @@ -193,10 +179,8 @@ int64_t Media_FormatContext::StreamSecondsToUnits(const AVStream& theStream, dou #endif } -// ======================================================================= -// function : Media_FormatContext -// purpose : -// ======================================================================= +//================================================================================================= + Media_FormatContext::Media_FormatContext() : myFormatCtx(NULL), myPtsStartBase(0.0), @@ -205,19 +189,15 @@ Media_FormatContext::Media_FormatContext() // } -// ======================================================================= -// function : ~Media_FormatContext -// purpose : -// ======================================================================= +//================================================================================================= + Media_FormatContext::~Media_FormatContext() { Close(); } -// ======================================================================= -// function : NbSteams -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int Media_FormatContext::NbSteams() const { #ifdef HAVE_FFMPEG @@ -227,10 +207,8 @@ unsigned int Media_FormatContext::NbSteams() const #endif } -// ======================================================================= -// function : Stream -// purpose : -// ======================================================================= +//================================================================================================= + const AVStream& Media_FormatContext::Stream(unsigned int theIndex) const { #ifdef HAVE_FFMPEG @@ -241,10 +219,8 @@ const AVStream& Media_FormatContext::Stream(unsigned int theIndex) const #endif } -// ======================================================================= -// function : OpenInput -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_FormatContext::OpenInput(const TCollection_AsciiString& theInput) { #ifdef HAVE_FFMPEG @@ -303,10 +279,8 @@ bool Media_FormatContext::OpenInput(const TCollection_AsciiString& theInput) #endif } -// ======================================================================= -// function : Close -// purpose : -// ======================================================================= +//================================================================================================= + void Media_FormatContext::Close() { if (myFormatCtx != NULL) @@ -318,10 +292,8 @@ void Media_FormatContext::Close() } } -// ======================================================================= -// function : FormatTime -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Media_FormatContext::FormatTime(double theSeconds) { double aSecIn = theSeconds; @@ -353,10 +325,8 @@ TCollection_AsciiString Media_FormatContext::FormatTime(double theSeconds) return TCollection_AsciiString(aMilliSeconds) + " ms"; } -// ======================================================================= -// function : FormatTimeProgress -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Media_FormatContext::FormatTimeProgress(double theProgress, double theDuration) { @@ -393,10 +363,8 @@ TCollection_AsciiString Media_FormatContext::FormatTimeProgress(double theProgre return aBuffer; } -// ======================================================================= -// function : StreamInfo -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Media_FormatContext::StreamInfo(unsigned int theIndex, AVCodecContext* theCodecCtx) const { @@ -463,10 +431,8 @@ TCollection_AsciiString Media_FormatContext::StreamInfo(unsigned int theIndex #endif } -// ======================================================================= -// function : ReadPacket -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_FormatContext::ReadPacket(const Handle(Media_Packet)& thePacket) { if (thePacket.IsNull()) @@ -481,10 +447,8 @@ bool Media_FormatContext::ReadPacket(const Handle(Media_Packet)& thePacket) #endif } -// ======================================================================= -// function : SeekStream -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_FormatContext::SeekStream(unsigned int theStreamId, double theSeekPts, bool theToSeekBack) @@ -531,10 +495,8 @@ bool Media_FormatContext::SeekStream(unsigned int theStreamId, #endif } -// ======================================================================= -// function : Seek -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_FormatContext::Seek(double theSeekPts, bool theToSeekBack) { #ifdef HAVE_FFMPEG diff --git a/src/Media/Media_Frame.cxx b/src/Media/Media_Frame.cxx index 891af86ff7..58169f54fc 100644 --- a/src/Media/Media_Frame.cxx +++ b/src/Media/Media_Frame.cxx @@ -33,10 +33,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Media_Frame, Standard_Transient) -// ======================================================================= -// function : FormatFFmpeg2Occt -// purpose : -// ======================================================================= +//================================================================================================= + Image_Format Media_Frame::FormatFFmpeg2Occt(int theFormat) { #ifdef HAVE_FFMPEG @@ -67,10 +65,8 @@ Image_Format Media_Frame::FormatFFmpeg2Occt(int theFormat) #endif } -// ======================================================================= -// function : FormatOcct2FFmpeg -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Frame::FormatOcct2FFmpeg(Image_Format theFormat) { #ifdef HAVE_FFMPEG @@ -114,10 +110,8 @@ int Media_Frame::FormatOcct2FFmpeg(Image_Format theFormat) #endif } -// ======================================================================= -// function : Media_Frame -// purpose : -// ======================================================================= +//================================================================================================= + Media_Frame::Media_Frame() : myFrame(NULL), myFramePts(0.0), @@ -130,10 +124,8 @@ Media_Frame::Media_Frame() Unref(); } -// ======================================================================= -// function : ~Media_Frame -// purpose : -// ======================================================================= +//================================================================================================= + Media_Frame::~Media_Frame() { #ifdef HAVE_FFMPEG @@ -141,10 +133,8 @@ Media_Frame::~Media_Frame() #endif } -// ======================================================================= -// function : Unref -// purpose : -// ======================================================================= +//================================================================================================= + void Media_Frame::Unref() { #ifdef HAVE_FFMPEG @@ -152,10 +142,8 @@ void Media_Frame::Unref() #endif } -// ======================================================================= -// function : IsFullRangeYUV -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Frame::IsFullRangeYUV() const { #ifdef HAVE_FFMPEG @@ -165,19 +153,15 @@ bool Media_Frame::IsFullRangeYUV() const #endif } -// ======================================================================= -// function : Swap -// purpose : -// ======================================================================= +//================================================================================================= + void Media_Frame::Swap(const Handle(Media_Frame)& theFrame1, const Handle(Media_Frame)& theFrame2) { std::swap(theFrame1->myFrame, theFrame2->myFrame); } -// ======================================================================= -// function : IsEmpty -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Frame::IsEmpty() const { #ifdef HAVE_FFMPEG @@ -187,10 +171,8 @@ bool Media_Frame::IsEmpty() const #endif } -// ======================================================================= -// function : SizeX -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Frame::SizeX() const { #ifdef HAVE_FFMPEG @@ -200,10 +182,8 @@ int Media_Frame::SizeX() const #endif } -// ======================================================================= -// function : SizeY -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Frame::SizeY() const { #ifdef HAVE_FFMPEG @@ -213,10 +193,8 @@ int Media_Frame::SizeY() const #endif } -// ======================================================================= -// function : Format -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Frame::Format() const { #ifdef HAVE_FFMPEG @@ -226,10 +204,8 @@ int Media_Frame::Format() const #endif } -// ======================================================================= -// function : Plane -// purpose : -// ======================================================================= +//================================================================================================= + uint8_t* Media_Frame::Plane(int thePlaneId) const { #ifdef HAVE_FFMPEG @@ -240,10 +216,8 @@ uint8_t* Media_Frame::Plane(int thePlaneId) const #endif } -// ======================================================================= -// function : LineSize -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Frame::LineSize(int thePlaneId) const { #ifdef HAVE_FFMPEG @@ -254,10 +228,8 @@ int Media_Frame::LineSize(int thePlaneId) const #endif } -// ======================================================================= -// function : BestEffortTimestamp -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_Frame::BestEffortTimestamp() const { #ifdef HAVE_FFMPEG @@ -267,10 +239,8 @@ int64_t Media_Frame::BestEffortTimestamp() const #endif } -// ======================================================================= -// function : InitWrapper -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Frame::InitWrapper(const Handle(Image_PixMap)& thePixMap) { Unref(); diff --git a/src/Media/Media_Packet.cxx b/src/Media/Media_Packet.cxx index b74be42297..b2335b412f 100644 --- a/src/Media/Media_Packet.cxx +++ b/src/Media/Media_Packet.cxx @@ -30,10 +30,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Media_Packet, Standard_Transient) -// ======================================================================= -// function : Media_Packet -// purpose : -// ======================================================================= +//================================================================================================= + Media_Packet::Media_Packet() : myPacket(NULL) { @@ -42,10 +40,8 @@ Media_Packet::Media_Packet() #endif } -// ======================================================================= -// function : ~Media_Packet -// purpose : -// ======================================================================= +//================================================================================================= + Media_Packet::~Media_Packet() { #ifdef HAVE_FFMPEG @@ -53,10 +49,8 @@ Media_Packet::~Media_Packet() #endif } -// ======================================================================= -// function : Unref -// purpose : -// ======================================================================= +//================================================================================================= + void Media_Packet::Unref() { #ifdef HAVE_FFMPEG @@ -64,10 +58,8 @@ void Media_Packet::Unref() #endif } -// ======================================================================= -// function : Data -// purpose : -// ======================================================================= +//================================================================================================= + const uint8_t* Media_Packet::Data() const { #ifdef HAVE_FFMPEG @@ -77,10 +69,8 @@ const uint8_t* Media_Packet::Data() const #endif } -// ======================================================================= -// function : ChangeData -// purpose : -// ======================================================================= +//================================================================================================= + uint8_t* Media_Packet::ChangeData() { #ifdef HAVE_FFMPEG @@ -90,10 +80,8 @@ uint8_t* Media_Packet::ChangeData() #endif } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Packet::Size() const { #ifdef HAVE_FFMPEG @@ -103,10 +91,8 @@ int Media_Packet::Size() const #endif } -// ======================================================================= -// function : Pts -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_Packet::Pts() const { #ifdef HAVE_FFMPEG @@ -116,10 +102,8 @@ int64_t Media_Packet::Pts() const #endif } -// ======================================================================= -// function : Dts -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_Packet::Dts() const { #ifdef HAVE_FFMPEG @@ -129,10 +113,8 @@ int64_t Media_Packet::Dts() const #endif } -// ======================================================================= -// function : Duration -// purpose : -// ======================================================================= +//================================================================================================= + int64_t Media_Packet::Duration() const { #ifdef HAVE_FFMPEG @@ -142,10 +124,8 @@ int64_t Media_Packet::Duration() const #endif } -// ======================================================================= -// function : StreamIndex -// purpose : -// ======================================================================= +//================================================================================================= + int Media_Packet::StreamIndex() const { #ifdef HAVE_FFMPEG @@ -155,10 +135,8 @@ int Media_Packet::StreamIndex() const #endif } -// ======================================================================= -// function : IsKeyFrame -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Packet::IsKeyFrame() const { #ifdef HAVE_FFMPEG @@ -168,10 +146,8 @@ bool Media_Packet::IsKeyFrame() const #endif } -// ======================================================================= -// function : SetKeyFrame -// purpose : -// ======================================================================= +//================================================================================================= + void Media_Packet::SetKeyFrame() { #ifdef HAVE_FFMPEG diff --git a/src/Media/Media_Scaler.cxx b/src/Media/Media_Scaler.cxx index 451f487f51..0169bcb887 100644 --- a/src/Media/Media_Scaler.cxx +++ b/src/Media/Media_Scaler.cxx @@ -32,10 +32,8 @@ extern "C" IMPLEMENT_STANDARD_RTTIEXT(Media_Scaler, Standard_Transient) -// ======================================================================= -// function : Media_Scaler -// purpose : -// ======================================================================= +//================================================================================================= + Media_Scaler::Media_Scaler() : mySwsContext(NULL), mySrcFormat(0), @@ -47,19 +45,15 @@ Media_Scaler::Media_Scaler() #endif } -// ======================================================================= -// function : ~Media_Scaler -// purpose : -// ======================================================================= +//================================================================================================= + Media_Scaler::~Media_Scaler() { Release(); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void Media_Scaler::Release() { if (mySwsContext != NULL) @@ -71,10 +65,8 @@ void Media_Scaler::Release() } } -// ======================================================================= -// function : Convert -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Scaler::Init(const Graphic3d_Vec2i& theSrcDims, int theSrcFormat, const Graphic3d_Vec2i& theResDims, @@ -118,10 +110,8 @@ bool Media_Scaler::Init(const Graphic3d_Vec2i& theSrcDims, #endif } -// ======================================================================= -// function : Convert -// purpose : -// ======================================================================= +//================================================================================================= + bool Media_Scaler::Convert(const Handle(Media_Frame)& theSrc, const Handle(Media_Frame)& theRes) { if (theSrc.IsNull() || theSrc->IsEmpty() || theRes.IsNull() || theRes->IsEmpty() diff --git a/src/Message/Message.cxx b/src/Message/Message.cxx index 1e6263dd08..a41dd0d156 100644 --- a/src/Message/Message.cxx +++ b/src/Message/Message.cxx @@ -100,10 +100,8 @@ Standard_Boolean Message::MetricFromString(const Standard_CString theString, return Standard_False; } -// ======================================================================= -// function : ToOSDMetric -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Message::ToOSDMetric(const Message_MetricType theMetric, OSD_MemInfo::Counter& theMemInfo) { @@ -136,10 +134,8 @@ Standard_Boolean Message::ToOSDMetric(const Message_MetricType theMetric, return Standard_True; } -// ======================================================================= -// function : ToMessageMetric -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Message::ToMessageMetric(const OSD_MemInfo::Counter theMemInfo, Message_MetricType& theMetric) { diff --git a/src/OSD/OSD_Directory.cxx b/src/OSD/OSD_Directory.cxx index 3c3497c5d0..3fbb750b3f 100644 --- a/src/OSD/OSD_Directory.cxx +++ b/src/OSD/OSD_Directory.cxx @@ -38,29 +38,23 @@ void _osd_wnt_set_error(OSD_Error&, Standard_Integer, ...); const OSD_WhoAmI Iam = OSD_WDirectory; #endif -// ======================================================================= -// function : OSD_Directory -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Directory::OSD_Directory() { // } -// ======================================================================= -// function : OSD_Directory -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Directory::OSD_Directory(const OSD_Path& theName) : OSD_FileNode(theName) { // } -// ======================================================================= -// function : Build -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_Directory::Build(const OSD_Protection& theProtect) { #ifdef _WIN32 @@ -142,10 +136,8 @@ void OSD_Directory::Build(const OSD_Protection& theProtect) #endif } -// ======================================================================= -// function : BuildTemporary -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Directory OSD_Directory::BuildTemporary() { #ifdef _WIN32 diff --git a/src/OSD/OSD_Disk.cxx b/src/OSD/OSD_Disk.cxx index 995f0e6005..c26f0db7b3 100644 --- a/src/OSD/OSD_Disk.cxx +++ b/src/OSD/OSD_Disk.cxx @@ -96,10 +96,8 @@ extern "C" #include #endif -// ======================================================================= -// function : OSD_Disk -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Disk::OSD_Disk() { #ifdef _WIN32 @@ -116,10 +114,8 @@ OSD_Disk::OSD_Disk() #endif } -// ======================================================================= -// function : OSD_Disk -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Disk::OSD_Disk(const OSD_Path& theName) : myDiskName(theName.Disk()) { @@ -137,19 +133,15 @@ OSD_Disk::OSD_Disk(const Standard_CString theName) #endif } -// ======================================================================= -// function : SetName -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_Disk::SetName(const OSD_Path& theName) { myDiskName = theName.Disk(); } -// ======================================================================= -// function : Name -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Path OSD_Disk::Name() const { #ifdef _WIN32 @@ -161,10 +153,8 @@ OSD_Path OSD_Disk::Name() const #endif } -// ======================================================================= -// function : DiskSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OSD_Disk::DiskSize() { #ifdef _WIN32 @@ -193,10 +183,8 @@ Standard_Integer OSD_Disk::DiskSize() #endif } -// ======================================================================= -// function : DiskFree -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OSD_Disk::DiskFree() { #ifdef _WIN32 diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx index b73a54d682..197bd20ca7 100644 --- a/src/OSD/OSD_File.cxx +++ b/src/OSD/OSD_File.cxx @@ -398,10 +398,8 @@ const OSD_WhoAmI Iam = OSD_WFile; #define NEWLINE '\10'; #endif -// ======================================================================= -// function : OSD_File -// purpose : -// ======================================================================= +//================================================================================================= + OSD_File::OSD_File() : #ifdef _WIN32 @@ -418,10 +416,8 @@ OSD_File::OSD_File() // } -// ======================================================================= -// function : OSD_File -// purpose : -// ======================================================================= +//================================================================================================= + OSD_File::OSD_File(const OSD_Path& theName) : OSD_FileNode(theName), #ifdef _WIN32 @@ -438,10 +434,8 @@ OSD_File::OSD_File(const OSD_Path& theName) // } -// ======================================================================= -// function : ~OSD_File -// purpose : -// ======================================================================= +//================================================================================================= + OSD_File::~OSD_File() { if (IsOpen()) @@ -454,10 +448,8 @@ OSD_File::~OSD_File() } } -// ======================================================================= -// function : Build -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Build(const OSD_OpenMode theMode, const OSD_Protection& theProtect) { if (OSD_File::KindOfFile() == OSD_DIRECTORY) @@ -529,10 +521,8 @@ void OSD_File::Build(const OSD_OpenMode theMode, const OSD_Protection& theProtec #endif } -// ======================================================================= -// function : Append -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Append(const OSD_OpenMode theMode, const OSD_Protection& theProtect) { if (OSD_File::KindOfFile() == OSD_DIRECTORY) @@ -619,10 +609,8 @@ void OSD_File::Append(const OSD_OpenMode theMode, const OSD_Protection& theProte #endif } -// ======================================================================= -// function : Open -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Open(const OSD_OpenMode theMode, const OSD_Protection& theProtect) { if (OSD_File::KindOfFile() == OSD_DIRECTORY) @@ -690,10 +678,8 @@ void OSD_File::Open(const OSD_OpenMode theMode, const OSD_Protection& theProtect #endif } -// ======================================================================= -// function : BuildTemporary -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::BuildTemporary() { #ifdef _WIN32 @@ -791,10 +777,8 @@ void OSD_File::BuildTemporary() #endif } -// ======================================================================= -// function : Read -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Read(TCollection_AsciiString& theBuffer, const Standard_Integer theNbBytes) { if (OSD_File::KindOfFile() == OSD_DIRECTORY) @@ -845,10 +829,8 @@ void OSD_File::Read(TCollection_AsciiString& theBuffer, const Standard_Integer t } } -// ======================================================================= -// function : ReadLine -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::ReadLine(TCollection_AsciiString& theBuffer, const Standard_Integer theNbBytes, Standard_Integer& theNbBytesRead) @@ -1032,10 +1014,8 @@ void OSD_File::ReadLine(TCollection_AsciiString& theBuffer, #endif } -// ======================================================================= -// function : KindOfFile -// purpose : -// ======================================================================= +//================================================================================================= + OSD_KindFile OSD_File::KindOfFile() const { TCollection_AsciiString aFullName; @@ -1086,10 +1066,8 @@ OSD_KindFile OSD_File::KindOfFile() const #endif } -// ======================================================================= -// function : Read -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Read(const Standard_Address theBuffer, const Standard_Integer theNbBytes, Standard_Integer& theNbReadBytes) @@ -1158,10 +1136,8 @@ void OSD_File::Read(const Standard_Address theBuffer, #endif } -// ======================================================================= -// function : Write -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Write(const Standard_Address theBuffer, const Standard_Integer theNbBytes) { if (!IsOpen()) @@ -1205,10 +1181,8 @@ void OSD_File::Write(const Standard_Address theBuffer, const Standard_Integer th #endif } -// ======================================================================= -// function : Seek -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Seek(const Standard_Integer theOffset, const OSD_FromWhere theWhence) { if (!IsOpen()) @@ -1273,10 +1247,8 @@ void OSD_File::Seek(const Standard_Integer theOffset, const OSD_FromWhere theWhe #endif } -// ======================================================================= -// function : Close -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Close() { if (!IsOpen()) @@ -1307,10 +1279,8 @@ void OSD_File::Close() myIO = 0; } -// ======================================================================= -// function : IsAtEnd -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::IsAtEnd() { if (!IsOpen()) @@ -1325,10 +1295,8 @@ Standard_Boolean OSD_File::IsAtEnd() #endif } -// ======================================================================= -// function : Link -// purpose : -// ======================================================================= +//================================================================================================= + /*void OSD_File::Link (const TCollection_AsciiString& theToFile) { if (!IsOpen()) @@ -1350,10 +1318,8 @@ Standard_Boolean OSD_File::IsAtEnd() #define __leave return #endif -// ======================================================================= -// function : SetLock -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::SetLock(const OSD_LockType theLock) { if (!IsOpen()) @@ -1493,10 +1459,8 @@ void OSD_File::SetLock(const OSD_LockType theLock) #undef __leave #endif -// ======================================================================= -// function : UnLock -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::UnLock() { if (!IsOpen()) @@ -1570,10 +1534,8 @@ void OSD_File::UnLock() #endif } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OSD_File::Size() { #ifdef _WIN32 @@ -1617,10 +1579,8 @@ Standard_Size OSD_File::Size() #endif } -// ======================================================================= -// function : IsOpen -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::IsOpen() const { #ifdef _WIN32 @@ -1630,10 +1590,8 @@ Standard_Boolean OSD_File::IsOpen() const #endif } -// ======================================================================= -// function : IsReadable -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::IsReadable() { TCollection_AsciiString aFileName; @@ -1652,10 +1610,8 @@ Standard_Boolean OSD_File::IsReadable() #endif } -// ======================================================================= -// function : IsWriteable -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::IsWriteable() { TCollection_AsciiString aFileName; @@ -1674,10 +1630,8 @@ Standard_Boolean OSD_File::IsWriteable() #endif } -// ======================================================================= -// function : IsExecutable -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::IsExecutable() { #ifdef _WIN32 @@ -1689,10 +1643,8 @@ Standard_Boolean OSD_File::IsExecutable() #endif } -// ======================================================================= -// function : Rewind -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_File::Rewind() { #ifdef _WIN32 @@ -1704,10 +1656,8 @@ void OSD_File::Rewind() #endif } -// ======================================================================= -// function : ReadLastLine -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::ReadLastLine(TCollection_AsciiString& theLine, const Standard_Integer theDelay, const Standard_Integer theNbTries) @@ -1731,10 +1681,8 @@ Standard_Boolean OSD_File::ReadLastLine(TCollection_AsciiString& theLine, return Standard_False; } -// ======================================================================= -// function : Edit -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_File::Edit() { std::cout << "Function OSD_File::Edit() not yet implemented.\n"; diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx index 5064594925..90709397e5 100644 --- a/src/OSD/OSD_MemInfo.cxx +++ b/src/OSD/OSD_MemInfo.cxx @@ -40,10 +40,8 @@ EM_JS(double, OSD_MemInfo_getModuleHeapLength, (), { return Module.HEAP8.length; }); #endif -// ======================================================================= -// function : OSD_MemInfo -// purpose : -// ======================================================================= +//================================================================================================= + OSD_MemInfo::OSD_MemInfo(const Standard_Boolean theImmediateUpdate) { SetActive(Standard_True); @@ -57,10 +55,8 @@ OSD_MemInfo::OSD_MemInfo(const Standard_Boolean theImmediateUpdate) } } -// ======================================================================= -// function : SetActive -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_MemInfo::SetActive(const Standard_Boolean theActive) { for (Standard_Integer anIter = 0; anIter < MemCounter_NB; ++anIter) @@ -69,10 +65,8 @@ void OSD_MemInfo::SetActive(const Standard_Boolean theActive) } } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_MemInfo::Clear() { for (Standard_Integer anIter = 0; anIter < MemCounter_NB; ++anIter) @@ -81,10 +75,8 @@ void OSD_MemInfo::Clear() } } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_MemInfo::Update() { Clear(); @@ -266,10 +258,8 @@ void OSD_MemInfo::Update() #endif } -// ======================================================================= -// function : ToString -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OSD_MemInfo::ToString() const { TCollection_AsciiString anInfo; @@ -313,10 +303,8 @@ TCollection_AsciiString OSD_MemInfo::ToString() const return anInfo; } -// ======================================================================= -// function : Value -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OSD_MemInfo::Value(const OSD_MemInfo::Counter theCounter) const { if (theCounter < 0 || theCounter >= MemCounter_NB || !IsActive(theCounter)) @@ -326,10 +314,8 @@ Standard_Size OSD_MemInfo::Value(const OSD_MemInfo::Counter theCounter) const return myCounters[theCounter]; } -// ======================================================================= -// function : ValueMiB -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OSD_MemInfo::ValueMiB(const OSD_MemInfo::Counter theCounter) const { if (theCounter < 0 || theCounter >= MemCounter_NB || !IsActive(theCounter)) @@ -340,10 +326,8 @@ Standard_Size OSD_MemInfo::ValueMiB(const OSD_MemInfo::Counter theCounter) const : (myCounters[theCounter] / (1024 * 1024)); } -// ======================================================================= -// function : ValuePreciseMiB -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real OSD_MemInfo::ValuePreciseMiB(const OSD_MemInfo::Counter theCounter) const { if (theCounter < 0 || theCounter >= MemCounter_NB || !IsActive(theCounter)) @@ -355,10 +339,8 @@ Standard_Real OSD_MemInfo::ValuePreciseMiB(const OSD_MemInfo::Counter theCounter : ((Standard_Real)myCounters[theCounter] / (1024.0 * 1024.0)); } -// ======================================================================= -// function : ShowInfo -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OSD_MemInfo::PrintInfo() { OSD_MemInfo anInfo; diff --git a/src/OSD/OSD_OpenFile.cxx b/src/OSD/OSD_OpenFile.cxx index d203b324f8..5cb4da7a86 100644 --- a/src/OSD/OSD_OpenFile.cxx +++ b/src/OSD/OSD_OpenFile.cxx @@ -54,10 +54,8 @@ static int OSD_OpenFile_iosMode2FileFlags(::std::ios_base::openmode theMode) return aFlags; } -// ============================================== -// function : OSD_OpenFile -// purpose : Opens file -// ============================================== +//================================================================================================= + int OSD_OpenFileDescriptor(const TCollection_ExtendedString& theName, ::std::ios_base::openmode theMode) { @@ -77,10 +75,8 @@ int OSD_OpenFileDescriptor(const TCollection_ExtendedString& theName, return aFileDesc; } -// ============================================== -// function : OSD_OpenFile -// purpose : Opens file -// ============================================== +//================================================================================================= + FILE* OSD_OpenFile(const char* theName, const char* theMode) { FILE* aFile = 0; @@ -95,10 +91,8 @@ FILE* OSD_OpenFile(const char* theName, const char* theMode) return aFile; } -// ============================================== -// function : OSD_OpenFile -// purpose : Opens file -// ============================================== +//================================================================================================= + FILE* OSD_OpenFile(const TCollection_ExtendedString& theName, const char* theMode) { FILE* aFile = 0; @@ -113,10 +107,8 @@ FILE* OSD_OpenFile(const TCollection_ExtendedString& theName, const char* theMod return aFile; } -// ============================================== -// function : OSD_FileStatCTime -// purpose : -// ============================================== +//================================================================================================= + Standard_Time OSD_FileStatCTime(const char* theName) { Standard_Time aTime = 0; diff --git a/src/OSD/OSD_Parallel_TBB.cxx b/src/OSD/OSD_Parallel_TBB.cxx index ea5334d24a..5ebe5cb25f 100644 --- a/src/OSD/OSD_Parallel_TBB.cxx +++ b/src/OSD/OSD_Parallel_TBB.cxx @@ -30,10 +30,7 @@ Standard_DISABLE_DEPRECATION_WARNINGS #endif Standard_ENABLE_DEPRECATION_WARNINGS - //======================================================================= - // function : forEachExternal - // purpose : - //======================================================================= + //================================================================================================= void OSD_Parallel::forEachExternal(UniversalIterator& theBegin, diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index c75850c385..40d338c914 100644 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -1476,10 +1476,8 @@ static void __fastcall _remove_dup(TCollection_AsciiString& str) #endif // Windows sources for OSD_Path -// ======================================================================= -// function : Analyse_VMS -// purpose : -// ======================================================================= +//================================================================================================= + static Standard_Boolean Analyse_VMS(const TCollection_AsciiString& theName) { if (theName.Search("/") != -1 || theName.Search("@") != -1 || theName.Search("\\") != -1) @@ -1490,10 +1488,8 @@ static Standard_Boolean Analyse_VMS(const TCollection_AsciiString& theName) return Standard_True; } -// ======================================================================= -// function : Analyse_DOS -// purpose : -// ======================================================================= +//================================================================================================= + static Standard_Boolean Analyse_DOS(const TCollection_AsciiString& theName) { if (theName.Search("/") != -1 || theName.Search(":") != -1 || theName.Search("*") != -1 @@ -1506,19 +1502,15 @@ static Standard_Boolean Analyse_DOS(const TCollection_AsciiString& theName) return Standard_True; } -// ======================================================================= -// function : Analyse_MACOS -// purpose : -// ======================================================================= +//================================================================================================= + static Standard_Boolean Analyse_MACOS(const TCollection_AsciiString& theName) { return theName.Search(":") == -1 ? theName.Length() <= 31 : Standard_True; } -// ======================================================================= -// function : IsValid -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OSD_Path::IsValid(const TCollection_AsciiString& theDependentName, const OSD_SysType theSysType) { @@ -1695,10 +1687,8 @@ Standard_Boolean LocateExecFile(OSD_Path&) return Standard_False; } -// ======================================================================= -// function : FolderAndFileFromPath -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_Path::FolderAndFileFromPath(const TCollection_AsciiString& theFilePath, TCollection_AsciiString& theFolder, TCollection_AsciiString& theFileName) @@ -1731,10 +1721,8 @@ void OSD_Path::FolderAndFileFromPath(const TCollection_AsciiString& theFilePath, } } -// ======================================================================= -// function : FileNameAndExtension -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_Path::FileNameAndExtension(const TCollection_AsciiString& theFilePath, TCollection_AsciiString& theName, TCollection_AsciiString& theExtension) diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index 90bdec15c4..d719469934 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -202,10 +202,8 @@ Standard_Integer OSD_Process::Error() const void _osd_wnt_set_error(OSD_Error&, Standard_Integer, ...); -// ======================================================================= -// function : OSD_Process -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Process::OSD_Process() { // @@ -233,10 +231,8 @@ Quantity_Date OSD_Process ::SystemDate() } // end OSD_Process :: SystemDate -// ======================================================================= -// function : UserName -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OSD_Process::UserName() { #ifndef OCCT_UWP @@ -295,19 +291,15 @@ Standard_Boolean OSD_Process ::IsSuperUser() #endif } // end OSD_Process :: IsSuperUser -// ======================================================================= -// function : ProcessId -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OSD_Process::ProcessId() { return (Standard_Integer)GetCurrentProcessId(); } -// ======================================================================= -// function : CurrentDirectory -// purpose : -// ======================================================================= +//================================================================================================= + OSD_Path OSD_Process::CurrentDirectory() { OSD_Path anCurrentDirectory; @@ -375,10 +367,8 @@ Standard_Integer OSD_Process ::Error() const #endif -// ======================================================================= -// function : ExecutablePath -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OSD_Process::ExecutablePath() { #ifdef _WIN32 @@ -457,10 +447,8 @@ TCollection_AsciiString OSD_Process::ExecutablePath() #endif } -// ======================================================================= -// function : ExecutableFolder -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OSD_Process::ExecutableFolder() { TCollection_AsciiString aFullPath = ExecutablePath(); diff --git a/src/OSD/OSD_ThreadPool.cxx b/src/OSD/OSD_ThreadPool.cxx index 97da632ef4..543fdff6ba 100644 --- a/src/OSD/OSD_ThreadPool.cxx +++ b/src/OSD/OSD_ThreadPool.cxx @@ -21,28 +21,22 @@ IMPLEMENT_STANDARD_RTTIEXT(OSD_ThreadPool, Standard_Transient) -// ======================================================================= -// function : Lock -// purpose : -// ======================================================================= +//================================================================================================= + bool OSD_ThreadPool::EnumeratedThread::Lock() { return Standard_Atomic_CompareAndSwap(&myUsageCounter, 0, 1); } -// ======================================================================= -// function : Free -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::EnumeratedThread::Free() { Standard_Atomic_CompareAndSwap(&myUsageCounter, 1, 0); } -// ======================================================================= -// function : WakeUp -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::EnumeratedThread::WakeUp(JobInterface* theJob, bool theToCatchFpe) { myJob = theJob; @@ -64,10 +58,8 @@ void OSD_ThreadPool::EnumeratedThread::WakeUp(JobInterface* theJob, bool theToCa } } -// ======================================================================= -// function : WaitIdle -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::EnumeratedThread::WaitIdle() { if (!myIsSelfThread) @@ -77,20 +69,16 @@ void OSD_ThreadPool::EnumeratedThread::WaitIdle() } } -// ======================================================================= -// function : DefaultPool -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(OSD_ThreadPool)& OSD_ThreadPool::DefaultPool(int theNbThreads) { static const Handle(OSD_ThreadPool) THE_GLOBAL_POOL = new OSD_ThreadPool(theNbThreads); return THE_GLOBAL_POOL; } -// ======================================================================= -// function : OSD_ThreadPool -// purpose : -// ======================================================================= +//================================================================================================= + OSD_ThreadPool::OSD_ThreadPool(int theNbThreads) : myNbDefThreads(0), myShutDown(false) @@ -99,10 +87,8 @@ OSD_ThreadPool::OSD_ThreadPool(int theNbThreads) myNbDefThreads = NbThreads(); } -// ======================================================================= -// function : IsInUse -// purpose : -// ======================================================================= +//================================================================================================= + bool OSD_ThreadPool::IsInUse() { for (NCollection_Array1::Iterator aThreadIter(myThreads); aThreadIter.More(); @@ -118,10 +104,8 @@ bool OSD_ThreadPool::IsInUse() return false; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::Init(int theNbThreads) { const int aNbThreads = @@ -177,19 +161,15 @@ void OSD_ThreadPool::Init(int theNbThreads) } } -// ======================================================================= -// function : ~OSD_ThreadPool -// purpose : -// ======================================================================= +//================================================================================================= + OSD_ThreadPool::~OSD_ThreadPool() { release(); } -// ======================================================================= -// function : release -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::release() { if (myThreads.IsEmpty()) @@ -206,20 +186,16 @@ void OSD_ThreadPool::release() } } -// ======================================================================= -// function : perform -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::Launcher::perform(JobInterface& theJob) { run(theJob); wait(); } -// ======================================================================= -// function : run -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::Launcher::run(JobInterface& theJob) { bool toCatchFpe = OSD::ToCatchFloatingSignals(); @@ -231,10 +207,8 @@ void OSD_ThreadPool::Launcher::run(JobInterface& theJob) } } -// ======================================================================= -// function : wait -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::Launcher::wait() { int aNbFailures = 0; @@ -277,10 +251,8 @@ void OSD_ThreadPool::Launcher::wait() throw Standard_ProgramError(aFailures.ToCString(), NULL); } -// ======================================================================= -// function : performJob -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::performJob(Handle(Standard_Failure)& theFailure, OSD_ThreadPool::JobInterface* theJob, int theThreadIndex) @@ -308,10 +280,8 @@ void OSD_ThreadPool::performJob(Handle(Standard_Failure)& theFailure, } } -// ======================================================================= -// function : performThread -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::EnumeratedThread::performThread() { OSD::SetThreadLocalSignal(OSD::SignalMode(), false); @@ -335,10 +305,8 @@ void OSD_ThreadPool::EnumeratedThread::performThread() } } -// ======================================================================= -// function : runThread -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Address OSD_ThreadPool::EnumeratedThread::runThread(Standard_Address theTask) { EnumeratedThread* aThread = static_cast(theTask); @@ -346,10 +314,8 @@ Standard_Address OSD_ThreadPool::EnumeratedThread::runThread(Standard_Address th return NULL; } -// ======================================================================= -// function : Launcher -// purpose : -// ======================================================================= +//================================================================================================= + OSD_ThreadPool::Launcher::Launcher(OSD_ThreadPool& thePool, Standard_Integer theMaxThreads) : mySelfThread(true), myNbThreads(0) @@ -384,10 +350,8 @@ OSD_ThreadPool::Launcher::Launcher(OSD_ThreadPool& thePool, Standard_Integer the ++myNbThreads; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OSD_ThreadPool::Launcher::Release() { for (NCollection_Array1::Iterator aThreadIter(myThreads); diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx index 533b3c648e..45d0debe85 100644 --- a/src/OSD/OSD_signal.cxx +++ b/src/OSD/OSD_signal.cxx @@ -29,19 +29,15 @@ OSD_SignalMode OSD::SignalMode() return OSD_WasSetSignal; } -// ======================================================================= -// function : SignalStackTraceLength -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OSD::SignalStackTraceLength() { return OSD_SignalStackTraceLength; } -// ======================================================================= -// function : SetSignalStackTraceLength -// purpose : -// ======================================================================= +//================================================================================================= + void OSD::SetSignalStackTraceLength(Standard_Integer theLength) { OSD_SignalStackTraceLength = theLength; diff --git a/src/OpenGl/OpenGl_Aspects.cxx b/src/OpenGl/OpenGl_Aspects.cxx index d1674d239e..c09389868b 100644 --- a/src/OpenGl/OpenGl_Aspects.cxx +++ b/src/OpenGl/OpenGl_Aspects.cxx @@ -37,10 +37,8 @@ inline Graphic3d_MaterialAspect initDefaultMaterial() static const Graphic3d_MaterialAspect THE_DEFAULT_MATERIAL = initDefaultMaterial(); } // namespace -// ======================================================================= -// function : OpenGl_Aspects -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Aspects::OpenGl_Aspects() : myAspect(new Graphic3d_Aspects()), myShadingModel(Graphic3d_TypeOfShadingModel_Unlit) @@ -54,20 +52,16 @@ OpenGl_Aspects::OpenGl_Aspects() myAspect->SetHatchStyle(Handle(Graphic3d_HatchStyle)()); } -// ======================================================================= -// function : OpenGl_Aspects -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Aspects::OpenGl_Aspects(const Handle(Graphic3d_Aspects)& theAspect) : myShadingModel(Graphic3d_TypeOfShadingModel_DEFAULT) { SetAspect(theAspect); } -// ======================================================================= -// function : SetAspect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Aspects::SetAspect(const Handle(Graphic3d_Aspects)& theAspect) { myAspect = theAspect; @@ -91,19 +85,15 @@ void OpenGl_Aspects::SetAspect(const Handle(Graphic3d_Aspects)& theAspect) } } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Aspects::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { theWorkspace->SetAspects(this); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Aspects::Release(OpenGl_Context* theContext) { myResTextureSet.Release(theContext); @@ -111,10 +101,8 @@ void OpenGl_Aspects::Release(OpenGl_Context* theContext) myResProgram.Release(theContext); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Aspects::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_Aspects) diff --git a/src/OpenGl/OpenGl_AspectsProgram.cxx b/src/OpenGl/OpenGl_AspectsProgram.cxx index 27ef773fbb..2026e623a5 100644 --- a/src/OpenGl/OpenGl_AspectsProgram.cxx +++ b/src/OpenGl/OpenGl_AspectsProgram.cxx @@ -21,10 +21,8 @@ namespace static const TCollection_AsciiString THE_EMPTY_KEY; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsProgram::Release(OpenGl_Context* theCtx) { if (!myShaderProgram.IsNull() && theCtx != NULL) @@ -35,10 +33,8 @@ void OpenGl_AspectsProgram::Release(OpenGl_Context* theCtx) myIsShaderReady = Standard_False; } -// ======================================================================= -// function : UpdateRediness -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsProgram::UpdateRediness(const Handle(Graphic3d_Aspects)& theAspect) { const TCollection_AsciiString& aShaderKey = @@ -49,10 +45,8 @@ void OpenGl_AspectsProgram::UpdateRediness(const Handle(Graphic3d_Aspects)& theA } } -// ======================================================================= -// function : build -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsProgram::build(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_ShaderProgram)& theShader) { diff --git a/src/OpenGl/OpenGl_AspectsSprite.cxx b/src/OpenGl/OpenGl_AspectsSprite.cxx index aa2dee789b..a37bf631e8 100644 --- a/src/OpenGl/OpenGl_AspectsSprite.cxx +++ b/src/OpenGl/OpenGl_AspectsSprite.cxx @@ -26,10 +26,8 @@ namespace static const TCollection_AsciiString THE_EMPTY_KEY; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsSprite::Release(OpenGl_Context* theCtx) { myIsSpriteReady = Standard_False; @@ -64,10 +62,8 @@ void OpenGl_AspectsSprite::Release(OpenGl_Context* theCtx) mySpriteA.Nullify(); } -// ======================================================================= -// function : HasPointSprite -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_AspectsSprite::HasPointSprite(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theAspects) { @@ -75,10 +71,8 @@ bool OpenGl_AspectsSprite::HasPointSprite(const Handle(OpenGl_Context)& theCt return !aSprite.IsNull() && !aSprite->IsDisplayList(); } -// ======================================================================= -// function : IsDisplayListSprite -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_AspectsSprite::IsDisplayListSprite(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theAspects) { @@ -91,10 +85,8 @@ bool OpenGl_AspectsSprite::IsDisplayListSprite(const Handle(OpenGl_Context)& return !aSprite.IsNull() && aSprite->IsDisplayList(); } -// ======================================================================= -// function : UpdateRediness -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsSprite::UpdateRediness(const Handle(Graphic3d_Aspects)& theAspect) { // update sprite resource bindings @@ -117,10 +109,8 @@ void OpenGl_AspectsSprite::UpdateRediness(const Handle(Graphic3d_Aspects)& theAs } } -// ======================================================================= -// function : Sprite -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(OpenGl_PointSprite)& OpenGl_AspectsSprite::Sprite( const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theAspects, @@ -139,10 +129,8 @@ const Handle(OpenGl_PointSprite)& OpenGl_AspectsSprite::Sprite( return theIsAlphaSprite && !mySpriteA.IsNull() && mySpriteA->IsValid() ? mySpriteA : mySprite; } -// ======================================================================= -// function : build -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsSprite::build(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_MarkerImage)& theMarkerImage, Aspect_TypeOfMarker theType, @@ -354,10 +342,8 @@ void OpenGl_AspectsSprite::build(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : spriteKeys -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsSprite::spriteKeys(const Handle(Graphic3d_MarkerImage)& theMarkerImage, Aspect_TypeOfMarker theType, Standard_ShortReal theScale, diff --git a/src/OpenGl/OpenGl_AspectsTextureSet.cxx b/src/OpenGl/OpenGl_AspectsTextureSet.cxx index 6e499898f3..abb41048d3 100644 --- a/src/OpenGl/OpenGl_AspectsTextureSet.cxx +++ b/src/OpenGl/OpenGl_AspectsTextureSet.cxx @@ -24,10 +24,8 @@ namespace static const TCollection_AsciiString THE_EMPTY_KEY; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsTextureSet::Release(OpenGl_Context* theCtx) { if (myTextures[0].IsNull()) @@ -70,10 +68,8 @@ void OpenGl_AspectsTextureSet::Release(OpenGl_Context* theCtx) myIsTextureReady = Standard_False; } -// ======================================================================= -// function : UpdateRediness -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsTextureSet::UpdateRediness(const Handle(Graphic3d_Aspects)& theAspect) { const Handle(Graphic3d_TextureSet)& aNewTextureSet = theAspect->TextureSet(); @@ -132,10 +128,8 @@ void OpenGl_AspectsTextureSet::UpdateRediness(const Handle(Graphic3d_Aspects)& t } } -// ======================================================================= -// function : build -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_AspectsTextureSet::build(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theAspect, const Handle(OpenGl_PointSprite)& theSprite, diff --git a/src/OpenGl/OpenGl_Buffer.cxx b/src/OpenGl/OpenGl_Buffer.cxx index 7c7071bb06..0c9b1c73f0 100644 --- a/src/OpenGl/OpenGl_Buffer.cxx +++ b/src/OpenGl/OpenGl_Buffer.cxx @@ -20,10 +20,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Buffer, OpenGl_Resource) -// ======================================================================= -// function : sizeOfGlType -// purpose : -// ======================================================================= +//================================================================================================= + size_t OpenGl_Buffer::sizeOfGlType(unsigned int theType) { switch (theType) @@ -50,10 +48,8 @@ size_t OpenGl_Buffer::sizeOfGlType(unsigned int theType) } } -// ======================================================================= -// function : FormatTarget -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Buffer::FormatTarget(unsigned int theTarget) { switch (theTarget) @@ -92,10 +88,8 @@ TCollection_AsciiString OpenGl_Buffer::FormatTarget(unsigned int theTarget) return OpenGl_Context::FormatGlEnumHex(theTarget); } -// ======================================================================= -// function : OpenGl_Buffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Buffer::OpenGl_Buffer() : OpenGl_Resource(), myOffset(NULL), @@ -107,19 +101,15 @@ OpenGl_Buffer::OpenGl_Buffer() // } -// ======================================================================= -// function : ~OpenGl_Buffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Buffer::~OpenGl_Buffer() { Release(NULL); } -// ======================================================================= -// function : Create -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::Create(const Handle(OpenGl_Context)& theGlCtx) { if (myBufferId == NO_BUFFER && theGlCtx->core15fwd != NULL) @@ -129,10 +119,8 @@ bool OpenGl_Buffer::Create(const Handle(OpenGl_Context)& theGlCtx) return myBufferId != NO_BUFFER; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::Release(OpenGl_Context* theGlCtx) { if (myBufferId == NO_BUFFER) @@ -153,46 +141,36 @@ void OpenGl_Buffer::Release(OpenGl_Context* theGlCtx) myBufferId = NO_BUFFER; } -// ======================================================================= -// function : Bind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::Bind(const Handle(OpenGl_Context)& theGlCtx) const { theGlCtx->core15fwd->glBindBuffer(GetTarget(), myBufferId); } -// ======================================================================= -// function : Unbind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::Unbind(const Handle(OpenGl_Context)& theGlCtx) const { theGlCtx->core15fwd->glBindBuffer(GetTarget(), NO_BUFFER); } -// ======================================================================= -// function : BindBufferBase -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::BindBufferBase(const Handle(OpenGl_Context)& theGlCtx, unsigned int theIndex) { theGlCtx->core30->glBindBufferBase(GetTarget(), theIndex, myBufferId); } -// ======================================================================= -// function : UnbindBufferBase -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::UnbindBufferBase(const Handle(OpenGl_Context)& theGlCtx, unsigned int theIndex) { theGlCtx->core30->glBindBufferBase(GetTarget(), theIndex, NO_BUFFER); } -// ======================================================================= -// function : BindBufferRange -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::BindBufferRange(const Handle(OpenGl_Context)& theGlCtx, unsigned int theIndex, const intptr_t theOffset, @@ -205,10 +183,8 @@ void OpenGl_Buffer::BindBufferRange(const Handle(OpenGl_Context)& theGlCtx, (GLsizeiptr)theSize); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -217,10 +193,8 @@ bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, return init(theGlCtx, theComponentsNb, theElemsNb, theData, GL_FLOAT); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -229,10 +203,8 @@ bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, return init(theGlCtx, theComponentsNb, theElemsNb, theData, GL_UNSIGNED_INT); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -241,10 +213,8 @@ bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, return init(theGlCtx, theComponentsNb, theElemsNb, theData, GL_UNSIGNED_SHORT); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -253,10 +223,8 @@ bool OpenGl_Buffer::Init(const Handle(OpenGl_Context)& theGlCtx, return init(theGlCtx, theComponentsNb, theElemsNb, theData, GL_UNSIGNED_BYTE); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -295,10 +263,8 @@ bool OpenGl_Buffer::init(const Handle(OpenGl_Context)& theGlCtx, return anErr == GL_NO_ERROR; } -// ======================================================================= -// function : SubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -307,10 +273,8 @@ bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, return subData(theGlCtx, theElemFrom, theElemsNb, theData, GL_FLOAT); } -// ======================================================================= -// function : SubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -319,10 +283,8 @@ bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, return subData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_INT); } -// ======================================================================= -// function : SubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -331,10 +293,8 @@ bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, return subData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_SHORT); } -// ======================================================================= -// function : SubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -343,10 +303,8 @@ bool OpenGl_Buffer::SubData(const Handle(OpenGl_Context)& theGlCtx, return subData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_BYTE); } -// ======================================================================= -// function : subData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::subData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -386,10 +344,8 @@ bool OpenGl_Buffer::subData(const Handle(OpenGl_Context)& theGlCtx, return anErr == GL_NO_ERROR; } -// ======================================================================= -// function : subData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -398,10 +354,8 @@ bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, return getSubData(theGlCtx, theElemFrom, theElemsNb, theData, GL_FLOAT); } -// ======================================================================= -// function : GetSubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -410,10 +364,8 @@ bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, return getSubData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_SHORT); } -// ======================================================================= -// function : GetSubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -422,10 +374,8 @@ bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, return getSubData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_INT); } -// ======================================================================= -// function : GetSubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -434,10 +384,8 @@ bool OpenGl_Buffer::GetSubData(const Handle(OpenGl_Context)& theGlCtx, return getSubData(theGlCtx, theElemFrom, theElemsNb, theData, GL_UNSIGNED_BYTE); } -// ======================================================================= -// function : getSubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Buffer::getSubData(const Handle(OpenGl_Context)& theGlCtx, const Standard_Integer theElemFrom, const Standard_Integer theElemsNb, @@ -460,10 +408,8 @@ bool OpenGl_Buffer::getSubData(const Handle(OpenGl_Context)& theGlCtx, return isDone; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Buffer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/OpenGl/OpenGl_CappingAlgo.cxx b/src/OpenGl/OpenGl_CappingAlgo.cxx index 0256446b33..2b94a9a84d 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.cxx +++ b/src/OpenGl/OpenGl_CappingAlgo.cxx @@ -208,10 +208,8 @@ static void renderCappingForStructure(StencilTestSentry& } } // namespace -// ======================================================================= -// function : RenderCapping -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_CappingAlgo::RenderCapping(const Handle(OpenGl_Workspace)& theWorkspace, const OpenGl_Structure& theStructure) { diff --git a/src/OpenGl/OpenGl_CappingPlaneResource.cxx b/src/OpenGl/OpenGl_CappingPlaneResource.cxx index 9a72837a28..bd782cc227 100755 --- a/src/OpenGl/OpenGl_CappingPlaneResource.cxx +++ b/src/OpenGl/OpenGl_CappingPlaneResource.cxx @@ -45,10 +45,8 @@ static const GLfloat THE_CAPPING_PLN_VERTS[12 * (4 + 4 + 4)] = { 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f}; } // namespace -// ======================================================================= -// function : OpenGl_CappingPlaneResource -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_CappingPlaneResource::OpenGl_CappingPlaneResource( const Handle(Graphic3d_ClipPlane)& thePlane) : myPrimitives(NULL), @@ -69,19 +67,15 @@ OpenGl_CappingPlaneResource::OpenGl_CappingPlaneResource( } } -// ======================================================================= -// function : OpenGl_CappingPlaneResource -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_CappingPlaneResource::~OpenGl_CappingPlaneResource() { Release(NULL); } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_CappingPlaneResource::Update(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theObjAspect) { @@ -89,10 +83,8 @@ void OpenGl_CappingPlaneResource::Update(const Handle(OpenGl_Context)& theCtx updateAspect(theObjAspect); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_CappingPlaneResource::Release(OpenGl_Context* theContext) { OpenGl_Element::Destroy(theContext, myAspect); @@ -101,10 +93,8 @@ void OpenGl_CappingPlaneResource::Release(OpenGl_Context* theContext) myAspectMod = (unsigned int)-1; } -// ======================================================================= -// function : updateAspect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_CappingPlaneResource::updateAspect(const Handle(Graphic3d_Aspects)& theObjAspect) { if (myAspect == NULL) @@ -158,10 +148,8 @@ void OpenGl_CappingPlaneResource::updateAspect(const Handle(Graphic3d_Aspects)& myAspect->SetAspect(myFillAreaAspect); } -// ======================================================================= -// function : updateTransform -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_CappingPlaneResource::updateTransform(const Handle(OpenGl_Context)& theCtx) { if (myEquationMod == myPlaneRoot->MCountEquation() diff --git a/src/OpenGl/OpenGl_Caps.cxx b/src/OpenGl/OpenGl_Caps.cxx index c5d2843e7c..6a7da5f008 100755 --- a/src/OpenGl/OpenGl_Caps.cxx +++ b/src/OpenGl/OpenGl_Caps.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Caps, Standard_Transient) -// ======================================================================= -// function : OpenGl_Caps -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Caps::OpenGl_Caps() : sRGBDisable(Standard_False), compressedTexturesDisable(Standard_False), @@ -90,10 +88,8 @@ OpenGl_Caps& OpenGl_Caps::operator=(const OpenGl_Caps& theCopy) return *this; } -// ======================================================================= -// function : ~OpenGl_Caps -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Caps::~OpenGl_Caps() { // diff --git a/src/OpenGl/OpenGl_Clipping.cxx b/src/OpenGl/OpenGl_Clipping.cxx index 80362e709e..951d4518ad 100755 --- a/src/OpenGl/OpenGl_Clipping.cxx +++ b/src/OpenGl/OpenGl_Clipping.cxx @@ -17,10 +17,8 @@ #include -// ======================================================================= -// function : OpenGl_Clipping -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Clipping::OpenGl_Clipping() : myCappedSubPlane(0), myNbClipping(0), @@ -30,10 +28,8 @@ OpenGl_Clipping::OpenGl_Clipping() { } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::Init() { myPlanesGlobal.Nullify(); @@ -47,10 +43,8 @@ void OpenGl_Clipping::Init() myCappedChain.Nullify(); } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::Reset(const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes) { const Standard_Integer aStartIndex = myPlanesGlobal.IsNull() ? 1 : myPlanesGlobal->Size() + 1; @@ -71,10 +65,8 @@ void OpenGl_Clipping::Reset(const Handle(Graphic3d_SequenceOfHClipPlane)& thePla // should not be a problem since overall number of clipping planes is expected to be quite small. } -// ======================================================================= -// function : SetLocalPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::SetLocalPlanes(const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes) { const Standard_Integer aStartIndex = myPlanesGlobal.IsNull() ? 1 : myPlanesGlobal->Size() + 1; @@ -85,10 +77,8 @@ void OpenGl_Clipping::SetLocalPlanes(const Handle(Graphic3d_SequenceOfHClipPlane add(thePlanes, aStartIndex); } -// ======================================================================= -// function : add -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::add(const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes, const Standard_Integer theStartIndex) { @@ -121,10 +111,8 @@ void OpenGl_Clipping::add(const Handle(Graphic3d_SequenceOfHClipPlane)& thePlane } } -// ======================================================================= -// function : remove -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::remove(const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes, const Standard_Integer theStartIndex) { @@ -156,10 +144,8 @@ void OpenGl_Clipping::remove(const Handle(Graphic3d_SequenceOfHClipPlane)& thePl } } -// ======================================================================= -// function : SetEnabled -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Clipping::SetEnabled(const OpenGl_ClippingIterator& thePlane, const Standard_Boolean theIsEnabled) { @@ -185,10 +171,8 @@ Standard_Boolean OpenGl_Clipping::SetEnabled(const OpenGl_ClippingIterator& theP return Standard_True; } -// ======================================================================= -// function : RestoreDisabled -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::RestoreDisabled() { if (myNbDisabled == 0) @@ -220,10 +204,8 @@ void OpenGl_Clipping::RestoreDisabled() } } -// ======================================================================= -// function : DisableGlobal -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::DisableGlobal() { for (OpenGl_ClippingIterator aPlaneIter(*this); aPlaneIter.More(); aPlaneIter.Next()) @@ -238,10 +220,8 @@ void OpenGl_Clipping::DisableGlobal() } } -// ======================================================================= -// function : DisableAllExcept -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::DisableAllExcept(const Handle(Graphic3d_ClipPlane)& theChain, const Standard_Integer theSubPlaneIndex) { @@ -249,10 +229,8 @@ void OpenGl_Clipping::DisableAllExcept(const Handle(Graphic3d_ClipPlane)& theCha myCappedSubPlane = theSubPlaneIndex; } -// ======================================================================= -// function : EnableAllExcept -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::EnableAllExcept(const Handle(Graphic3d_ClipPlane)& theChain, const Standard_Integer theSubPlaneIndex) { @@ -260,10 +238,8 @@ void OpenGl_Clipping::EnableAllExcept(const Handle(Graphic3d_ClipPlane)& theChai myCappedSubPlane = -theSubPlaneIndex; } -// ======================================================================= -// function : ResetCappingFilter -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Clipping::ResetCappingFilter() { myCappedChain.Nullify(); diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index aa2f128e4b..61c306076c 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -107,10 +107,8 @@ static void addInfo(TColStd_IndexedDataMapOfStringString& theDict, } } // namespace -// ======================================================================= -// function : OpenGl_Context -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Context::OpenGl_Context(const Handle(OpenGl_Caps)& theCaps) : core11ffp(NULL), core11fwd(NULL), @@ -295,10 +293,8 @@ OpenGl_Context::OpenGl_Context(const Handle(OpenGl_Caps)& theCaps) myShaderManager = new OpenGl_ShaderManager(this); } -// ======================================================================= -// function : ~OpenGl_Context -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Context::~OpenGl_Context() { // release clean up queue @@ -372,10 +368,8 @@ OpenGl_Context::~OpenGl_Context() } } -// ======================================================================= -// function : forcedRelease -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::forcedRelease() { ReleaseDelayed(); @@ -398,10 +392,8 @@ void OpenGl_Context::forcedRelease() } } -// ======================================================================= -// function : ResizeViewport -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ResizeViewport(const Standard_Integer* theRect) { core11fwd->glViewport(theRect[0], theRect[1], theRect[2], theRect[3]); @@ -440,10 +432,8 @@ static Standard_Integer stereoToMonoBuffer(const Standard_Integer theBuffer) } } -// ======================================================================= -// function : SetReadBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetReadBuffer(const Standard_Integer theReadBuffer) { if (myGapi == Aspect_GraphicsLibrary_OpenGLES) @@ -459,10 +449,8 @@ void OpenGl_Context::SetReadBuffer(const Standard_Integer theReadBuffer) core11fwd->glReadBuffer(myReadBuffer); } -// ======================================================================= -// function : SetDrawBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetDrawBuffer(const Standard_Integer theDrawBuffer) { if (myGapi == Aspect_GraphicsLibrary_OpenGLES) @@ -482,10 +470,8 @@ void OpenGl_Context::SetDrawBuffer(const Standard_Integer theDrawBuffer) myDrawBuffers.SetValue(0, aDrawBuffer); } -// ======================================================================= -// function : SetDrawBuffers -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetDrawBuffers(const Standard_Integer theNb, const Standard_Integer* theDrawBuffers) { @@ -520,10 +506,8 @@ void OpenGl_Context::SetDrawBuffers(const Standard_Integer theNb, myFuncs->glDrawBuffers(theNb, (const GLenum*)theDrawBuffers); } -// ======================================================================= -// function : SetFrameBufferSRGB -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetFrameBufferSRGB(bool theIsFbo, bool theIsFboSRgb) { if (!hasFboSRGB) @@ -547,10 +531,8 @@ void OpenGl_Context::SetFrameBufferSRGB(bool theIsFbo, bool theIsFboSRgb) } } -// ======================================================================= -// function : SetFaceCulling -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetFaceCulling(Graphic3d_TypeOfBackfacingModel theMode) { if (myFaceCulling == theMode) @@ -579,10 +561,8 @@ void OpenGl_Context::SetFaceCulling(Graphic3d_TypeOfBackfacingModel theMode) myFaceCulling = theMode; } -// ======================================================================= -// function : FetchState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::FetchState() { if (myGapi == Aspect_GraphicsLibrary_OpenGLES) @@ -623,10 +603,8 @@ void OpenGl_Context::FetchState() } } -// ======================================================================= -// function : Share -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::Share(const Handle(OpenGl_Context)& theShareCtx) { if (!theShareCtx.IsNull()) @@ -640,10 +618,8 @@ void OpenGl_Context::Share(const Handle(OpenGl_Context)& theShareCtx) #if !defined(__APPLE__) || defined(HAVE_XLIB) -// ======================================================================= -// function : IsCurrent -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::IsCurrent() const { #if defined(HAVE_EGL) @@ -675,10 +651,8 @@ Standard_Boolean OpenGl_Context::IsCurrent() const #endif } -// ======================================================================= -// function : MakeCurrent -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::MakeCurrent() { #if defined(HAVE_EGL) @@ -776,10 +750,8 @@ Standard_Boolean OpenGl_Context::MakeCurrent() return Standard_True; } -// ======================================================================= -// function : SwapBuffers -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SwapBuffers() { #if defined(HAVE_EGL) @@ -805,10 +777,8 @@ void OpenGl_Context::SwapBuffers() #endif // __APPLE__ -// ======================================================================= -// function : SetSwapInterval -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::SetSwapInterval(const Standard_Integer theInterval) { #if defined(HAVE_EGL) @@ -849,10 +819,8 @@ Standard_Boolean OpenGl_Context::SetSwapInterval(const Standard_Integer theInter return Standard_False; } -// ======================================================================= -// function : findProc -// purpose : -// ======================================================================= +//================================================================================================= + void* OpenGl_Context::findProc(const char* theFuncName) { #if defined(HAVE_EGL) @@ -869,10 +837,8 @@ void* OpenGl_Context::findProc(const char* theFuncName) #endif } -// ======================================================================= -// function : CheckExtension -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::CheckExtension(const char* theExtName) const { if (theExtName == NULL) @@ -936,10 +902,8 @@ Standard_Boolean OpenGl_Context::CheckExtension(const char* theExtName) const #endif } -// ======================================================================= -// function : CheckExtension -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::CheckExtension(const char* theExtString, const char* theExtName) { if (theExtString == NULL) @@ -967,10 +931,8 @@ Standard_Boolean OpenGl_Context::CheckExtension(const char* theExtString, const #if !defined(__APPLE__) || defined(HAVE_XLIB) -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::Init(const Standard_Boolean theIsCoreProfile) { if (myIsInitialized) @@ -1004,10 +966,8 @@ Standard_Boolean OpenGl_Context::Init(const Standard_Boolean theIsCoreProfile) #endif // __APPLE__ -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::Init(const Aspect_Drawable theSurface, const Aspect_Display theDisplay, const Aspect_RenderingContext theContext, @@ -1028,10 +988,8 @@ Standard_Boolean OpenGl_Context::Init(const Aspect_Drawable theSurface, return Standard_True; } -// ======================================================================= -// function : FormatGlEnumHex -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Context::FormatGlEnumHex(int theGlEnum) { char aBuff[16]; @@ -1041,10 +999,8 @@ TCollection_AsciiString OpenGl_Context::FormatGlEnumHex(int theGlEnum) return aBuff; } -// ======================================================================= -// function : FormatSize -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Context::FormatSize(Standard_Size theSize) { char aBuff[32]; @@ -1052,10 +1008,8 @@ TCollection_AsciiString OpenGl_Context::FormatSize(Standard_Size theSize) return aBuff; } -// ======================================================================= -// function : FormatPointer -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Context::FormatPointer(const void* thePtr) { char aBuff[32]; @@ -1063,10 +1017,8 @@ TCollection_AsciiString OpenGl_Context::FormatPointer(const void* thePtr) return aBuff; } -// ======================================================================= -// function : FormatGlError -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Context::FormatGlError(int theGlError) { switch (theGlError) @@ -1089,10 +1041,8 @@ TCollection_AsciiString OpenGl_Context::FormatGlError(int theGlError) return FormatGlEnumHex(theGlError); } -// ======================================================================= -// function : ResetErrors -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Context::ResetErrors(const bool theToPrintErrors) { int aPrevErr = 0; @@ -1118,10 +1068,8 @@ bool OpenGl_Context::ResetErrors(const bool theToPrintErrors) return hasError; } -// ======================================================================= -// function : ReadGlVersion -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ReadGlVersion(Standard_Integer& theGlVerMajor, Standard_Integer& theGlVerMinor) { OpenGl_GlFunctions::readGlVersion(theGlVerMajor, theGlVerMinor); @@ -1163,10 +1111,8 @@ static void APIENTRY debugCallbackWrap(unsigned int theSource, aCtx->PushMessage(theSource, theType, theId, theSeverity, theMessage); } -// ======================================================================= -// function : PushMessage -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::PushMessage(const unsigned int theSource, const unsigned int theType, const unsigned int theId, @@ -1209,10 +1155,8 @@ void OpenGl_Context::PushMessage(const unsigned int theSource, Messenger()->Send(aMsg, aGrav); } -// ======================================================================= -// function : ExcludeMessage -// purpose : -// ====================================================================== +//================================================================================================= + Standard_Boolean OpenGl_Context::ExcludeMessage(const unsigned int theSource, const unsigned int theId) { @@ -1220,10 +1164,8 @@ Standard_Boolean OpenGl_Context::ExcludeMessage(const unsigned int theSource, && myFilters[theSource - GL_DEBUG_SOURCE_API].Add(theId); } -// ======================================================================= -// function : IncludeMessage -// purpose : -// ====================================================================== +//================================================================================================= + Standard_Boolean OpenGl_Context::IncludeMessage(const unsigned int theSource, const unsigned int theId) { @@ -1231,10 +1173,8 @@ Standard_Boolean OpenGl_Context::IncludeMessage(const unsigned int theSource, && myFilters[theSource - GL_DEBUG_SOURCE_API].Remove(theId); } -// ======================================================================= -// function : checkWrongVersion -// purpose : -// ====================================================================== +//================================================================================================= + void OpenGl_Context::checkWrongVersion(Standard_Integer theGlVerMajor, Standard_Integer theGlVerMinor, const char* theLastFailedProc) @@ -1292,10 +1232,8 @@ void OpenGl_Context::checkWrongVersion(Standard_Integer theGlVerMajor, } } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::init(const Standard_Boolean theIsCoreProfile) { // read version @@ -1718,10 +1656,8 @@ void OpenGl_Context::init(const Standard_Boolean theIsCoreProfile) } } -// ======================================================================= -// function : MemoryInfo -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_Context::AvailableMemory() const { if (atiMem) @@ -1746,10 +1682,8 @@ Standard_Size OpenGl_Context::AvailableMemory() const return 0; } -// ======================================================================= -// function : MemoryInfo -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Context::MemoryInfo() const { TColStd_IndexedDataMapOfStringString aDict; @@ -1767,10 +1701,8 @@ TCollection_AsciiString OpenGl_Context::MemoryInfo() const return aText; } -// ======================================================================= -// function : MemoryInfo -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::MemoryInfo(TColStd_IndexedDataMapOfStringString& theDict) const { #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE @@ -1897,10 +1829,8 @@ void OpenGl_Context::MemoryInfo(TColStd_IndexedDataMapOfStringString& theDict) c #endif } -// ======================================================================= -// function : WindowBufferBits -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::WindowBufferBits(Graphic3d_Vec4i& theColorBits, Graphic3d_Vec2i& theDepthStencilBits) const { @@ -1953,10 +1883,8 @@ void OpenGl_Context::WindowBufferBits(Graphic3d_Vec4i& theColorBits, } } -// ======================================================================= -// function : DiagnosticInfo -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& theDict, Graphic3d_DiagnosticInfo theFlags) const { @@ -2097,20 +2025,16 @@ void OpenGl_Context::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& } } -// ======================================================================= -// function : GetResource -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(OpenGl_Resource)& OpenGl_Context::GetResource( const TCollection_AsciiString& theKey) const { return mySharedResources->IsBound(theKey) ? mySharedResources->Find(theKey) : NULL_GL_RESOURCE; } -// ======================================================================= -// function : ShareResource -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::ShareResource(const TCollection_AsciiString& theKey, const Handle(OpenGl_Resource)& theResource) { @@ -2121,10 +2045,8 @@ Standard_Boolean OpenGl_Context::ShareResource(const TCollection_AsciiString& th return mySharedResources->Bind(theKey, theResource); } -// ======================================================================= -// function : ReleaseResource -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ReleaseResource(const TCollection_AsciiString& theKey, const Standard_Boolean theToDelay) { @@ -2149,10 +2071,8 @@ void OpenGl_Context::ReleaseResource(const TCollection_AsciiString& theKey, } } -// ======================================================================= -// function : ReleaseDelayed -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ReleaseDelayed() { // release queued elements @@ -2202,10 +2122,8 @@ void OpenGl_Context::ReleaseDelayed() } } -// ======================================================================= -// function : BindTextures -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_TextureSet) OpenGl_Context::BindTextures( const Handle(OpenGl_TextureSet)& theTextures, const Handle(OpenGl_ShaderProgram)& theProgram) @@ -2338,10 +2256,8 @@ Handle(OpenGl_TextureSet) OpenGl_Context::BindTextures( return anOldTextures; } -// ======================================================================= -// function : BindProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::BindProgram(const Handle(OpenGl_ShaderProgram)& theProgram) { if (core20fwd == NULL) @@ -2368,10 +2284,8 @@ Standard_Boolean OpenGl_Context::BindProgram(const Handle(OpenGl_ShaderProgram)& return Standard_True; } -// ======================================================================= -// function : BindDefaultVao -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::BindDefaultVao() { if (myDefaultVao == 0 || core32 == NULL) @@ -2382,10 +2296,8 @@ void OpenGl_Context::BindDefaultVao() core32->glBindVertexArray(myDefaultVao); } -// ======================================================================= -// function : SetDefaultFrameBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_FrameBuffer) OpenGl_Context::SetDefaultFrameBuffer( const Handle(OpenGl_FrameBuffer)& theFbo) { @@ -2394,28 +2306,22 @@ Handle(OpenGl_FrameBuffer) OpenGl_Context::SetDefaultFrameBuffer( return aFbo; } -// ======================================================================= -// function : IsRender -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::IsRender() const { return myRenderMode == GL_RENDER; } -// ======================================================================= -// function : IsFeedback -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::IsFeedback() const { return myRenderMode == GL_FEEDBACK; } -// ======================================================================= -// function : SetShadingMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetShadingMaterial( const OpenGl_Aspects* theAspect, const Handle(Graphic3d_PresentationAttributes)& theHighlight) @@ -2483,10 +2389,8 @@ void OpenGl_Context::SetShadingMaterial( myShaderManager->UpdateMaterialStateTo(myMaterial, anAlphaCutoff, toDistinguish, toMapTexture); } -// ======================================================================= -// function : CheckIsTransparent -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::CheckIsTransparent( const OpenGl_Aspects* theAspect, const Handle(Graphic3d_PresentationAttributes)& theHighlight, @@ -2523,10 +2427,8 @@ Standard_Boolean OpenGl_Context::CheckIsTransparent( return anAspect->AlphaMode() == Graphic3d_AlphaMode_Blend; } -// ======================================================================= -// function : SetColor4fv -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetColor4fv(const OpenGl_Vec4& theColor) { if (!myActiveProgram.IsNull()) @@ -2543,20 +2445,16 @@ void OpenGl_Context::SetColor4fv(const OpenGl_Vec4& theColor) } } -// ======================================================================= -// function : SetTypeOfLine -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetTypeOfLine(const Aspect_TypeOfLine theType, const Standard_ShortReal theFactor) { SetLineStipple(theFactor, Graphic3d_Aspects::DefaultLinePatternForType(theType)); } -// ======================================================================= -// function : SetLineStipple -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetLineStipple(const Standard_ShortReal theFactor, const uint16_t thePattern) { if (!myActiveProgram.IsNull()) @@ -2599,10 +2497,8 @@ void OpenGl_Context::SetLineStipple(const Standard_ShortReal theFactor, const ui } } -// ======================================================================= -// function : SetLineWidth -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetLineWidth(const Standard_ShortReal theWidth) { if (myGapi == Aspect_GraphicsLibrary_OpenGLES || core11ffp != NULL) @@ -2612,10 +2508,8 @@ void OpenGl_Context::SetLineWidth(const Standard_ShortReal theWidth) } } -// ======================================================================= -// function : SetTextureMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetTextureMatrix(const Handle(Graphic3d_TextureParams)& theParams, const Standard_Boolean theIsTopDown) { @@ -2678,10 +2572,8 @@ void OpenGl_Context::SetTextureMatrix(const Handle(Graphic3d_TextureParams)& the } } -// ======================================================================= -// function : SetPointSize -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetPointSize(const Standard_ShortReal theSize) { if (!myActiveProgram.IsNull()) @@ -2704,10 +2596,8 @@ void OpenGl_Context::SetPointSize(const Standard_ShortReal theSize) } } -// ======================================================================= -// function : SetPointSpriteOrigin -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetPointSpriteOrigin() { if (myGapi == Aspect_GraphicsLibrary_OpenGLES || core15fwd == NULL) @@ -2723,10 +2613,8 @@ void OpenGl_Context::SetPointSpriteOrigin() } } -// ======================================================================= -// function : SetGlNormalizeEnabled -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled(Standard_Boolean isEnabled) { if (isEnabled == myIsGlNormalizeEnabled) @@ -2752,10 +2640,8 @@ Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled(Standard_Boolean isEnable return anOldGlNormalize; } -// ======================================================================= -// function : SetShadeModel -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetShadeModel(Graphic3d_TypeOfShadingModel theModel) { if (core11ffp != NULL) @@ -2773,10 +2659,8 @@ void OpenGl_Context::SetShadeModel(Graphic3d_TypeOfShadingModel theModel) } } -// ======================================================================= -// function : SetPolygonMode -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_Context::SetPolygonMode(const Standard_Integer theMode) { if (myPolygonMode == theMode) @@ -2793,10 +2677,8 @@ Standard_Integer OpenGl_Context::SetPolygonMode(const Standard_Integer theMode) return anOldPolygonMode; } -// ======================================================================= -// function : SetPolygonHatchEnabled -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Context::SetPolygonHatchEnabled(const bool theIsEnabled) { if (core11ffp == NULL) @@ -2822,10 +2704,8 @@ bool OpenGl_Context::SetPolygonHatchEnabled(const bool theIsEnabled) return anOldIsEnabled; } -// ======================================================================= -// function : SetPolygonHatchStyle -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_Context::SetPolygonHatchStyle(const Handle(Graphic3d_HatchStyle)& theStyle) { const Standard_Integer aNewStyle = !theStyle.IsNull() ? theStyle->HatchType() : Aspect_HS_SOLID; @@ -2860,10 +2740,8 @@ Standard_Integer OpenGl_Context::SetPolygonHatchStyle(const Handle(Graphic3d_Hat return anOldType; } -// ======================================================================= -// function : SetPolygonOffset -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetPolygonOffset(const Graphic3d_PolygonOffset& theOffset) { const bool toFillOld = (myPolygonOffset.Mode & Aspect_POM_Fill) == Aspect_POM_Fill; @@ -2918,10 +2796,8 @@ void OpenGl_Context::SetPolygonOffset(const Graphic3d_PolygonOffset& theOffset) myPolygonOffset = theOffset; } -// ======================================================================= -// function : SetCamera -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetCamera(const Handle(Graphic3d_Camera)& theCamera) { myCamera = theCamera; @@ -2934,10 +2810,8 @@ void OpenGl_Context::SetCamera(const Handle(Graphic3d_Camera)& theCamera) } } -// ======================================================================= -// function : ApplyModelWorldMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ApplyModelWorldMatrix() { if (myShaderManager->ModelWorldState().ModelWorldMatrix() != ModelWorldState.Current()) @@ -2946,10 +2820,8 @@ void OpenGl_Context::ApplyModelWorldMatrix() } } -// ======================================================================= -// function : ApplyWorldViewMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ApplyWorldViewMatrix() { if (myShaderManager->ModelWorldState().ModelWorldMatrix() != THE_IDENTITY_MATRIX) @@ -2962,10 +2834,8 @@ void OpenGl_Context::ApplyWorldViewMatrix() } } -// ======================================================================= -// function : ApplyModelViewMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ApplyModelViewMatrix() { if (myShaderManager->ModelWorldState().ModelWorldMatrix() != ModelWorldState.Current()) @@ -2978,10 +2848,8 @@ void OpenGl_Context::ApplyModelViewMatrix() } } -// ======================================================================= -// function : ApplyProjectionMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::ApplyProjectionMatrix() { if (myShaderManager->ProjectionState().ProjectionMatrix() != ProjectionState.Current()) @@ -2990,19 +2858,15 @@ void OpenGl_Context::ApplyProjectionMatrix() } } -// ======================================================================= -// function : EnableFeatures -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::EnableFeatures() const { // } -// ======================================================================= -// function : DisableFeatures -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::DisableFeatures() const { // Disable stuff that's likely to slow down glDrawPixels. @@ -3063,10 +2927,8 @@ void OpenGl_Context::DisableFeatures() const } } -// ======================================================================= -// function : SetColorMaskRGBA -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::SetColorMaskRGBA(const NCollection_Vec4& theVal) { core11fwd->glColorMask(theVal.r() ? GL_TRUE : GL_FALSE, @@ -3076,10 +2938,8 @@ void OpenGl_Context::SetColorMaskRGBA(const NCollection_Vec4& theVal) myColorMask = theVal; } -// ======================================================================= -// function : SetColorMask -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Context::SetColorMask(bool theToWriteColor) { const bool anOldValue = myColorMask.r(); @@ -3092,10 +2952,8 @@ bool OpenGl_Context::SetColorMask(bool theToWriteColor) return anOldValue; } -// ======================================================================= -// function : SetSampleAlphaToCoverage -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Context::SetSampleAlphaToCoverage(bool theToEnable) { bool toEnable = myAllowAlphaToCov && theToEnable; @@ -3122,10 +2980,8 @@ bool OpenGl_Context::SetSampleAlphaToCoverage(bool theToEnable) return anOldValue; } -// ======================================================================= -// function : GetBufferSubData -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Context::GetBufferSubData(unsigned int theTarget, intptr_t theOffset, intptr_t theSize, @@ -3157,10 +3013,8 @@ bool OpenGl_Context::GetBufferSubData(unsigned int theTarget, #endif } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) @@ -3222,10 +3076,8 @@ void OpenGl_Context::DumpJson(Standard_OStream& theOStream, Standard_Integer the OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &ProjectionState) } -// ======================================================================= -// function : DumpJsonOpenGlState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Context::DumpJsonOpenGlState(Standard_OStream& theOStream, Standard_Integer) { GLboolean isEnableBlend = core11fwd->glIsEnabled(GL_BLEND); diff --git a/src/OpenGl/OpenGl_DepthPeeling.cxx b/src/OpenGl/OpenGl_DepthPeeling.cxx index 2a7254ebad..72e565e31e 100644 --- a/src/OpenGl/OpenGl_DepthPeeling.cxx +++ b/src/OpenGl/OpenGl_DepthPeeling.cxx @@ -32,10 +32,8 @@ OpenGl_DepthPeeling::OpenGl_DepthPeeling() myBlendBackFboOit = new OpenGl_FrameBuffer(myResourceId + ":fbo_blend"); } -// ======================================================================= -// function : ~OpenGl_DepthPeeling -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_DepthPeeling::~OpenGl_DepthPeeling() { Release(NULL); diff --git a/src/OpenGl/OpenGl_Element.cxx b/src/OpenGl/OpenGl_Element.cxx index a367f43610..ed999b5d55 100755 --- a/src/OpenGl/OpenGl_Element.cxx +++ b/src/OpenGl/OpenGl_Element.cxx @@ -18,46 +18,36 @@ #include #include -// ======================================================================= -// function : OpenGl_Element -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Element::OpenGl_Element() { // } -// ======================================================================= -// function : ~OpenGl_Element -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Element::~OpenGl_Element() { // } -// ======================================================================= -// function : UpdateMemStats -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Element::UpdateMemStats(Graphic3d_FrameStatsDataTmp& theStats) const { theStats[Graphic3d_FrameStatsCounter_EstimatedBytesGeom] += EstimatedDataSize(); } -// ======================================================================= -// function : UpdateDrawStats -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Element::UpdateDrawStats(Graphic3d_FrameStatsDataTmp&, bool) const { // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Element::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_Element) diff --git a/src/OpenGl/OpenGl_Flipper.cxx b/src/OpenGl/OpenGl_Flipper.cxx index a60a69e6fe..8f858b1689 100755 --- a/src/OpenGl/OpenGl_Flipper.cxx +++ b/src/OpenGl/OpenGl_Flipper.cxx @@ -21,10 +21,8 @@ #include -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Flipper::OpenGl_Flipper(const gp_Ax2& theReferenceSystem) : OpenGl_Element(), myReferenceOrigin((Standard_ShortReal)theReferenceSystem.Location().X(), @@ -48,19 +46,15 @@ OpenGl_Flipper::OpenGl_Flipper(const gp_Ax2& theReferenceSystem) // } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Flipper::Release(OpenGl_Context*) { // } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Flipper::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { // Check if rendering is to be in immediate mode @@ -142,10 +136,8 @@ void OpenGl_Flipper::Render(const Handle(OpenGl_Workspace)& theWorkspace) const aContext->ApplyModelWorldMatrix(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Flipper::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_Flipper) diff --git a/src/OpenGl/OpenGl_Font.cxx b/src/OpenGl/OpenGl_Font.cxx index e4970fba87..0f01353f50 100755 --- a/src/OpenGl/OpenGl_Font.cxx +++ b/src/OpenGl/OpenGl_Font.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Font, OpenGl_Resource) -// ======================================================================= -// function : OpenGl_Font -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Font::OpenGl_Font(const Handle(Font_FTFont)& theFont, const TCollection_AsciiString& theKey) : myKey(theKey), myFont(theFont), @@ -38,19 +36,15 @@ OpenGl_Font::OpenGl_Font(const Handle(Font_FTFont)& theFont, const TCollection_A memset(&myLastTilePx, 0, sizeof(myLastTilePx)); } -// ======================================================================= -// function : ~OpenGl_Font -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Font::~OpenGl_Font() { Release(NULL); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Font::Release(OpenGl_Context* theCtx) { if (myTextures.IsEmpty()) @@ -75,10 +69,8 @@ void OpenGl_Font::Release(OpenGl_Context* theCtx) myTextures.Clear(); } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_Font::EstimatedDataSize() const { Standard_Size aSize = 0; @@ -90,10 +82,8 @@ Standard_Size OpenGl_Font::EstimatedDataSize() const return aSize; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Font::Init(const Handle(OpenGl_Context)& theCtx) { Release(theCtx.operator->()); @@ -115,10 +105,8 @@ bool OpenGl_Font::Init(const Handle(OpenGl_Context)& theCtx) return true; } -// ======================================================================= -// function : createTexture -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Font::createTexture(const Handle(OpenGl_Context)& theCtx) { // Single font might define very wide range of symbols, with very few of them actually used in @@ -166,10 +154,8 @@ bool OpenGl_Font::createTexture(const Handle(OpenGl_Context)& theCtx) return true; } -// ======================================================================= -// function : renderGlyph -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Font::renderGlyph(const Handle(OpenGl_Context)& theCtx, const Standard_Utf32Char theChar) { @@ -241,10 +227,8 @@ bool OpenGl_Font::renderGlyph(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : RenderGlyph -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Font::RenderGlyph(const Handle(OpenGl_Context)& theCtx, const Standard_Utf32Char theUChar, Tile& theGlyph) diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 92aa66ae6c..1afbe8b335 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -62,10 +62,8 @@ static bool hasDepthStencilAttach(const Handle(OpenGl_Context)& theCtx) } } // namespace -// ======================================================================= -// function : OpenGl_FrameBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameBuffer::OpenGl_FrameBuffer(const TCollection_AsciiString& theResourceId) : OpenGl_NamedResource(theResourceId), myInitVPSizeX(0), @@ -86,37 +84,29 @@ OpenGl_FrameBuffer::OpenGl_FrameBuffer(const TCollection_AsciiString& theResourc myColorTextures.Append(new OpenGl_Texture(theResourceId + ":color")); } -// ======================================================================= -// function : ~OpenGl_FrameBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameBuffer::~OpenGl_FrameBuffer() { Release(NULL); } -// ======================================================================= -// function : GetSizeX -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_FrameBuffer::GetSizeX() const { return !myColorTextures.IsEmpty() ? myColorTextures.First()->SizeX() : 0; } -// ======================================================================= -// function : GetSizeY -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_FrameBuffer::GetSizeY() const { return !myColorTextures.IsEmpty() ? myColorTextures.First()->SizeY() : 0; } -// ======================================================================= -// function : InitWrapper -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::InitWrapper( const Handle(OpenGl_Context)& theGlContext, const NCollection_Sequence& theColorTextures, @@ -196,10 +186,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper( return true; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlContext, const Graphic3d_Vec2i& theSize, const Standard_Integer theColorFormat, @@ -214,10 +202,8 @@ Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlCon return Init(theGlContext, theSize, aColorFormats, theDepthFormat, theNbSamples); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlContext, const Graphic3d_Vec2i& theSize, const OpenGl_ColorFormats& theColorFormats, @@ -357,10 +343,8 @@ Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlCon return Standard_True; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlContext, const Graphic3d_Vec2i& theSize, const OpenGl_ColorFormats& theColorFormats, @@ -581,10 +565,8 @@ Standard_Boolean OpenGl_FrameBuffer::Init(const Handle(OpenGl_Context)& theGlCon return Standard_True; } -// ======================================================================= -// function : InitLazy -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::InitLazy(const Handle(OpenGl_Context)& theGlContext, const Graphic3d_Vec2i& theViewportSize, const Standard_Integer theColorFormat, @@ -596,10 +578,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitLazy(const Handle(OpenGl_Context)& theG return InitLazy(theGlContext, theViewportSize, aColorFormats, theDepthFormat, theNbSamples); } -// ======================================================================= -// function : InitLazy -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::InitLazy(const Handle(OpenGl_Context)& theGlContext, const Graphic3d_Vec2i& theViewportSize, const OpenGl_ColorFormats& theColorFormats, @@ -616,10 +596,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitLazy(const Handle(OpenGl_Context)& theG return Init(theGlContext, theViewportSize, theColorFormats, theDepthFormat, theNbSamples); } -// ======================================================================= -// function : InitWithRB -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::InitWithRB(const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_Vec2i& theSize, const Standard_Integer theColorFormat, @@ -639,10 +617,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB(const Handle(OpenGl_Context)& th theColorRBufferFromWindow); } -// ======================================================================= -// function : initRenderBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::initRenderBuffer(const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_Vec2i& theSize, const OpenGl_ColorFormats& theColorFormats, @@ -837,10 +813,8 @@ Standard_Boolean OpenGl_FrameBuffer::initRenderBuffer(const Handle(OpenGl_Contex return Standard_True; } -// ======================================================================= -// function : InitWrapper -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::InitWrapper(const Handle(OpenGl_Context)& theGlCtx) { myNbSamples = 0; @@ -941,10 +915,8 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper(const Handle(OpenGl_Context)& t return Standard_True; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::Release(OpenGl_Context* theGlCtx) { if (isValidFrameBuffer()) @@ -991,20 +963,16 @@ void OpenGl_FrameBuffer::Release(OpenGl_Context* theGlCtx) myVPSizeY = 0; } -// ======================================================================= -// function : SetupViewport -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::SetupViewport(const Handle(OpenGl_Context)& theGlCtx) { const Standard_Integer aViewport[4] = {0, 0, myVPSizeX, myVPSizeY}; theGlCtx->ResizeViewport(aViewport); } -// ======================================================================= -// function : ChangeViewport -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::ChangeViewport(const Standard_Integer theVPSizeX, const Standard_Integer theVPSizeY) { @@ -1012,39 +980,31 @@ void OpenGl_FrameBuffer::ChangeViewport(const Standard_Integer theVPSizeX, myVPSizeY = theVPSizeY; } -// ======================================================================= -// function : BindBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theGlCtx) { theGlCtx->arbFBO->glBindFramebuffer(GL_FRAMEBUFFER, myGlFBufferId); theGlCtx->SetFrameBufferSRGB(true); } -// ======================================================================= -// function : BindDrawBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::BindDrawBuffer(const Handle(OpenGl_Context)& theGlCtx) { theGlCtx->arbFBO->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, myGlFBufferId); theGlCtx->SetFrameBufferSRGB(true); } -// ======================================================================= -// function : BindReadBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::BindReadBuffer(const Handle(OpenGl_Context)& theGlCtx) { theGlCtx->arbFBO->glBindFramebuffer(GL_READ_FRAMEBUFFER, myGlFBufferId); } -// ======================================================================= -// function : UnbindBuffer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameBuffer::UnbindBuffer(const Handle(OpenGl_Context)& theGlCtx) { if (!theGlCtx->DefaultFrameBuffer().IsNull() @@ -1059,10 +1019,8 @@ void OpenGl_FrameBuffer::UnbindBuffer(const Handle(OpenGl_Context)& theGlCtx) } } -// ======================================================================= -// function : getAligned -// purpose : -// ======================================================================= +//================================================================================================= + inline Standard_Size getAligned(const Standard_Size theNumber, const Standard_Size theAlignment) { return theNumber + theAlignment - 1 - (theNumber - 1) % theAlignment; @@ -1083,10 +1041,8 @@ inline void convertRowFromRgba(T* theRgbRow, } } -// ======================================================================= -// function : BufferDump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_FrameBuffer::BufferDump(const Handle(OpenGl_Context)& theGlCtx, const Handle(OpenGl_FrameBuffer)& theFbo, Image_PixMap& theImage, @@ -1376,10 +1332,8 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump(const Handle(OpenGl_Context)& return !hasErrors; } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_FrameBuffer::EstimatedDataSize() const { if (!IsValid()) diff --git a/src/OpenGl/OpenGl_FrameStats.cxx b/src/OpenGl/OpenGl_FrameStats.cxx index c538065465..85ca4dfc64 100644 --- a/src/OpenGl/OpenGl_FrameStats.cxx +++ b/src/OpenGl/OpenGl_FrameStats.cxx @@ -30,28 +30,22 @@ static Standard_Size estimatedDataSize(const Handle(OpenGl_Resource)& theRes) } } // namespace -// ======================================================================= -// function : OpenGl_FrameStats -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameStats::OpenGl_FrameStats() { // } -// ======================================================================= -// function : ~OpenGl_FrameStats -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameStats::~OpenGl_FrameStats() { // } -// ======================================================================= -// function : IsFrameUpdated -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_FrameStats::IsFrameUpdated(Handle(OpenGl_FrameStats)& thePrev) const { const Graphic3d_FrameStatsData& aFrame = LastDataFrame(); @@ -84,10 +78,8 @@ bool OpenGl_FrameStats::IsFrameUpdated(Handle(OpenGl_FrameStats)& thePrev) const return true; } -// ======================================================================= -// function : updateStatistics -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStats::updateStatistics(const Handle(Graphic3d_CView)& theView, bool theIsImmediateOnly) { @@ -218,10 +210,8 @@ void OpenGl_FrameStats::updateStatistics(const Handle(Graphic3d_CView)& theView, } } -// ======================================================================= -// function : updateStructures -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStats::updateStructures( Standard_Integer theViewId, const NCollection_IndexedMap& theStructures, diff --git a/src/OpenGl/OpenGl_FrameStatsPrs.cxx b/src/OpenGl/OpenGl_FrameStatsPrs.cxx index eed3633260..f14cea073f 100644 --- a/src/OpenGl/OpenGl_FrameStatsPrs.cxx +++ b/src/OpenGl/OpenGl_FrameStatsPrs.cxx @@ -41,10 +41,8 @@ static TCollection_AsciiString formatTimeMs(Standard_Real theSeconds) } } // namespace -// ======================================================================= -// function : OpenGl_FrameStatsPrs -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameStatsPrs::OpenGl_FrameStatsPrs() : myStatsPrev(new OpenGl_FrameStats()), myCountersTrsfPers(new Graphic3d_TransformPers(Graphic3d_TMF_2d, @@ -60,19 +58,15 @@ OpenGl_FrameStatsPrs::OpenGl_FrameStatsPrs() // } -// ======================================================================= -// function : ~OpenGl_FrameStatsPrs -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_FrameStatsPrs::~OpenGl_FrameStatsPrs() { // } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStatsPrs::Release(OpenGl_Context* theCtx) { myCountersText.Release(theCtx); @@ -84,10 +78,8 @@ void OpenGl_FrameStatsPrs::Release(OpenGl_Context* theCtx) myChartLines->Release(theCtx); } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStatsPrs::Update(const Handle(OpenGl_Workspace)& theWorkspace) { const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); @@ -142,10 +134,8 @@ void OpenGl_FrameStatsPrs::Update(const Handle(OpenGl_Workspace)& theWorkspace) updateChart(theWorkspace); } -// ======================================================================= -// function : updateChart -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStatsPrs::updateChart(const Handle(OpenGl_Workspace)& theWorkspace) { const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); @@ -381,10 +371,8 @@ void OpenGl_FrameStatsPrs::updateChart(const Handle(OpenGl_Workspace)& theWorksp } } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStatsPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); @@ -505,10 +493,8 @@ void OpenGl_FrameStatsPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace) } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_FrameStatsPrs::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_FrameStatsPrs) diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index b72c9f7f3a..2529d5a06e 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -1606,10 +1606,8 @@ static void APIENTRY glPixelTransferi(GLenum pname, GLint param) #endif } // namespace opencascade -// ======================================================================= -// function : debugPrintError -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_GlFunctions::debugPrintError(const char* theName) { const int anErr = ::glGetError(); @@ -1635,10 +1633,8 @@ bool OpenGl_GlFunctions::debugPrintError(const char* theName) return anErr != GL_NO_ERROR; } -// ======================================================================= -// function : readGlVersion -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GlFunctions::readGlVersion(Standard_Integer& theGlVerMajor, Standard_Integer& theGlVerMinor) { @@ -1764,10 +1760,8 @@ void OpenGl_GlFunctions::readGlVersion(Standard_Integer& theGlVerMajor, } } -// ======================================================================= -// function : load -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GlFunctions::load(OpenGl_Context& theCtx, Standard_Boolean theIsCoreProfile) { #if !defined(GL_ES_VERSION_2_0) diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx index 542249bbf8..8483aa3741 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -34,10 +34,8 @@ static Graphic3d_HorizontalTextAlignment THE_LABEL_HALIGH = Graphic3d_HTA_LEFT; static Graphic3d_VerticalTextAlignment THE_LABEL_VALIGH = Graphic3d_VTA_BOTTOM; } // namespace -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_GraduatedTrihedron::OpenGl_GraduatedTrihedron() : myMin(0.0f, 0.0f, 0.0f), myMax(100.0f, 100.0f, 100.0f), @@ -46,29 +44,23 @@ OpenGl_GraduatedTrihedron::OpenGl_GraduatedTrihedron() // } -// ======================================================================= -// function : SetValues -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::SetValues(const Graphic3d_GraduatedTrihedron& theData) { myData = theData; myIsInitialized = Standard_False; } -// ======================================================================= -// function : Destructor -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_GraduatedTrihedron::~OpenGl_GraduatedTrihedron() { // } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::Release(OpenGl_Context* theCtx) { myAxes[0].Release(theCtx); @@ -77,10 +69,8 @@ void OpenGl_GraduatedTrihedron::Release(OpenGl_Context* theCtx) myLabelValues.Release(theCtx); } -// ======================================================================= -// function : initResources -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::initGlResources(const Handle(OpenGl_Context)& theCtx) const { myAxes[0].Release(theCtx.operator->()); @@ -321,10 +311,8 @@ Standard_ExtCharacter OpenGl_GraduatedTrihedron::getGridAxes(const Standard_Shor } } -// ======================================================================= -// function : renderLine -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::renderLine(const OpenGl_PrimitiveArray& theLine, const Handle(OpenGl_Workspace)& theWorkspace, const OpenGl_Mat4& theMat, @@ -340,10 +328,8 @@ void OpenGl_GraduatedTrihedron::renderLine(const OpenGl_PrimitiveArray& theLi theLine.Render(theWorkspace); } -// ======================================================================= -// function : renderGridPlane -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::renderGridPlane(const Handle(OpenGl_Workspace)& theWorkspace, const Standard_Integer& theIndex, const GridAxes& theGridAxes, @@ -391,10 +377,8 @@ void OpenGl_GraduatedTrihedron::renderGridPlane(const Handle(OpenGl_Workspace)& } } -// ======================================================================= -// function : renderAxis -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::renderAxis(const Handle(OpenGl_Workspace)& theWorkspace, const Standard_Integer& theIndex, const OpenGl_Mat4& theMat) const @@ -475,10 +459,8 @@ void OpenGl_GraduatedTrihedron::renderAxis(const Handle(OpenGl_Workspace)& theWo anAxis.Line.Render(theWorkspace); } -// ======================================================================= -// function : renderTickmarkTextLabels -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::renderTickmarkLabels(const Handle(OpenGl_Workspace)& theWorkspace, const OpenGl_Mat4& theMat, const Standard_Integer theIndex, @@ -826,10 +808,8 @@ void OpenGl_GraduatedTrihedron::Axis::InitArrow(const Handle(OpenGl_Context)& th anArray->Bounds()); } -// ======================================================================= -// function : InitTickmark -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::Axis::InitTickmark(const Handle(OpenGl_Context)& theContext, const OpenGl_Vec3& theDir) const { @@ -844,10 +824,8 @@ void OpenGl_GraduatedTrihedron::Axis::InitTickmark(const Handle(OpenGl_Context)& anArray->Bounds()); } -// ======================================================================= -// function : InitLine -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::Axis::InitLine(const Handle(OpenGl_Context)& theContext, const OpenGl_Vec3& theDir) const { @@ -863,10 +841,8 @@ void OpenGl_GraduatedTrihedron::Axis::InitLine(const Handle(OpenGl_Context)& the anArray->Bounds()); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::Axis::Release(OpenGl_Context* theCtx) { Label.Release(theCtx); @@ -875,10 +851,8 @@ void OpenGl_GraduatedTrihedron::Axis::Release(OpenGl_Context* theCtx) Arrow.Release(theCtx); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraduatedTrihedron::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index 801080fb89..86cddf2ecc 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -171,10 +171,8 @@ static int TheDoubleBuffFBConfig[] = {GLX_X_RENDERABLE, } // namespace -// ======================================================================= -// function : OpenGl_GraphicDriver -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_GraphicDriver::OpenGl_GraphicDriver(const Handle(Aspect_DisplayConnection)& theDisp, const Standard_Boolean theToInitialize) : Graphic3d_GraphicDriver(theDisp), @@ -213,19 +211,15 @@ OpenGl_GraphicDriver::OpenGl_GraphicDriver(const Handle(Aspect_DisplayConnection } } -// ======================================================================= -// function : ~OpenGl_GraphicDriver -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_GraphicDriver::~OpenGl_GraphicDriver() { ReleaseContext(); } -// ======================================================================= -// function : ReleaseContext -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::ReleaseContext() { Handle(OpenGl_Context) aCtxShared; @@ -314,10 +308,8 @@ void OpenGl_GraphicDriver::ReleaseContext() myIsOwnContext = Standard_False; } -// ======================================================================= -// function : InitContext -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_GraphicDriver::InitContext() { ReleaseContext(); @@ -401,10 +393,8 @@ Standard_Boolean OpenGl_GraphicDriver::InitContext() return Standard_True; } -// ======================================================================= -// function : InitEglContext -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_GraphicDriver::InitEglContext(Aspect_Display theEglDisplay, Aspect_RenderingContext theEglContext, void* theEglConfig) @@ -444,10 +434,8 @@ Standard_Boolean OpenGl_GraphicDriver::InitEglContext(Aspect_Display th #endif } -// ======================================================================= -// function : chooseVisualInfo -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::chooseVisualInfo() { if (myDisplayConnection.IsNull()) @@ -527,10 +515,8 @@ void OpenGl_GraphicDriver::chooseVisualInfo() #endif } -// ======================================================================= -// function : InquireLimit -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_GraphicDriver::InquireLimit(const Graphic3d_TypeOfLimit theType) const { const Handle(OpenGl_Context)& aCtx = GetSharedContext(); @@ -587,46 +573,36 @@ Standard_Integer OpenGl_GraphicDriver::InquireLimit(const Graphic3d_TypeOfLimit return 0; } -// ======================================================================= -// function : DefaultTextHeight -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight() const { return 16.; } -// ======================================================================= -// function : EnableVBO -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::EnableVBO(const Standard_Boolean theToTurnOn) { myCaps->vboDisable = !theToTurnOn; } -// ======================================================================= -// function : IsVerticalSync -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_GraphicDriver::IsVerticalSync() const { return myCaps->swapInterval == 1; } -// ======================================================================= -// function : SetVerticalSync -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::SetVerticalSync(bool theToEnable) { myCaps->swapInterval = theToEnable ? 1 : 0; } -// ======================================================================= -// function : GetSharedContext -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(OpenGl_Context)& OpenGl_GraphicDriver::GetSharedContext(bool theBound) const { if (myMapOfView.IsEmpty()) @@ -653,10 +629,8 @@ const Handle(OpenGl_Context)& OpenGl_GraphicDriver::GetSharedContext(bool theBou return TheNullGlCtx; } -// ======================================================================= -// function : MemoryInfo -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_GraphicDriver::MemoryInfo(Standard_Size& theFreeBytes, TCollection_AsciiString& theInfo) const { @@ -671,19 +645,15 @@ Standard_Boolean OpenGl_GraphicDriver::MemoryInfo(Standard_Size& theFr return !theInfo.IsEmpty(); } -// ======================================================================= -// function : SetBuffersNoSwap -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::SetBuffersNoSwap(const Standard_Boolean theIsNoSwap) { myCaps->buffersNoSwap = theIsNoSwap; } -// ======================================================================= -// function : TextSize -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::TextSize(const Handle(Graphic3d_CView)& theView, const Standard_CString theText, const Standard_ShortReal theHeight, @@ -784,10 +754,8 @@ void OpenGl_GraphicDriver::SetZLayerSettings(const Graphic3d_ZLayerId the } } -// ======================================================================= -// function : Structure -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_CStructure) OpenGl_GraphicDriver::CreateStructure( const Handle(Graphic3d_StructureManager)& theManager) { @@ -796,10 +764,8 @@ Handle(Graphic3d_CStructure) OpenGl_GraphicDriver::CreateStructure( return aStructure; } -// ======================================================================= -// function : Structure -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::RemoveStructure(Handle(Graphic3d_CStructure)& theCStructure) { OpenGl_Structure* aStructure = NULL; @@ -813,10 +779,8 @@ void OpenGl_GraphicDriver::RemoveStructure(Handle(Graphic3d_CStructure)& theCStr theCStructure.Nullify(); } -// ======================================================================= -// function : CreateView -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_CView) OpenGl_GraphicDriver::CreateView( const Handle(Graphic3d_StructureManager)& theMgr) { @@ -831,10 +795,8 @@ Handle(Graphic3d_CView) OpenGl_GraphicDriver::CreateView( return aView; } -// ======================================================================= -// function : RemoveView -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_GraphicDriver::RemoveView(const Handle(Graphic3d_CView)& theView) { Handle(OpenGl_Context) aCtx = GetSharedContext(); @@ -886,10 +848,8 @@ void OpenGl_GraphicDriver::RemoveView(const Handle(Graphic3d_CView)& theView) } } -// ======================================================================= -// function : CreateRenderWindow -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_Window) OpenGl_GraphicDriver::CreateRenderWindow( const Handle(Aspect_Window)& theNativeWindow, const Handle(Aspect_Window)& theSizeWindow, diff --git a/src/OpenGl/OpenGl_GraphicDriverFactory.cxx b/src/OpenGl/OpenGl_GraphicDriverFactory.cxx index d62ddc6bc1..aaa9f595a0 100644 --- a/src/OpenGl/OpenGl_GraphicDriverFactory.cxx +++ b/src/OpenGl/OpenGl_GraphicDriverFactory.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriverFactory, Graphic3d_GraphicDriverFactory) -// ======================================================================= -// function : OpenGl_GraphicDriverFactory -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_GraphicDriverFactory::OpenGl_GraphicDriverFactory() : Graphic3d_GraphicDriverFactory(OpenGl_DRIVER_NAME), myDefaultCaps(new OpenGl_Caps()) @@ -34,10 +32,8 @@ OpenGl_GraphicDriverFactory::OpenGl_GraphicDriverFactory() // } -// ======================================================================= -// function : CreateDriver -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_GraphicDriver) OpenGl_GraphicDriverFactory::CreateDriver( const Handle(Aspect_DisplayConnection)& theDisp) { diff --git a/src/OpenGl/OpenGl_Group.cxx b/src/OpenGl/OpenGl_Group.cxx index a066494e65..2addad3bc0 100644 --- a/src/OpenGl/OpenGl_Group.cxx +++ b/src/OpenGl/OpenGl_Group.cxx @@ -28,10 +28,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Group, Graphic3d_Group) -// ======================================================================= -// function : OpenGl_Group -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Group::OpenGl_Group(const Handle(Graphic3d_Structure)& theStruct) : Graphic3d_Group(theStruct), myAspects(NULL), @@ -46,19 +44,15 @@ OpenGl_Group::OpenGl_Group(const Handle(Graphic3d_Structure)& theStruct) } } -// ======================================================================= -// function : ~OpenGl_Group -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Group::~OpenGl_Group() { Release(Handle(OpenGl_Context)()); } -// ======================================================================= -// function : SetGroupPrimitivesAspect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::SetGroupPrimitivesAspect(const Handle(Graphic3d_Aspects)& theAspect) { if (IsDeleted()) @@ -83,10 +77,8 @@ void OpenGl_Group::SetGroupPrimitivesAspect(const Handle(Graphic3d_Aspects)& the Update(); } -// ======================================================================= -// function : SetPrimitivesAspect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::SetPrimitivesAspect(const Handle(Graphic3d_Aspects)& theAspect) { if (myAspects == NULL) @@ -104,10 +96,8 @@ void OpenGl_Group::SetPrimitivesAspect(const Handle(Graphic3d_Aspects)& theAspec Update(); } -// ======================================================================= -// function : SynchronizeAspects -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::SynchronizeAspects() { if (myAspects != NULL) @@ -124,10 +114,8 @@ void OpenGl_Group::SynchronizeAspects() } } -// ======================================================================= -// function : ReplaceAspects -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::ReplaceAspects(const Graphic3d_MapOfAspectsToAspects& theMap) { if (theMap.IsEmpty()) @@ -154,10 +142,8 @@ void OpenGl_Group::ReplaceAspects(const Graphic3d_MapOfAspectsToAspects& theMap) } } -// ======================================================================= -// function : AddPrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray theType, const Handle(Graphic3d_IndexBuffer)& theIndices, const Handle(Graphic3d_Buffer)& theAttribs, @@ -179,10 +165,8 @@ void OpenGl_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray theTyp Graphic3d_Group::AddPrimitiveArray(theType, theIndices, theAttribs, theBounds, theToEvalMinMax); } -// ======================================================================= -// function : AddText -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::AddText(const Handle(Graphic3d_Text)& theTextParams, const Standard_Boolean theToEvalMinMax) { @@ -204,10 +188,8 @@ void OpenGl_Group::AddText(const Handle(Graphic3d_Text)& theTextParams, Graphic3d_Group::AddText(theTextParams, theToEvalMinMax); } -// ======================================================================= -// function : SetFlippingOptions -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::SetFlippingOptions(const Standard_Boolean theIsEnabled, const gp_Ax2& theRefPlane) { @@ -216,10 +198,8 @@ void OpenGl_Group::SetFlippingOptions(const Standard_Boolean theIsEnabled, AddElement(aFlipper); } -// ======================================================================= -// function : SetStencilTestOptions -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::SetStencilTestOptions(const Standard_Boolean theIsEnabled) { OpenGl_StencilTest* aStencilTest = new OpenGl_StencilTest(); @@ -227,10 +207,8 @@ void OpenGl_Group::SetStencilTestOptions(const Standard_Boolean theIsEnabled) AddElement(aStencilTest); } -// ======================================================================= -// function : AddElement -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::AddElement(OpenGl_Element* theElem) { OpenGl_ElementNode* aNode = new OpenGl_ElementNode(); @@ -252,10 +230,8 @@ void OpenGl_Group::AddElement(OpenGl_Element* theElem) } } -// ======================================================================= -// function : renderFiltered -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Group::renderFiltered(const Handle(OpenGl_Workspace)& theWorkspace, OpenGl_Element* theElement) const { @@ -268,10 +244,8 @@ bool OpenGl_Group::renderFiltered(const Handle(OpenGl_Workspace)& theWorkspace, return true; } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { // Setup aspects @@ -291,10 +265,8 @@ void OpenGl_Group::Render(const Handle(OpenGl_Workspace)& theWorkspace) const theWorkspace->SetAspects(aBackAspects); } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::Clear(const Standard_Boolean theToUpdateStructureMgr) { if (IsDeleted()) @@ -311,10 +283,8 @@ void OpenGl_Group::Clear(const Standard_Boolean theToUpdateStructureMgr) myIsRaytracable = Standard_False; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::Release(const Handle(OpenGl_Context)& theGlCtx) { // Delete elements @@ -330,10 +300,8 @@ void OpenGl_Group::Release(const Handle(OpenGl_Context)& theGlCtx) OpenGl_Element::Destroy(theGlCtx.get(), myAspects); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Group::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/OpenGl/OpenGl_IndexBuffer.cxx b/src/OpenGl/OpenGl_IndexBuffer.cxx index b3c98e4c7e..6266cb7562 100644 --- a/src/OpenGl/OpenGl_IndexBuffer.cxx +++ b/src/OpenGl/OpenGl_IndexBuffer.cxx @@ -19,28 +19,22 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_IndexBuffer, OpenGl_Buffer) -// ======================================================================= -// function : OpenGl_IndexBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_IndexBuffer::OpenGl_IndexBuffer() : OpenGl_Buffer() { } -// ======================================================================= -// function : GetTarget -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_IndexBuffer::GetTarget() const { return GL_ELEMENT_ARRAY_BUFFER; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_IndexBuffer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 5a5782b917..dbabf596ac 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -1273,10 +1273,8 @@ void OpenGl_LayerList::renderTransparent(const Handle(OpenGl_Workspace)& theWo aCtx->core11fwd->glDepthFunc(theGlobalSettings.DepthFunc); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_LayerList::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_LayerList) diff --git a/src/OpenGl/OpenGl_LineAttributes.cxx b/src/OpenGl/OpenGl_LineAttributes.cxx index bea47ed20f..9ff6672785 100644 --- a/src/OpenGl/OpenGl_LineAttributes.cxx +++ b/src/OpenGl/OpenGl_LineAttributes.cxx @@ -20,28 +20,22 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_LineAttributes, OpenGl_Resource) -// ======================================================================= -// function : OpenGl_LineAttributes -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_LineAttributes::OpenGl_LineAttributes() { // } -// ======================================================================= -// function : ~OpenGl_LineAttributes -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_LineAttributes::~OpenGl_LineAttributes() { Release(NULL); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_LineAttributes::Release(OpenGl_Context* theGlCtx) { if (theGlCtx != NULL && theGlCtx->IsValid()) @@ -54,10 +48,8 @@ void OpenGl_LineAttributes::Release(OpenGl_Context* theGlCtx) myStyles.Clear(); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_LineAttributes::init(const OpenGl_Context* theGlCtx, const Handle(Graphic3d_HatchStyle)& theStyle) { @@ -68,10 +60,8 @@ unsigned int OpenGl_LineAttributes::init(const OpenGl_Context* the return aListId; } -// ======================================================================= -// function : SetTypeOfHatch -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_LineAttributes::SetTypeOfHatch(const OpenGl_Context* theGlCtx, const Handle(Graphic3d_HatchStyle)& theStyle) { diff --git a/src/OpenGl/OpenGl_PBREnvironment.cxx b/src/OpenGl/OpenGl_PBREnvironment.cxx index 207321f49d..189dff10c0 100644 --- a/src/OpenGl/OpenGl_PBREnvironment.cxx +++ b/src/OpenGl/OpenGl_PBREnvironment.cxx @@ -124,10 +124,8 @@ private: Graphic3d_Vec4 myClearColor; }; -// ======================================================================= -// function : Create -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_PBREnvironment) OpenGl_PBREnvironment::Create(const Handle(OpenGl_Context)& theCtx, unsigned int thePow2Size, unsigned int theLevelsNumber, @@ -155,10 +153,8 @@ Handle(OpenGl_PBREnvironment) OpenGl_PBREnvironment::Create(const Handle(OpenGl_ return anEnvironment; } -// ======================================================================= -// function : OpenGl_PBREnvironment -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PBREnvironment::OpenGl_PBREnvironment(const Handle(OpenGl_Context)& theCtx, unsigned int thePowOf2Size, unsigned int theSpecMapLevelsNumber, @@ -182,10 +178,8 @@ OpenGl_PBREnvironment::OpenGl_PBREnvironment(const Handle(OpenGl_Context)& theC } } -// ======================================================================= -// function : Bind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::Bind(const Handle(OpenGl_Context)& theCtx) { myIBLMaps[OpenGl_TypeOfIBLMap_DiffuseSH].Bind(theCtx); @@ -193,10 +187,8 @@ void OpenGl_PBREnvironment::Bind(const Handle(OpenGl_Context)& theCtx) myIsNeededToBeBound = Standard_False; } -// ======================================================================= -// function : Unbind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::Unbind(const Handle(OpenGl_Context)& theCtx) { myIBLMaps[OpenGl_TypeOfIBLMap_DiffuseSH].Unbind(theCtx); @@ -204,10 +196,8 @@ void OpenGl_PBREnvironment::Unbind(const Handle(OpenGl_Context)& theCtx) myIsNeededToBeBound = Standard_True; } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::Clear(const Handle(OpenGl_Context)& theCtx, const Graphic3d_Vec3& theColor) { @@ -215,10 +205,8 @@ void OpenGl_PBREnvironment::Clear(const Handle(OpenGl_Context)& theCtx, clear(theCtx, theColor); } -// ======================================================================= -// function : Bake -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::Bake(const Handle(OpenGl_Context)& theCtx, const Handle(OpenGl_Texture)& theEnvMap, Standard_Boolean theZIsInverted, @@ -243,10 +231,8 @@ void OpenGl_PBREnvironment::Bake(const Handle(OpenGl_Context)& theCtx, theProbability); } -// ======================================================================= -// function : SizesAreDifferent -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::SizesAreDifferent(unsigned int thePow2Size, unsigned int theSpecMapLevelsNumber) const { @@ -256,10 +242,8 @@ bool OpenGl_PBREnvironment::SizesAreDifferent(unsigned int thePow2Size, return myPow2Size != thePow2Size || mySpecMapLevelsNumber != theSpecMapLevelsNumber; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::Release(OpenGl_Context* theCtx) { if (myFBO != OpenGl_FrameBuffer::NO_FRAMEBUFFER) @@ -276,19 +260,15 @@ void OpenGl_PBREnvironment::Release(OpenGl_Context* theCtx) myVBO.Release(theCtx); } -// ======================================================================= -// function : ~OpenGl_PBREnvironment -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PBREnvironment::~OpenGl_PBREnvironment() { Release(NULL); } -// ======================================================================= -// function : initTextures -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::initTextures(const Handle(OpenGl_Context)& theCtx) { myIBLMaps[OpenGl_TypeOfIBLMap_Specular].Sampler()->Parameters()->SetTextureUnit( @@ -340,10 +320,8 @@ bool OpenGl_PBREnvironment::initTextures(const Handle(OpenGl_Context)& theCtx) return true; } -// ======================================================================= -// function : initVAO -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::initVAO(const Handle(OpenGl_Context)& theCtx) { const float aVertexPos[] = @@ -351,20 +329,16 @@ bool OpenGl_PBREnvironment::initVAO(const Handle(OpenGl_Context)& theCtx) return myVBO.Init(theCtx, 4, 4, aVertexPos); } -// ======================================================================= -// function : initFBO -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::initFBO(const Handle(OpenGl_Context)& theCtx) { theCtx->arbFBO->glGenFramebuffers(1, &myFBO); return checkFBOComplentess(theCtx); } -// ======================================================================= -// function : processDiffIBLMap -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::processDiffIBLMap(const Handle(OpenGl_Context)& theCtx, const BakingParams* theDrawParams) { @@ -486,10 +460,8 @@ bool OpenGl_PBREnvironment::processDiffIBLMap(const Handle(OpenGl_Context)& theC return true; } -// ======================================================================= -// function : processSpecIBLMap -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::processSpecIBLMap(const Handle(OpenGl_Context)& theCtx, const BakingParams* theDrawParams) { @@ -593,10 +565,8 @@ bool OpenGl_PBREnvironment::processSpecIBLMap(const Handle(OpenGl_Context)& theC return true; } -// ======================================================================= -// function : checkFBOCompletness -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_PBREnvironment::checkFBOComplentess(const Handle(OpenGl_Context)& theCtx) { myCanRenderFloat = true; @@ -652,10 +622,8 @@ bool OpenGl_PBREnvironment::checkFBOComplentess(const Handle(OpenGl_Context)& th return true; } -// ======================================================================= -// function : bake -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::bake(const Handle(OpenGl_Context)& theCtx, const Handle(OpenGl_Texture)& theEnvMap, Standard_Boolean theZIsInverted, @@ -701,10 +669,8 @@ void OpenGl_PBREnvironment::bake(const Handle(OpenGl_Context)& theCtx, theEnvMap->Unbind(theCtx, theCtx->PBREnvLUTTexUnit()); } -// ======================================================================= -// function : clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PBREnvironment::clear(const Handle(OpenGl_Context)& theCtx, const Graphic3d_Vec3& theColor) { diff --git a/src/OpenGl/OpenGl_PointSprite.cxx b/src/OpenGl/OpenGl_PointSprite.cxx index 30822ba8c9..9b7935ffcc 100755 --- a/src/OpenGl/OpenGl_PointSprite.cxx +++ b/src/OpenGl/OpenGl_PointSprite.cxx @@ -21,10 +21,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_PointSprite, OpenGl_Texture) -// ======================================================================= -// function : OpenGl_PointSprite -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PointSprite::OpenGl_PointSprite(const TCollection_AsciiString& theResourceId) : OpenGl_Texture(theResourceId, Handle(Graphic3d_TextureParams)()), myBitmapList(0) @@ -36,19 +34,15 @@ OpenGl_PointSprite::OpenGl_PointSprite(const TCollection_AsciiString& theResourc Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); } -// ======================================================================= -// function : ~OpenGl_PointSprite -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PointSprite::~OpenGl_PointSprite() { Release(NULL); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PointSprite::Release(OpenGl_Context* theGlCtx) { if (myBitmapList != 0) @@ -67,10 +61,8 @@ void OpenGl_PointSprite::Release(OpenGl_Context* theGlCtx) OpenGl_Texture::Release(theGlCtx); } -// ======================================================================= -// function : SetDisplayList -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PointSprite::SetDisplayList(const Handle(OpenGl_Context)& theCtx, const GLuint theBitmapList) { @@ -78,10 +70,8 @@ void OpenGl_PointSprite::SetDisplayList(const Handle(OpenGl_Context)& theCtx, myBitmapList = theBitmapList; } -// ======================================================================= -// function : DrawBitmap -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PointSprite::DrawBitmap(const Handle(OpenGl_Context)& theCtx) const { if (myBitmapList != 0) diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index f18ffaf646..b7574b5028 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -169,10 +169,8 @@ private: Standard_Integer Stride; }; -// ======================================================================= -// function : clearMemoryGL -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::clearMemoryGL(const Handle(OpenGl_Context)& theGlCtx) const { if (!myVboIndices.IsNull()) @@ -187,10 +185,8 @@ void OpenGl_PrimitiveArray::clearMemoryGL(const Handle(OpenGl_Context)& theGlCtx } } -// ======================================================================= -// function : initNormalVbo -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_PrimitiveArray::initNormalVbo(const Handle(OpenGl_Context)& theCtx) const { switch (myAttribs->NbAttributes) @@ -315,10 +311,8 @@ Standard_Boolean OpenGl_PrimitiveArray::initNormalVbo(const Handle(OpenGl_Contex return Standard_True; } -// ======================================================================= -// function : buildVBO -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_PrimitiveArray::buildVBO(const Handle(OpenGl_Context)& theCtx, const Standard_Boolean theToKeepData) const { @@ -410,10 +404,8 @@ Standard_Boolean OpenGl_PrimitiveArray::buildVBO(const Handle(OpenGl_Context)& t return Standard_True; } -// ======================================================================= -// function : updateVBO -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::updateVBO(const Handle(OpenGl_Context)& theCtx) const { if (!myAttribs.IsNull()) @@ -451,10 +443,8 @@ void OpenGl_PrimitiveArray::updateVBO(const Handle(OpenGl_Context)& theCtx) cons } } -// ======================================================================= -// function : drawArray -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::drawArray(const Handle(OpenGl_Workspace)& theWorkspace, const Graphic3d_Vec4* theFaceColors, const Standard_Boolean theHasVertColor) const @@ -541,10 +531,8 @@ void OpenGl_PrimitiveArray::drawArray(const Handle(OpenGl_Workspace)& theWorkspa myVboAttribs->UnbindAllAttributes(aGlContext); } -// ======================================================================= -// function : drawEdges -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::drawEdges(const Handle(OpenGl_Workspace)& theWorkspace) const { const Handle(OpenGl_Context)& aGlContext = theWorkspace->GetGlContext(); @@ -645,10 +633,8 @@ void OpenGl_PrimitiveArray::drawEdges(const Handle(OpenGl_Workspace)& theWorkspa aGlContext->SetPolygonMode(aPolyModeOld); } -// ======================================================================= -// function : drawMarkers -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::drawMarkers(const Handle(OpenGl_Workspace)& theWorkspace) const { const OpenGl_Aspects* anAspectMarker = theWorkspace->Aspects(); @@ -714,10 +700,8 @@ void OpenGl_PrimitiveArray::drawMarkers(const Handle(OpenGl_Workspace)& theWorks } } -// ======================================================================= -// function : OpenGl_PrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PrimitiveArray::OpenGl_PrimitiveArray(const OpenGl_GraphicDriver* theDriver) : myDrawMode(DRAW_MODE_NONE), @@ -730,10 +714,8 @@ OpenGl_PrimitiveArray::OpenGl_PrimitiveArray(const OpenGl_GraphicDriver* theDriv } } -// ======================================================================= -// function : OpenGl_PrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PrimitiveArray::OpenGl_PrimitiveArray(const OpenGl_GraphicDriver* theDriver, const Graphic3d_TypeOfPrimitiveArray theType, const Handle(Graphic3d_IndexBuffer)& theIndices, @@ -766,19 +748,15 @@ OpenGl_PrimitiveArray::OpenGl_PrimitiveArray(const OpenGl_GraphicDriver* setDrawMode(theType); } -// ======================================================================= -// function : ~OpenGl_PrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_PrimitiveArray::~OpenGl_PrimitiveArray() { // } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::Release(OpenGl_Context* theContext) { myIsVboInit = Standard_False; @@ -800,10 +778,8 @@ void OpenGl_PrimitiveArray::Release(OpenGl_Context* theContext) } } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_PrimitiveArray::EstimatedDataSize() const { Standard_Size aSize = 0; @@ -818,10 +794,8 @@ Standard_Size OpenGl_PrimitiveArray::EstimatedDataSize() const return aSize; } -// ======================================================================= -// function : UpdateDrawStats -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::UpdateDrawStats(Graphic3d_FrameStatsDataTmp& theStats, bool theIsDetailed) const { @@ -898,10 +872,8 @@ void OpenGl_PrimitiveArray::UpdateDrawStats(Graphic3d_FrameStatsDataTmp& theStat } } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { if (myDrawMode == DRAW_MODE_NONE) @@ -1133,10 +1105,8 @@ void OpenGl_PrimitiveArray::Render(const Handle(OpenGl_Workspace)& theWorkspace) } } -// ======================================================================= -// function : setDrawMode -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::setDrawMode(const Graphic3d_TypeOfPrimitiveArray theType) { if (myAttribs.IsNull()) @@ -1209,10 +1179,8 @@ void OpenGl_PrimitiveArray::setDrawMode(const Graphic3d_TypeOfPrimitiveArray the } } -// ======================================================================= -// function : processIndices -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_PrimitiveArray::processIndices( const Handle(OpenGl_Context)& theContext) const { @@ -1246,10 +1214,8 @@ Standard_Boolean OpenGl_PrimitiveArray::processIndices( return Standard_True; } -// ======================================================================= -// function : InitBuffers -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::InitBuffers(const Handle(OpenGl_Context)& theContext, const Graphic3d_TypeOfPrimitiveArray theType, const Handle(Graphic3d_IndexBuffer)& theIndices, @@ -1270,10 +1236,8 @@ void OpenGl_PrimitiveArray::InitBuffers(const Handle(OpenGl_Context)& the setDrawMode(theType); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_PrimitiveArray::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_PrimitiveArray) diff --git a/src/OpenGl/OpenGl_Sampler.cxx b/src/OpenGl/OpenGl_Sampler.cxx index 96f98c609e..ed4b6461b3 100644 --- a/src/OpenGl/OpenGl_Sampler.cxx +++ b/src/OpenGl/OpenGl_Sampler.cxx @@ -22,10 +22,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Sampler, OpenGl_Resource) -// ======================================================================= -// function : OpenGl_Sampler -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Sampler::OpenGl_Sampler(const Handle(Graphic3d_TextureParams)& theParams) : myParams(theParams), mySamplerRevision(0), @@ -38,19 +36,15 @@ OpenGl_Sampler::OpenGl_Sampler(const Handle(Graphic3d_TextureParams)& theParams) } } -// ======================================================================= -// function : ~OpenGl_Sampler -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Sampler::~OpenGl_Sampler() { Release(NULL); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::Release(OpenGl_Context* theCtx) { myIsImmutable = false; @@ -73,10 +67,8 @@ void OpenGl_Sampler::Release(OpenGl_Context* theCtx) mySamplerID = NO_SAMPLER; } -// ======================================================================= -// function : Create -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Sampler::Create(const Handle(OpenGl_Context)& theCtx) { if (isValidSampler()) @@ -92,10 +84,8 @@ Standard_Boolean OpenGl_Sampler::Create(const Handle(OpenGl_Context)& theCtx) return Standard_True; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Sampler::Init(const Handle(OpenGl_Context)& theCtx, const OpenGl_Texture& theTexture) { @@ -151,10 +141,8 @@ void OpenGl_Sampler::Unbind(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : setParameter -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::setParameter(const Handle(OpenGl_Context)& theCtx, OpenGl_Sampler* theSampler, unsigned int theTarget, @@ -171,10 +159,8 @@ void OpenGl_Sampler::setParameter(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : SetParameters -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::SetParameters(const Handle(Graphic3d_TextureParams)& theParams) { if (myParams != theParams) @@ -184,10 +170,8 @@ void OpenGl_Sampler::SetParameters(const Handle(Graphic3d_TextureParams)& thePar } } -// ======================================================================= -// function : applySamplerParams -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::applySamplerParams(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_TextureParams)& theParams, OpenGl_Sampler* theSampler, @@ -273,10 +257,8 @@ void OpenGl_Sampler::applySamplerParams(const Handle(OpenGl_Context)& t } } -// ======================================================================= -// function : applyGlobalTextureParams -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::applyGlobalTextureParams(const Handle(OpenGl_Context)& theCtx, const OpenGl_Texture& theTexture, const Handle(Graphic3d_TextureParams)& theParams) @@ -376,10 +358,8 @@ void OpenGl_Sampler::applyGlobalTextureParams(const Handle(OpenGl_Context)& } } -// ======================================================================= -// function : resetGlobalTextureParams -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Sampler::resetGlobalTextureParams(const Handle(OpenGl_Context)& theCtx, const OpenGl_Texture& theTexture, const Handle(Graphic3d_TextureParams)& theParams) diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 0128658fbc..4293f4415d 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -160,10 +160,8 @@ OpenGl_ShaderManager::~OpenGl_ShaderManager() } } -// ======================================================================= -// function : clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::clear() { myProgramList.Clear(); @@ -257,10 +255,8 @@ void OpenGl_ShaderManager::Unregister(TCollection_AsciiString& theShareKey, } } -// ======================================================================= -// function : switchLightPrograms -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::switchLightPrograms() { const Handle(Graphic3d_LightSet)& aLights = myLightSourceState.LightSources(); @@ -282,10 +278,8 @@ void OpenGl_ShaderManager::switchLightPrograms() } } -// ======================================================================= -// function : UpdateSRgbState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::UpdateSRgbState() { if (mySRgbState == myContext->ToRenderSRGB()) @@ -315,19 +309,15 @@ void OpenGl_ShaderManager::UpdateLightSourceStateTo( switchLightPrograms(); } -// ======================================================================= -// function : UpdateLightSourceState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::UpdateLightSourceState() { myLightSourceState.Update(); } -// ======================================================================= -// function : SetShadingModel -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::SetShadingModel(const Graphic3d_TypeOfShadingModel theModel) { if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT) @@ -370,10 +360,8 @@ void OpenGl_ShaderManager::UpdateWorldViewStateTo(const OpenGl_Mat4& theWorldVie myWorldViewState.Update(); } -// ======================================================================= -// function : pushLightSourceState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushLightSourceState( const Handle(OpenGl_ShaderProgram)& theProgram) const { @@ -617,10 +605,8 @@ void OpenGl_ShaderManager::pushLightSourceState( } } -// ======================================================================= -// function : pushProjectionState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushProjectionState(const Handle(OpenGl_ShaderProgram)& theProgram) const { theProgram->UpdateState(OpenGl_PROJECTION_STATE, myProjectionState.Index()); @@ -656,10 +642,8 @@ void OpenGl_ShaderManager::pushProjectionState(const Handle(OpenGl_ShaderProgram } } -// ======================================================================= -// function : pushModelWorldState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushModelWorldState(const Handle(OpenGl_ShaderProgram)& theProgram) const { theProgram->UpdateState(OpenGl_MODEL_WORLD_STATE, myModelWorldState.Index()); @@ -698,10 +682,8 @@ void OpenGl_ShaderManager::pushModelWorldState(const Handle(OpenGl_ShaderProgram } } -// ======================================================================= -// function : pushWorldViewState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushWorldViewState(const Handle(OpenGl_ShaderProgram)& theProgram) const { if (myWorldViewState.Index() == theProgram->ActiveState(OpenGl_WORLD_VIEW_STATE)) @@ -763,10 +745,8 @@ void OpenGl_ShaderManager::RevertClippingState() myClippingState.Revert(); } -// ======================================================================= -// function : pushClippingState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushClippingState(const Handle(OpenGl_ShaderProgram)& theProgram) const { theProgram->UpdateState(OpenGl_CLIP_PLANES_STATE, myClippingState.Index()); @@ -957,10 +937,8 @@ void OpenGl_ShaderManager::pushClippingState(const Handle(OpenGl_ShaderProgram)& &myClipChainArray.First()); } -// ======================================================================= -// function : pushMaterialState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushMaterialState(const Handle(OpenGl_ShaderProgram)& theProgram) const { const OpenGl_Material& aMat = myMaterialState.Material(); @@ -1031,10 +1009,8 @@ void OpenGl_ShaderManager::pushMaterialState(const Handle(OpenGl_ShaderProgram)& } } -// ======================================================================= -// function : pushOitState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::pushOitState(const Handle(OpenGl_ShaderProgram)& theProgram) const { if (const OpenGl_ShaderUniformLocation& aLocOutput = @@ -1049,10 +1025,8 @@ void OpenGl_ShaderManager::pushOitState(const Handle(OpenGl_ShaderProgram)& theP } } -// ======================================================================= -// function : PushInteriorState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderManager::PushInteriorState(const Handle(OpenGl_ShaderProgram)& theProgram, const Handle(Graphic3d_Aspects)& theAspect) const { @@ -1138,10 +1112,8 @@ void OpenGl_ShaderManager::PushState(const Handle(OpenGl_ShaderProgram)& theProg } } -// ======================================================================= -// function : BindFontProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindFontProgram( const Handle(OpenGl_ShaderProgram)& theCustomProgram) { @@ -1164,10 +1136,8 @@ Standard_Boolean OpenGl_ShaderManager::BindFontProgram( return bindProgramWithState(myFontProgram, Graphic3d_TypeOfShadingModel_Unlit); } -// ======================================================================= -// function : BindFboBlitProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindFboBlitProgram(Standard_Integer theNbSamples, Standard_Boolean theIsFallback_sRGB) { @@ -1200,10 +1170,8 @@ Standard_Boolean OpenGl_ShaderManager::BindFboBlitProgram(Standard_Integer theNb return true; } -// ======================================================================= -// function : BindOitCompositingProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindOitCompositingProgram(Standard_Boolean theIsMSAAEnabled) { const Standard_Integer aProgramIdx = theIsMSAAEnabled ? 1 : 0; @@ -1227,10 +1195,8 @@ Standard_Boolean OpenGl_ShaderManager::BindOitCompositingProgram(Standard_Boolea return true; } -// ======================================================================= -// function : BindOitDepthPeelingBlendProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindOitDepthPeelingBlendProgram(bool theIsMSAAEnabled) { const Standard_Integer aProgramIdx = theIsMSAAEnabled ? 1 : 0; @@ -1253,10 +1219,8 @@ Standard_Boolean OpenGl_ShaderManager::BindOitDepthPeelingBlendProgram(bool theI return true; } -// ======================================================================= -// function : BindOitDepthPeelingFlushProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindOitDepthPeelingFlushProgram(bool theIsMSAAEnabled) { const Standard_Integer aProgramIdx = theIsMSAAEnabled ? 1 : 0; @@ -1280,10 +1244,8 @@ Standard_Boolean OpenGl_ShaderManager::BindOitDepthPeelingFlushProgram(bool theI return true; } -// ======================================================================= -// function : prepareStdProgramUnlit -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::prepareStdProgramUnlit( Handle(OpenGl_ShaderProgram)& theProgram, Standard_Integer theBits, @@ -1299,10 +1261,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramUnlit( return Standard_True; } -// ======================================================================= -// function : prepareStdProgramGouraud -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::prepareStdProgramGouraud( Handle(OpenGl_ShaderProgram)& theProgram, const Standard_Integer theBits) @@ -1318,10 +1278,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramGouraud( return Standard_True; } -// ======================================================================= -// function : prepareStdProgramPhong -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::prepareStdProgramPhong( Handle(OpenGl_ShaderProgram)& theProgram, const Standard_Integer theBits, @@ -1345,10 +1303,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramPhong( return Standard_True; } -// ======================================================================= -// function : BindStereoProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindStereoProgram(Graphic3d_StereoMode theStereoMode) { if (theStereoMode < 0 || (int)theStereoMode >= Graphic3d_StereoMode_NB) @@ -1377,10 +1333,8 @@ Standard_Boolean OpenGl_ShaderManager::BindStereoProgram(Graphic3d_StereoMode th return true; } -// ======================================================================= -// function : prepareStdProgramBoundBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::prepareStdProgramBoundBox() { Handle(Graphic3d_ShaderProgram) aProgramSrc = Graphic3d_ShaderManager::getStdProgramBoundBox(); @@ -1426,10 +1380,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramBoundBox() return Standard_True; } -// ======================================================================= -// function : preparePBREnvBakingProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::preparePBREnvBakingProgram(Standard_Integer theIndex) { Handle(Graphic3d_ShaderProgram) aProgramSrc = getPBREnvBakingProgram(theIndex); @@ -1478,10 +1430,8 @@ Standard_Boolean OpenGl_ShaderManager::preparePBREnvBakingProgram(Standard_Integ return Standard_True; } -// ======================================================================= -// function : GetBgCubeMapProgram -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgCubeMapProgram() { if (myBgCubeMapProgram.IsNull()) @@ -1491,10 +1441,8 @@ const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgCubeMapProgram return myBgCubeMapProgram; } -// ======================================================================= -// function : GetBgSkydomeProgram -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgSkydomeProgram() { if (myBgSkydomeProgram.IsNull()) @@ -1504,10 +1452,8 @@ const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgSkydomeProgram return myBgSkydomeProgram; } -// ======================================================================= -// function : GetColoredQuadProgram -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetColoredQuadProgram() { if (myColoredQuadProgram.IsNull()) @@ -1517,10 +1463,8 @@ const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetColoredQuadProgr return myColoredQuadProgram; } -// ======================================================================= -// function : bindProgramWithState -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::bindProgramWithState( const Handle(OpenGl_ShaderProgram)& theProgram, Graphic3d_TypeOfShadingModel theShadingModel) @@ -1534,10 +1478,8 @@ Standard_Boolean OpenGl_ShaderManager::bindProgramWithState( return isBound; } -// ======================================================================= -// function : BindMarkerProgram -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderManager::BindMarkerProgram( const Handle(OpenGl_TextureSet)& theTextures, Graphic3d_TypeOfShadingModel theShadingModel, diff --git a/src/OpenGl/OpenGl_ShaderObject.cxx b/src/OpenGl/OpenGl_ShaderObject.cxx index 74eaec7db9..b21180bfa0 100755 --- a/src/OpenGl/OpenGl_ShaderObject.cxx +++ b/src/OpenGl/OpenGl_ShaderObject.cxx @@ -88,10 +88,8 @@ OpenGl_ShaderObject::~OpenGl_ShaderObject() Release(NULL); } -// ======================================================================= -// function : LoadAndCompile -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderObject::LoadAndCompile(const Handle(OpenGl_Context)& theCtx, const TCollection_AsciiString& theId, const TCollection_AsciiString& theSource, @@ -163,10 +161,8 @@ Standard_Boolean OpenGl_ShaderObject::LoadAndCompile(const Handle(OpenGl_Context return true; } -// ======================================================================= -// function : DumpSourceCode -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShaderObject::DumpSourceCode(const Handle(OpenGl_Context)& theCtx, const TCollection_AsciiString& theId, const TCollection_AsciiString& theSource) const @@ -369,10 +365,8 @@ static bool restoreShaderSource(TCollection_AsciiString& theSource, return true; } -// ======================================================================= -// function : updateDebugDump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderObject::updateDebugDump(const Handle(OpenGl_Context)& theCtx, const TCollection_AsciiString& theProgramId, const TCollection_AsciiString& theFolder, diff --git a/src/OpenGl/OpenGl_ShaderProgram.cxx b/src/OpenGl/OpenGl_ShaderProgram.cxx index a33ea92fdc..d9cbc6e531 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.cxx +++ b/src/OpenGl/OpenGl_ShaderProgram.cxx @@ -778,10 +778,8 @@ Standard_Boolean OpenGl_ShaderProgram::link(const Handle(OpenGl_Context)& theCtx return Standard_True; } -// ======================================================================= -// function : Link -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::Link(const Handle(OpenGl_Context)& theCtx, bool theIsVerbose) { if (!theIsVerbose) @@ -959,10 +957,8 @@ Standard_Boolean OpenGl_ShaderProgram::GetAttribute(const Handle(OpenGl_Context) return Standard_True; } -// ======================================================================= -// function : SetAttributeName -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetAttributeName(const Handle(OpenGl_Context)& theCtx, GLint theIndex, const GLchar* theName) @@ -971,10 +967,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetAttributeName(const Handle(OpenGl_Cont return Standard_True; } -// ======================================================================= -// function : SetAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context)& theCtx, GLint theIndex, GLfloat theValue) @@ -988,10 +982,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context) return Standard_True; } -// ======================================================================= -// function : SetAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context)& theCtx, GLint theIndex, const OpenGl_Vec2& theValue) @@ -1005,10 +997,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context) return Standard_True; } -// ======================================================================= -// function : SetAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context)& theCtx, GLint theIndex, const OpenGl_Vec3& theValue) @@ -1022,10 +1012,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context) return Standard_True; } -// ======================================================================= -// function : SetAttribute -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetAttribute(const Handle(OpenGl_Context)& theCtx, GLint theIndex, const OpenGl_Vec4& theValue) @@ -1056,10 +1044,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& return Standard_True; } -// ======================================================================= -// function : SetUniform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& theCtx, GLint theLocation, const OpenGl_Vec2u& theValue) @@ -1089,10 +1075,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& return false; } -// ======================================================================= -// function : SetUniform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& theCtx, const GLchar* theName, const GLsizei theCount, @@ -1101,10 +1085,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& return SetUniform(theCtx, GetUniformLocation(theCtx, theName), theCount, theValue); } -// ======================================================================= -// function : SetUniform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& theCtx, GLint theLocation, const GLsizei theCount, @@ -1253,10 +1235,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& return Standard_True; } -// ======================================================================= -// function : SetUniform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& theCtx, GLint theLocation, GLuint theCount, @@ -1293,10 +1273,8 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& return Standard_True; } -// ======================================================================= -// function : SetUniform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::SetUniform(const Handle(OpenGl_Context)& theCtx, GLint theLocation, GLuint theCount, @@ -1518,10 +1496,8 @@ void OpenGl_ShaderProgram::Release(OpenGl_Context* theCtx) myProgramID = NO_PROGRAM; } -// ======================================================================= -// function : UpdateDebugDump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_ShaderProgram::UpdateDebugDump(const Handle(OpenGl_Context)& theCtx, const TCollection_AsciiString& theFolder, Standard_Boolean theToBeautify, diff --git a/src/OpenGl/OpenGl_ShaderStates.cxx b/src/OpenGl/OpenGl_ShaderStates.cxx index cfe9169cf8..664dd46a11 100755 --- a/src/OpenGl/OpenGl_ShaderStates.cxx +++ b/src/OpenGl/OpenGl_ShaderStates.cxx @@ -15,10 +15,8 @@ #include -// ======================================================================= -// function : OpenGl_StateInterface -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_StateInterface::OpenGl_StateInterface() : myIndex(0) { diff --git a/src/OpenGl/OpenGl_ShadowMap.cxx b/src/OpenGl/OpenGl_ShadowMap.cxx index acda15921c..8a1e305a13 100644 --- a/src/OpenGl/OpenGl_ShadowMap.cxx +++ b/src/OpenGl/OpenGl_ShadowMap.cxx @@ -20,10 +20,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ShadowMap, OpenGl_NamedResource) -// ======================================================================= -// function : OpenGl_ShadowMap -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_ShadowMap::OpenGl_ShadowMap() : OpenGl_NamedResource("shadow_map"), myShadowMapFbo(new OpenGl_FrameBuffer(myResourceId + ":fbo")), @@ -33,55 +31,43 @@ OpenGl_ShadowMap::OpenGl_ShadowMap() // } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShadowMap::Release(OpenGl_Context* theCtx) { myShadowMapFbo->Release(theCtx); } -// ======================================================================= -// function : ~OpenGl_ShadowMap -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_ShadowMap::~OpenGl_ShadowMap() { Release(NULL); } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_ShadowMap::EstimatedDataSize() const { return myShadowMapFbo->EstimatedDataSize(); } -// ======================================================================= -// function : IsValid -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_ShadowMap::IsValid() const { return myShadowMapFbo->IsValid(); } -// ======================================================================= -// function : Texture -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(OpenGl_Texture)& OpenGl_ShadowMap::Texture() const { return myShadowMapFbo->DepthStencilTexture(); } -// ======================================================================= -// function : UpdateCamera -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_ShadowMap::UpdateCamera(const Graphic3d_CView& theView, const gp_XYZ* theOrigin) { // clang-format off @@ -184,10 +170,8 @@ bool OpenGl_ShadowMap::UpdateCamera(const Graphic3d_CView& theView, const gp_XYZ return false; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_ShadowMapArray::Release(OpenGl_Context* theCtx) { for (Standard_Integer anIter = Lower(); anIter <= Upper(); ++anIter) @@ -199,10 +183,8 @@ void OpenGl_ShadowMapArray::Release(OpenGl_Context* theCtx) } } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_ShadowMapArray::EstimatedDataSize() const { Standard_Size aSize = 0; diff --git a/src/OpenGl/OpenGl_StencilTest.cxx b/src/OpenGl/OpenGl_StencilTest.cxx index 44c9f0527b..e03f850793 100755 --- a/src/OpenGl/OpenGl_StencilTest.cxx +++ b/src/OpenGl/OpenGl_StencilTest.cxx @@ -24,10 +24,8 @@ OpenGl_StencilTest::OpenGl_StencilTest() // } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StencilTest::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); @@ -42,37 +40,29 @@ void OpenGl_StencilTest::Render(const Handle(OpenGl_Workspace)& theWorkspace) co } } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StencilTest::Release(OpenGl_Context*) { // } -// ======================================================================= -// function : SetStencilTestState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StencilTest::SetOptions(const Standard_Boolean theIsEnabled) { myIsEnabled = theIsEnabled; } -// ======================================================================= -// function : ~OpenGl_StencilTest -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_StencilTest::~OpenGl_StencilTest() { // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StencilTest::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_StencilTest) diff --git a/src/OpenGl/OpenGl_Structure.cxx b/src/OpenGl/OpenGl_Structure.cxx index 2508964081..be9362129c 100644 --- a/src/OpenGl/OpenGl_Structure.cxx +++ b/src/OpenGl/OpenGl_Structure.cxx @@ -25,10 +25,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Structure, Graphic3d_CStructure) -// ======================================================================= -// function : renderBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::renderBoundingBox(const Handle(OpenGl_Workspace)& theWorkspace) const { if (!myBndBox.IsValid()) @@ -103,10 +101,8 @@ void OpenGl_Structure::renderBoundingBox(const Handle(OpenGl_Workspace)& theWork aCtx->BindTextures(aPrevTexture, Handle(OpenGl_ShaderProgram)()); } -// ======================================================================= -// function : OpenGl_Structure -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Structure::OpenGl_Structure(const Handle(Graphic3d_StructureManager)& theManager) : Graphic3d_CStructure(theManager), myInstancedStructure(NULL), @@ -117,29 +113,23 @@ OpenGl_Structure::OpenGl_Structure(const Handle(Graphic3d_StructureManager)& the updateLayerTransformation(); } -// ======================================================================= -// function : ~OpenGl_Structure -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Structure::~OpenGl_Structure() { Release(Handle(OpenGl_Context)()); } -// ======================================================================= -// function : SetZLayer -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::SetZLayer(const Graphic3d_ZLayerId theLayerIndex) { Graphic3d_CStructure::SetZLayer(theLayerIndex); updateLayerTransformation(); } -// ======================================================================= -// function : SetTransformation -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::SetTransformation(const Handle(TopLoc_Datum3D)& theTrsf) { myTrsf = theTrsf; @@ -165,10 +155,8 @@ void OpenGl_Structure::SetTransformation(const Handle(TopLoc_Datum3D)& theTrsf) } } -// ======================================================================= -// function : SetTransformPersistence -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::SetTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers) { if ((myTrsfPers.IsNull() || theTrsfPers.IsNull()) && myTrsfPers != theTrsfPers) @@ -179,10 +167,8 @@ void OpenGl_Structure::SetTransformPersistence(const Handle(Graphic3d_TransformP updateLayerTransformation(); } -// ======================================================================= -// function : updateLayerTransformation -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::updateLayerTransformation() { gp_Trsf aRenderTrsf; @@ -199,30 +185,24 @@ void OpenGl_Structure::updateLayerTransformation() aRenderTrsf.GetMat4(myRenderTrsf); } -// ======================================================================= -// function : GraphicHighlight -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::GraphicHighlight(const Handle(Graphic3d_PresentationAttributes)& theStyle) { myHighlightStyle = theStyle; highlight = 1; } -// ======================================================================= -// function : GraphicUnhighlight -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::GraphicUnhighlight() { highlight = 0; myHighlightStyle.Nullify(); } -// ======================================================================= -// function : OnVisibilityChanged -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::OnVisibilityChanged() { if (IsRaytracable()) @@ -231,10 +211,8 @@ void OpenGl_Structure::OnVisibilityChanged() } } -// ======================================================================= -// function : IsRaytracable -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Structure::IsRaytracable() const { if (!myGroups.IsEmpty() && myIsRaytracable && myTrsfPers.IsNull()) @@ -245,10 +223,8 @@ Standard_Boolean OpenGl_Structure::IsRaytracable() const return myInstancedStructure != NULL && myInstancedStructure->IsRaytracable(); } -// ======================================================================= -// function : UpdateRaytracableState -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::UpdateStateIfRaytracable(const Standard_Boolean toCheck) const { myIsRaytracable = !toCheck; @@ -270,10 +246,8 @@ void OpenGl_Structure::UpdateStateIfRaytracable(const Standard_Boolean toCheck) } } -// ======================================================================= -// function : Connect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Connect(Graphic3d_CStructure& theStructure) { OpenGl_Structure* aStruct = static_cast(&theStructure); @@ -289,10 +263,8 @@ void OpenGl_Structure::Connect(Graphic3d_CStructure& theStructure) } } -// ======================================================================= -// function : Disconnect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Disconnect(Graphic3d_CStructure& theStructure) { OpenGl_Structure* aStruct = static_cast(&theStructure); @@ -308,10 +280,8 @@ void OpenGl_Structure::Disconnect(Graphic3d_CStructure& theStructure) } } -// ======================================================================= -// function : NewGroup -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_Group) OpenGl_Structure::NewGroup(const Handle(Graphic3d_Structure)& theStruct) { Handle(OpenGl_Group) aGroup = new OpenGl_Group(theStruct); @@ -319,10 +289,8 @@ Handle(Graphic3d_Group) OpenGl_Structure::NewGroup(const Handle(Graphic3d_Struct return aGroup; } -// ======================================================================= -// function : RemoveGroup -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::RemoveGroup(const Handle(Graphic3d_Group)& theGroup) { if (theGroup.IsNull()) @@ -352,19 +320,15 @@ void OpenGl_Structure::RemoveGroup(const Handle(Graphic3d_Group)& theGroup) } } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Clear() { Clear(GlDriver()->GetSharedContext()); } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Clear(const Handle(OpenGl_Context)& theGlCtx) { Standard_Boolean aRaytracableGroupDeleted(Standard_False); @@ -388,10 +352,8 @@ void OpenGl_Structure::Clear(const Handle(OpenGl_Context)& theGlCtx) IsForHighlight = Standard_False; } -// ======================================================================= -// function : renderGeometry -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::renderGeometry(const Handle(OpenGl_Workspace)& theWorkspace, bool& theHasClosed) const { @@ -435,10 +397,8 @@ void OpenGl_Structure::renderGeometry(const Handle(OpenGl_Workspace)& theWorkspa } } -// ======================================================================= -// function : applyTransformation -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::applyTransformation(const Handle(OpenGl_Context)& theContext, const gp_Trsf& theTrsf, const Standard_Boolean toEnable) const @@ -459,10 +419,8 @@ void OpenGl_Structure::applyTransformation(const Handle(OpenGl_Context)& theCont } } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { // Process the structure only if visible @@ -669,10 +627,8 @@ void OpenGl_Structure::Render(const Handle(OpenGl_Workspace)& theWorkspace) cons theWorkspace->SetHighlightStyle(Handle(Graphic3d_PresentationAttributes)()); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::Release(const Handle(OpenGl_Context)& theGlCtx) { // Release groups @@ -680,10 +636,8 @@ void OpenGl_Structure::Release(const Handle(OpenGl_Context)& theGlCtx) myHighlightStyle.Nullify(); } -// ======================================================================= -// function : ReleaseGlResources -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::ReleaseGlResources(const Handle(OpenGl_Context)& theGlCtx) { for (OpenGl_Structure::GroupIterator aGroupIter(myGroups); aGroupIter.More(); aGroupIter.Next()) @@ -700,10 +654,8 @@ Handle(Graphic3d_CStructure) OpenGl_Structure::ShadowLink( return new OpenGl_StructureShadow(theManager, this); } -// ======================================================================= -// function : applyPersistence -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::applyPersistence(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_TransformPers)& theTrsfPers, const Standard_Boolean theIsLocal, @@ -757,10 +709,8 @@ void OpenGl_Structure::applyPersistence(const Handle(OpenGl_Context)& t } } -// ======================================================================= -// function : revertPersistence -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Structure::revertPersistence(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_TransformPers)& theTrsfPers, const Standard_Boolean theIsLocal, diff --git a/src/OpenGl/OpenGl_StructureShadow.cxx b/src/OpenGl/OpenGl_StructureShadow.cxx index 80c46beeb6..0819edaa0a 100644 --- a/src/OpenGl/OpenGl_StructureShadow.cxx +++ b/src/OpenGl/OpenGl_StructureShadow.cxx @@ -40,19 +40,15 @@ OpenGl_StructureShadow::OpenGl_StructureShadow(const Handle(Graphic3d_StructureM myInstancedStructure = myParent.operator->(); } -// ======================================================================= -// function : Connect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StructureShadow::Connect(Graphic3d_CStructure&) { throw Standard_ProgramError("Error! OpenGl_StructureShadow::Connect() should not be called!"); } -// ======================================================================= -// function : Disconnect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_StructureShadow::Disconnect(Graphic3d_CStructure&) { throw Standard_ProgramError("Error! OpenGl_StructureShadow::Disconnect() should not be called!"); diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index 6198aa4dd4..e8f1291de0 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -68,10 +68,8 @@ private: } // anonymous namespace -// ======================================================================= -// function : OpenGl_Text -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Text::OpenGl_Text() : myScaleHeight(1.0f), myIs2d(Standard_False) @@ -79,10 +77,8 @@ OpenGl_Text::OpenGl_Text() myText = new Graphic3d_Text(10.); } -// ======================================================================= -// function : OpenGl_Text -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Text::OpenGl_Text(const Handle(Graphic3d_Text)& theTextParams) : myText(theTextParams), myScaleHeight(1.0f), @@ -90,19 +86,15 @@ OpenGl_Text::OpenGl_Text(const Handle(Graphic3d_Text)& theTextParams) { } -// ======================================================================= -// function : SetPosition -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::SetPosition(const OpenGl_Vec3& thePoint) { myText->SetPosition(gp_Pnt(thePoint.x(), thePoint.y(), thePoint.z())); } -// ======================================================================= -// function : SetFontSize -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::SetFontSize(const Handle(OpenGl_Context)& theCtx, const Standard_Integer theFontSize) { @@ -113,10 +105,8 @@ void OpenGl_Text::SetFontSize(const Handle(OpenGl_Context)& theCtx, myText->SetHeight((Standard_ShortReal)theFontSize); } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::Reset(const Handle(OpenGl_Context)& theCtx) { if (!myFont.IsNull() && myFont->FTFont()->PointSize() != myText->Height()) @@ -129,10 +119,8 @@ void OpenGl_Text::Reset(const Handle(OpenGl_Context)& theCtx) } } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::Init(const Handle(OpenGl_Context)& theCtx, const Standard_Utf8Char* theText, const OpenGl_Vec3& thePoint) @@ -146,19 +134,15 @@ void OpenGl_Text::Init(const Handle(OpenGl_Context)& theCtx, myText->SetPosition(gp_Pnt(thePoint.x(), thePoint.y(), thePoint.z())); } -// ======================================================================= -// function : ~OpenGl_Text -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Text::~OpenGl_Text() { // } -// ======================================================================= -// function : releaseVbos -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::releaseVbos(OpenGl_Context* theCtx) { for (Standard_Integer anIter = 0; anIter < myVertsVbo.Length(); ++anIter) @@ -185,10 +169,8 @@ void OpenGl_Text::releaseVbos(OpenGl_Context* theCtx) myBndVertsVbo.Nullify(); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::Release(OpenGl_Context* theCtx) { releaseVbos(theCtx); @@ -203,10 +185,8 @@ void OpenGl_Text::Release(OpenGl_Context* theCtx) } } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_Text::EstimatedDataSize() const { Standard_Size aSize = 0; @@ -228,10 +208,8 @@ Standard_Size OpenGl_Text::EstimatedDataSize() const return aSize; } -// ======================================================================= -// function : UpdateDrawStats -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::UpdateDrawStats(Graphic3d_FrameStatsDataTmp& theStats, bool theIsDetailed) const { ++theStats[Graphic3d_FrameStatsCounter_NbElemsNotCulled]; @@ -249,10 +227,8 @@ void OpenGl_Text::UpdateDrawStats(Graphic3d_FrameStatsDataTmp& theStats, bool th } } -// ======================================================================= -// function : StringSize -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::StringSize(const Handle(OpenGl_Context)& theCtx, const NCollection_String& theText, const OpenGl_Aspects& theTextAspect, @@ -322,10 +298,8 @@ void OpenGl_Text::StringSize(const Handle(OpenGl_Context)& theCtx, aCtx->ReleaseResource(aFontKey, Standard_True); } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::Render(const Handle(OpenGl_Workspace)& theWorkspace) const { // clang-format off @@ -370,10 +344,8 @@ void OpenGl_Text::Render(const Handle(OpenGl_Workspace)& theWorkspace) const } } -// ======================================================================= -// function : Render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::Render(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theTextAspect, unsigned int theResolution, @@ -393,10 +365,8 @@ void OpenGl_Text::Render(const Handle(OpenGl_Context)& theCtx, theCtx->SetPolygonHatchEnabled(aPrevHatchingMode); } -// ======================================================================= -// function : setupMatrix -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::setupMatrix(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theTextAspect, const OpenGl_Vec3& theDVec) const @@ -529,10 +499,8 @@ void OpenGl_Text::setupMatrix(const Handle(OpenGl_Context)& theCtx, theCtx->ShaderManager()->PushState(theCtx->ActiveProgram()); } -// ======================================================================= -// function : drawText -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::drawText(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theTextAspect) const { @@ -560,10 +528,8 @@ void OpenGl_Text::drawText(const Handle(OpenGl_Context)& theCtx, theCtx->core11fwd->glBindTexture(GL_TEXTURE_2D, 0); } -// ======================================================================= -// function : FontKey -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_Text::FontKey(const OpenGl_Aspects& theAspect, Standard_Integer theHeight, unsigned int theResolution, @@ -586,10 +552,8 @@ TCollection_AsciiString OpenGl_Text::FontKey(const OpenGl_Aspects& theAspect, return aFont + aSuff; } -// ======================================================================= -// function : FindFont -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_Font) OpenGl_Text::FindFont(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theAspect, Standard_Integer theHeight, @@ -649,10 +613,8 @@ Handle(OpenGl_Font) OpenGl_Text::FindFont(const Handle(OpenGl_Context)& theCtx, return aFont; } -// ======================================================================= -// function : drawRect -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::drawRect(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theTextAspect, const OpenGl_Vec4& theColorSubs) const @@ -698,10 +660,8 @@ void OpenGl_Text::drawRect(const Handle(OpenGl_Context)& theCtx, theCtx->BindProgram(aPrevProgram); } -// ======================================================================= -// function : render -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::render(const Handle(OpenGl_Context)& theCtx, const OpenGl_Aspects& theTextAspect, const OpenGl_Vec4& theColorText, @@ -951,10 +911,8 @@ void OpenGl_Text::render(const Handle(OpenGl_Context)& theCtx, theCtx->ApplyModelViewMatrix(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Text::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_CLASS_BEGIN(theOStream, OpenGl_Text) diff --git a/src/OpenGl/OpenGl_TextBuilder.cxx b/src/OpenGl/OpenGl_TextBuilder.cxx index c20761736e..b8d4365799 100644 --- a/src/OpenGl/OpenGl_TextBuilder.cxx +++ b/src/OpenGl/OpenGl_TextBuilder.cxx @@ -32,19 +32,15 @@ inline OpenGl_Vec2& floor(OpenGl_Vec2& theVec) } } // namespace -// ======================================================================= -// function : OpenGl_TextBuilder -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextBuilder::OpenGl_TextBuilder() { // } -// ======================================================================= -// function : createGlyphs -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_TextBuilder::createGlyphs( const Handle(Font_TextFormatter)& theFormatter, const Handle(OpenGl_Context)& theCtx, @@ -112,10 +108,8 @@ void OpenGl_TextBuilder::createGlyphs( } } -// ======================================================================= -// function : CreateTextures -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_TextBuilder::Perform( const Handle(Font_TextFormatter)& theFormatter, const Handle(OpenGl_Context)& theCtx, diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 40b3a4e287..759938b8c2 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -93,10 +93,8 @@ static Graphic3d_Vec2i computeSmallestMipMapSize(const Graphic3d_Vec2i& theBaseS } // namespace -// ======================================================================= -// function : OpenGl_Texture -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Texture::OpenGl_Texture(const TCollection_AsciiString& theResourceId, const Handle(Graphic3d_TextureParams)& theParams) : OpenGl_NamedResource(theResourceId), @@ -114,19 +112,15 @@ OpenGl_Texture::OpenGl_Texture(const TCollection_AsciiString& theResourc // } -// ======================================================================= -// function : ~OpenGl_Texture -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Texture::~OpenGl_Texture() { Release(NULL); } -// ======================================================================= -// function : Create -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Create(const Handle(OpenGl_Context)& theCtx) { if (myTextureId != NO_TEXTURE) @@ -144,10 +138,8 @@ bool OpenGl_Texture::Create(const Handle(OpenGl_Context)& theCtx) return true; } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Texture::Release(OpenGl_Context* theGlCtx) { mySampler->Release(theGlCtx); @@ -169,10 +161,8 @@ void OpenGl_Texture::Release(OpenGl_Context* theGlCtx) mySize.SetValues(0, 0, 0); } -// ======================================================================= -// function : applyDefaultSamplerParams -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Texture::applyDefaultSamplerParams(const Handle(OpenGl_Context)& theCtx) { OpenGl_Sampler::applySamplerParams(theCtx, @@ -190,10 +180,8 @@ void OpenGl_Texture::applyDefaultSamplerParams(const Handle(OpenGl_Context)& the } } -// ======================================================================= -// function : Bind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Texture::Bind(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TextureUnit theTextureUnit) const { @@ -205,10 +193,8 @@ void OpenGl_Texture::Bind(const Handle(OpenGl_Context)& theCtx, theCtx->core11fwd->glBindTexture(myTarget, myTextureId); } -// ======================================================================= -// function : Unbind -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Texture::Unbind(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TextureUnit theTextureUnit) const { @@ -227,10 +213,8 @@ bool OpenGl_Texture::InitSamplerObject(const Handle(OpenGl_Context)& theCtx) return myTextureId != NO_TEXTURE && mySampler->Init(theCtx, *this); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, const OpenGl_TextureFormat& theFormat, const Graphic3d_Vec3i& theSizeXYZ, @@ -645,10 +629,8 @@ bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : GenerateMipmaps -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::GenerateMipmaps(const Handle(OpenGl_Context)& theCtx) { if (theCtx->arbFBO == nullptr || !IsValid()) @@ -730,10 +712,8 @@ bool OpenGl_Texture::GenerateMipmaps(const Handle(OpenGl_Context)& theCtx) return true; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, const Image_PixMap& theImage, const Graphic3d_TypeOfTexture theType, @@ -763,10 +743,8 @@ bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, return Init(theCtx, aFormat, Graphic3d_Vec3i(theImage.SizeXYZ()), theType, &theImage); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_TextureRoot)& theTextureMap) { @@ -814,10 +792,8 @@ bool OpenGl_Texture::Init(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : InitCompressed -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::InitCompressed(const Handle(OpenGl_Context)& theCtx, const Image_CompressedPixMap& theImage, const Standard_Boolean theIsColorMap) @@ -947,10 +923,8 @@ bool OpenGl_Texture::InitCompressed(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : Init2DMultisample -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Init2DMultisample(const Handle(OpenGl_Context)& theCtx, const Standard_Integer theNbSamples, const Standard_Integer theTextFormat, @@ -1035,10 +1009,8 @@ bool OpenGl_Texture::Init2DMultisample(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : InitRectangle -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::InitRectangle(const Handle(OpenGl_Context)& theCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, @@ -1108,10 +1080,8 @@ bool OpenGl_Texture::InitRectangle(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : Init3D -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::Init3D(const Handle(OpenGl_Context)& theCtx, const OpenGl_TextureFormat& theFormat, const Graphic3d_Vec3i& theSizeXYZ, @@ -1230,10 +1200,8 @@ bool OpenGl_Texture::Init3D(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : InitCubeMap -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::InitCubeMap(const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_CubeMap)& theCubeMap, Standard_Size theSize, @@ -1533,10 +1501,8 @@ bool OpenGl_Texture::InitCubeMap(const Handle(OpenGl_Context)& theCtx, return true; } -// ======================================================================= -// function : PixelSizeOfPixelFormat -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_Texture::PixelSizeOfPixelFormat(Standard_Integer theInternalFormat) { switch (theInternalFormat) @@ -1617,10 +1583,8 @@ Standard_Size OpenGl_Texture::PixelSizeOfPixelFormat(Standard_Integer theInterna return 1; } -// ======================================================================= -// function : EstimatedDataSize -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Size OpenGl_Texture::EstimatedDataSize() const { if (!IsValid()) @@ -1648,10 +1612,8 @@ Standard_Size OpenGl_Texture::EstimatedDataSize() const return aSize; } -// ======================================================================= -// function : ImageDump -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Texture::ImageDump(Image_PixMap& theImage, const Handle(OpenGl_Context)& theCtx, Graphic3d_TextureUnit theTexUnit, diff --git a/src/OpenGl/OpenGl_TextureBuffer.cxx b/src/OpenGl/OpenGl_TextureBuffer.cxx index 9f44967302..ab3717f3bf 100644 --- a/src/OpenGl/OpenGl_TextureBuffer.cxx +++ b/src/OpenGl/OpenGl_TextureBuffer.cxx @@ -21,10 +21,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_TextureBuffer, OpenGl_Buffer) -// ======================================================================= -// function : OpenGl_TextureBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureBuffer::OpenGl_TextureBuffer() : OpenGl_Buffer(), myTextureId(NO_TEXTURE), @@ -33,28 +31,22 @@ OpenGl_TextureBuffer::OpenGl_TextureBuffer() // } -// ======================================================================= -// function : ~OpenGl_TextureBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureBuffer::~OpenGl_TextureBuffer() { Release(NULL); } -// ======================================================================= -// function : GetTarget -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_TextureBuffer::GetTarget() const { return GL_TEXTURE_BUFFER; // GL_TEXTURE_BUFFER for OpenGL 3.1+, OpenGL ES 3.2 } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_TextureBuffer::Release(OpenGl_Context* theGlCtx) { if (myTextureId != NO_TEXTURE) @@ -73,10 +65,8 @@ void OpenGl_TextureBuffer::Release(OpenGl_Context* theGlCtx) base_type::Release(theGlCtx); } -// ======================================================================= -// function : Create -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureBuffer::Create(const Handle(OpenGl_Context)& theGlCtx) { if (!base_type::Create(theGlCtx)) @@ -91,10 +81,8 @@ bool OpenGl_TextureBuffer::Create(const Handle(OpenGl_Context)& theGlCtx) return myTextureId != NO_TEXTURE; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -142,10 +130,8 @@ bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, return true; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -193,10 +179,8 @@ bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, return true; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -240,10 +224,8 @@ bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, return true; } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theComponentsNb, const Standard_Integer theElemsNb, @@ -287,10 +269,8 @@ bool OpenGl_TextureBuffer::Init(const Handle(OpenGl_Context)& theGlCtx, return true; } -// ======================================================================= -// function : BindTexture -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_TextureBuffer::BindTexture(const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_TextureUnit theTextureUnit) const { @@ -298,10 +278,8 @@ void OpenGl_TextureBuffer::BindTexture(const Handle(OpenGl_Context)& theGlCtx, theGlCtx->core20fwd->glBindTexture(GetTarget(), myTextureId); } -// ======================================================================= -// function : UnbindTexture -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_TextureBuffer::UnbindTexture(const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_TextureUnit theTextureUnit) const { diff --git a/src/OpenGl/OpenGl_TextureFormat.cxx b/src/OpenGl/OpenGl_TextureFormat.cxx index 04c985a518..ec3882a422 100644 --- a/src/OpenGl/OpenGl_TextureFormat.cxx +++ b/src/OpenGl/OpenGl_TextureFormat.cxx @@ -16,10 +16,8 @@ #include #include -// ======================================================================= -// function : FormatFormat -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_TextureFormat::FormatFormat(GLint theInternalFormat) { switch (theInternalFormat) @@ -154,10 +152,8 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatFormat(GLint theInternalForm return OpenGl_Context::FormatGlEnumHex(theInternalFormat); } -// ======================================================================= -// function : FormatDataType -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString OpenGl_TextureFormat::FormatDataType(GLint theDataType) { switch (theDataType) @@ -186,10 +182,8 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatDataType(GLint theDataType) return OpenGl_Context::FormatGlEnumHex(theDataType); } -// ======================================================================= -// function : FindFormat -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat(const Handle(OpenGl_Context)& theCtx, Image_Format theFormat, bool theIsColorMap) @@ -522,10 +516,8 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat(const Handle(OpenGl_Contex return OpenGl_TextureFormat(); } -// ======================================================================= -// function : FindSizedFormat -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat(const Handle(OpenGl_Context)& theCtx, GLint theSizedFormat) { @@ -713,10 +705,8 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat(const Handle(OpenGl_C return aFormat; } -// ======================================================================= -// function : FindCompressedFormat -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureFormat OpenGl_TextureFormat::FindCompressedFormat( const Handle(OpenGl_Context)& theCtx, Image_CompressedFormat theFormat, diff --git a/src/OpenGl/OpenGl_TextureSet.cxx b/src/OpenGl/OpenGl_TextureSet.cxx index 9fd8bfeaa2..398f6a6f14 100644 --- a/src/OpenGl/OpenGl_TextureSet.cxx +++ b/src/OpenGl/OpenGl_TextureSet.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_TextureSet, Standard_Transient) -// ======================================================================= -// function : OpenGl_TextureSet -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_TextureSet::OpenGl_TextureSet(const Handle(OpenGl_Texture)& theTexture) : myTextures(0, 0), myTextureSetBits(Graphic3d_TextureSetBits_NONE) @@ -33,20 +31,16 @@ OpenGl_TextureSet::OpenGl_TextureSet(const Handle(OpenGl_Texture)& theTexture) } } -// ======================================================================= -// function : IsModulate -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureSet::IsModulate() const { return myTextures.IsEmpty() || myTextures.First().Texture.IsNull() || myTextures.First().Texture->Sampler()->Parameters()->IsModulate(); } -// ======================================================================= -// function : HasNonPointSprite -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureSet::HasNonPointSprite() const { if (myTextures.IsEmpty()) @@ -60,10 +54,8 @@ bool OpenGl_TextureSet::HasNonPointSprite() const return !myTextures.First().Texture.IsNull(); } -// ======================================================================= -// function : HasPointSprite -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_TextureSet::HasPointSprite() const { return !myTextures.IsEmpty() && !myTextures.Last().Texture.IsNull() diff --git a/src/OpenGl/OpenGl_UniformBuffer.cxx b/src/OpenGl/OpenGl_UniformBuffer.cxx index b82deed6df..02a75d8985 100644 --- a/src/OpenGl/OpenGl_UniformBuffer.cxx +++ b/src/OpenGl/OpenGl_UniformBuffer.cxx @@ -18,19 +18,15 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_UniformBuffer, OpenGl_Buffer) -// ======================================================================= -// function : OpenGl_UniformBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_UniformBuffer::OpenGl_UniformBuffer() : OpenGl_Buffer() { } -// ======================================================================= -// function : GetTarget -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_UniformBuffer::GetTarget() const { return GL_UNIFORM_BUFFER; diff --git a/src/OpenGl/OpenGl_VertexBuffer.cxx b/src/OpenGl/OpenGl_VertexBuffer.cxx index 83ac79d44c..326a25f0e4 100644 --- a/src/OpenGl/OpenGl_VertexBuffer.cxx +++ b/src/OpenGl/OpenGl_VertexBuffer.cxx @@ -18,37 +18,29 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_VertexBuffer, OpenGl_Buffer) -// ======================================================================= -// function : OpenGl_VertexBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_VertexBuffer::OpenGl_VertexBuffer() { // } -// ======================================================================= -// function : ~OpenGl_VertexBuffer -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_VertexBuffer::~OpenGl_VertexBuffer() { // } -// ======================================================================= -// function : GetTarget -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_VertexBuffer::GetTarget() const { return GL_ARRAY_BUFFER; } -// ======================================================================= -// function : BindVertexAttrib -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::BindVertexAttrib(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theAttribLoc) const { @@ -62,10 +54,8 @@ void OpenGl_VertexBuffer::BindVertexAttrib(const Handle(OpenGl_Context)& theGlCt ->glVertexAttribPointer(theAttribLoc, GLint(myComponentsNb), myDataType, GL_FALSE, 0, myOffset); } -// ======================================================================= -// function : UnbindVertexAttrib -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::UnbindVertexAttrib(const Handle(OpenGl_Context)& theGlCtx, const unsigned int theAttribLoc) const { @@ -77,55 +67,43 @@ void OpenGl_VertexBuffer::UnbindVertexAttrib(const Handle(OpenGl_Context)& theGl Unbind(theGlCtx); } -// ======================================================================= -// function : BindAllAttributes -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::BindAllAttributes(const Handle(OpenGl_Context)&) const { // } -// ======================================================================= -// function : BindPositionAttribute -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::BindPositionAttribute(const Handle(OpenGl_Context)&) const { // } -// ======================================================================= -// function : UnbindAllAttributes -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::UnbindAllAttributes(const Handle(OpenGl_Context)&) const { // } -// ======================================================================= -// function : HasColorAttribute -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_VertexBuffer::HasColorAttribute() const { return false; } -// ======================================================================= -// function : HasNormalAttribute -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_VertexBuffer::HasNormalAttribute() const { return false; } -// ======================================================================= -// function : bindAttribute -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::bindAttribute(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TypeOfAttribute theAttribute, const Standard_Integer theNbComp, @@ -159,10 +137,8 @@ void OpenGl_VertexBuffer::bindAttribute(const Handle(OpenGl_Context)& theCtx, theOffset); } -// ======================================================================= -// function : unbindAttribute -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::unbindAttribute(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TypeOfAttribute theAttribute) { @@ -178,10 +154,8 @@ void OpenGl_VertexBuffer::unbindAttribute(const Handle(OpenGl_Context)& theCtx theCtx->core20fwd->glDisableVertexAttribArray(theAttribute); } -// ======================================================================= -// function : bindFixed -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::bindFixed(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TypeOfAttribute theMode, const Standard_Integer theNbComp, @@ -219,10 +193,8 @@ void OpenGl_VertexBuffer::bindFixed(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : unbindFixed -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::unbindFixed(const Handle(OpenGl_Context)& theCtx, const Graphic3d_TypeOfAttribute theMode) { @@ -246,10 +218,8 @@ void OpenGl_VertexBuffer::unbindFixed(const Handle(OpenGl_Context)& theCtx, } } -// ======================================================================= -// function : unbindFixedColor -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_VertexBuffer::unbindFixedColor(const Handle(OpenGl_Context)& theCtx) { theCtx->core11ffp->glDisableClientState(GL_COLOR_ARRAY); diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 3ff6873441..3bb304f6d1 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -102,10 +102,8 @@ static bool chooseOitColorConfiguration(const Handle(OpenGl_Context)& theGlConte IMPLEMENT_STANDARD_RTTIEXT(OpenGl_View, Graphic3d_CView) -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_View::OpenGl_View(const Handle(Graphic3d_StructureManager)& theMgr, const Handle(OpenGl_GraphicDriver)& theDriver, const Handle(OpenGl_Caps)& theCaps, @@ -188,10 +186,8 @@ OpenGl_View::OpenGl_View(const Handle(Graphic3d_StructureManager)& theMgr, myXrSceneFbo->ColorTexture()->Sampler()->Parameters()->SetFilter(Graphic3d_TOTF_BILINEAR); } -// ======================================================================= -// function : Destructor -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_View::~OpenGl_View() { ReleaseGlResources(NULL); // ensure ReleaseGlResources() was called within valid context @@ -205,10 +201,8 @@ OpenGl_View::~OpenGl_View() OpenGl_Element::Destroy(NULL, myColoredQuadParams); } -// ======================================================================= -// function : releaseSrgbResources -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::releaseSrgbResources(const Handle(OpenGl_Context)& theCtx) { myRenderParams.RebuildRayTracingShaders = true; @@ -266,10 +260,8 @@ void OpenGl_View::releaseSrgbResources(const Handle(OpenGl_Context)& theCtx) // and re-create dynamically only frame buffers. } -// ======================================================================= -// function : ReleaseGlResources -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx) { myGraduatedTrihedron.Release(theCtx.get()); @@ -286,10 +278,8 @@ void OpenGl_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx) ReleaseXR(); } -// ======================================================================= -// function : Remove -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::Remove() { if (IsRemoved()) @@ -303,10 +293,8 @@ void OpenGl_View::Remove() Graphic3d_CView::Remove(); } -// ======================================================================= -// function : SetLocalOrigin -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetLocalOrigin(const gp_XYZ& theOrigin) { myLocalOrigin = theOrigin; @@ -317,10 +305,8 @@ void OpenGl_View::SetLocalOrigin(const gp_XYZ& theOrigin) } } -// ======================================================================= -// function : SetTextureEnv -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetTextureEnv(const Handle(Graphic3d_TextureEnv)& theTextureEnv) { Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext(); @@ -340,10 +326,8 @@ void OpenGl_View::SetTextureEnv(const Handle(Graphic3d_TextureEnv)& theTextureEn initTextureEnv(aCtx); } -// ======================================================================= -// function : initTextureEnv -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::initTextureEnv(const Handle(OpenGl_Context)& theContext) { if (myTextureEnvData.IsNull() || theContext.IsNull() || !theContext->MakeCurrent()) @@ -359,10 +343,8 @@ void OpenGl_View::initTextureEnv(const Handle(OpenGl_Context)& theContext) myTextureEnv->ChangeTextureSetBits() = Graphic3d_TextureSetBits_BaseColor; } -// ======================================================================= -// function : SetImmediateModeDrawToFront -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::SetImmediateModeDrawToFront( const Standard_Boolean theDrawToFrontBuffer) { @@ -371,19 +353,15 @@ Standard_Boolean OpenGl_View::SetImmediateModeDrawToFront( return aPrevMode; } -// ======================================================================= -// function : Window -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Aspect_Window) OpenGl_View::Window() const { return myWindow->SizeWindow(); } -// ======================================================================= -// function : SetWindow -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew, const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) @@ -454,10 +432,8 @@ void OpenGl_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew, initTextureEnv(aCtx); } -// ======================================================================= -// function : Resized -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::Resized() { base_type::Resized(); @@ -467,10 +443,8 @@ void OpenGl_View::Resized() } } -// ======================================================================= -// function : SetMinMaxValuesCallback -// purpose : -// ======================================================================= +//================================================================================================= + static void SetMinMaxValuesCallback(Graphic3d_CView* theView) { OpenGl_View* aView = dynamic_cast(theView); @@ -493,10 +467,8 @@ static void SetMinMaxValuesCallback(Graphic3d_CView* theView) } } -// ======================================================================= -// function : GraduatedTrihedronDisplay -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::GraduatedTrihedronDisplay(const Graphic3d_GraduatedTrihedron& theTrihedronData) { myGTrihedronData = theTrihedronData; @@ -505,30 +477,24 @@ void OpenGl_View::GraduatedTrihedronDisplay(const Graphic3d_GraduatedTrihedron& myToShowGradTrihedron = true; } -// ======================================================================= -// function : GraduatedTrihedronErase -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::GraduatedTrihedronErase() { myGraduatedTrihedron.Release(myWorkspace->GetGlContext().operator->()); myToShowGradTrihedron = false; } -// ======================================================================= -// function : GraduatedTrihedronMinMaxValues -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::GraduatedTrihedronMinMaxValues(const Graphic3d_Vec3 theMin, const Graphic3d_Vec3 theMax) { myGraduatedTrihedron.SetMinMax(theMin, theMax); } -// ======================================================================= -// function : BufferDump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::BufferDump(Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) { @@ -666,10 +632,8 @@ Standard_Boolean OpenGl_View::ShadowMapDump(Image_PixMap& theIm return Standard_False; } -// ======================================================================= -// function : GradientBackground -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_GradientBackground OpenGl_View::GradientBackground() const { Quantity_Color aColor1, aColor2; @@ -686,10 +650,8 @@ Aspect_GradientBackground OpenGl_View::GradientBackground() const myBackgrounds[Graphic3d_TOB_GRADIENT]->GradientFillMethod()); } -// ======================================================================= -// function : SetGradientBackground -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetGradientBackground(const Aspect_GradientBackground& theBackground) { Quantity_Color aColor1, aColor2; @@ -712,10 +674,8 @@ void OpenGl_View::SetGradientBackground(const Aspect_GradientBackground& theBack myBackgroundType = Graphic3d_TOB_GRADIENT; } -// ======================================================================= -// function : SetBackgroundImage -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetBackgroundImage(const Handle(Graphic3d_TextureMap)& theTextureMap, Standard_Boolean theToUpdatePBREnv) { @@ -793,10 +753,8 @@ void OpenGl_View::SetBackgroundImage(const Handle(Graphic3d_TextureMap)& theText "OpenGl_View::SetBackgroundImage() - invalid texture map set for background"); } -// ======================================================================= -// function : SetImageBasedLighting -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetImageBasedLighting(Standard_Boolean theToEnableIBL) { if (!theToEnableIBL || myBackgroundType != Graphic3d_TOB_CUBEMAP) @@ -820,28 +778,22 @@ void OpenGl_View::SetImageBasedLighting(Standard_Boolean theToEnableIBL) myCubeMapIBL = myCubeMapBackground; } -// ======================================================================= -// function : BackgroundImageStyle -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_FillMethod OpenGl_View::BackgroundImageStyle() const { return myBackgrounds[Graphic3d_TOB_TEXTURE]->TextureFillMethod(); } -// ======================================================================= -// function : SetBackgroundImageStyle -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::SetBackgroundImageStyle(const Aspect_FillMethod theFillStyle) { myBackgrounds[Graphic3d_TOB_TEXTURE]->SetTextureFillMethod(theFillStyle); } -// ======================================================================= -// function : SpecIBLMapLevels -// purpose : -// ======================================================================= +//================================================================================================= + unsigned int OpenGl_View::SpecIBLMapLevels() const { return myPBREnvironment.IsNull() ? 0 : myPBREnvironment->SpecMapLevelsNumber(); @@ -2058,10 +2010,8 @@ void OpenGl_View::Redraw() myWasRedrawnGL = Standard_True; } -// ======================================================================= -// function : RedrawImmediate -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::RedrawImmediate() { if (!myWorkspace->Activate()) @@ -2217,10 +2167,8 @@ void OpenGl_View::RedrawImmediate() myWasRedrawnGL = Standard_True; } -// ======================================================================= -// function : redraw -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::redraw(const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer* theReadDrawFbo, OpenGl_FrameBuffer* theOitAccumFbo) @@ -2263,10 +2211,8 @@ void OpenGl_View::redraw(const Graphic3d_Camera::Projection theProjection, render(theProjection, theReadDrawFbo, theOitAccumFbo, Standard_False); } -// ======================================================================= -// function : redrawImmediate -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_View::redrawImmediate(const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer* theReadFbo, OpenGl_FrameBuffer* theDrawFbo, @@ -2332,10 +2278,8 @@ bool OpenGl_View::redrawImmediate(const Graphic3d_Camera::Projection theProjecti return !toCopyBackToFront; } -// ======================================================================= -// function : blitSubviews -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_View::blitSubviews(const Graphic3d_Camera::Projection, OpenGl_FrameBuffer* theDrawFbo) { const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); @@ -2676,10 +2620,8 @@ void OpenGl_View::render(Graphic3d_Camera::Projection theProjection, } } -// ======================================================================= -// function : InvalidateBVHData -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::InvalidateBVHData(const Graphic3d_ZLayerId theLayerId) { myZLayers.InvalidateBVHData(theLayerId); @@ -2831,10 +2773,8 @@ void OpenGl_View::renderFrameStats() } } -// ======================================================================= -// function : Invalidate -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::Invalidate() { myBackBufferRestored = Standard_False; @@ -2869,10 +2809,8 @@ void OpenGl_View::renderScene(Graphic3d_Camera::Projection theProjection, } } -// ======================================================================= -// function : bindDefaultFbo -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::bindDefaultFbo(OpenGl_FrameBuffer* theCustomFbo) { Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext(); @@ -2903,10 +2841,8 @@ void OpenGl_View::bindDefaultFbo(OpenGl_FrameBuffer* theCustomFbo) } } -// ======================================================================= -// function : initBlitQuad -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_VertexBuffer* OpenGl_View::initBlitQuad(const Standard_Boolean theToFlip) { OpenGl_VertexBuffer* aVerts = NULL; @@ -2937,10 +2873,8 @@ OpenGl_VertexBuffer* OpenGl_View::initBlitQuad(const Standard_Boolean theToFlip) return aVerts; } -// ======================================================================= -// function : blitBuffers -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_View::blitBuffers(OpenGl_FrameBuffer* theReadFbo, OpenGl_FrameBuffer* theDrawFbo, const Standard_Boolean theToFlip) @@ -3145,10 +3079,8 @@ bool OpenGl_View::blitBuffers(OpenGl_FrameBuffer* theReadFbo, return true; } -// ======================================================================= -// function : drawStereoPair -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::drawStereoPair(OpenGl_FrameBuffer* theDrawFbo) { const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); @@ -3353,10 +3285,8 @@ void OpenGl_View::drawStereoPair(OpenGl_FrameBuffer* theDrawFbo) aPair[0]->ColorTexture()->Unbind(aCtx, Graphic3d_TextureUnit_0); } -// ======================================================================= -// function : copyBackToFront -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_View::copyBackToFront() { myIsImmediateDrawn = Standard_False; @@ -3421,10 +3351,8 @@ bool OpenGl_View::copyBackToFront() return true; } -// ======================================================================= -// function : checkOitCompatibility -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::checkOitCompatibility(const Handle(OpenGl_Context)& theGlContext, const Standard_Boolean theMSAA) { @@ -3466,10 +3394,8 @@ Standard_Boolean OpenGl_View::checkOitCompatibility(const Handle(OpenGl_Context) return Standard_False; } -// ======================================================================= -// function : updateSkydomeBg -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::updateSkydomeBg(const Handle(OpenGl_Context)& theCtx) { if (!myToUpdateSkydome) @@ -3565,19 +3491,15 @@ void OpenGl_View::updateSkydomeBg(const Handle(OpenGl_Context)& theCtx) theCtx->arbFBO->glBindFramebuffer(GL_FRAMEBUFFER, aPrevFBO); } -// ======================================================================= -// function : checkPBRAvailability -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::checkPBRAvailability() const { return myWorkspace->GetGlContext()->HasPBR() && !myPBREnvironment.IsNull(); } -// ======================================================================= -// function : updatePBREnvironment -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_View::updatePBREnvironment(const Handle(OpenGl_Context)& theCtx) { if (myBackgroundType == Graphic3d_TOB_CUBEMAP && myToUpdateSkydome) diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 4cd4f44ad5..3083332de0 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -1147,10 +1147,8 @@ Standard_Boolean OpenGl_View::ShaderSource::LoadFromFiles( return Standard_True; } -// ======================================================================= -// function : LoadFromStrings -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::ShaderSource::LoadFromStrings( const TCollection_AsciiString* theStrings, const TCollection_AsciiString& thePrefix) @@ -3335,10 +3333,8 @@ Standard_Boolean OpenGl_View::runPathtrace(const Standard_Integer th return true; } -// ======================================================================= -// function : runPathtraceOut -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_View::runPathtraceOut(const Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer* theReadDrawFbo, const Handle(OpenGl_Context)& theGlContext) diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 64da92ad18..7382d9b75c 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -162,10 +162,8 @@ static void addMsgToList(TCollection_ExtendedString& theList, } // namespace -// ======================================================================= -// function : OpenGl_Window -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Window::OpenGl_Window() : myOwnGContext(false), mySwapInterval(0) @@ -173,10 +171,8 @@ OpenGl_Window::OpenGl_Window() // } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Window::Init(const Handle(OpenGl_GraphicDriver)& theDriver, const Handle(Aspect_Window)& thePlatformWindow, const Handle(Aspect_Window)& theSizeWindow, @@ -763,10 +759,8 @@ void OpenGl_Window::Init(const Handle(OpenGl_GraphicDriver)& theDriver, init(); } -// ======================================================================= -// function : ~OpenGl_Window -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Window::~OpenGl_Window() { if (!myOwnGContext || myGlContext.IsNull()) @@ -824,10 +818,8 @@ OpenGl_Window::~OpenGl_Window() #endif // !__APPLE__ -// ======================================================================= -// function : Activate -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Window::Activate() { return myGlContext->MakeCurrent(); @@ -854,10 +846,8 @@ void OpenGl_Window::Resize() init(); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Window::init() { if (!Activate()) @@ -918,10 +908,8 @@ void OpenGl_Window::init() } } -// ======================================================================= -// function : SetSwapInterval -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Window::SetSwapInterval(Standard_Boolean theToForceNoSync) { const Standard_Integer aSwapInterval = theToForceNoSync ? 0 : myGlContext->caps->swapInterval; diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index e29bba5149..7fb41164ea 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -25,10 +25,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Workspace, Standard_Transient) -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Material::Init(const OpenGl_Context& theCtx, const Graphic3d_MaterialAspect& theFront, const Quantity_Color& theFrontColor, @@ -47,10 +45,8 @@ void OpenGl_Material::Init(const OpenGl_Context& theCtx, } } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Material::init(const OpenGl_Context& theCtx, const Graphic3d_MaterialAspect& theMat, const Quantity_Color& theInteriorColor, @@ -93,10 +89,8 @@ void OpenGl_Material::init(const OpenGl_Context& theCtx, aCommon.Emission = theCtx.Vec4FromQuantityColor(aCommon.Emission); } -// ======================================================================= -// function : OpenGl_Workspace -// purpose : -// ======================================================================= +//================================================================================================= + OpenGl_Workspace::OpenGl_Workspace(OpenGl_View* theView, const Handle(OpenGl_Window)& theWindow) : myView(theView), myWindow(theWindow), @@ -148,10 +142,8 @@ OpenGl_Workspace::OpenGl_Workspace(OpenGl_View* theView, const Handle(OpenGl_Win myFrontCulling.Aspect()->SetAlphaMode(Graphic3d_AlphaMode_Opaque); } -// ======================================================================= -// function : Activate -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Workspace::Activate() { if (myWindow.IsNull() || !myWindow->Activate()) @@ -222,10 +214,8 @@ void OpenGl_Workspace::ResetAppliedAspect() } } -// ======================================================================= -// function : SetDefaultPolygonOffset -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_PolygonOffset OpenGl_Workspace::SetDefaultPolygonOffset( const Graphic3d_PolygonOffset& theOffset) { @@ -239,10 +229,8 @@ Graphic3d_PolygonOffset OpenGl_Workspace::SetDefaultPolygonOffset( return aPrev; } -// ======================================================================= -// function : SetAspects -// purpose : -// ======================================================================= +//================================================================================================= + const OpenGl_Aspects* OpenGl_Workspace::SetAspects(const OpenGl_Aspects* theAspect) { const OpenGl_Aspects* aPrevAspects = myAspectsSet; @@ -250,10 +238,8 @@ const OpenGl_Aspects* OpenGl_Workspace::SetAspects(const OpenGl_Aspects* theAspe return aPrevAspects; } -// ======================================================================= -// function : ApplyAspects -// purpose : -// ======================================================================= +//================================================================================================= + const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects(bool theToBindTextures) { // bool toSuppressBackFaces = myView->BackfacingModel() == @@ -343,28 +329,22 @@ const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects(bool theToBindTextures) return myAspectsSet; } -// ======================================================================= -// function : Width -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_Workspace::Width() const { return !myView->GlWindow().IsNull() ? myView->GlWindow()->Width() : 0; } -// ======================================================================= -// function : Height -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer OpenGl_Workspace::Height() const { return !myView->GlWindow().IsNull() ? myView->GlWindow()->Height() : 0; } -// ======================================================================= -// function : FBOCreate -// purpose : -// ======================================================================= +//================================================================================================= + Handle(OpenGl_FrameBuffer) OpenGl_Workspace::FBOCreate(const Standard_Integer theWidth, const Standard_Integer theHeight) { @@ -388,10 +368,8 @@ Handle(OpenGl_FrameBuffer) OpenGl_Workspace::FBOCreate(const Standard_Integer th return aFrameBuffer; } -// ======================================================================= -// function : FBORelease -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Workspace::FBORelease(Handle(OpenGl_FrameBuffer)& theFbo) { // activate OpenGL context @@ -404,10 +382,8 @@ void OpenGl_Workspace::FBORelease(Handle(OpenGl_FrameBuffer)& theFbo) theFbo.Nullify(); } -// ======================================================================= -// function : BufferDump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean OpenGl_Workspace::BufferDump(const Handle(OpenGl_FrameBuffer)& theFbo, Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) @@ -416,10 +392,8 @@ Standard_Boolean OpenGl_Workspace::BufferDump(const Handle(OpenGl_FrameBuffer)& && OpenGl_FrameBuffer::BufferDump(GetGlContext(), theFbo, theImage, theBufferType); } -// ======================================================================= -// function : ShouldRender -// purpose : -// ======================================================================= +//================================================================================================= + bool OpenGl_Workspace::ShouldRender(const OpenGl_Element* theElement, const OpenGl_Group* theGroup) { if ((myRenderFilter & OpenGl_RenderFilter_SkipTrsfPersistence) != 0) @@ -477,10 +451,8 @@ bool OpenGl_Workspace::ShouldRender(const OpenGl_Element* theElement, const Open return true; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void OpenGl_Workspace::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/OpenGlTest/OpenGlTest.cxx b/src/OpenGlTest/OpenGlTest.cxx index daa3b81d1d..08bfa6918a 100644 --- a/src/OpenGlTest/OpenGlTest.cxx +++ b/src/OpenGlTest/OpenGlTest.cxx @@ -16,10 +16,8 @@ #include #include -// ====================================================================== -// function : Factory -// purpose : -// ====================================================================== +//================================================================================================= + void OpenGlTest::Factory(Draw_Interpretor& theDI) { static const Handle(OpenGl_GraphicDriverFactory) aFactory = new OpenGl_GraphicDriverFactory(); diff --git a/src/Poly/Poly_ArrayOfNodes.cxx b/src/Poly/Poly_ArrayOfNodes.cxx index 888dbce5e9..6ecc57f71f 100644 --- a/src/Poly/Poly_ArrayOfNodes.cxx +++ b/src/Poly/Poly_ArrayOfNodes.cxx @@ -13,29 +13,23 @@ #include -// ======================================================================= -// function : Poly_ArrayOfNodes -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfNodes::Poly_ArrayOfNodes(const Poly_ArrayOfNodes& theOther) : NCollection_AliasedArray(theOther) { // } -// ======================================================================= -// function : ~Poly_ArrayOfNodes -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfNodes::~Poly_ArrayOfNodes() { // } -// ======================================================================= -// function : Assign -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfNodes& Poly_ArrayOfNodes::Assign(const Poly_ArrayOfNodes& theOther) { if (&theOther == this) diff --git a/src/Poly/Poly_ArrayOfUVNodes.cxx b/src/Poly/Poly_ArrayOfUVNodes.cxx index a33c598977..d524cc6c94 100644 --- a/src/Poly/Poly_ArrayOfUVNodes.cxx +++ b/src/Poly/Poly_ArrayOfUVNodes.cxx @@ -13,29 +13,23 @@ #include -// ======================================================================= -// function : Poly_ArrayOfUVNodes -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfUVNodes::Poly_ArrayOfUVNodes(const Poly_ArrayOfUVNodes& theOther) : NCollection_AliasedArray(theOther) { // } -// ======================================================================= -// function : ~Poly_ArrayOfUVNodes -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfUVNodes::~Poly_ArrayOfUVNodes() { // } -// ======================================================================= -// function : Assign -// purpose : -// ======================================================================= +//================================================================================================= + Poly_ArrayOfUVNodes& Poly_ArrayOfUVNodes::Assign(const Poly_ArrayOfUVNodes& theOther) { if (&theOther == this) diff --git a/src/Poly/Poly_MergeNodesTool.cxx b/src/Poly/Poly_MergeNodesTool.cxx index c490af89db..96af784862 100644 --- a/src/Poly/Poly_MergeNodesTool.cxx +++ b/src/Poly/Poly_MergeNodesTool.cxx @@ -59,10 +59,8 @@ private: Poly_MergeNodesTool::Vec3AndNormal myKey; }; -// ======================================================================= -// function : MergedNodesMap -// purpose : -// ======================================================================= +//================================================================================================= + Poly_MergeNodesTool::MergedNodesMap::MergedNodesMap(const int theNbBuckets) : NCollection_BaseMap(theNbBuckets, true, new NCollection_IncAllocator()), myTolerance(0.0f), @@ -74,10 +72,8 @@ Poly_MergeNodesTool::MergedNodesMap::MergedNodesMap(const int theNbBuckets) // } -// ======================================================================= -// function : MergedNodesMap::SetMergeTolerance -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_MergeNodesTool::MergedNodesMap::SetMergeTolerance(double theTolerance) { myTolerance = (float)theTolerance; @@ -88,10 +84,8 @@ void Poly_MergeNodesTool::MergedNodesMap::SetMergeTolerance(double theTolerance) } } -// ======================================================================= -// function : MergedNodesMap::hashCode -// purpose : -// ======================================================================= +//================================================================================================= + inline size_t Poly_MergeNodesTool::MergedNodesMap::vec3iHashCode( const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, const int theUpper) @@ -105,10 +99,8 @@ inline size_t Poly_MergeNodesTool::MergedNodesMap::vec3iHashCode( return aHashCode % theUpper + 1; } -// ======================================================================= -// function : MergedNodesMap::hashCode -// purpose : -// ======================================================================= +//================================================================================================= + inline size_t Poly_MergeNodesTool::MergedNodesMap::hashCode(const NCollection_Vec3& thePos, const NCollection_Vec3& theNorm, const int theUpper) const @@ -131,10 +123,8 @@ inline size_t Poly_MergeNodesTool::MergedNodesMap::hashCode(const NCollection_Ve return vec3iHashCode(anIndex, theUpper); } -// ======================================================================= -// function : MergedNodesMap::vec3AreEqual -// purpose : -// ======================================================================= +//================================================================================================= + inline bool Poly_MergeNodesTool::MergedNodesMap::vec3AreEqual( const NCollection_Vec3& theKey1, const NCollection_Vec3& theKey2) const @@ -179,10 +169,8 @@ inline bool Poly_MergeNodesTool::MergedNodesMap::vec3AreEqual( return true; } -// ======================================================================= -// function : MergedNodesMap::isEqual -// purpose : -// ======================================================================= +//================================================================================================= + inline bool Poly_MergeNodesTool::MergedNodesMap::isEqual(const Vec3AndNormal& theKey1, const NCollection_Vec3& thePos2, const NCollection_Vec3& theNorm2, @@ -207,10 +195,8 @@ inline bool Poly_MergeNodesTool::MergedNodesMap::isEqual(const Vec3AndNormal& return false; } -// ======================================================================= -// function : MergedNodesMap::Bind -// purpose : -// ======================================================================= +//================================================================================================= + inline bool Poly_MergeNodesTool::MergedNodesMap::Bind(int& theIndex, bool& theIsOpposite, const NCollection_Vec3& thePos, @@ -264,10 +250,8 @@ inline bool Poly_MergeNodesTool::MergedNodesMap::Bind(int& return true; } -// ======================================================================= -// function : MergedNodesMap::ReSize -// purpose : -// ======================================================================= +//================================================================================================= + inline void Poly_MergeNodesTool::MergedNodesMap::ReSize(const int theSize) { NCollection_ListNode** aNewData = NULL; @@ -293,10 +277,8 @@ inline void Poly_MergeNodesTool::MergedNodesMap::ReSize(const int theSize) } } -// ======================================================================= -// function : Poly_MergeNodesTool -// purpose : -// ======================================================================= +//================================================================================================= + Poly_MergeNodesTool::Poly_MergeNodesTool(const double theSmoothAngle, const double theMergeTolerance, const int theNbFacets) @@ -317,10 +299,8 @@ Poly_MergeNodesTool::Poly_MergeNodesTool(const double theSmoothAngle, SetMergeTolerance(theMergeTolerance); } -// ======================================================================= -// function : AddElement -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_MergeNodesTool::AddElement(const gp_XYZ* theElemNodes, int theNbNodes) { if (theNbNodes != 3 && theNbNodes != 4) @@ -338,10 +318,8 @@ void Poly_MergeNodesTool::AddElement(const gp_XYZ* theElemNodes, int theNbNodes) PushLastElement(theNbNodes); } -// ======================================================================= -// function : PushLastElement -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_MergeNodesTool::PushLastElement(int theNbNodes) { if (theNbNodes != 3 && theNbNodes != 4) @@ -429,10 +407,8 @@ void Poly_MergeNodesTool::PushLastElement(int theNbNodes) } } -// ======================================================================= -// function : AddTriangulation -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_MergeNodesTool::AddTriangulation(const Handle(Poly_Triangulation)& theTris, const gp_Trsf& theTrsf, const Standard_Boolean theToReverse) @@ -466,10 +442,8 @@ void Poly_MergeNodesTool::AddTriangulation(const Handle(Poly_Triangulation)& the } } -// ======================================================================= -// function : Result -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Poly_Triangulation) Poly_MergeNodesTool::Result() { if (myPolyData.IsNull()) @@ -483,10 +457,8 @@ Handle(Poly_Triangulation) Poly_MergeNodesTool::Result() return myPolyData; } -// ======================================================================= -// function : MergeNodes -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Poly_Triangulation) Poly_MergeNodesTool::MergeNodes( const Handle(Poly_Triangulation)& theTris, const gp_Trsf& theTrsf, diff --git a/src/Poly/Poly_Triangulation.cxx b/src/Poly/Poly_Triangulation.cxx index f4e296d976..311c20abb8 100644 --- a/src/Poly/Poly_Triangulation.cxx +++ b/src/Poly/Poly_Triangulation.cxx @@ -269,20 +269,16 @@ void Poly_Triangulation::SetNormals(const Handle(TShort_HArray1OfShortReal)& the } } -// ======================================================================= -// function : SetDoublePrecision -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::SetDoublePrecision(bool theIsDouble) { myNodes.SetDoublePrecision(theIsDouble); myUVNodes.SetDoublePrecision(theIsDouble); } -// ======================================================================= -// function : ResizeNodes -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::ResizeNodes(Standard_Integer theNbNodes, Standard_Boolean theToCopyOld) { myNodes.Resize(theNbNodes, theToCopyOld); @@ -296,20 +292,16 @@ void Poly_Triangulation::ResizeNodes(Standard_Integer theNbNodes, Standard_Boole } } -// ======================================================================= -// function : ResizeTriangles -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::ResizeTriangles(Standard_Integer theNbTriangles, Standard_Boolean theToCopyOld) { myTriangles.Resize(1, theNbTriangles, theToCopyOld); } -// ======================================================================= -// function : AddUVNodes -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::AddUVNodes() { if (myUVNodes.IsEmpty() || myUVNodes.Size() != myNodes.Size()) @@ -318,10 +310,8 @@ void Poly_Triangulation::AddUVNodes() } } -// ======================================================================= -// function : AddNormals -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::AddNormals() { if (myNormals.IsEmpty() || myNormals.Size() != myNodes.Size()) @@ -330,10 +320,7 @@ void Poly_Triangulation::AddNormals() } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= void Poly_Triangulation::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { @@ -350,20 +337,16 @@ void Poly_Triangulation::DumpJson(Standard_OStream& theOStream, Standard_Integer OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myPurpose) } -// ======================================================================= -// function : CachedMinMax -// purpose : -// ======================================================================= +//================================================================================================= + const Bnd_Box& Poly_Triangulation::CachedMinMax() const { static const Bnd_Box anEmptyBox; return (myCachedMinMax == NULL) ? anEmptyBox : *myCachedMinMax; } -// ======================================================================= -// function : SetCachedMinMax -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::SetCachedMinMax(const Bnd_Box& theBox) { if (theBox.IsVoid()) @@ -378,10 +361,8 @@ void Poly_Triangulation::SetCachedMinMax(const Bnd_Box& theBox) *myCachedMinMax = theBox; } -// ======================================================================= -// function : unsetCachedMinMax -// purpose : -// ======================================================================= +//================================================================================================= + void Poly_Triangulation::unsetCachedMinMax() { if (myCachedMinMax != NULL) @@ -391,10 +372,8 @@ void Poly_Triangulation::unsetCachedMinMax() } } -// ======================================================================= -// function : MinMax -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Poly_Triangulation::MinMax(Bnd_Box& theBox, const gp_Trsf& theTrsf, const bool theIsAccurate) const @@ -419,10 +398,8 @@ Standard_Boolean Poly_Triangulation::MinMax(Bnd_Box& theBox, return Standard_True; } -// ======================================================================= -// function : computeBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + Bnd_Box Poly_Triangulation::computeBoundingBox(const gp_Trsf& theTrsf) const { Bnd_Box aBox; diff --git a/src/Prs3d/Prs3d.cxx b/src/Prs3d/Prs3d.cxx index abddf20291..92901ba290 100644 --- a/src/Prs3d/Prs3d.cxx +++ b/src/Prs3d/Prs3d.cxx @@ -23,10 +23,8 @@ #include #include -// ========================================================================= -// function : AddFreeEdges -// purpose : -// ========================================================================= +//================================================================================================= + void Prs3d::AddFreeEdges(TColgp_SequenceOfPnt& theSegments, const Handle(Poly_Triangulation)& thePolyTri, const gp_Trsf& theLocation) diff --git a/src/Prs3d/Prs3d_Arrow.cxx b/src/Prs3d/Prs3d_Arrow.cxx index e6b13797bb..61b9404f35 100644 --- a/src/Prs3d/Prs3d_Arrow.cxx +++ b/src/Prs3d/Prs3d_Arrow.cxx @@ -102,10 +102,8 @@ Handle(Graphic3d_ArrayOfSegments) Prs3d_Arrow::DrawSegments(const gp_Pnt& return aSegments; } -// ============================================================================ -// function : DrawShaded -// purpose : -// ============================================================================ +//================================================================================================= + Handle(Graphic3d_ArrayOfTriangles) Prs3d_Arrow::DrawShaded(const gp_Ax1& theAxis, const Standard_Real theTubeRadius, const Standard_Real theAxisLength, diff --git a/src/Prs3d/Prs3d_ArrowAspect.cxx b/src/Prs3d/Prs3d_ArrowAspect.cxx index 8cb504bfde..ad9cb0ba72 100644 --- a/src/Prs3d/Prs3d_ArrowAspect.cxx +++ b/src/Prs3d/Prs3d_ArrowAspect.cxx @@ -19,10 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_ArrowAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_ArrowAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_ArrowAspect::Prs3d_ArrowAspect() : myArrowAspect( new Graphic3d_AspectLine3d(Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0)), @@ -33,10 +31,8 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect() // } -// ======================================================================= -// function : Prs3d_ArrowAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_ArrowAspect::Prs3d_ArrowAspect(const Standard_Real theAngle, const Standard_Real theLength) : myArrowAspect( new Graphic3d_AspectLine3d(Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0)), @@ -46,10 +42,8 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect(const Standard_Real theAngle, const Standar // } -// ======================================================================= -// function : Prs3d_ArrowAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_ArrowAspect::Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect) : myArrowAspect(theAspect), myAngle(M_PI / 180.0 * 10.0), @@ -58,10 +52,8 @@ Prs3d_ArrowAspect::Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAs // } -// ======================================================================= -// function : SetAngle -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_ArrowAspect::SetAngle(const Standard_Real theAngle) { Prs3d_InvalidAngle_Raise_if(theAngle <= 0.0 || theAngle >= M_PI / 2.0, @@ -69,10 +61,8 @@ void Prs3d_ArrowAspect::SetAngle(const Standard_Real theAngle) myAngle = theAngle; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_ArrowAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_DatumAspect.cxx b/src/Prs3d/Prs3d_DatumAspect.cxx index ba605bef5b..a8e7cae24d 100644 --- a/src/Prs3d/Prs3d_DatumAspect.cxx +++ b/src/Prs3d/Prs3d_DatumAspect.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_DatumAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_DatumAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_DatumAspect::Prs3d_DatumAspect() : myAxes(Prs3d_DatumAxes_XYZAxes), myToDrawLabels(Standard_True), @@ -66,10 +64,8 @@ Prs3d_DatumAspect::Prs3d_DatumAspect() myTextAspects[Prs3d_DatumParts_ZAxis] = new Prs3d_TextAspect(); } -// ======================================================================= -// function : DrawDatumPart -// purpose : -// ======================================================================= +//================================================================================================= + bool Prs3d_DatumAspect::DrawDatumPart(Prs3d_DatumParts thePart) const { switch (thePart) @@ -100,10 +96,8 @@ bool Prs3d_DatumAspect::DrawDatumPart(Prs3d_DatumParts thePart) const return false; } -// ======================================================================= -// function : AxisLength -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Prs3d_DatumAspect::AxisLength(Prs3d_DatumParts thePart) const { switch (thePart) @@ -120,10 +114,8 @@ Standard_Real Prs3d_DatumAspect::AxisLength(Prs3d_DatumParts thePart) const return 0.0; } -// ======================================================================= -// function : ArrowPartForAxis -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_DatumParts Prs3d_DatumAspect::ArrowPartForAxis(Prs3d_DatumParts thePart) { switch (thePart) @@ -171,10 +163,8 @@ void Prs3d_DatumAspect::CopyAspectsFrom(const Handle(Prs3d_DatumAspect)& theOthe } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_DatumAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_DimensionAspect.cxx b/src/Prs3d/Prs3d_DimensionAspect.cxx index 1871b5ca03..6dbde017c2 100755 --- a/src/Prs3d/Prs3d_DimensionAspect.cxx +++ b/src/Prs3d/Prs3d_DimensionAspect.cxx @@ -59,10 +59,8 @@ void Prs3d_DimensionAspect::SetCommonColor(const Quantity_Color& theColor) myArrowAspect->SetColor(theColor); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_DimensionAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_Drawer.cxx b/src/Prs3d/Prs3d_Drawer.cxx index f9585639cb..60eecd8981 100644 --- a/src/Prs3d/Prs3d_Drawer.cxx +++ b/src/Prs3d/Prs3d_Drawer.cxx @@ -40,10 +40,8 @@ static const Quantity_NameOfColor THE_DEF_COLOR_Vector = Quantity_NOC_SK static const Quantity_NameOfColor THE_DEF_COLOR_Section = Quantity_NOC_ORANGE; } // namespace -// ======================================================================= -// function : Prs3d_Drawer -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_Drawer::Prs3d_Drawer() : myNbPoints(-1), myMaximalParameterValue(-1.0), @@ -87,10 +85,8 @@ Prs3d_Drawer::Prs3d_Drawer() myDimensionDisplayUnits.SetAngleUnits("deg"); } -// ======================================================================= -// function : SetupOwnDefaults -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_Drawer::SetupOwnDefaults() { myNbPoints = 30; @@ -106,10 +102,7 @@ void Prs3d_Drawer::SetupOwnDefaults() SetDimensionAspect(new Prs3d_DimensionAspect()); } -// ======================================================================= -// function : SetTypeOfDeflection -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetTypeOfDeflection(const Aspect_TypeOfDeflection theTypeOfDeflection) { @@ -145,20 +138,15 @@ Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR() const return Prs3d_TOH_PolyAlgo; } -// ======================================================================= -// function : SetIsoOnTriangulation -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_Drawer::SetIsoOnTriangulation(const Standard_Boolean theToEnable) { myHasOwnIsoOnTriangulation = Standard_True; myIsoOnTriangulation = theToEnable; } -// ======================================================================= -// function : SetIsoOnPlane -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetIsoOnPlane(const Standard_Boolean theIsEnabled) { @@ -182,10 +170,7 @@ void Prs3d_Drawer::SetDeviationAngle(const Standard_Real theAngle) myDeviationAngle = theAngle; } -// ======================================================================= -// function : SetAutoTriangulation -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetAutoTriangulation(const Standard_Boolean theIsEnabled) { @@ -193,10 +178,7 @@ void Prs3d_Drawer::SetAutoTriangulation(const Standard_Boolean theIsEnabled) myIsAutoTriangulated = theIsEnabled; } -// ======================================================================= -// function : FreeBoundaryAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect() const { @@ -207,10 +189,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect() const return myFreeBoundaryAspect; } -// ======================================================================= -// function : SetFreeBoundaryDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetFreeBoundaryDraw(const Standard_Boolean theIsEnabled) { @@ -218,10 +197,7 @@ void Prs3d_Drawer::SetFreeBoundaryDraw(const Standard_Boolean theIsEnabled) myFreeBoundaryDraw = theIsEnabled; } -// ======================================================================= -// function : UnFreeBoundaryAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect() const { @@ -232,10 +208,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect() const return myUnFreeBoundaryAspect; } -// ======================================================================= -// function : SetUnFreeBoundaryDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetUnFreeBoundaryDraw(const Standard_Boolean theIsEnabled) { @@ -243,10 +216,7 @@ void Prs3d_Drawer::SetUnFreeBoundaryDraw(const Standard_Boolean theIsEnabled) myUnFreeBoundaryDraw = theIsEnabled; } -// ======================================================================= -// function : FaceBoundaryAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect() const { @@ -257,10 +227,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect() const return myFaceBoundaryAspect; } -// ======================================================================= -// function : SetFaceBoundaryDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetFaceBoundaryDraw(const Standard_Boolean theIsEnabled) { @@ -268,10 +235,7 @@ void Prs3d_Drawer::SetFaceBoundaryDraw(const Standard_Boolean theIsEnabled) myFaceBoundaryDraw = theIsEnabled; } -// ======================================================================= -// function : DimensionAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect() const { @@ -282,10 +246,7 @@ const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect() const return myDimensionAspect; } -// ======================================================================= -// function : SetDimLengthModelUnits -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetDimLengthModelUnits(const TCollection_AsciiString& theUnits) { @@ -293,10 +254,7 @@ void Prs3d_Drawer::SetDimLengthModelUnits(const TCollection_AsciiString& theUnit myDimensionModelUnits.SetLengthUnits(theUnits); } -// ======================================================================= -// function : SetDimAngleModelUnits -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetDimAngleModelUnits(const TCollection_AsciiString& theUnits) { @@ -304,10 +262,7 @@ void Prs3d_Drawer::SetDimAngleModelUnits(const TCollection_AsciiString& theUnits myDimensionModelUnits.SetAngleUnits(theUnits); } -// ======================================================================= -// function : SetDimLengthDisplayUnits -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetDimLengthDisplayUnits(const TCollection_AsciiString& theUnits) { @@ -315,10 +270,7 @@ void Prs3d_Drawer::SetDimLengthDisplayUnits(const TCollection_AsciiString& theUn myDimensionDisplayUnits.SetLengthUnits(theUnits); } -// ======================================================================= -// function : SetDimAngleDisplayUnits -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetDimAngleDisplayUnits(const TCollection_AsciiString& theUnits) { @@ -326,10 +278,7 @@ void Prs3d_Drawer::SetDimAngleDisplayUnits(const TCollection_AsciiString& theUni myDimensionDisplayUnits.SetAngleUnits(theUnits); } -// ======================================================================= -// function : UIsoAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::UIsoAspect() const { @@ -340,10 +289,7 @@ const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::UIsoAspect() const return myUIsoAspect; } -// ======================================================================= -// function : VIsoAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::VIsoAspect() const { @@ -354,10 +300,7 @@ const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::VIsoAspect() const return myVIsoAspect; } -// ======================================================================= -// function : WireAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect() const { @@ -368,10 +311,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect() const return myWireAspect; } -// ======================================================================= -// function : SetWireDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetWireDraw(const Standard_Boolean theIsEnabled) { @@ -379,10 +319,7 @@ void Prs3d_Drawer::SetWireDraw(const Standard_Boolean theIsEnabled) myWireDraw = theIsEnabled; } -// ======================================================================= -// function : PointAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect() const { @@ -393,10 +330,8 @@ const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect() const return myPointAspect; } -// ======================================================================= -// function : SetupOwnPointAspect -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Prs3d_Drawer::SetupOwnPointAspect(const Handle(Prs3d_Drawer)& theDefaults) { if (!myPointAspect.IsNull()) @@ -415,10 +350,7 @@ Standard_Boolean Prs3d_Drawer::SetupOwnPointAspect(const Handle(Prs3d_Drawer)& t return Standard_True; } -// ======================================================================= -// function : LineAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect() const { @@ -429,10 +361,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect() const return myLineAspect; } -// ======================================================================= -// function : TextAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect() const { @@ -443,10 +372,7 @@ const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect() const return myTextAspect; } -// ======================================================================= -// function : ShadingAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect() const { @@ -457,10 +383,8 @@ const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect() const return myShadingAspect; } -// ======================================================================= -// function : SetupOwnShadingAspect -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Prs3d_Drawer::SetupOwnShadingAspect(const Handle(Prs3d_Drawer)& theDefaults) { if (!myShadingAspect.IsNull()) @@ -478,10 +402,7 @@ Standard_Boolean Prs3d_Drawer::SetupOwnShadingAspect(const Handle(Prs3d_Drawer)& return Standard_True; } -// ======================================================================= -// function : PlaneAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_PlaneAspect)& Prs3d_Drawer::PlaneAspect() const { @@ -492,10 +413,7 @@ const Handle(Prs3d_PlaneAspect)& Prs3d_Drawer::PlaneAspect() const return myPlaneAspect; } -// ======================================================================= -// function : SeenLineAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect() const { @@ -506,10 +424,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect() const return mySeenLineAspect; } -// ======================================================================= -// function : ArrowAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect() const { @@ -520,10 +435,7 @@ const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect() const return myArrowAspect; } -// ======================================================================= -// function : SetLineArrowDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetLineArrowDraw(const Standard_Boolean theIsEnabled) { @@ -531,10 +443,7 @@ void Prs3d_Drawer::SetLineArrowDraw(const Standard_Boolean theIsEnabled) myLineArrowDraw = theIsEnabled; } -// ======================================================================= -// function : HiddenLineAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect() const { @@ -545,10 +454,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect() const return myHiddenLineAspect; } -// ======================================================================= -// function : EnableDrawHiddenLineDraw -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::EnableDrawHiddenLine() { @@ -556,10 +462,7 @@ void Prs3d_Drawer::EnableDrawHiddenLine() myDrawHiddenLine = Standard_True; } -// ======================================================================= -// function : DisableDrawHiddenLine -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::DisableDrawHiddenLine() { @@ -567,10 +470,7 @@ void Prs3d_Drawer::DisableDrawHiddenLine() myDrawHiddenLine = Standard_False; } -// ======================================================================= -// function : VectorAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect() const { @@ -581,10 +481,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect() const return myVectorAspect; } -// ======================================================================= -// function : SetVertexDrawMode -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::SetVertexDrawMode(const Prs3d_VertexDrawMode theMode) { @@ -593,10 +490,7 @@ void Prs3d_Drawer::SetVertexDrawMode(const Prs3d_VertexDrawMode theMode) myVertexDrawMode = theMode; } -// ======================================================================= -// function : VertexDrawMode -// purpose : -// ======================================================================= +//================================================================================================= Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode() const { @@ -611,10 +505,7 @@ Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode() const return Prs3d_VDM_Isolated; } -// ======================================================================= -// function : DatumAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect() const { @@ -625,10 +516,7 @@ const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect() const return myDatumAspect; } -// ======================================================================= -// function : SectionAspect -// purpose : -// ======================================================================= +//================================================================================================= const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect() const { @@ -639,10 +527,7 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect() const return mySectionAspect; } -// ======================================================================= -// function : SetSectionAspect -// purpose : -// ======================================================================= +//================================================================================================= void Prs3d_Drawer::ClearLocalAttributes() { @@ -694,10 +579,8 @@ void Prs3d_Drawer::ClearLocalAttributes() myTypeOfHLR = Prs3d_TOH_NotSet; } -// ======================================================================= -// function : SetupOwnFaceBoundaryAspect -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Prs3d_Drawer::SetupOwnFaceBoundaryAspect(const Handle(Prs3d_Drawer)& theDefaults) { if (!myFaceBoundaryAspect.IsNull()) @@ -716,10 +599,8 @@ Standard_Boolean Prs3d_Drawer::SetupOwnFaceBoundaryAspect(const Handle(Prs3d_Dra return true; } -// ======================================================================= -// function : SetOwnLineAspects -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Prs3d_Drawer::SetOwnLineAspects(const Handle(Prs3d_Drawer)& theDefaults) { bool isUpdateNeeded = false; @@ -806,10 +687,8 @@ Standard_Boolean Prs3d_Drawer::SetOwnLineAspects(const Handle(Prs3d_Drawer)& the return isUpdateNeeded; } -// ======================================================================= -// function : SetOwnDatumAspects -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Prs3d_Drawer::SetOwnDatumAspects(const Handle(Prs3d_Drawer)& theDefaults) { bool isUpdateNeeded = false; @@ -865,10 +744,8 @@ inline void setAspectProgram(const Handle(Graphic3d_ShaderProgram)& theProgram, } } -// ======================================================================= -// function : SetShaderProgram -// purpose : -// ======================================================================= +//================================================================================================= + bool Prs3d_Drawer::SetShaderProgram(const Handle(Graphic3d_ShaderProgram)& theProgram, const Graphic3d_GroupAspect theAspect, const bool theToOverrideDefaults) @@ -944,10 +821,8 @@ bool Prs3d_Drawer::SetShaderProgram(const Handle(Graphic3d_ShaderProgram)& thePr return false; } -// ======================================================================= -// function : SetShadingModel -// purpose : -// ======================================================================= +//================================================================================================= + bool Prs3d_Drawer::SetShadingModel(Graphic3d_TypeOfShadingModel theModel, bool theToOverrideDefaults) { @@ -966,10 +841,8 @@ bool Prs3d_Drawer::SetShadingModel(Graphic3d_TypeOfShadingModel theModel, return isUpdateNeeded; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_Drawer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_LineAspect.cxx b/src/Prs3d/Prs3d_LineAspect.cxx index 3e98c05920..11f1f44b3a 100644 --- a/src/Prs3d/Prs3d_LineAspect.cxx +++ b/src/Prs3d/Prs3d_LineAspect.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_LineAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_LineAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_LineAspect::Prs3d_LineAspect(const Quantity_Color& theColor, const Aspect_TypeOfLine theType, const Standard_Real theWidth) @@ -30,10 +28,8 @@ Prs3d_LineAspect::Prs3d_LineAspect(const Quantity_Color& theColor, // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_LineAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_PlaneAspect.cxx b/src/Prs3d/Prs3d_PlaneAspect.cxx index 97c1918cd2..10676145b7 100644 --- a/src/Prs3d/Prs3d_PlaneAspect.cxx +++ b/src/Prs3d/Prs3d_PlaneAspect.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_PlaneAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_PlaneAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_PlaneAspect::Prs3d_PlaneAspect() : myEdgesAspect(new Prs3d_LineAspect(Quantity_NOC_GREEN, Aspect_TOL_SOLID, 1.0)), myIsoAspect(new Prs3d_LineAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5)), @@ -40,10 +38,8 @@ Prs3d_PlaneAspect::Prs3d_PlaneAspect() // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_PlaneAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_PointAspect.cxx b/src/Prs3d/Prs3d_PointAspect.cxx index c63f598034..d3ce3ce086 100644 --- a/src/Prs3d/Prs3d_PointAspect.cxx +++ b/src/Prs3d/Prs3d_PointAspect.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_PointAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_PointAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_PointAspect::Prs3d_PointAspect(const Aspect_TypeOfMarker theType, const Quantity_Color& theColor, const Standard_Real theScale) @@ -30,10 +28,8 @@ Prs3d_PointAspect::Prs3d_PointAspect(const Aspect_TypeOfMarker theType, // } -// ======================================================================= -// function : Prs3d_PointAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_PointAspect::Prs3d_PointAspect(const Quantity_Color& theColor, const Standard_Integer theWidth, const Standard_Integer theHeight, @@ -43,10 +39,8 @@ Prs3d_PointAspect::Prs3d_PointAspect(const Quantity_Color& theCol // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_PointAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_PresentationShadow.cxx b/src/Prs3d/Prs3d_PresentationShadow.cxx index 31733e7bbc..1be0784cdc 100644 --- a/src/Prs3d/Prs3d_PresentationShadow.cxx +++ b/src/Prs3d/Prs3d_PresentationShadow.cxx @@ -36,10 +36,8 @@ void Prs3d_PresentationShadow::CalculateBoundBox() // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_PresentationShadow::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Prs3d/Prs3d_ShadingAspect.cxx b/src/Prs3d/Prs3d_ShadingAspect.cxx index 10791d5e73..a1fc4504fb 100644 --- a/src/Prs3d/Prs3d_ShadingAspect.cxx +++ b/src/Prs3d/Prs3d_ShadingAspect.cxx @@ -155,10 +155,8 @@ Standard_Real Prs3d_ShadingAspect::Transparency(const Aspect_TypeOfFacingModel t return 0.0; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_ShadingAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Prs3d/Prs3d_Text.cxx b/src/Prs3d/Prs3d_Text.cxx index afdda65177..2308ad5b38 100644 --- a/src/Prs3d/Prs3d_Text.cxx +++ b/src/Prs3d/Prs3d_Text.cxx @@ -23,10 +23,8 @@ #include #include -// ======================================================================= -// function : Draw -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_Text) Prs3d_Text::Draw(const Handle(Graphic3d_Group)& theGroup, const Handle(Prs3d_TextAspect)& theAspect, const TCollection_ExtendedString& theText, @@ -43,10 +41,8 @@ Handle(Graphic3d_Text) Prs3d_Text::Draw(const Handle(Graphic3d_Group)& theGro return aText; } -// ======================================================================= -// function : Draw -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_Text) Prs3d_Text::Draw(const Handle(Graphic3d_Group)& theGroup, const Handle(Prs3d_TextAspect)& theAspect, const TCollection_ExtendedString& theText, diff --git a/src/Prs3d/Prs3d_TextAspect.cxx b/src/Prs3d/Prs3d_TextAspect.cxx index c24ab0a063..4c6cf803bc 100644 --- a/src/Prs3d/Prs3d_TextAspect.cxx +++ b/src/Prs3d/Prs3d_TextAspect.cxx @@ -21,10 +21,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_TextAspect, Prs3d_BasicAspect) -// ======================================================================= -// function : Prs3d_TextAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_TextAspect::Prs3d_TextAspect() : myTextAspect( new Graphic3d_AspectText3d(Quantity_Color(Quantity_NOC_YELLOW), Font_NOF_SERIF, 1.0, 0.0)), @@ -36,10 +34,8 @@ Prs3d_TextAspect::Prs3d_TextAspect() // } -// ======================================================================= -// function : Prs3d_TextAspect -// purpose : -// ======================================================================= +//================================================================================================= + Prs3d_TextAspect::Prs3d_TextAspect(const Handle(Graphic3d_AspectText3d)& theAspect) : myTextAspect(theAspect), myHeight(16.0), @@ -50,10 +46,8 @@ Prs3d_TextAspect::Prs3d_TextAspect(const Handle(Graphic3d_AspectText3d)& theAspe // } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Prs3d_TextAspect::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/PrsMgr/PrsMgr_PresentableObject.cxx b/src/PrsMgr/PrsMgr_PresentableObject.cxx index 01ddff4b8f..b06f8e5947 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.cxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.cxx @@ -375,10 +375,8 @@ void PrsMgr_PresentableObject::SetZLayer(const Graphic3d_ZLayerId theLayerId) } } -// ======================================================================= -// function : AddClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::AddClipPlane(const Handle(Graphic3d_ClipPlane)& thePlane) { // add to collection and process changes @@ -391,10 +389,8 @@ void PrsMgr_PresentableObject::AddClipPlane(const Handle(Graphic3d_ClipPlane)& t UpdateClipping(); } -// ======================================================================= -// function : RemoveClipPlane -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::RemoveClipPlane(const Handle(Graphic3d_ClipPlane)& thePlane) { if (myClipPlanes.IsNull()) @@ -416,10 +412,8 @@ void PrsMgr_PresentableObject::RemoveClipPlane(const Handle(Graphic3d_ClipPlane) } } -// ======================================================================= -// function : SetClipPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::SetClipPlanes( const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes) { @@ -428,10 +422,8 @@ void PrsMgr_PresentableObject::SetClipPlanes( UpdateClipping(); } -// ======================================================================= -// function : UpdateClipping -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::UpdateClipping() { for (PrsMgr_Presentations::Iterator aPrsIter(myPresentations); aPrsIter.More(); aPrsIter.Next()) @@ -458,10 +450,8 @@ void PrsMgr_PresentableObject::SetInfiniteState(const Standard_Boolean theFlag) } } -// ======================================================================= -// function : SetMutable -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::SetMutable(const Standard_Boolean theIsMutable) { if (myIsMutable == theIsMutable) @@ -477,10 +467,8 @@ void PrsMgr_PresentableObject::SetMutable(const Standard_Boolean theIsMutable) } } -// ======================================================================= -// function : UnsetAttributes -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::UnsetAttributes() { Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); @@ -734,10 +722,8 @@ void PrsMgr_PresentableObject::PolygonOffsets(Standard_Integer& theMode, } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentableObject::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/PrsMgr/PrsMgr_Presentation.cxx b/src/PrsMgr/PrsMgr_Presentation.cxx index fe1902ea9d..cd0074e5d6 100644 --- a/src/PrsMgr/PrsMgr_Presentation.cxx +++ b/src/PrsMgr/PrsMgr_Presentation.cxx @@ -198,10 +198,8 @@ PrsMgr_Presentation::~PrsMgr_Presentation() Erase(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_Presentation::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/PrsMgr/PrsMgr_PresentationManager.cxx b/src/PrsMgr/PrsMgr_PresentationManager.cxx index 59571b9d20..b05da451b5 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.cxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.cxx @@ -24,10 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_PresentationManager, Standard_Transient) -// ======================================================================= -// function : PrsMgr_PresentationManager -// purpose : -// ======================================================================= +//================================================================================================= + PrsMgr_PresentationManager::PrsMgr_PresentationManager( const Handle(Graphic3d_StructureManager)& theStructureManager) : myStructureManager(theStructureManager), @@ -36,10 +34,8 @@ PrsMgr_PresentationManager::PrsMgr_PresentationManager( // } -// ======================================================================= -// function : Display -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Display(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) { @@ -79,10 +75,8 @@ void PrsMgr_PresentationManager::Display(const Handle(PrsMgr_PresentableObject)& } } -// ======================================================================= -// function : Erase -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Erase(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) { @@ -124,10 +118,8 @@ void PrsMgr_PresentationManager::Erase(const Handle(PrsMgr_PresentableObject)& t } } -// ======================================================================= -// function : Clear -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Clear(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) { @@ -147,10 +139,8 @@ void PrsMgr_PresentationManager::Clear(const Handle(PrsMgr_PresentableObject)& t } } -// ======================================================================= -// function : SetVisibility -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::SetVisibility(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode, const Standard_Boolean theValue) @@ -179,10 +169,8 @@ void PrsMgr_PresentationManager::SetVisibility(const Handle(PrsMgr_PresentableOb } } -// ======================================================================= -// function : Unhighlight -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Unhighlight(const Handle(PrsMgr_PresentableObject)& thePrsObj) { if (thePrsObj->ToPropagateVisualState()) @@ -206,10 +194,8 @@ void PrsMgr_PresentationManager::Unhighlight(const Handle(PrsMgr_PresentableObje } } -// ======================================================================= -// function : SetDisplayPriority -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::SetDisplayPriority( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode, @@ -231,10 +217,8 @@ void PrsMgr_PresentationManager::SetDisplayPriority( } } -// ======================================================================= -// function : DisplayPriority -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_DisplayPriority PrsMgr_PresentationManager::DisplayPriority( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) const @@ -256,10 +240,8 @@ Graphic3d_DisplayPriority PrsMgr_PresentationManager::DisplayPriority( return !aPrs.IsNull() ? aPrs->DisplayPriority() : Graphic3d_DisplayPriority_INVALID; } -// ======================================================================= -// function : IsDisplayed -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean PrsMgr_PresentationManager::IsDisplayed( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) const @@ -280,10 +262,8 @@ Standard_Boolean PrsMgr_PresentationManager::IsDisplayed( return !aPrs.IsNull() && aPrs->IsDisplayed(); } -// ======================================================================= -// function : IsHighlighted -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean PrsMgr_PresentationManager::IsHighlighted( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) const @@ -304,10 +284,8 @@ Standard_Boolean PrsMgr_PresentationManager::IsHighlighted( return !aPrs.IsNull() && aPrs->IsHighlighted(); } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Update(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) const { @@ -326,10 +304,8 @@ void PrsMgr_PresentationManager::Update(const Handle(PrsMgr_PresentableObject)& } } -// ======================================================================= -// function : BeginImmediateDraw -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::BeginImmediateDraw() { if (++myImmediateModeOn > 1) @@ -340,10 +316,8 @@ void PrsMgr_PresentationManager::BeginImmediateDraw() ClearImmediateDraw(); } -// ======================================================================= -// function : ClearImmediateDraw -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::ClearImmediateDraw() { for (PrsMgr_ListOfPresentations::Iterator anIter(myImmediateList); anIter.More(); anIter.Next()) @@ -419,10 +393,8 @@ void PrsMgr_PresentationManager::displayImmediate(const Handle(V3d_Viewer)& theV } } -// ======================================================================= -// function : EndImmediateDraw -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::EndImmediateDraw(const Handle(V3d_Viewer)& theViewer) { if (--myImmediateModeOn > 0) @@ -478,10 +450,8 @@ void PrsMgr_PresentationManager::AddToImmediateList(const Handle(Prs3d_Presentat myImmediateList.Append(thePrs); } -// ======================================================================= -// function : HasPresentation -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean PrsMgr_PresentationManager::HasPresentation( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) const @@ -502,10 +472,8 @@ Standard_Boolean PrsMgr_PresentationManager::HasPresentation( return Standard_False; } -// ======================================================================= -// function : Presentation -// purpose : -// ======================================================================= +//================================================================================================= + Handle(PrsMgr_Presentation) PrsMgr_PresentationManager::Presentation( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode, @@ -540,10 +508,8 @@ Handle(PrsMgr_Presentation) PrsMgr_PresentationManager::Presentation( return aPrs; } -// ======================================================================= -// function : RemovePresentation -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean PrsMgr_PresentationManager::RemovePresentation( const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode) @@ -562,10 +528,8 @@ Standard_Boolean PrsMgr_PresentationManager::RemovePresentation( return Standard_False; } -// ======================================================================= -// function : SetZLayer -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::SetZLayer(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Graphic3d_ZLayerId theLayerId) { @@ -586,20 +550,16 @@ void PrsMgr_PresentationManager::SetZLayer(const Handle(PrsMgr_PresentableObject thePrsObj->SetZLayer(theLayerId); } -// ======================================================================= -// function : GetZLayer -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_ZLayerId PrsMgr_PresentationManager::GetZLayer( const Handle(PrsMgr_PresentableObject)& thePrsObj) const { return thePrsObj->ZLayer(); } -// ======================================================================= -// function : Connect -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Connect(const Handle(PrsMgr_PresentableObject)& thePrsObject, const Handle(PrsMgr_PresentableObject)& theOtherObject, const Standard_Integer theMode, @@ -610,10 +570,8 @@ void PrsMgr_PresentationManager::Connect(const Handle(PrsMgr_PresentableObject)& aPrs->Connect(aPrsOther.get(), Graphic3d_TOC_DESCENDANT); } -// ======================================================================= -// function : Transform -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Transform(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Handle(TopLoc_Datum3D)& theTransformation, const Standard_Integer theMode) @@ -621,10 +579,8 @@ void PrsMgr_PresentationManager::Transform(const Handle(PrsMgr_PresentableObject Presentation(thePrsObj, theMode)->SetTransformation(theTransformation); } -// ======================================================================= -// function : Color -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::Color(const Handle(PrsMgr_PresentableObject)& thePrsObj, const Handle(Prs3d_Drawer)& theStyle, const Standard_Integer theMode, @@ -694,10 +650,8 @@ static void updatePrsTransformation(const PrsMgr_ListOfPresentations& thePrsList } } // namespace -// ======================================================================= -// function : UpdateHighlightTrsf -// purpose : -// ======================================================================= +//================================================================================================= + void PrsMgr_PresentationManager::UpdateHighlightTrsf( const Handle(V3d_Viewer)& theViewer, const Handle(PrsMgr_PresentableObject)& theObj, diff --git a/src/Quantity/Quantity_Color.cxx b/src/Quantity/Quantity_Color.cxx index b7d0cb6c74..60a948a6eb 100644 --- a/src/Quantity/Quantity_Color.cxx +++ b/src/Quantity/Quantity_Color.cxx @@ -89,28 +89,22 @@ static const Quantity_StandardColor THE_COLORS[] = { #include "Quantity_ColorTable.pxx" }; -// ======================================================================= -// function : Epsilon -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Quantity_Color::Epsilon() { return TheEpsilon; } -// ======================================================================= -// function : SetEpsilon -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::SetEpsilon(const Standard_Real theEpsilon) { TheEpsilon = theEpsilon; } -// ======================================================================= -// function : valuesOf -// purpose : -// ======================================================================= +//================================================================================================= + NCollection_Vec3 Quantity_Color::valuesOf(const Quantity_NameOfColor theName, const Quantity_TypeOfColor theType) { @@ -136,10 +130,8 @@ NCollection_Vec3 Quantity_Color::valuesOf(const Quantity_NameOfColor theN throw Standard_ProgramError("Internal error"); } -// ======================================================================= -// function : StringName -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Quantity_Color::StringName(const Quantity_NameOfColor theName) { if ((Standard_Integer)theName < 0 || (Standard_Integer)theName > Quantity_NOC_WHITE) @@ -149,10 +141,8 @@ Standard_CString Quantity_Color::StringName(const Quantity_NameOfColor theName) return THE_COLORS[theName].StringName; } -// ======================================================================= -// function : ColorFromName -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Quantity_Color::ColorFromName(const Standard_CString theName, Quantity_NameOfColor& theColor) { @@ -244,10 +234,8 @@ bool Quantity_Color::ColorFromHex(const Standard_CString theHexColorString, return true; } -// ======================================================================= -// function : Quantity_Color -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_Color::Quantity_Color(const Standard_Real theC1, const Standard_Real theC2, const Standard_Real theC3, @@ -256,20 +244,16 @@ Quantity_Color::Quantity_Color(const Standard_Real theC1, SetValues(theC1, theC2, theC3, theType); } -// ======================================================================= -// function : Quantity_Color -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_Color::Quantity_Color(const NCollection_Vec3& theRgb) : myRgb(theRgb) { Quantity_ColorValidateRgbRange(theRgb.r(), theRgb.g(), theRgb.b()); } -// ======================================================================= -// function : ChangeContrast -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::ChangeContrast(const Standard_Real theDelta) { NCollection_Vec3 aHls = Convert_LinearRGB_To_HLS(myRgb); @@ -280,10 +264,8 @@ void Quantity_Color::ChangeContrast(const Standard_Real theDelta) } } -// ======================================================================= -// function : ChangeIntensity -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::ChangeIntensity(const Standard_Real theDelta) { NCollection_Vec3 aHls = Convert_LinearRGB_To_HLS(myRgb); @@ -294,10 +276,8 @@ void Quantity_Color::ChangeIntensity(const Standard_Real theDelta) } } -// ======================================================================= -// function : SetValues -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::SetValues(const Standard_Real theC1, const Standard_Real theC2, const Standard_Real theC3, @@ -338,10 +318,8 @@ void Quantity_Color::SetValues(const Standard_Real theC1, } } -// ======================================================================= -// function : Delta -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::Delta(const Quantity_Color& theColor, Standard_Real& theDC, Standard_Real& theDI) const @@ -424,10 +402,8 @@ Standard_Real Quantity_Color::DeltaE2000(const Quantity_Color& theOther) const return aDeltaE2000; } -// ======================================================================= -// function : Name -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_NameOfColor Quantity_Color::Name() const { // it is better finding closest sRGB color (closest to human eye) instead of linear RGB color, @@ -453,10 +429,8 @@ Quantity_NameOfColor Quantity_Color::Name() const return aResName; } -// ======================================================================= -// function : Values -// purpose : -// ======================================================================= +//================================================================================================= + void Quantity_Color::Values(Standard_Real& theR1, Standard_Real& theR2, Standard_Real& theR3, diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index c2d14ac52f..4039e6eab0 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -303,10 +303,8 @@ Standard_Boolean RWGltf_CafWriter::hasTriangulation(const RWGltf_GltfFace& theGl } } -// ======================================================================= -// function : saveNodes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveNodes(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_ShapeIterator& theShapeIter, @@ -349,10 +347,8 @@ void RWGltf_CafWriter::saveNodes(RWGltf_GltfFace& } } -// ======================================================================= -// function : saveNormals -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveNormals(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, @@ -399,10 +395,8 @@ void RWGltf_CafWriter::saveNormals(RWGltf_GltfFace& } } -// ======================================================================= -// function : saveTextCoords -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveTextCoords(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, @@ -464,10 +458,8 @@ void RWGltf_CafWriter::saveTextCoords(RWGltf_GltfFace& } } -// ======================================================================= -// function : saveTriangleIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveTriangleIndices(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, @@ -503,10 +495,8 @@ void RWGltf_CafWriter::saveTriangleIndices(RWGltf_GltfFace& theGltfFac } } -// ======================================================================= -// function : saveEdgeIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveEdgeIndices(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_EdgeIterator& theFaceIter) @@ -528,10 +518,8 @@ void RWGltf_CafWriter::saveEdgeIndices(RWGltf_GltfFace& theGltfFace, } } -// ======================================================================= -// function : saveVertexIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveVertexIndices(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_VertexIterator& theFaceIter) @@ -553,10 +541,8 @@ void RWGltf_CafWriter::saveVertexIndices(RWGltf_GltfFace& theGltfFac } } -// ======================================================================= -// function : saveIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::saveIndices(RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_ShapeIterator& theFaceIter, @@ -604,10 +590,8 @@ void RWGltf_CafWriter::saveIndices(RWGltf_GltfFace& } } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TColStd_IndexedDataMapOfStringString& theFileInfo, const Message_ProgressRange& theProgress) @@ -618,10 +602,8 @@ bool RWGltf_CafWriter::Perform(const Handle(TDocStd_Document)& theDo return Perform(theDocument, aRoots, NULL, theFileInfo, theProgress); } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRootLabels, const TColStd_MapOfAsciiString* theLabelFilter, @@ -651,10 +633,8 @@ bool RWGltf_CafWriter::Perform(const Handle(TDocStd_Document)& theDo return writeJson(theDocument, theRootLabels, theLabelFilter, theFileInfo, aPSentry.Next()); } -// ======================================================================= -// function : dispatchShapes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::dispatchShapes( const XCAFPrs_DocumentNode& theDocNode, const Message_ProgressScope& thePSentryBin, @@ -736,10 +716,8 @@ void RWGltf_CafWriter::dispatchShapes( } } -// ======================================================================= -// function : saveShapes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWGltf_CafWriter::writeShapesToBin( RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, @@ -795,10 +773,8 @@ Standard_Boolean RWGltf_CafWriter::writeShapesToBin( return true; } -// ======================================================================= -// function : writeBinData -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_CafWriter::writeBinData(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRootLabels, const TColStd_MapOfAsciiString* theLabelFilter, @@ -1415,10 +1391,8 @@ bool RWGltf_CafWriter::writeJson(const Handle(TDocStd_Document)& the #endif } -// ======================================================================= -// function : writeAccessors -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeAccessors(const RWGltf_GltfSceneNodeMap&) { #ifdef HAVE_RAPIDJSON @@ -1526,10 +1500,8 @@ void RWGltf_CafWriter::writeAccessors(const RWGltf_GltfSceneNodeMap&) #endif } -// ======================================================================= -// function : writePositions -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writePositions(const RWGltf_GltfFace& theGltfFace) { #ifdef HAVE_RAPIDJSON @@ -1578,10 +1550,8 @@ void RWGltf_CafWriter::writePositions(const RWGltf_GltfFace& theGltfFace) #endif } -// ======================================================================= -// function : writeNormals -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeNormals(const RWGltf_GltfFace& theGltfFace) { #ifdef HAVE_RAPIDJSON @@ -1630,10 +1600,8 @@ void RWGltf_CafWriter::writeNormals(const RWGltf_GltfFace& theGltfFace) #endif } -// ======================================================================= -// function : writeTextCoords -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeTextCoords(const RWGltf_GltfFace& theGltfFace) { #ifdef HAVE_RAPIDJSON @@ -1682,10 +1650,8 @@ void RWGltf_CafWriter::writeTextCoords(const RWGltf_GltfFace& theGltfFace) #endif } -// ======================================================================= -// function : writeIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeIndices(const RWGltf_GltfFace& theGltfFace) { #ifdef HAVE_RAPIDJSON @@ -1718,10 +1684,8 @@ void RWGltf_CafWriter::writeIndices(const RWGltf_GltfFace& theGltfFace) #endif } -// ======================================================================= -// function : writeAnimations -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeAnimations() { Standard_ProgramError_Raise_if(myWriter.get() == NULL, @@ -1733,10 +1697,8 @@ void RWGltf_CafWriter::writeAnimations() // myWriter->EndArray(); } -// ======================================================================= -// function : writeAsset -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeAsset(const TColStd_IndexedDataMapOfStringString& theFileInfo) { #ifdef HAVE_RAPIDJSON @@ -1775,10 +1737,8 @@ void RWGltf_CafWriter::writeAsset(const TColStd_IndexedDataMapOfStringString& th #endif } -// ======================================================================= -// function : writeBufferViews -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeBufferViews(const Standard_Integer theBinDataBufferId) { #ifdef HAVE_RAPIDJSON @@ -1877,10 +1837,8 @@ void RWGltf_CafWriter::writeBufferViews(const Standard_Integer theBinDataBufferI #endif } -// ======================================================================= -// function : writeBuffers -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeBuffers() { #ifdef HAVE_RAPIDJSON @@ -1906,10 +1864,8 @@ void RWGltf_CafWriter::writeBuffers() #endif } -// ======================================================================= -// function : writeExtensions -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeExtensions() { #ifdef HAVE_RAPIDJSON @@ -1937,10 +1893,8 @@ void RWGltf_CafWriter::writeExtensions() #endif } -// ======================================================================= -// function : writeImages -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeImages(const RWGltf_GltfSceneNodeMap& theSceneNodeMap) { #ifdef HAVE_RAPIDJSON @@ -1979,10 +1933,8 @@ void RWGltf_CafWriter::writeImages(const RWGltf_GltfSceneNodeMap& theSceneNodeMa #endif } -// ======================================================================= -// function : writeMaterials -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeMaterials(const RWGltf_GltfSceneNodeMap& theSceneNodeMap) { #ifdef HAVE_RAPIDJSON @@ -2011,10 +1963,8 @@ void RWGltf_CafWriter::writeMaterials(const RWGltf_GltfSceneNodeMap& theSceneNod #endif } -// ======================================================================= -// function : writePrimArray -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writePrimArray(const RWGltf_GltfFace& theGltfFace, const TCollection_AsciiString& theName, const int theDracoBufInd, @@ -2121,10 +2071,8 @@ void RWGltf_CafWriter::writePrimArray(const RWGltf_GltfFace& theGltfFace #endif } -// ======================================================================= -// function : writeShapes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeShapes(RWMesh_ShapeIterator& theShapeIter, Standard_Integer& theNbFacesInNode, Standard_Integer& theDracoBufInd, @@ -2166,10 +2114,8 @@ void RWGltf_CafWriter::writeShapes(RWMesh_ShapeIterator& } } -// ======================================================================= -// function : writeMeshes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeMeshes(const RWGltf_GltfSceneNodeMap& theSceneNodeMap) { #ifdef HAVE_RAPIDJSON @@ -2277,10 +2223,8 @@ void RWGltf_CafWriter::writeMeshes(const RWGltf_GltfSceneNodeMap& theSceneNodeMa #endif } -// ======================================================================= -// function : writeNodes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeNodes(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRootLabels, const TColStd_MapOfAsciiString* theLabelFilter, @@ -2475,10 +2419,8 @@ void RWGltf_CafWriter::writeNodes(const Handle(TDocStd_Document)& theDoc #endif } -// ======================================================================= -// function : writeExtrasAttributes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeExtrasAttributes(const Handle(TDataStd_NamedData)& theNamedData) { #ifdef HAVE_RAPIDJSON @@ -2576,10 +2518,8 @@ void RWGltf_CafWriter::writeExtrasAttributes(const Handle(TDataStd_NamedData)& t #endif } -// ======================================================================= -// function : writeSamplers -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeSamplers() { #ifdef HAVE_RAPIDJSON @@ -2606,10 +2546,8 @@ void RWGltf_CafWriter::writeSamplers() #endif } -// ======================================================================= -// function : writeScene -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeScene(const Standard_Integer theDefSceneId) { #ifdef HAVE_RAPIDJSON @@ -2623,10 +2561,8 @@ void RWGltf_CafWriter::writeScene(const Standard_Integer theDefSceneId) #endif } -// ======================================================================= -// function : writeScenes -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeScenes( const NCollection_Sequence& theSceneRootNodeInds) { @@ -2655,10 +2591,8 @@ void RWGltf_CafWriter::writeScenes( #endif } -// ======================================================================= -// function : writeSkins -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeSkins() { Standard_ProgramError_Raise_if(myWriter.get() == NULL, @@ -2670,10 +2604,8 @@ void RWGltf_CafWriter::writeSkins() myWriter->EndArray();*/ } -// ======================================================================= -// function : writeTextures -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_CafWriter::writeTextures(const RWGltf_GltfSceneNodeMap& theSceneNodeMap) { #ifdef HAVE_RAPIDJSON diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index 05ffdccba0..57a6ed6fc7 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -141,10 +141,8 @@ private: Handle(TDataStd_NamedData) myResult; //!< Result of parsing. }; -// ======================================================================= -// function : RWGltf_ExtrasParser -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_ExtrasParser::RWGltf_ExtrasParser(const TCollection_AsciiString& theParentID, const RWGltf_JsonValue& theExtrasValue) : myParentID(theParentID), @@ -153,10 +151,8 @@ RWGltf_ExtrasParser::RWGltf_ExtrasParser(const TCollection_AsciiString& theParen { } -// ======================================================================= -// function : parseValue -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TDataStd_NamedData) RWGltf_ExtrasParser::Parse() { parseObject(myExtrasValue); @@ -165,10 +161,8 @@ Handle(TDataStd_NamedData) RWGltf_ExtrasParser::Parse() return myResult; } -// ======================================================================= -// function : parseValue -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TDataStd_NamedData) RWGltf_ExtrasParser::ParseExtras( const TCollection_AsciiString& theParentID, const RWGltf_JsonValue* theExtrasValue) @@ -182,10 +176,8 @@ Handle(TDataStd_NamedData) RWGltf_ExtrasParser::ParseExtras( return anExtrasParser.Parse(); } -// ======================================================================= -// function : parseValue -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_ExtrasParser::parseObject(const RWGltf_JsonValue& theValue, const std::string& theValueName) { @@ -211,10 +203,8 @@ bool RWGltf_ExtrasParser::parseObject(const RWGltf_JsonValue& theValue, return anIsAnyValProcessed; } -// ======================================================================= -// function : parseNumber -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_ExtrasParser::parseNumber(const RWGltf_JsonValue& theValue, const std::string& theValueName) { @@ -241,10 +231,8 @@ bool RWGltf_ExtrasParser::parseNumber(const RWGltf_JsonValue& theValue, return false; } -// ======================================================================= -// function : parseString -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_ExtrasParser::parseString(const RWGltf_JsonValue& theValue, const std::string& theValueName) { @@ -260,10 +248,8 @@ bool RWGltf_ExtrasParser::parseString(const RWGltf_JsonValue& theValue, return false; } -// ======================================================================= -// function : parseArray -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_ExtrasParser::parseArray(const RWGltf_JsonValue& theValue, const std::string& theValueName) { @@ -327,10 +313,8 @@ bool RWGltf_ExtrasParser::parseArray(const RWGltf_JsonValue& theValue, return true; } -// ======================================================================= -// function : parseArray -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TDataStd_NamedData)& RWGltf_ExtrasParser::getResult() { if (myResult.IsNull()) @@ -367,10 +351,8 @@ inline const RWGltf_JsonValue* findObjectMember(const RWGltf_JsonValue& theObjec return anIter != theObject.MemberEnd() ? &anIter->value : NULL; } -// ======================================================================= -// function : RWGltf_GltfJsonParser::FormatParseError -// purpose : -// ======================================================================= +//================================================================================================= + const char* RWGltf_GltfJsonParser::FormatParseError(rapidjson::ParseErrorCode theCode) { switch (theCode) @@ -415,10 +397,8 @@ const char* RWGltf_GltfJsonParser::FormatParseError(rapidjson::ParseErrorCode th return "UNKOWN syntax error"; } -// ======================================================================= -// function : GltfElementMap::Init -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::GltfElementMap::Init(const TCollection_AsciiString& theRootName, const RWGltf_JsonValue* theRoot) { @@ -462,10 +442,8 @@ void RWGltf_GltfJsonParser::GltfElementMap::Init(const TCollection_AsciiString& } } -// ======================================================================= -// function : parseTransformationMatrix -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::parseTransformationMatrix(const TCollection_AsciiString& theSceneNodeId, const RWGltf_JsonValue& theMatrixVal, TopLoc_Location& theResult) const @@ -518,10 +496,8 @@ bool RWGltf_GltfJsonParser::parseTransformationMatrix(const TCollection_AsciiStr return true; } -// ======================================================================= -// function : RWGltf_GltfJsonParser -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::parseTransformationComponents( const TCollection_AsciiString& theSceneNodeId, const RWGltf_JsonValue* theRotationVal, @@ -647,20 +623,16 @@ bool RWGltf_GltfJsonParser::parseTransformationComponents( } #endif -// ======================================================================= -// function : reportGltfSyntaxProblem -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::reportGltfSyntaxProblem(const TCollection_AsciiString& theMsg, Message_Gravity theGravity) const { Message::Send(myErrorPrefix + theMsg, theGravity); } -// ======================================================================= -// function : RWGltf_GltfJsonParser -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfJsonParser::RWGltf_GltfJsonParser(TopTools_SequenceOfShape& theRootShapes) : myRootShapes(&theRootShapes), myAttribMap(NULL), @@ -680,10 +652,8 @@ RWGltf_GltfJsonParser::RWGltf_GltfJsonParser(TopTools_SequenceOfShape& theRootSh myCSTrsf.SetInputCoordinateSystem(RWMesh_CoordinateSystem_glTF); } -// ======================================================================= -// function : SetFilePath -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::SetFilePath(const TCollection_AsciiString& theFilePath) { myFilePath = theFilePath; @@ -693,10 +663,8 @@ void RWGltf_GltfJsonParser::SetFilePath(const TCollection_AsciiString& theFilePa } #ifdef HAVE_RAPIDJSON -// ======================================================================= -// function : gltfParseRoots -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseRoots() { // find glTF root elements for smooth navigation @@ -734,10 +702,8 @@ bool RWGltf_GltfJsonParser::gltfParseRoots() return true; } -// ======================================================================= -// function : gltfParseAsset -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::gltfParseAsset() { const RWGltf_JsonValue* anAsset = myGltfRoots[RWGltf_GltfRootElement_Asset].Root(); @@ -800,10 +766,8 @@ void RWGltf_GltfJsonParser::gltfParseAsset() } } -// ======================================================================= -// function : gltfParseMaterials -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::gltfParseMaterials() { const RWGltf_JsonValue* aMatList = myGltfRoots[RWGltf_GltfRootElement_Materials].Root(); @@ -876,10 +840,8 @@ void RWGltf_GltfJsonParser::gltfParseMaterials() } } -// ======================================================================= -// function : gltfBindMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::gltfBindMaterial( const Handle(RWGltf_MaterialMetallicRoughness)& theMatPbr, const Handle(RWGltf_MaterialCommon)& theMatCommon) @@ -962,10 +924,8 @@ void RWGltf_GltfJsonParser::gltfBindMaterial( myMaterials.Bind(!theMatPbr.IsNull() ? theMatPbr->Id : theMatCommon->Id, aMat); } -// ======================================================================= -// function : gltfParseStdMaterial -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseStdMaterial(Handle(RWGltf_MaterialCommon)& theMat, const RWGltf_JsonValue& theMatNode) { @@ -1034,10 +994,8 @@ bool RWGltf_GltfJsonParser::gltfParseStdMaterial(Handle(RWGltf_MaterialCommon)& return true; } -// ======================================================================= -// function : gltfParsePbrMaterial -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParsePbrMaterial(Handle(RWGltf_MaterialMetallicRoughness)& theMat, const RWGltf_JsonValue& theMatNode) { @@ -1154,10 +1112,8 @@ bool RWGltf_GltfJsonParser::gltfParsePbrMaterial(Handle(RWGltf_MaterialMetallicR return true; } -// ======================================================================= -// function : gltfParseCommonMaterial -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseCommonMaterial(Handle(RWGltf_MaterialCommon)& theMat, const RWGltf_JsonValue& theMatNode) { @@ -1180,10 +1136,8 @@ bool RWGltf_GltfJsonParser::gltfParseCommonMaterial(Handle(RWGltf_MaterialCommon return true; } -// ======================================================================= -// function : gltfParseTexture -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseTexture(Handle(Image_Texture)& theTexture, const RWGltf_JsonValue* theTextureId) { @@ -1334,10 +1288,8 @@ bool RWGltf_GltfJsonParser::gltfParseTexture(Handle(Image_Texture)& theTexture, return true; } -// ======================================================================= -// function : gltfParseTexturInGlbBuffer -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseTexturInGlbBuffer( Handle(Image_Texture)& theTexture, const RWGltf_JsonValue& theBinVal, @@ -1380,10 +1332,8 @@ bool RWGltf_GltfJsonParser::gltfParseTexturInGlbBuffer( return true; } -// ======================================================================= -// function : gltfParseTextureInBufferView -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseTextureInBufferView( Handle(Image_Texture)& theTexture, const TCollection_AsciiString& theSourceId, @@ -1480,10 +1430,8 @@ bool RWGltf_GltfJsonParser::gltfParseTextureInBufferView( return true; } -// ======================================================================= -// function : gltfParseScene -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseScene(const Message_ProgressRange& theProgress) { const RWGltf_JsonValue* aScenes = myGltfRoots[RWGltf_GltfRootElement_Scenes].Root(); @@ -1545,10 +1493,8 @@ bool RWGltf_GltfJsonParser::gltfParseScene(const Message_ProgressRange& theProgr return gltfParseSceneNodes(*myRootShapes, *aSceneNodes, theProgress); } -// ======================================================================= -// function : gltfParseSceneNodes -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseSceneNodes(TopTools_SequenceOfShape& theShapeSeq, const RWGltf_JsonValue& theSceneNodes, const Message_ProgressRange& theProgress) @@ -1595,10 +1541,8 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNodes(TopTools_SequenceOfShape& the return true; } -// ======================================================================= -// function : gltfParseSceneNode -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseSceneNode(TopoDS_Shape& theNodeShape, const TCollection_AsciiString& theSceneNodeId, const RWGltf_JsonValue& theSceneNode, @@ -1740,10 +1684,8 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode(TopoDS_Shape& th return true; } -// ======================================================================= -// function : gltfParseMesh -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseMesh(TopoDS_Shape& theMeshShape, const TCollection_AsciiString& theMeshId, const RWGltf_JsonValue& theMesh) @@ -1804,10 +1746,8 @@ bool RWGltf_GltfJsonParser::gltfParseMesh(TopoDS_Shape& theMesh return true; } -// ======================================================================= -// function : gltfParsePrimArray -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParsePrimArray(TopoDS_Shape& thePrimArrayShape, const TCollection_AsciiString& theMeshId, const TCollection_AsciiString& theMeshName, @@ -2061,10 +2001,8 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray(TopoDS_Shape& th return true; } -// ======================================================================= -// function : gltfParseAccessor -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseAccessor( const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, const TCollection_AsciiString& theName, @@ -2227,10 +2165,8 @@ bool RWGltf_GltfJsonParser::gltfParseAccessor( theType); } -// ======================================================================= -// function : gltfParseBufferView -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseBufferView( const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, const TCollection_AsciiString& theName, @@ -2300,10 +2236,8 @@ bool RWGltf_GltfJsonParser::gltfParseBufferView( theType); } -// ======================================================================= -// function : gltfParseBuffer -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::gltfParseBuffer( const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, const TCollection_AsciiString& theName, @@ -2399,10 +2333,8 @@ bool RWGltf_GltfJsonParser::gltfParseBuffer( } } -// ======================================================================= -// function : bindNamedShape -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfJsonParser::bindNamedShape(TopoDS_Shape& theShape, ShapeMapGroup theGroup, const TopLoc_Location& theLoc, @@ -2513,10 +2445,8 @@ void RWGltf_GltfJsonParser::bindNamedShape(TopoDS_Shape& the } #endif -// ======================================================================= -// function : Parse -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_GltfJsonParser::Parse(const Message_ProgressRange& theProgress) { Message_ProgressScope aPS(theProgress, "Parsing glTF", 1); diff --git a/src/RWGltf/RWGltf_GltfLatePrimitiveArray.cxx b/src/RWGltf/RWGltf_GltfLatePrimitiveArray.cxx index 9826a18fde..31712157da 100644 --- a/src/RWGltf/RWGltf_GltfLatePrimitiveArray.cxx +++ b/src/RWGltf/RWGltf_GltfLatePrimitiveArray.cxx @@ -21,10 +21,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWGltf_GltfLatePrimitiveArray, RWMesh_TriangulationSource) -// ======================================================================= -// function : RWGltf_GltfLatePrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfLatePrimitiveArray::RWGltf_GltfLatePrimitiveArray(const TCollection_AsciiString& theId, const TCollection_AsciiString& theName) : myId(theId), @@ -33,19 +31,15 @@ RWGltf_GltfLatePrimitiveArray::RWGltf_GltfLatePrimitiveArray(const TCollection_A { } -// ======================================================================= -// function : ~RWGltf_GltfLatePrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfLatePrimitiveArray::~RWGltf_GltfLatePrimitiveArray() { // } -// ======================================================================= -// function : BaseColor -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_ColorRGBA RWGltf_GltfLatePrimitiveArray::BaseColor() const { if (!myMaterialPbr.IsNull()) @@ -60,10 +54,8 @@ Quantity_ColorRGBA RWGltf_GltfLatePrimitiveArray::BaseColor() const return Quantity_ColorRGBA(); } -// ======================================================================= -// function : AddPrimArrayData -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfPrimArrayData& RWGltf_GltfLatePrimitiveArray::AddPrimArrayData( RWGltf_GltfArrayType theType) { diff --git a/src/RWGltf/RWGltf_GltfMaterialMap.cxx b/src/RWGltf/RWGltf_GltfMaterialMap.cxx index 31804cb38c..4f33e87a7c 100644 --- a/src/RWGltf/RWGltf_GltfMaterialMap.cxx +++ b/src/RWGltf/RWGltf_GltfMaterialMap.cxx @@ -24,10 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWGltf_GltfMaterialMap, RWMesh_MaterialMap) -// ======================================================================= -// function : baseColorTexture -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Image_Texture)& RWGltf_GltfMaterialMap::baseColorTexture( const Handle(XCAFDoc_VisMaterial)& theMat) { @@ -47,10 +45,8 @@ const Handle(Image_Texture)& RWGltf_GltfMaterialMap::baseColorTexture( return THE_NULL_TEXTURE; } -// ======================================================================= -// function : RWGltf_GltfMaterialMap -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfMaterialMap::RWGltf_GltfMaterialMap(const TCollection_AsciiString& theFile, const Standard_Integer theDefSamplerId) : RWMesh_MaterialMap(theFile), @@ -60,19 +56,15 @@ RWGltf_GltfMaterialMap::RWGltf_GltfMaterialMap(const TCollection_AsciiString& th myMatNameAsKey = false; } -// ======================================================================= -// function : ~RWGltf_GltfMaterialMap -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_GltfMaterialMap::~RWGltf_GltfMaterialMap() { // } -// ======================================================================= -// function : AddImages -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::AddImages(RWGltf_GltfOStreamWriter* theWriter, const XCAFPrs_Style& theStyle, Standard_Boolean& theIsStarted) @@ -89,10 +81,8 @@ void RWGltf_GltfMaterialMap::AddImages(RWGltf_GltfOStreamWriter* theWriter, addImage(theWriter, theStyle.Material()->PbrMaterial().OcclusionTexture, theIsStarted); } -// ======================================================================= -// function : AddGlbImages -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::AddGlbImages(std::ostream& theBinFile, const XCAFPrs_Style& theStyle) { if (theStyle.Material().IsNull() || theStyle.Material()->IsEmpty()) @@ -107,10 +97,8 @@ void RWGltf_GltfMaterialMap::AddGlbImages(std::ostream& theBinFile, const XCAFPr addGlbImage(theBinFile, theStyle.Material()->PbrMaterial().OcclusionTexture); } -// ======================================================================= -// function : addImage -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::addImage(RWGltf_GltfOStreamWriter* theWriter, const Handle(Image_Texture)& theTexture, Standard_Boolean& theIsStarted) @@ -150,10 +138,8 @@ void RWGltf_GltfMaterialMap::addImage(RWGltf_GltfOStreamWriter* theWriter, #endif } -// ======================================================================= -// function : addGlbImage -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::addGlbImage(std::ostream& theBinFile, const Handle(Image_Texture)& theTexture) { @@ -189,10 +175,8 @@ void RWGltf_GltfMaterialMap::addGlbImage(std::ostream& theBinFile myImageMap.Add(theTexture, aBuffImage); } -// ======================================================================= -// function : FlushBufferViews -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::FlushGlbBufferViews(RWGltf_GltfOStreamWriter* theWriter, const Standard_Integer theBinDataBufferId, Standard_Integer& theBuffViewId) @@ -226,10 +210,8 @@ void RWGltf_GltfMaterialMap::FlushGlbBufferViews(RWGltf_GltfOStreamWriter* theWr #endif } -// ======================================================================= -// function : FlushGlbImages -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::FlushGlbImages(RWGltf_GltfOStreamWriter* theWriter) { #ifdef HAVE_RAPIDJSON @@ -278,10 +260,8 @@ void RWGltf_GltfMaterialMap::FlushGlbImages(RWGltf_GltfOStreamWriter* theWriter) #endif } -// ======================================================================= -// function : AddMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::AddMaterial(RWGltf_GltfOStreamWriter* theWriter, const XCAFPrs_Style& theStyle, Standard_Boolean& theIsStarted) @@ -310,10 +290,8 @@ void RWGltf_GltfMaterialMap::AddMaterial(RWGltf_GltfOStreamWriter* theWriter, #endif } -// ======================================================================= -// function : AddTextures -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::AddTextures(RWGltf_GltfOStreamWriter* theWriter, const XCAFPrs_Style& theStyle, Standard_Boolean& theIsStarted) @@ -330,10 +308,8 @@ void RWGltf_GltfMaterialMap::AddTextures(RWGltf_GltfOStreamWriter* theWriter, addTexture(theWriter, theStyle.Material()->PbrMaterial().OcclusionTexture, theIsStarted); } -// ======================================================================= -// function : addTexture -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::addTexture(RWGltf_GltfOStreamWriter* theWriter, const Handle(Image_Texture)& theTexture, Standard_Boolean& theIsStarted) @@ -371,19 +347,15 @@ void RWGltf_GltfMaterialMap::addTexture(RWGltf_GltfOStreamWriter* theWriter, #endif } -// ======================================================================= -// function : AddMaterial -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString RWGltf_GltfMaterialMap::AddMaterial(const XCAFPrs_Style& theStyle) { return RWMesh_MaterialMap::AddMaterial(theStyle); } -// ======================================================================= -// function : DefineMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_GltfMaterialMap::DefineMaterial(const XCAFPrs_Style& theStyle, const TCollection_AsciiString& /*theKey*/, const TCollection_AsciiString& theName) diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 0bc0a5c082..445e315b66 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -100,29 +100,23 @@ static RWGltf_GltfAccessorCompType compTypeFromDraco(draco::DataType theType) IMPLEMENT_STANDARD_RTTIEXT(RWGltf_TriangulationReader, RWMesh_TriangulationReader) -// ======================================================================= -// function : RWGltf_TriangulationReader -// purpose : -// ======================================================================= +//================================================================================================= + RWGltf_TriangulationReader::RWGltf_TriangulationReader() { // } -// ======================================================================= -// function : reportError -// purpose : -// ======================================================================= +//================================================================================================= + void RWGltf_TriangulationReader::reportError(const TCollection_AsciiString& theText) const { Message::SendFail(TCollection_AsciiString("File '") + myFileName + "' defines invalid glTF!\n" + theText); } -// ======================================================================= -// function : LoadStreamData -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::LoadStreamData( const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh) const @@ -146,10 +140,8 @@ bool RWGltf_TriangulationReader::LoadStreamData( return true; } -// ======================================================================= -// function : readStreamData -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::readStreamData( const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceGltfMesh, const RWGltf_GltfPrimArrayData& theGltfData, @@ -166,10 +158,8 @@ bool RWGltf_TriangulationReader::readStreamData( return true; } -// ======================================================================= -// function : readFileData -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::readFileData( const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceGltfMesh, const RWGltf_GltfPrimArrayData& theGltfData, @@ -200,10 +190,8 @@ bool RWGltf_TriangulationReader::readFileData( return true; } -// ======================================================================= -// function : loadStreamData -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::loadStreamData( const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh, @@ -239,10 +227,8 @@ bool RWGltf_TriangulationReader::loadStreamData( return wasLoaded; } -// ======================================================================= -// function : readDracoBuffer -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::readDracoBuffer( const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceGltfMesh, const RWGltf_GltfPrimArrayData& theGltfData, @@ -471,10 +457,8 @@ bool RWGltf_TriangulationReader::readDracoBuffer( #endif } -// ======================================================================= -// function : load -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::load(const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh, const Handle(OSD_FileSystem)& theFileSystem) const @@ -530,10 +514,8 @@ bool RWGltf_TriangulationReader::load(const Handle(RWMesh_TriangulationSource)& return true; } -// ======================================================================= -// function : finalizeLoading -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::finalizeLoading( const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh) const @@ -571,10 +553,8 @@ bool RWGltf_TriangulationReader::finalizeLoading( return RWMesh_TriangulationReader::finalizeLoading(theSourceMesh, theDestMesh); } -// ======================================================================= -// function : readBuffer -// purpose : -// ======================================================================= +//================================================================================================= + bool RWGltf_TriangulationReader::readBuffer( const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh, diff --git a/src/RWMesh/RWMesh.cxx b/src/RWMesh/RWMesh.cxx index 6d148a6c66..2c40feeec9 100644 --- a/src/RWMesh/RWMesh.cxx +++ b/src/RWMesh/RWMesh.cxx @@ -16,10 +16,8 @@ #include #include -// ================================================================ -// Function : ReadNameAttribute -// Purpose : -// ================================================================ +//================================================================================================= + TCollection_AsciiString RWMesh::ReadNameAttribute(const TDF_Label& theLabel) { Handle(TDataStd_Name) aNodeName; @@ -28,10 +26,8 @@ TCollection_AsciiString RWMesh::ReadNameAttribute(const TDF_Label& theLabel) : TCollection_AsciiString(); } -// ================================================================ -// Function : FormatName -// Purpose : -// ================================================================ +//================================================================================================= + TCollection_AsciiString RWMesh::FormatName(RWMesh_NameFormat theFormat, const TDF_Label& theLabel, const TDF_Label& theRefLabel) diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index c3183f297c..47d805468f 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -35,10 +35,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWMesh_CafReader, Standard_Transient) -// ======================================================================= -// function : RWMesh_CafReader -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_CafReader::RWMesh_CafReader() : myToFillDoc(Standard_True), myToFillIncomplete(Standard_True), @@ -48,10 +46,8 @@ RWMesh_CafReader::RWMesh_CafReader() // } -// ======================================================================= -// function : ~RWMesh_CafReader -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_CafReader::~RWMesh_CafReader() { // @@ -67,10 +63,8 @@ void RWMesh_CafReader::SetDocument(const Handle(TDocStd_Document)& theDoc) } } -// ======================================================================= -// function : SingleShape -// purpose : -// ======================================================================= +//================================================================================================= + TopoDS_Shape RWMesh_CafReader::SingleShape() const { if (myRootShapes.Size() > 1) @@ -92,10 +86,8 @@ TopoDS_Shape RWMesh_CafReader::SingleShape() const return TopoDS_Shape(); } -// ======================================================================= -// function : perform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWMesh_CafReader::perform(const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) @@ -105,10 +97,8 @@ Standard_Boolean RWMesh_CafReader::perform(const TCollection_AsciiString& theFil return perform(aStream, theFile, theProgress, theToProbe); } -// ======================================================================= -// function : perform -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWMesh_CafReader::perform(std::istream& theStream, const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, @@ -171,10 +161,8 @@ Standard_Boolean RWMesh_CafReader::perform(std::istream& theStr return Standard_True; } -// ======================================================================= -// function : fillDocument -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_CafReader::fillDocument() { if (!myToFillDoc || myXdeDoc.IsNull() || myRootShapes.IsEmpty()) @@ -209,10 +197,8 @@ void RWMesh_CafReader::fillDocument() XCAFDoc_ShapeTool::SetAutoNaming(wasAutoNaming); } -// ======================================================================= -// function : setShapeName -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_CafReader::setShapeName(const TDF_Label& theLabel, const TopAbs_ShapeEnum theShapeType, const TCollection_AsciiString& theName, @@ -233,10 +219,8 @@ void RWMesh_CafReader::setShapeName(const TDF_Label& theLabel, } } -// ======================================================================= -// function : setShapeStyle -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_CafReader::setShapeStyle(const CafDocumentTools& theTools, const TDF_Label& theLabel, const XCAFPrs_Style& theStyle) @@ -262,10 +246,8 @@ void RWMesh_CafReader::setShapeStyle(const CafDocumentTools& theTools, } } -// ======================================================================= -// function : setShapeNamedData -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_CafReader::setShapeNamedData(const CafDocumentTools&, const TDF_Label& theLabel, const Handle(TDataStd_NamedData)& theNameData) @@ -297,10 +279,8 @@ void RWMesh_CafReader::setShapeNamedData(const CafDocumentTools&, } } -// ======================================================================= -// function : addShapeIntoDoc -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWMesh_CafReader::addShapeIntoDoc(CafDocumentTools& theTools, const TopoDS_Shape& theShape, const TDF_Label& theLabel, @@ -478,10 +458,8 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc(CafDocumentTools& return Standard_True; } -// ======================================================================= -// function : addSubShapeIntoDoc -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWMesh_CafReader::addSubShapeIntoDoc(CafDocumentTools& theTools, const TopoDS_Shape& theShape, const TDF_Label& theParentLabel) @@ -536,10 +514,8 @@ Standard_Boolean RWMesh_CafReader::addSubShapeIntoDoc(CafDocumentTools& theToo return Standard_True; } -// ======================================================================= -// function : generateNames -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_CafReader::generateNames(const TCollection_AsciiString& theFile, const Standard_Integer theRootLower, const Standard_Boolean theWithSubLabels) diff --git a/src/RWMesh/RWMesh_CoordinateSystemConverter.cxx b/src/RWMesh/RWMesh_CoordinateSystemConverter.cxx index c1f17a16f8..6c68b6c700 100644 --- a/src/RWMesh/RWMesh_CoordinateSystemConverter.cxx +++ b/src/RWMesh/RWMesh_CoordinateSystemConverter.cxx @@ -16,10 +16,8 @@ #include -// ================================================================ -// Function : RWMesh_CoordinateSystemConverter -// Purpose : -// ================================================================ +//================================================================================================= + RWMesh_CoordinateSystemConverter::RWMesh_CoordinateSystemConverter() : myInputLengthUnit(-1.0), myOutputLengthUnit(-1.0), @@ -33,10 +31,8 @@ RWMesh_CoordinateSystemConverter::RWMesh_CoordinateSystemConverter() // } -// ================================================================ -// Function : Init -// Purpose : -// ================================================================ +//================================================================================================= + void RWMesh_CoordinateSystemConverter::Init(const gp_Ax3& theInputSystem, Standard_Real theInputLengthUnit, const gp_Ax3& theOutputSystem, diff --git a/src/RWMesh/RWMesh_EdgeIterator.cxx b/src/RWMesh/RWMesh_EdgeIterator.cxx index bdcbe8ce81..68b76cc7b7 100644 --- a/src/RWMesh/RWMesh_EdgeIterator.cxx +++ b/src/RWMesh/RWMesh_EdgeIterator.cxx @@ -19,10 +19,8 @@ #include #include -// ======================================================================= -// function : RWMesh_EdgeIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_EdgeIterator::RWMesh_EdgeIterator(const TDF_Label& theLabel, const TopLoc_Location& theLocation, const Standard_Boolean theToMapColors, @@ -32,10 +30,8 @@ RWMesh_EdgeIterator::RWMesh_EdgeIterator(const TDF_Label& theLabel, Next(); } -// ======================================================================= -// function : RWMesh_EdgeIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_EdgeIterator::RWMesh_EdgeIterator(const TopoDS_Shape& theShape, const XCAFPrs_Style& theStyle) : RWMesh_ShapeIterator(theShape, TopAbs_EDGE, theStyle) @@ -43,10 +39,8 @@ RWMesh_EdgeIterator::RWMesh_EdgeIterator(const TopoDS_Shape& theShape, Next(); } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_EdgeIterator::Next() { for (; myIter.More(); myIter.Next()) @@ -68,10 +62,8 @@ void RWMesh_EdgeIterator::Next() resetEdge(); } -// ======================================================================= -// function : initEdge -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_EdgeIterator::initEdge() { initShape(); diff --git a/src/RWMesh/RWMesh_FaceIterator.cxx b/src/RWMesh/RWMesh_FaceIterator.cxx index 2cdc3c923d..59e62666c0 100644 --- a/src/RWMesh/RWMesh_FaceIterator.cxx +++ b/src/RWMesh/RWMesh_FaceIterator.cxx @@ -20,10 +20,8 @@ #include #include -// ======================================================================= -// function : RWMesh_FaceIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_FaceIterator::RWMesh_FaceIterator(const TDF_Label& theLabel, const TopLoc_Location& theLocation, const Standard_Boolean theToMapColors, @@ -36,10 +34,8 @@ RWMesh_FaceIterator::RWMesh_FaceIterator(const TDF_Label& theLabel, Next(); } -// ======================================================================= -// function : RWMesh_FaceIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_FaceIterator::RWMesh_FaceIterator(const TopoDS_Shape& theShape, const XCAFPrs_Style& theStyle) : RWMesh_ShapeIterator(theShape, TopAbs_FACE, theStyle), @@ -50,10 +46,8 @@ RWMesh_FaceIterator::RWMesh_FaceIterator(const TopoDS_Shape& theShape, Next(); } -// ======================================================================= -// function : normal -// purpose : -// ======================================================================= +//================================================================================================= + gp_Dir RWMesh_FaceIterator::normal(Standard_Integer theNode) const { gp_Dir aNormal(gp::DZ()); @@ -78,10 +72,8 @@ gp_Dir RWMesh_FaceIterator::normal(Standard_Integer theNode) const return aNormal; } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_FaceIterator::Next() { for (; myIter.More(); myIter.Next()) @@ -103,10 +95,8 @@ void RWMesh_FaceIterator::Next() resetFace(); } -// ======================================================================= -// function : initFace -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_FaceIterator::initFace() { myHasNormals = false; diff --git a/src/RWMesh/RWMesh_MaterialMap.cxx b/src/RWMesh/RWMesh_MaterialMap.cxx index bd9cc3ebcf..cf5472e7ce 100644 --- a/src/RWMesh/RWMesh_MaterialMap.cxx +++ b/src/RWMesh/RWMesh_MaterialMap.cxx @@ -24,10 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWMesh_MaterialMap, Standard_Transient) -// ======================================================================= -// function : RWMesh_MaterialMap -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_MaterialMap::RWMesh_MaterialMap(const TCollection_AsciiString& theFile) : myFileName(theFile), myKeyPrefix("mat_"), @@ -44,19 +42,15 @@ RWMesh_MaterialMap::RWMesh_MaterialMap(const TCollection_AsciiString& theFile) } } -// ======================================================================= -// function : ~RWMesh_MaterialMap -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_MaterialMap::~RWMesh_MaterialMap() { // } -// ======================================================================= -// function : AddMaterial -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString RWMesh_MaterialMap::AddMaterial(const XCAFPrs_Style& theStyle) { if (myStyles.IsBound1(theStyle)) @@ -123,10 +117,8 @@ TCollection_AsciiString RWMesh_MaterialMap::AddMaterial(const XCAFPrs_Style& the return aMatKey; } -// ======================================================================= -// function : copyFileTo -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_MaterialMap::copyFileTo(const TCollection_AsciiString& theFileSrc, const TCollection_AsciiString& theFileDst) { @@ -161,10 +153,8 @@ bool RWMesh_MaterialMap::copyFileTo(const TCollection_AsciiString& theFileSrc, } } -// ======================================================================= -// function : CopyTexture -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_MaterialMap::CopyTexture(TCollection_AsciiString& theResTexture, const Handle(Image_Texture)& theTexture, const TCollection_AsciiString& theKey) @@ -194,10 +184,8 @@ bool RWMesh_MaterialMap::CopyTexture(TCollection_AsciiString& theResTextur return theTexture->WriteImage(aResTexFile); } -// ======================================================================= -// function : CreateTextureFolder -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_MaterialMap::CreateTextureFolder() { if (!myTexFolder.IsEmpty()) diff --git a/src/RWMesh/RWMesh_ShapeIterator.cxx b/src/RWMesh/RWMesh_ShapeIterator.cxx index 63c3fccaf3..a26b6c5766 100644 --- a/src/RWMesh/RWMesh_ShapeIterator.cxx +++ b/src/RWMesh/RWMesh_ShapeIterator.cxx @@ -18,10 +18,8 @@ #include #include -// ======================================================================= -// function : RWMesh_ShapeIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_ShapeIterator::RWMesh_ShapeIterator(const TDF_Label& theLabel, const TopLoc_Location& theLocation, const TopAbs_ShapeEnum theShapeType, @@ -48,10 +46,8 @@ RWMesh_ShapeIterator::RWMesh_ShapeIterator(const TDF_Label& theLabel, } } -// ======================================================================= -// function : RWMesh_ShapeIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_ShapeIterator::RWMesh_ShapeIterator(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theShapeType, const XCAFPrs_Style& theStyle) @@ -67,10 +63,8 @@ RWMesh_ShapeIterator::RWMesh_ShapeIterator(const TopoDS_Shape& theShape, myIter.Init(theShape, myShapeType); } -// ======================================================================= -// function : dispatchStyles -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_ShapeIterator::dispatchStyles(const TDF_Label& theLabel, const TopLoc_Location& theLocation, const XCAFPrs_Style& theStyle) @@ -135,10 +129,8 @@ void RWMesh_ShapeIterator::dispatchStyles(const TDF_Label& theLabel, } } -// ======================================================================= -// function : initEdge -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_ShapeIterator::initShape() { myHasColor = false; diff --git a/src/RWMesh/RWMesh_TriangulationReader.cxx b/src/RWMesh/RWMesh_TriangulationReader.cxx index 575c83e13a..2ac19a28aa 100644 --- a/src/RWMesh/RWMesh_TriangulationReader.cxx +++ b/src/RWMesh/RWMesh_TriangulationReader.cxx @@ -61,10 +61,8 @@ static TCollection_AsciiString loadingStatistic(const TCollection_AsciiString& t } } // namespace -// ======================================================================= -// function : PrintStatistic -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_TriangulationReader::LoadingStatistic::PrintStatistic( const TCollection_AsciiString& thePrefix) const { @@ -80,10 +78,8 @@ void RWMesh_TriangulationReader::LoadingStatistic::PrintStatistic( } } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_TriangulationReader::RWMesh_TriangulationReader() : myLoadingStatistic(NULL), myIsDoublePrecision(false), @@ -92,19 +88,15 @@ RWMesh_TriangulationReader::RWMesh_TriangulationReader() { } -// ======================================================================= -// function : Destructor -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_TriangulationReader::~RWMesh_TriangulationReader() { delete myLoadingStatistic; } -// ======================================================================= -// function : Load -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_TriangulationReader::Load(const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh, const Handle(OSD_FileSystem)& theFileSystem) const @@ -128,10 +120,8 @@ bool RWMesh_TriangulationReader::Load(const Handle(RWMesh_TriangulationSource)& return true; } -// ======================================================================= -// function : finalizeLoading -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_TriangulationReader::finalizeLoading( const Handle(RWMesh_TriangulationSource)& theSourceMesh, const Handle(Poly_Triangulation)& theDestMesh) const @@ -163,10 +153,8 @@ bool RWMesh_TriangulationReader::finalizeLoading( return true; } -// ======================================================================= -// function : setNbEdges -// purpose : -// ======================================================================= +//================================================================================================= + bool RWMesh_TriangulationReader::setNbEdges(const Handle(Poly_Triangulation)& theMesh, const Standard_Integer theNbTris, const Standard_Boolean theToCopyData) const @@ -180,10 +168,8 @@ bool RWMesh_TriangulationReader::setNbEdges(const Handle(Poly_Triangulation)& th return false; } -// ======================================================================= -// function : setEdge -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer RWMesh_TriangulationReader::setEdge(const Handle(Poly_Triangulation)& theMesh, const Standard_Integer theIndex, const Standard_Integer theEdge) const diff --git a/src/RWMesh/RWMesh_TriangulationSource.cxx b/src/RWMesh/RWMesh_TriangulationSource.cxx index 7d04ebaad8..3cbde10564 100644 --- a/src/RWMesh/RWMesh_TriangulationSource.cxx +++ b/src/RWMesh/RWMesh_TriangulationSource.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWMesh_TriangulationSource, Poly_Triangulation) -// ======================================================================= -// function : RWMesh_TriangulationSource -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_TriangulationSource::RWMesh_TriangulationSource() : myNbDefNodes(0), myNbDefTriangles(0), @@ -28,19 +26,15 @@ RWMesh_TriangulationSource::RWMesh_TriangulationSource() { } -// ======================================================================= -// function : ~RWMesh_TriangulationSource -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_TriangulationSource::~RWMesh_TriangulationSource() { // } -// ======================================================================= -// function : loadDeferredData -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWMesh_TriangulationSource::loadDeferredData( const Handle(OSD_FileSystem)& theFileSystem, const Handle(Poly_Triangulation)& theDestTriangulation) const @@ -63,10 +57,8 @@ Standard_Boolean RWMesh_TriangulationSource::loadDeferredData( return false; } -// ======================================================================= -// function : ResizeEdges -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_TriangulationSource::ResizeEdges(Standard_Integer theNbEdges, Standard_Boolean theToCopyOld) { diff --git a/src/RWMesh/RWMesh_VertexIterator.cxx b/src/RWMesh/RWMesh_VertexIterator.cxx index ce9d3deb47..555b170a03 100644 --- a/src/RWMesh/RWMesh_VertexIterator.cxx +++ b/src/RWMesh/RWMesh_VertexIterator.cxx @@ -19,10 +19,8 @@ #include #include -// ======================================================================= -// function : RWMesh_VertexIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_VertexIterator::RWMesh_VertexIterator(const TDF_Label& theLabel, const TopLoc_Location& theLocation, const Standard_Boolean theToMapColors, @@ -32,10 +30,8 @@ RWMesh_VertexIterator::RWMesh_VertexIterator(const TDF_Label& theLabel, Next(); } -// ======================================================================= -// function : RWMesh_VertexIterator -// purpose : -// ======================================================================= +//================================================================================================= + RWMesh_VertexIterator::RWMesh_VertexIterator(const TopoDS_Shape& theShape, const XCAFPrs_Style& theStyle) : RWMesh_ShapeIterator(theShape, TopAbs_VERTEX, theStyle) @@ -43,10 +39,8 @@ RWMesh_VertexIterator::RWMesh_VertexIterator(const TopoDS_Shape& theShape, Next(); } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_VertexIterator::Next() { for (; myIter.More(); myIter.Next()) @@ -68,10 +62,8 @@ void RWMesh_VertexIterator::Next() resetVertex(); } -// ======================================================================= -// function : initEdge -// purpose : -// ======================================================================= +//================================================================================================= + void RWMesh_VertexIterator::initVertex() { initShape(); diff --git a/src/RWObj/RWObj_CafWriter.cxx b/src/RWObj/RWObj_CafWriter.cxx index eef208e5fc..ba1a2554f2 100644 --- a/src/RWObj/RWObj_CafWriter.cxx +++ b/src/RWObj/RWObj_CafWriter.cxx @@ -79,10 +79,8 @@ Standard_Boolean RWObj_CafWriter::toSkipFaceMesh(const RWMesh_FaceIterator& theF return theFaceIter.IsEmptyMesh(); } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TColStd_IndexedDataMapOfStringString& theFileInfo, const Message_ProgressRange& theProgress) @@ -93,10 +91,8 @@ bool RWObj_CafWriter::Perform(const Handle(TDocStd_Document)& theDoc return Perform(theDocument, aRoots, NULL, theFileInfo, theProgress); } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRootLabels, const TColStd_MapOfAsciiString* theLabelFilter, @@ -234,10 +230,8 @@ bool RWObj_CafWriter::Perform(const Handle(TDocStd_Document)& theDoc return isDone && !aPSentry.IsAborted(); } -// ======================================================================= -// function : addFaceInfo -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_CafWriter::addFaceInfo(const RWMesh_FaceIterator& theFace, Standard_Integer& theNbNodes, Standard_Integer& theNbElems, @@ -263,10 +257,8 @@ void RWObj_CafWriter::addFaceInfo(const RWMesh_FaceIterator& theFace, || (!theFace.FaceStyle().BaseColorTexture().IsNull() && theFace.HasTexCoords()); } -// ======================================================================= -// function : writeShape -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::writeShape(RWObj_ObjWriterContext& theWriter, RWObj_ObjMaterialMap& theMatMgr, Message_LazyProgressScope& thePSentry, @@ -342,10 +334,8 @@ bool RWObj_CafWriter::writeShape(RWObj_ObjWriterContext& theWriter, return true; } -// ======================================================================= -// function : writePositions -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::writePositions(RWObj_ObjWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) @@ -365,10 +355,8 @@ bool RWObj_CafWriter::writePositions(RWObj_ObjWriterContext& theWriter, return true; } -// ======================================================================= -// function : writeNormals -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::writeNormals(RWObj_ObjWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) @@ -389,10 +377,8 @@ bool RWObj_CafWriter::writeNormals(RWObj_ObjWriterContext& theWriter, return true; } -// ======================================================================= -// function : writeTextCoords -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::writeTextCoords(RWObj_ObjWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) @@ -411,10 +397,8 @@ bool RWObj_CafWriter::writeTextCoords(RWObj_ObjWriterContext& theWriter, return true; } -// ======================================================================= -// function : writeIndices -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_CafWriter::writeIndices(RWObj_ObjWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) diff --git a/src/RWObj/RWObj_MtlReader.cxx b/src/RWObj/RWObj_MtlReader.cxx index 6af7405984..e79d02a4a5 100644 --- a/src/RWObj/RWObj_MtlReader.cxx +++ b/src/RWObj/RWObj_MtlReader.cxx @@ -76,10 +76,8 @@ static bool findRelativePath(const TCollection_AsciiString& theAbsolutePath, } } // namespace -// ======================================================================= -// function : RWObj_MtlReader -// purpose : -// ======================================================================= +//================================================================================================= + RWObj_MtlReader::RWObj_MtlReader( NCollection_DataMap& theMaterials) : myFile(NULL), @@ -89,10 +87,8 @@ RWObj_MtlReader::RWObj_MtlReader( // } -// ======================================================================= -// function : ~RWObj_MtlReader -// purpose : -// ======================================================================= +//================================================================================================= + RWObj_MtlReader::~RWObj_MtlReader() { if (myFile != NULL) @@ -101,10 +97,8 @@ RWObj_MtlReader::~RWObj_MtlReader() } } -// ======================================================================= -// function : Read -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_MtlReader::Read(const TCollection_AsciiString& theFolder, const TCollection_AsciiString& theFile) { @@ -298,10 +292,8 @@ bool RWObj_MtlReader::Read(const TCollection_AsciiString& theFolder, return myMaterials->Extent() != aNbMatOld; } -// ======================================================================= -// function : processTexturePath -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_MtlReader::processTexturePath(TCollection_AsciiString& theTexturePath, const TCollection_AsciiString& theFolder) { @@ -327,10 +319,8 @@ void RWObj_MtlReader::processTexturePath(TCollection_AsciiString& theTextu } } -// ======================================================================= -// function : validateScalar -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_MtlReader::validateScalar(const Standard_Real theValue) { if (theValue < 0.0 || theValue > 1.0) @@ -342,10 +332,8 @@ bool RWObj_MtlReader::validateScalar(const Standard_Real theValue) return true; } -// ======================================================================= -// function : validateColor -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_MtlReader::validateColor(const Graphic3d_Vec3& theVec) { if (theVec.r() < 0.0f || theVec.r() > 1.0f || theVec.g() < 0.0f || theVec.g() > 1.0f diff --git a/src/RWObj/RWObj_ObjMaterialMap.cxx b/src/RWObj/RWObj_ObjMaterialMap.cxx index 8bdfec8d4a..ab383f85d7 100644 --- a/src/RWObj/RWObj_ObjMaterialMap.cxx +++ b/src/RWObj/RWObj_ObjMaterialMap.cxx @@ -18,10 +18,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWObj_ObjMaterialMap, RWMesh_MaterialMap) -// ================================================================ -// Function : RWObj_ObjMaterialMap -// Purpose : -// ================================================================ +//================================================================================================= + RWObj_ObjMaterialMap::RWObj_ObjMaterialMap(const TCollection_AsciiString& theFile) : RWMesh_MaterialMap(theFile), myFile(NULL) @@ -29,10 +27,8 @@ RWObj_ObjMaterialMap::RWObj_ObjMaterialMap(const TCollection_AsciiString& theFil // } -// ================================================================ -// Function : ~RWObj_ObjMaterialMap -// Purpose : -// ================================================================ +//================================================================================================= + RWObj_ObjMaterialMap::~RWObj_ObjMaterialMap() { if (myFile != NULL) @@ -49,10 +45,8 @@ RWObj_ObjMaterialMap::~RWObj_ObjMaterialMap() } } -// ================================================================ -// Function : AddMaterial -// Purpose : -// ================================================================ +//================================================================================================= + TCollection_AsciiString RWObj_ObjMaterialMap::AddMaterial(const XCAFPrs_Style& theStyle) { if (myFile == NULL && !myIsFailed) @@ -72,10 +66,8 @@ TCollection_AsciiString RWObj_ObjMaterialMap::AddMaterial(const XCAFPrs_Style& t return RWMesh_MaterialMap::AddMaterial(theStyle); } -// ================================================================ -// Function : DefineMaterial -// Purpose : -// ================================================================ +//================================================================================================= + void RWObj_ObjMaterialMap::DefineMaterial(const XCAFPrs_Style& theStyle, const TCollection_AsciiString& theKey, const TCollection_AsciiString& theName) diff --git a/src/RWObj/RWObj_ObjWriterContext.cxx b/src/RWObj/RWObj_ObjWriterContext.cxx index ece99ebe78..bc2819730c 100644 --- a/src/RWObj/RWObj_ObjWriterContext.cxx +++ b/src/RWObj/RWObj_ObjWriterContext.cxx @@ -17,10 +17,8 @@ #include #include -// ======================================================================= -// function : splitLines -// purpose : -// ======================================================================= +//================================================================================================= + static void splitLines(const TCollection_AsciiString& theString, NCollection_IndexedMap& theLines) { @@ -58,10 +56,8 @@ static void splitLines(const TCollection_AsciiString& theStrin } } -// ================================================================ -// Function : RWObj_ObjWriterContext -// Purpose : -// ================================================================ +//================================================================================================= + RWObj_ObjWriterContext::RWObj_ObjWriterContext(const TCollection_AsciiString& theName) : NbFaces(0), myFile(OSD_OpenFile(theName.ToCString(), "wb")), @@ -79,10 +75,8 @@ RWObj_ObjWriterContext::RWObj_ObjWriterContext(const TCollection_AsciiString& th } } -// ================================================================ -// Function : ~RWObj_ObjWriterContext -// Purpose : -// ================================================================ +//================================================================================================= + RWObj_ObjWriterContext::~RWObj_ObjWriterContext() { if (myFile != NULL) @@ -92,10 +86,8 @@ RWObj_ObjWriterContext::~RWObj_ObjWriterContext() } } -// ================================================================ -// Function : Close -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::Close() { bool isOk = ::fclose(myFile) == 0; @@ -103,10 +95,8 @@ bool RWObj_ObjWriterContext::Close() return isOk; } -// ================================================================ -// Function : WriteHeader -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteHeader(const Standard_Integer theNbNodes, const Standard_Integer theNbElems, const TCollection_AsciiString& theMatLib, @@ -147,10 +137,8 @@ bool RWObj_ObjWriterContext::WriteHeader(const Standard_Integer return isOk; } -// ================================================================ -// Function : WriteActiveMaterial -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteActiveMaterial(const TCollection_AsciiString& theMaterial) { myActiveMaterial = theMaterial; @@ -158,10 +146,8 @@ bool RWObj_ObjWriterContext::WriteActiveMaterial(const TCollection_AsciiString& : Fprintf(myFile, "usemtl\n") != 0; } -// ================================================================ -// Function : WriteTriangle -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteTriangle(const Graphic3d_Vec3i& theTri) { const Graphic3d_Vec3i aTriPos = theTri + myElemPosFirst.xyz(); @@ -216,10 +202,8 @@ bool RWObj_ObjWriterContext::WriteTriangle(const Graphic3d_Vec3i& theTri) } } -// ================================================================ -// Function : WriteQuad -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteQuad(const Graphic3d_Vec4i& theQuad) { const Graphic3d_Vec4i aQPos = theQuad + myElemPosFirst; @@ -281,47 +265,37 @@ bool RWObj_ObjWriterContext::WriteQuad(const Graphic3d_Vec4i& theQuad) } } -// ================================================================ -// Function : WriteVertex -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteVertex(const Graphic3d_Vec3& theValue) { return Fprintf(myFile, "v %f %f %f\n", theValue.x(), theValue.y(), theValue.z()) != 0; } -// ================================================================ -// Function : WriteNormal -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteNormal(const Graphic3d_Vec3& theValue) { return Fprintf(myFile, "vn %f %f %f\n", theValue.x(), theValue.y(), theValue.z()) != 0; } -// ================================================================ -// Function : WriteTexCoord -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteTexCoord(const Graphic3d_Vec2& theValue) { return Fprintf(myFile, "vt %f %f\n", theValue.x(), theValue.y()) != 0; } -// ================================================================ -// Function : WriteGroup -// Purpose : -// ================================================================ +//================================================================================================= + bool RWObj_ObjWriterContext::WriteGroup(const TCollection_AsciiString& theValue) { return !theValue.IsEmpty() ? Fprintf(myFile, "g %s\n", theValue.ToCString()) != 0 : Fprintf(myFile, "g\n") != 0; } -// ================================================================ -// Function : FlushFace -// Purpose : -// ================================================================ +//================================================================================================= + void RWObj_ObjWriterContext::FlushFace(Standard_Integer theNbNodes) { Graphic3d_Vec4i aShift(theNbNodes, theNbNodes, theNbNodes, theNbNodes); diff --git a/src/RWObj/RWObj_Reader.cxx b/src/RWObj/RWObj_Reader.cxx index 9fb423520e..d120daf479 100644 --- a/src/RWObj/RWObj_Reader.cxx +++ b/src/RWObj/RWObj_Reader.cxx @@ -64,10 +64,8 @@ static bool isClockwisePolygon(const Handle(BRepMesh_DataStructureOfDelaun)& the } } // namespace -// ================================================================ -// Function : Read -// Purpose : -// ================================================================ +//================================================================================================= + RWObj_Reader::RWObj_Reader() : myMemLimitBytes(Standard_Size(-1)), myMemEstim(0), @@ -80,10 +78,8 @@ RWObj_Reader::RWObj_Reader() // } -// ================================================================ -// Function : read -// Purpose : -// ================================================================ +//================================================================================================= + Standard_Boolean RWObj_Reader::read(std::istream& theStream, const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, @@ -284,10 +280,8 @@ Standard_Boolean RWObj_Reader::read(std::istream& theStream, return true; } -// ======================================================================= -// function : pushIndices -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::pushIndices(const char* thePos) { char* aNext = NULL; @@ -613,10 +607,8 @@ Standard_Integer RWObj_Reader::triangulatePolygon( return triangulatePolygonFan(theIndices); } -// ======================================================================= -// function : pushObject -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::pushObject(const char* theObjectName) { TCollection_AsciiString aNewObject; @@ -631,10 +623,8 @@ void RWObj_Reader::pushObject(const char* theObjectName) myActiveSubMesh.Object = aNewObject; } -// ======================================================================= -// function : pushGroup -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::pushGroup(const char* theGroupName) { TCollection_AsciiString aNewGroup; @@ -649,10 +639,8 @@ void RWObj_Reader::pushGroup(const char* theGroupName) myActiveSubMesh.Group = aNewGroup; } -// ======================================================================= -// function : pushSmoothGroup -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::pushSmoothGroup(const char* theSmoothGroupIndex) { TCollection_AsciiString aNewSmoothGroup; @@ -676,10 +664,8 @@ void RWObj_Reader::pushSmoothGroup(const char* theSmoothGroupIndex) myActiveSubMesh.SmoothGroup = aNewSmoothGroup; } -// ======================================================================= -// function : pushMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::pushMaterial(const char* theMaterialName) { TCollection_AsciiString aNewMat; @@ -706,10 +692,8 @@ void RWObj_Reader::pushMaterial(const char* theMaterialName) myActiveSubMesh.Material = aNewMat; } -// ======================================================================= -// function : readMaterialLib -// purpose : -// ======================================================================= +//================================================================================================= + void RWObj_Reader::readMaterialLib(const char* theFileName) { TCollection_AsciiString aMatPath; @@ -727,10 +711,8 @@ void RWObj_Reader::readMaterialLib(const char* theFileName) } } -// ======================================================================= -// function : checkMemory -// purpose : -// ======================================================================= +//================================================================================================= + bool RWObj_Reader::checkMemory() { if (myMemEstim < myMemLimitBytes || myToAbort) diff --git a/src/RWObj/RWObj_TriangulationReader.cxx b/src/RWObj/RWObj_TriangulationReader.cxx index a334d88122..d66bc514fa 100644 --- a/src/RWObj/RWObj_TriangulationReader.cxx +++ b/src/RWObj/RWObj_TriangulationReader.cxx @@ -101,10 +101,8 @@ Standard_Boolean RWObj_TriangulationReader::addMesh(const RWObj_SubMesh& th return Standard_True; } -// ======================================================================= -// function : addSubShape -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean RWObj_TriangulationReader::addSubShape(TopoDS_Shape& theParent, const TopoDS_Shape& theSubShape, const Standard_Boolean theToExpandCompound) diff --git a/src/RWPly/RWPly_CafWriter.cxx b/src/RWPly/RWPly_CafWriter.cxx index afa9607a71..04e4c120e2 100644 --- a/src/RWPly/RWPly_CafWriter.cxx +++ b/src/RWPly/RWPly_CafWriter.cxx @@ -56,10 +56,8 @@ Standard_Boolean RWPly_CafWriter::toSkipFaceMesh(const RWMesh_FaceIterator& theF return theFaceIter.IsEmptyMesh(); } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWPly_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TColStd_IndexedDataMapOfStringString& theFileInfo, const Message_ProgressRange& theProgress) @@ -70,10 +68,8 @@ bool RWPly_CafWriter::Perform(const Handle(TDocStd_Document)& theDoc return Perform(theDocument, aRoots, NULL, theFileInfo, theProgress); } -// ======================================================================= -// function : Perform -// purpose : -// ======================================================================= +//================================================================================================= + bool RWPly_CafWriter::Perform(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRootLabels, const TColStd_MapOfAsciiString* theLabelFilter, @@ -187,10 +183,8 @@ bool RWPly_CafWriter::Perform(const Handle(TDocStd_Document)& theDoc return isDone && !aPSentry.IsAborted(); } -// ======================================================================= -// function : addFaceInfo -// purpose : -// ======================================================================= +//================================================================================================= + void RWPly_CafWriter::addFaceInfo(const RWMesh_FaceIterator& theFace, Standard_Integer& theNbNodes, Standard_Integer& theNbElems) @@ -199,10 +193,8 @@ void RWPly_CafWriter::addFaceInfo(const RWMesh_FaceIterator& theFace, theNbElems += theFace.NbTriangles(); } -// ======================================================================= -// function : writeShape -// purpose : -// ======================================================================= +//================================================================================================= + bool RWPly_CafWriter::writeShape(RWPly_PlyWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const Standard_Integer theWriteStep, @@ -231,10 +223,8 @@ bool RWPly_CafWriter::writeShape(RWPly_PlyWriterContext& theWriter, return true; } -// ======================================================================= -// function : writeNodes -// purpose : -// ======================================================================= +//================================================================================================= + bool RWPly_CafWriter::writeNodes(RWPly_PlyWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) @@ -278,10 +268,8 @@ bool RWPly_CafWriter::writeNodes(RWPly_PlyWriterContext& theWriter, return true; } -// ======================================================================= -// function : writeIndices -// purpose : -// ======================================================================= +//================================================================================================= + bool RWPly_CafWriter::writeIndices(RWPly_PlyWriterContext& theWriter, Message_LazyProgressScope& thePSentry, const RWMesh_FaceIterator& theFace) diff --git a/src/RWPly/RWPly_PlyWriterContext.cxx b/src/RWPly/RWPly_PlyWriterContext.cxx index 05bf347c48..b3169e18d7 100644 --- a/src/RWPly/RWPly_PlyWriterContext.cxx +++ b/src/RWPly/RWPly_PlyWriterContext.cxx @@ -17,10 +17,8 @@ #include #include -// ======================================================================= -// function : splitLines -// purpose : -// ======================================================================= +//================================================================================================= + static void splitLines(const TCollection_AsciiString& theString, NCollection_IndexedMap& theLines) { @@ -58,10 +56,8 @@ static void splitLines(const TCollection_AsciiString& theStrin } } -// ================================================================ -// Function : RWPly_PlyWriterContext -// Purpose : -// ================================================================ +//================================================================================================= + RWPly_PlyWriterContext::RWPly_PlyWriterContext() : myNbHeaderVerts(0), myNbHeaderElems(0), @@ -78,19 +74,15 @@ RWPly_PlyWriterContext::RWPly_PlyWriterContext() // } -// ================================================================ -// Function : ~RWPly_PlyWriterContext -// Purpose : -// ================================================================ +//================================================================================================= + RWPly_PlyWriterContext::~RWPly_PlyWriterContext() { Close(); } -// ================================================================ -// Function : Open -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::Open(const TCollection_AsciiString& theName, const std::shared_ptr& theStream) { @@ -114,10 +106,8 @@ bool RWPly_PlyWriterContext::Open(const TCollection_AsciiString& theName, return true; } -// ================================================================ -// Function : Close -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::Close(bool theIsAborted) { if (myStream.get() == nullptr) @@ -148,10 +138,8 @@ bool RWPly_PlyWriterContext::Close(bool theIsAborted) return aResult; } -// ================================================================ -// Function : WriteHeader -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::WriteHeader(const Standard_Integer theNbNodes, const Standard_Integer theNbElems, const TColStd_IndexedDataMapOfStringString& theFileInfo) @@ -233,10 +221,8 @@ bool RWPly_PlyWriterContext::WriteHeader(const Standard_Integer return myStream->good(); } -// ================================================================ -// Function : WriteVertex -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::WriteVertex(const gp_Pnt& thePoint, const Graphic3d_Vec3& theNorm, const Graphic3d_Vec2& theUV, @@ -277,10 +263,8 @@ bool RWPly_PlyWriterContext::WriteVertex(const gp_Pnt& thePoint, return myStream->good(); } -// ================================================================ -// Function : WriteTriangle -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::WriteTriangle(const Graphic3d_Vec3i& theTri) { if (myStream.get() == nullptr) @@ -303,10 +287,8 @@ bool RWPly_PlyWriterContext::WriteTriangle(const Graphic3d_Vec3i& theTri) return myStream->good(); } -// ================================================================ -// Function : WriteQuad -// Purpose : -// ================================================================ +//================================================================================================= + bool RWPly_PlyWriterContext::WriteQuad(const Graphic3d_Vec4i& theQuad) { if (myStream.get() == nullptr) diff --git a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx index bea15589f7..408de87909 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx @@ -109,10 +109,8 @@ Standard_Boolean AreEndsMatch(const Handle(StepShape_EdgeCurve)& theEdgeCurve) } } // namespace -// ================================================================ -// Function : ReadStep -// Purpose : -// ================================================================ +//================================================================================================= + void RWStepShape_RWEdgeCurve::ReadStep(const Handle(StepData_StepReaderData)& theStepData, const Standard_Integer theRecordID, Handle(Interface_Check)& theMessageTool, @@ -163,10 +161,8 @@ void RWStepShape_RWEdgeCurve::ReadStep(const Handle(StepData_StepReaderData)& th theEdgeCurve->Init(aName, anEdgeStart, anEdgeEnd, anEdgeGeometry, aSameSense); } -// ================================================================ -// Function : WriteStep -// Purpose : -// ================================================================ +//================================================================================================= + void RWStepShape_RWEdgeCurve::WriteStep(StepData_StepWriter& theStepWriter, const Handle(StepShape_EdgeCurve)& theEdgeCurve) const { @@ -186,10 +182,8 @@ void RWStepShape_RWEdgeCurve::WriteStep(StepData_StepWriter& theSt theStepWriter.SendBoolean(theEdgeCurve->SameSense()); } -// ================================================================ -// Function : Share -// Purpose : -// ================================================================ +//================================================================================================= + void RWStepShape_RWEdgeCurve::Share(const Handle(StepShape_EdgeCurve)& theEdgeCurve, Interface_EntityIterator& theSharedEntitiesIt) const { @@ -200,10 +194,8 @@ void RWStepShape_RWEdgeCurve::Share(const Handle(StepShape_EdgeCurve)& theEdgeCu theSharedEntitiesIt.GetOneItem(theEdgeCurve->EdgeGeometry()); } -// ================================================================ -// Function : Check -// Purpose : -// ================================================================ +//================================================================================================= + void RWStepShape_RWEdgeCurve::Check(const Handle(StepShape_EdgeCurve)& theEdgeCurve, const Interface_ShareTool& theShareTool, Handle(Interface_Check)& theMessageTool) const diff --git a/src/Resource/Resource_Manager.cxx b/src/Resource/Resource_Manager.cxx index 9b999f110c..eebf96c45c 100644 --- a/src/Resource/Resource_Manager.cxx +++ b/src/Resource/Resource_Manager.cxx @@ -53,10 +53,8 @@ static Standard_Integer GetLine(OSD_File& aFile, TCollection_AsciiString& aLine) static Standard_Boolean Debug; -// ======================================================================= -// function : Resource_Manager -// purpose : -// ======================================================================= +//================================================================================================= + Resource_Manager::Resource_Manager(const TCollection_AsciiString& theName, const TCollection_AsciiString& theDefaultsDirectory, const TCollection_AsciiString& theUserDefaultsDirectory, @@ -133,20 +131,16 @@ Resource_Manager::Resource_Manager(const Standard_CString aName, const Standard_ << "UserDefaults\" not set." << std::endl; } -// ======================================================================= -// function : Resource_Manager -// purpose : -// ======================================================================= +//================================================================================================= + Resource_Manager::Resource_Manager() : myName(""), myVerbose(Standard_False) { } -// ======================================================================= -// function : Load -// purpose : -// ======================================================================= +//================================================================================================= + void Resource_Manager::Load(const TCollection_AsciiString& thePath, Resource_DataMapOfAsciiStringAsciiString& aMap) { diff --git a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx index 24cae90a95..d623f0f1bb 100644 --- a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx +++ b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx @@ -243,10 +243,8 @@ void Select3D_InteriorSensitivePointSet::Swap(const Standard_Integer theIdx1, myPolygonsIdxs->ChangeValue(theIdx2) = aPolygIdx1; } -// ======================================================================= -// function : overlapsElement -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_InteriorSensitivePointSet::overlapsElement( SelectBasics_PickResult& thePickResult, SelectBasics_SelectingVolumeManager& theMgr, @@ -260,10 +258,8 @@ Standard_Boolean Select3D_InteriorSensitivePointSet::overlapsElement( return theMgr.OverlapsPolygon(aPoints->Array1(), Select3D_TOS_INTERIOR, thePickResult); } -// ======================================================================= -// function : elementIsInside -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_InteriorSensitivePointSet::elementIsInside( SelectBasics_SelectingVolumeManager& theMgr, Standard_Integer theElemIdx, @@ -313,10 +309,8 @@ Standard_Integer Select3D_InteriorSensitivePointSet::NbSubElements() const return myPlanarPolygons.Length(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_InteriorSensitivePointSet::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Select3D/Select3D_SensitiveGroup.cxx b/src/Select3D/Select3D_SensitiveGroup.cxx index e9e1fb7a42..521ee90570 100644 --- a/src/Select3D/Select3D_SensitiveGroup.cxx +++ b/src/Select3D/Select3D_SensitiveGroup.cxx @@ -326,10 +326,8 @@ Standard_Boolean Select3D_SensitiveGroup::overlapsElement( return Standard_False; } -// ======================================================================= -// function : elementIsInside -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitiveGroup::elementIsInside( SelectBasics_SelectingVolumeManager& theMgr, Standard_Integer theElemIdx, @@ -349,10 +347,8 @@ Standard_Real Select3D_SensitiveGroup::distanceToCOG(SelectBasics_SelectingVolum return theMgr.DistToGeometryCenter(CenterOfGeometry()); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitiveGroup::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Select3D/Select3D_SensitivePoly.cxx b/src/Select3D/Select3D_SensitivePoly.cxx index cccce637c2..2bdd39da26 100644 --- a/src/Select3D/Select3D_SensitivePoly.cxx +++ b/src/Select3D/Select3D_SensitivePoly.cxx @@ -455,10 +455,8 @@ gp_Pnt Select3D_SensitivePoly::CenterOfGeometry() const return myCOG; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePoly::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/Select3D/Select3D_SensitivePrimitiveArray.cxx b/src/Select3D/Select3D_SensitivePrimitiveArray.cxx index 23b13451a8..1d19822c5a 100644 --- a/src/Select3D/Select3D_SensitivePrimitiveArray.cxx +++ b/src/Select3D/Select3D_SensitivePrimitiveArray.cxx @@ -167,10 +167,8 @@ private: NCollection_Array1& myGroups; }; -// ======================================================================= -// function : Select3D_SensitivePrimitiveArray -// purpose : -// ======================================================================= +//================================================================================================= + Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray( const Handle(SelectMgr_EntityOwner)& theOwnerId) : Select3D_SensitiveSet(theOwnerId), @@ -197,10 +195,8 @@ Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray( // } -// ======================================================================= -// function : SetDetectElementMap -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::SetDetectElementMap(bool theToDetect) { if (!theToDetect) @@ -219,10 +215,8 @@ void Select3D_SensitivePrimitiveArray::SetDetectElementMap(bool theToDetect) } } -// ======================================================================= -// function : SetDetectNodeMap -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::SetDetectNodeMap(bool theToDetect) { if (!theToDetect) @@ -241,10 +235,8 @@ void Select3D_SensitivePrimitiveArray::SetDetectNodeMap(bool theToDetect) } } -// ======================================================================= -// function : InitTriangulation -// purpose : -// ======================================================================= +//================================================================================================= + bool Select3D_SensitivePrimitiveArray::InitTriangulation( const Handle(Graphic3d_Buffer)& theVerts, const Handle(Graphic3d_IndexBuffer)& theIndices, @@ -408,10 +400,8 @@ bool Select3D_SensitivePrimitiveArray::InitTriangulation( return true; } -// ======================================================================= -// function : InitPoints -// purpose : -// ======================================================================= +//================================================================================================= + bool Select3D_SensitivePrimitiveArray::InitPoints(const Handle(Graphic3d_Buffer)& theVerts, const Handle(Graphic3d_IndexBuffer)& theIndices, const TopLoc_Location& theInitLoc, @@ -586,10 +576,8 @@ bool Select3D_SensitivePrimitiveArray::InitPoints(const Handle(Graphic3d_Buffer) return true; } -// ======================================================================= -// function : GetConnected -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Select3D_SensitiveEntity) Select3D_SensitivePrimitiveArray::GetConnected() { Handle(Select3D_SensitivePrimitiveArray) aNewEntity = @@ -637,10 +625,8 @@ void Select3D_SensitivePrimitiveArray::Set(const Handle(SelectMgr_EntityOwner)& } } -// ======================================================================= -// function : BVH -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::BVH() { if (!myContent.IsDirty()) @@ -671,19 +657,15 @@ void Select3D_SensitivePrimitiveArray::BVH() } } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Select3D_SensitivePrimitiveArray::Size() const { return myBvhIndices.NbElements; } -// ======================================================================= -// function : Box -// purpose : -// ======================================================================= +//================================================================================================= + Select3D_BndBox3d Select3D_SensitivePrimitiveArray::Box(const Standard_Integer theIdx) const { const Standard_Integer anElemIdx = myBvhIndices.Index(theIdx); @@ -756,10 +738,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::Box(const Standard_Integer t return aBox; } -// ======================================================================= -// function : Center -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Select3D_SensitivePrimitiveArray::Center(const Standard_Integer theIdx, const Standard_Integer theAxis) const { @@ -775,10 +755,8 @@ Standard_Real Select3D_SensitivePrimitiveArray::Center(const Standard_Integer th return theAxis == 0 ? aCenter.x() : (theAxis == 1 ? aCenter.y() : aCenter.z()); } -// ======================================================================= -// function : Swap -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::Swap(const Standard_Integer theIdx1, const Standard_Integer theIdx2) { @@ -798,10 +776,8 @@ void Select3D_SensitivePrimitiveArray::Swap(const Standard_Integer theIdx1, } } -// ======================================================================= -// function : BoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + Select3D_BndBox3d Select3D_SensitivePrimitiveArray::BoundingBox() { if (!myBndBox.IsValid()) @@ -811,10 +787,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::BoundingBox() return applyTransformation(); } -// ======================================================================= -// function : computeBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::computeBoundingBox() { myBndBox.Clear(); @@ -852,10 +826,8 @@ void Select3D_SensitivePrimitiveArray::computeBoundingBox() } } -// ======================================================================= -// function : applyTransformation -// purpose : -// ======================================================================= +//================================================================================================= + Select3D_BndBox3d Select3D_SensitivePrimitiveArray::applyTransformation() { if (!HasInitLocation()) @@ -881,10 +853,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::applyTransformation() return aBndBox; } -// ======================================================================= -// function : Matches -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitivePrimitiveArray::Matches( SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) @@ -960,10 +930,8 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::Matches( return Standard_True; } -// ======================================================================= -// function : overlapsElement -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement( SelectBasics_PickResult& thePickResult, SelectBasics_SelectingVolumeManager& theMgr, @@ -1119,20 +1087,16 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement( return aResult; } -// ======================================================================= -// function : distanceToCOG -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Select3D_SensitivePrimitiveArray::distanceToCOG( SelectBasics_SelectingVolumeManager& theMgr) { return theMgr.DistToGeometryCenter(myCDG3D); } -// ======================================================================= -// function : elementIsInside -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside( SelectBasics_SelectingVolumeManager& theMgr, Standard_Integer theElemIdx, @@ -1232,10 +1196,8 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside( } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitivePrimitiveArray::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Select3D/Select3D_SensitiveSphere.cxx b/src/Select3D/Select3D_SensitiveSphere.cxx index 7ecc7700c6..ac366fe464 100644 --- a/src/Select3D/Select3D_SensitiveSphere.cxx +++ b/src/Select3D/Select3D_SensitiveSphere.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveSphere, Select3D_SensitiveEntity) -// ================================================== -// Function: Select3D_SensitiveSphere -// Purpose : -// ================================================== +//================================================================================================= + Select3D_SensitiveSphere::Select3D_SensitiveSphere(const Handle(SelectMgr_EntityOwner)& theOwnerId, const gp_Pnt& theCenter, const Standard_Real theRadius) @@ -31,10 +29,8 @@ Select3D_SensitiveSphere::Select3D_SensitiveSphere(const Handle(SelectMgr_Entity { } -// ================================================== -// Function: Mathes -// Purpose : -// ================================================== +//================================================================================================= + Standard_Boolean Select3D_SensitiveSphere::Matches(SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) { @@ -60,10 +56,8 @@ Standard_Boolean Select3D_SensitiveSphere::Matches(SelectBasics_SelectingVolumeM return Standard_True; } -// ================================================== -// Function: GetConnected -// Purpose : -// ================================================== +//================================================================================================= + Handle(Select3D_SensitiveEntity) Select3D_SensitiveSphere::GetConnected() { Handle(Select3D_SensitiveEntity) aNewEntity = @@ -71,10 +65,8 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveSphere::GetConnected() return aNewEntity; } -// ================================================== -// Function: BoundingBox -// Purpose : -// ================================================== +//================================================================================================= + Select3D_BndBox3d Select3D_SensitiveSphere::BoundingBox() { const SelectMgr_Vec3 aMinPnt = diff --git a/src/Select3D/Select3D_SensitiveTriangulation.cxx b/src/Select3D/Select3D_SensitiveTriangulation.cxx index 171de70a90..5647d9ce63 100644 --- a/src/Select3D/Select3D_SensitiveTriangulation.cxx +++ b/src/Select3D/Select3D_SensitiveTriangulation.cxx @@ -243,10 +243,8 @@ Select3D_BndBox3d Select3D_SensitiveTriangulation::Box(const Standard_Integer th return Select3D_BndBox3d(aMinPnt, aMaxPnt); } -// ======================================================================= -// function : Matches -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitiveTriangulation::Matches( SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) @@ -490,10 +488,8 @@ Select3D_BndBox3d Select3D_SensitiveTriangulation::BoundingBox() return applyTransformation(); } -// ======================================================================= -// function : computeBoundingBox -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitiveTriangulation::computeBoundingBox() { myBndBox.Clear(); @@ -553,10 +549,8 @@ gp_GTrsf Select3D_SensitiveTriangulation::InvInitLocation() const return myInvInitLocation; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitiveTriangulation::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Select3D/Select3D_SensitiveWire.cxx b/src/Select3D/Select3D_SensitiveWire.cxx index 434ff16e74..fffde8506e 100644 --- a/src/Select3D/Select3D_SensitiveWire.cxx +++ b/src/Select3D/Select3D_SensitiveWire.cxx @@ -117,10 +117,8 @@ Standard_Boolean Select3D_SensitiveWire::overlapsElement( return aSeg->Matches(theMgr, thePickResult); } -// ======================================================================= -// function : elementIsInside -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Select3D_SensitiveWire::elementIsInside( SelectBasics_SelectingVolumeManager& theMgr, Standard_Integer theElemIdx, @@ -216,10 +214,8 @@ gp_Pnt Select3D_SensitiveWire::CenterOfGeometry() const return myCenter; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void Select3D_SensitiveWire::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.cxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.cxx index 06498dffc8..1f2ec37e8b 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.cxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.cxx @@ -13,28 +13,22 @@ #include -// ======================================================================= -// function : SelectBasics_SelectingVolumeManager -// purpose : -// ======================================================================= +//================================================================================================= + SelectBasics_SelectingVolumeManager::SelectBasics_SelectingVolumeManager() { // } -// ======================================================================= -// function : ~SelectBasics_SelectingVolumeManager -// purpose : -// ======================================================================= +//================================================================================================= + SelectBasics_SelectingVolumeManager::~SelectBasics_SelectingVolumeManager() { // } -// ======================================================================= -// function : Overlaps -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectBasics_SelectingVolumeManager::Overlaps( const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, Standard_Integer theSensType, diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index 452ece2dbd..c315558cef 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -18,48 +18,38 @@ #include #include -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_AxisIntersector::SelectMgr_AxisIntersector() { // } -// ======================================================================= -// function : ~SelectMgr_AxisIntersector -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_AxisIntersector::~SelectMgr_AxisIntersector() { // } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_AxisIntersector::Init(const gp_Ax1& theAxis) { mySelectionType = SelectMgr_SelectionType_Point; myAxis = theAxis; } -// ======================================================================= -// function : Build -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_AxisIntersector::Build() {} //================================================================================================= void SelectMgr_AxisIntersector::SetCamera(const Handle(Graphic3d_Camera)&) {} -// ======================================================================= -// function : ScaleAndTransform -// purpose : -// ======================================================================= +//================================================================================================= + Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform( const Standard_Integer theScaleFactor, const gp_GTrsf& theTrsf, @@ -109,10 +99,8 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder( return aRes; } -// ======================================================================= -// function : hasIntersection -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::hasIntersection(const SelectMgr_Vec3& theBoxMin, const SelectMgr_Vec3& theBoxMax, Standard_Real& theTimeEnter, @@ -133,10 +121,8 @@ Standard_Boolean SelectMgr_AxisIntersector::hasIntersection(const SelectMgr_Vec3 return Standard_True; } -// ======================================================================= -// function : hasIntersection -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::hasIntersection(const gp_Pnt& thePnt, Standard_Real& theDepth) const { @@ -153,10 +139,8 @@ Standard_Boolean SelectMgr_AxisIntersector::hasIntersection(const gp_Pnt& thePn return Standard_True; } -// ======================================================================= -// function : raySegmentDistance -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::raySegmentDistance( const gp_Pnt& theSegPnt1, const gp_Pnt& theSegPnt2, @@ -206,10 +190,8 @@ Standard_Boolean SelectMgr_AxisIntersector::raySegmentDistance( return true; } -// ======================================================================= -// function : rayPlaneIntersection -// purpose : -// ======================================================================= +//================================================================================================= + bool SelectMgr_AxisIntersector::rayPlaneIntersection(const gp_Vec& thePlane, const gp_Pnt& thePntOnPlane, SelectBasics_PickResult& thePickResult) const @@ -238,10 +220,8 @@ bool SelectMgr_AxisIntersector::rayPlaneIntersection(const gp_Vec& th return true; } -// ======================================================================= -// function : OverlapsBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox(const SelectMgr_Vec3& theBoxMin, const SelectMgr_Vec3& theBoxMax, Standard_Boolean* theInside) const @@ -263,10 +243,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox(const SelectMgr_Vec3& th return Standard_True; } -// ======================================================================= -// function : OverlapsBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox( const SelectMgr_Vec3& theBoxMin, const SelectMgr_Vec3& theBoxMax, @@ -297,10 +275,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox( return Standard_True; } -// ======================================================================= -// function : OverlapsPoint -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint( const gp_Pnt& thePnt, const SelectMgr_ViewClipRange& theClipRange, @@ -322,10 +298,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint( return !theClipRange.IsClipped(thePickResult.Depth()); } -// ======================================================================= -// function : OverlapsPoint -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint(const gp_Pnt& thePnt) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, @@ -336,10 +310,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint(const gp_Pnt& thePnt) return hasIntersection(thePnt, aDepth); } -// ======================================================================= -// function : OverlapsSegment -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsSegment( const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, @@ -358,10 +330,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSegment( return !theClipRange.IsClipped(thePickResult.Depth()); } -// ======================================================================= -// function : OverlapsPolygon -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsPolygon( const TColgp_Array1OfPnt& theArrayOfPnts, Select3D_TypeOfSensitivity theSensType, @@ -418,10 +388,8 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPolygon( return !theClipRange.IsClipped(thePickResult.Depth()); } -// ======================================================================= -// function : OverlapsTriangle -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_AxisIntersector::OverlapsTriangle( const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, @@ -785,10 +753,8 @@ const gp_Dir& SelectMgr_AxisIntersector::GetViewRayDirection() const return myAxis.Direction(); } -// ======================================================================= -// function : DistToGeometryCenter -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real SelectMgr_AxisIntersector::DistToGeometryCenter(const gp_Pnt& theCOG) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, @@ -798,10 +764,8 @@ Standard_Real SelectMgr_AxisIntersector::DistToGeometryCenter(const gp_Pnt& theC return theCOG.Distance(myAxis.Location()); } -// ======================================================================= -// function : DetectedPoint -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt SelectMgr_AxisIntersector::DetectedPoint(const Standard_Real theDepth) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, diff --git a/src/SelectMgr/SelectMgr_BVHThreadPool.cxx b/src/SelectMgr/SelectMgr_BVHThreadPool.cxx index 591f9f9ec0..1d12d7e395 100644 --- a/src/SelectMgr/SelectMgr_BVHThreadPool.cxx +++ b/src/SelectMgr/SelectMgr_BVHThreadPool.cxx @@ -156,10 +156,8 @@ void SelectMgr_BVHThreadPool::BVHThread::performThread() } } -// ======================================================================= -// function : runThread -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Address SelectMgr_BVHThreadPool::BVHThread::runThread(Standard_Address theTask) { BVHThread* aThread = static_cast(theTask); diff --git a/src/SelectMgr/SelectMgr_EntityOwner.cxx b/src/SelectMgr/SelectMgr_EntityOwner.cxx index 969722a33b..9e9a76d7d7 100644 --- a/src/SelectMgr/SelectMgr_EntityOwner.cxx +++ b/src/SelectMgr/SelectMgr_EntityOwner.cxx @@ -77,10 +77,8 @@ void SelectMgr_EntityOwner::HilightWithColor(const Handle(PrsMgr_PresentationMan } } -// ======================================================================= -// function : Select -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_EntityOwner::Select(const AIS_SelectionScheme theSelScheme, const Standard_Boolean theIsDetected) const { @@ -115,10 +113,8 @@ Standard_Boolean SelectMgr_EntityOwner::Select(const AIS_SelectionScheme theSelS return Standard_False; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_EntityOwner::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 58ae408ef7..1d9286dfff 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -22,19 +22,15 @@ #include #include -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_RectangularFrustum::SelectMgr_RectangularFrustum() : myScale(1.0) { } -// ======================================================================= -// function : segmentSegmentDistance -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_RectangularFrustum::segmentSegmentDistance( const gp_Pnt& theSegPnt1, const gp_Pnt& theSegPnt2, @@ -105,10 +101,8 @@ void SelectMgr_RectangularFrustum::segmentSegmentDistance( + aFigureVec.XYZ() * (aSegPntShift / aFigureVecMod)); } -// ======================================================================= -// function : segmentPlaneIntersection -// purpose : -// ======================================================================= +//================================================================================================= + bool SelectMgr_RectangularFrustum::segmentPlaneIntersection( const gp_Vec& thePlane, const gp_Pnt& thePntOnPlane, @@ -278,20 +272,16 @@ void SelectMgr_RectangularFrustum::cacheVertexProjections( } } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_RectangularFrustum::Init(const gp_Pnt2d& thePoint) { mySelectionType = SelectMgr_SelectionType_Point; mySelRectangle.SetMousePos(thePoint); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_RectangularFrustum::Init(const gp_Pnt2d& theMinPnt, const gp_Pnt2d& theMaxPnt) { mySelectionType = SelectMgr_SelectionType_Box; @@ -299,10 +289,8 @@ void SelectMgr_RectangularFrustum::Init(const gp_Pnt2d& theMinPnt, const gp_Pnt2 mySelRectangle.SetMaxPnt(theMaxPnt); } -// ======================================================================= -// function : Build -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_RectangularFrustum::Build() { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point @@ -479,10 +467,8 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder( return aRes; } -// ======================================================================= -// function : IsScalable -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_RectangularFrustum::IsScalable() const { return mySelectionType == SelectMgr_SelectionType_Point; @@ -1048,10 +1034,8 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCircle(const Standard_Rea return hasCircleOverlap(theRadius, theTrsf, theIsFilled, theInside); } -// ======================================================================= -// function : GetMousePosition -// purpose : -// ======================================================================= +//================================================================================================= + const gp_Pnt2d& SelectMgr_RectangularFrustum::GetMousePosition() const { if (mySelectionType == SelectMgr_SelectionType_Point) @@ -1061,10 +1045,8 @@ const gp_Pnt2d& SelectMgr_RectangularFrustum::GetMousePosition() const return base_type::GetMousePosition(); } -// ======================================================================= -// function : OverlapsSphere -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_RectangularFrustum::OverlapsSphere( const gp_Pnt& theCenter, const Standard_Real theRadius, @@ -1098,10 +1080,8 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsSphere( return !theClipRange.IsClipped(thePickResult.Depth()); } -// ======================================================================= -// function : OverlapsSphere -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_RectangularFrustum::OverlapsSphere(const gp_Pnt& theCenter, const Standard_Real theRadius, Standard_Boolean* theInside) const @@ -1141,10 +1121,8 @@ gp_Pnt SelectMgr_RectangularFrustum::DetectedPoint(const Standard_Real theDepth) return myNearPickedPnt.XYZ() + myViewRayDir.XYZ() * theDepth / myScale; } -// ======================================================================= -// function : GetPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_RectangularFrustum::GetPlanes( NCollection_Vector& thePlaneEquations) const { diff --git a/src/SelectMgr/SelectMgr_SelectableObject.cxx b/src/SelectMgr/SelectMgr_SelectableObject.cxx index adebae2c51..a8f7816750 100644 --- a/src/SelectMgr/SelectMgr_SelectableObject.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObject.cxx @@ -540,10 +540,8 @@ const Handle(SelectMgr_EntityOwner)& SelectMgr_SelectableObject::GetAssemblyOwne return THE_NULL_ENTITYOWNER; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_SelectableObject::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/SelectMgr/SelectMgr_Selection.cxx b/src/SelectMgr/SelectMgr_Selection.cxx index 07423cc9c4..e0760003ac 100644 --- a/src/SelectMgr/SelectMgr_Selection.cxx +++ b/src/SelectMgr/SelectMgr_Selection.cxx @@ -115,10 +115,8 @@ void SelectMgr_Selection::SetSensitivity(const Standard_Integer theNewSens) } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_Selection::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx b/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx index cb6f21ba80..b8a5841d7e 100644 --- a/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx +++ b/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx @@ -431,10 +431,8 @@ public: }; } // namespace -// ======================================================================= -// function : CreateFiller -// purpose : -// ======================================================================= +//================================================================================================= + Handle(SelectMgr_SelectionImageFiller) SelectMgr_SelectionImageFiller::CreateFiller( Image_PixMap& thePixMap, SelectMgr_ViewerSelector* theSelector, diff --git a/src/SelectMgr/SelectMgr_SensitiveEntity.cxx b/src/SelectMgr/SelectMgr_SensitiveEntity.cxx index 6336644de4..afa95d58cc 100644 --- a/src/SelectMgr/SelectMgr_SensitiveEntity.cxx +++ b/src/SelectMgr/SelectMgr_SensitiveEntity.cxx @@ -40,10 +40,8 @@ void SelectMgr_SensitiveEntity::Clear() mySensitive.Nullify(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_SensitiveEntity::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index 22b285629a..5b6ed1ecf8 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -37,19 +37,15 @@ void computeFrustumNormals(const gp_Vec* theEdges, gp_Vec* theNormals) } } // namespace -// ======================================================================= -// function : SelectMgr_TriangularFrustum -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_TriangularFrustum::SelectMgr_TriangularFrustum() { // } -// ======================================================================= -// function : ~SelectMgr_TriangularFrustum -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_TriangularFrustum::~SelectMgr_TriangularFrustum() { Clear(); @@ -416,10 +412,8 @@ void SelectMgr_TriangularFrustum::Clear() myBuilder.Nullify(); } -// ======================================================================= -// function : GetPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_TriangularFrustum::GetPlanes( NCollection_Vector& thePlaneEquations) const { diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index a3711b96ac..4cb2661b3b 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -29,28 +29,22 @@ namespace static const size_t MEMORY_BLOCK_SIZE = 512 * 7; } -// ======================================================================= -// function : SelectMgr_TriangularFrustumSet -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_TriangularFrustumSet::SelectMgr_TriangularFrustumSet() : myToAllowOverlap(Standard_False) { } -// ======================================================================= -// function : ~SelectMgr_TriangularFrustumSet -// purpose : -// ======================================================================= +//================================================================================================= + SelectMgr_TriangularFrustumSet::~SelectMgr_TriangularFrustumSet() { // } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_TriangularFrustumSet::Init(const TColgp_Array1OfPnt2d& thePoints) { if (mySelPolyline.Points.IsNull()) @@ -227,10 +221,8 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilde return aRes; } -// ======================================================================= -// function : OverlapsBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox( const SelectMgr_Vec3& theMinPnt, const SelectMgr_Vec3& theMaxPnt, @@ -252,10 +244,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox( return Standard_False; } -// ======================================================================= -// function : OverlapsBox -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox(const SelectMgr_Vec3& theMinPnt, const SelectMgr_Vec3& theMaxPnt, Standard_Boolean* theInside) const @@ -305,10 +295,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox(const SelectMgr_Vec return Standard_False; } -// ======================================================================= -// function : OverlapsPoint -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPoint( const gp_Pnt& thePnt, const SelectMgr_ViewClipRange& theClipRange, @@ -329,10 +317,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPoint( return Standard_False; } -// ======================================================================= -// function : OverlapsPolygon -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPolygon( const TColgp_Array1OfPnt& theArrayOfPts, Select3D_TypeOfSensitivity theSensType, @@ -371,10 +357,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPolygon( return Standard_False; } -// ======================================================================= -// function : OverlapsSegment -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsSegment( const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, @@ -407,10 +391,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsSegment( return Standard_False; } -// ======================================================================= -// function : OverlapsTriangle -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsTriangle( const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, @@ -790,10 +772,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCircle(const Standard_R return Standard_False; } -// ======================================================================= -// function : GetPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_TriangularFrustumSet::GetPlanes( NCollection_Vector& thePlaneEquations) const { @@ -1010,10 +990,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::segmentTriangleIntersection(con return Standard_True; } -// ======================================================================= -// function : DetectedPoint -// purpose : -// ======================================================================= +//================================================================================================= + gp_Pnt SelectMgr_TriangularFrustumSet::DetectedPoint(const Standard_Real theDepth) const { (void)theDepth; diff --git a/src/SelectMgr/SelectMgr_ViewClipRange.cxx b/src/SelectMgr/SelectMgr_ViewClipRange.cxx index 951cd65aed..dd7e2b8539 100644 --- a/src/SelectMgr/SelectMgr_ViewClipRange.cxx +++ b/src/SelectMgr/SelectMgr_ViewClipRange.cxx @@ -15,10 +15,8 @@ #include -// ======================================================================= -// function : AddClippingPlanes -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_ViewClipRange::AddClippingPlanes(const Graphic3d_SequenceOfHClipPlane& thePlanes, const gp_Ax1& thePickRay) { @@ -103,10 +101,8 @@ void SelectMgr_ViewClipRange::AddClippingPlanes(const Graphic3d_SequenceOfHClipP } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void SelectMgr_ViewClipRange::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { diff --git a/src/Standard/Standard_ArrayStreamBuffer.cxx b/src/Standard/Standard_ArrayStreamBuffer.cxx index e681d6cc54..6342801761 100644 --- a/src/Standard/Standard_ArrayStreamBuffer.cxx +++ b/src/Standard/Standard_ArrayStreamBuffer.cxx @@ -13,10 +13,8 @@ #include -// ======================================================================= -// function : Standard_ArrayStreamBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::Standard_ArrayStreamBuffer(const char* theBegin, const size_t theSize) : myBegin(theBegin), myEnd(theBegin + theSize), @@ -25,19 +23,15 @@ Standard_ArrayStreamBuffer::Standard_ArrayStreamBuffer(const char* theBegin, con // } -// ======================================================================= -// function : ~Standard_ArrayStreamBuffer -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::~Standard_ArrayStreamBuffer() { // } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_ArrayStreamBuffer::Init(const char* theBegin, const size_t theSize) { myBegin = theBegin; @@ -45,10 +39,8 @@ void Standard_ArrayStreamBuffer::Init(const char* theBegin, const size_t theSize myCurrent = theBegin; } -// ======================================================================= -// function : underflow -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::underflow() { if (myCurrent == myEnd) @@ -59,10 +51,8 @@ Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::underflow() return traits_type::to_int_type(*myCurrent); } -// ======================================================================= -// function : uflow -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::uflow() { if (myCurrent == myEnd) @@ -73,10 +63,8 @@ Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::uflow() return traits_type::to_int_type(*myCurrent++); } -// ======================================================================= -// function : pbackfail -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::pbackfail(int_type ch) { if (myCurrent == myBegin || (ch != traits_type::eof() && ch != myCurrent[-1])) @@ -87,10 +75,8 @@ Standard_ArrayStreamBuffer::int_type Standard_ArrayStreamBuffer::pbackfail(int_t return traits_type::to_int_type(*--myCurrent); } -// ======================================================================= -// function : showmanyc -// purpose : -// ======================================================================= +//================================================================================================= + std::streamsize Standard_ArrayStreamBuffer::showmanyc() { if (myCurrent > myEnd) @@ -100,10 +86,8 @@ std::streamsize Standard_ArrayStreamBuffer::showmanyc() return myEnd - myCurrent; } -// ======================================================================= -// function : seekoff -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::pos_type Standard_ArrayStreamBuffer::seekoff( off_type theOff, std::ios_base::seekdir theWay, @@ -143,10 +127,8 @@ Standard_ArrayStreamBuffer::pos_type Standard_ArrayStreamBuffer::seekoff( return myCurrent - myBegin; } -// ======================================================================= -// function : seekpos -// purpose : -// ======================================================================= +//================================================================================================= + Standard_ArrayStreamBuffer::pos_type Standard_ArrayStreamBuffer::seekpos( pos_type thePosition, std::ios_base::openmode theWhich) @@ -154,10 +136,8 @@ Standard_ArrayStreamBuffer::pos_type Standard_ArrayStreamBuffer::seekpos( return seekoff(off_type(thePosition), std::ios_base::beg, theWhich); } -// ======================================================================= -// function : xsgetn -// purpose : -// ======================================================================= +//================================================================================================= + std::streamsize Standard_ArrayStreamBuffer::xsgetn(char* thePtr, std::streamsize theCount) { const char* aCurrent = myCurrent + theCount; diff --git a/src/Standard/Standard_CLocaleSentry.cxx b/src/Standard/Standard_CLocaleSentry.cxx index 73d248f463..e3ecbcb04e 100644 --- a/src/Standard/Standard_CLocaleSentry.cxx +++ b/src/Standard/Standard_CLocaleSentry.cxx @@ -56,19 +56,15 @@ static CLocalePtr theCLocale; } // namespace -// ======================================================================= -// function : GetCLocale -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CLocaleSentry::clocale_t Standard_CLocaleSentry::GetCLocale() { return theCLocale.myLocale; } -// ======================================================================= -// function : Standard_CLocaleSentry -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CLocaleSentry::Standard_CLocaleSentry() #ifdef OCCT_CLOCALE_POSIX2008 : myPrevLocale(uselocale( @@ -97,10 +93,8 @@ Standard_CLocaleSentry::Standard_CLocaleSentry() #endif } -// ======================================================================= -// function : ~Standard_CLocaleSentry -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CLocaleSentry::~Standard_CLocaleSentry() { #if defined(OCCT_CLOCALE_POSIX2008) diff --git a/src/Standard/Standard_Condition.cxx b/src/Standard/Standard_Condition.cxx index e08196a6ec..57df2ef450 100644 --- a/src/Standard/Standard_Condition.cxx +++ b/src/Standard/Standard_Condition.cxx @@ -41,10 +41,8 @@ static void conditionGetRealTime(struct timespec& theTime) #endif } // namespace -// ======================================================================= -// function : Standard_Condition -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Condition::Standard_Condition(bool theIsSet) #ifdef _WIN32 : myEvent((void*)::CreateEvent(0, true, theIsSet, NULL)) @@ -58,10 +56,8 @@ Standard_Condition::Standard_Condition(bool theIsSet) #endif } -// ======================================================================= -// function : ~Standard_Condition -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Condition::~Standard_Condition() { #ifdef _WIN32 @@ -72,10 +68,8 @@ Standard_Condition::~Standard_Condition() #endif } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Condition::Set() { #ifdef _WIN32 @@ -88,10 +82,8 @@ void Standard_Condition::Set() #endif } -// ======================================================================= -// function : Reset -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Condition::Reset() { #ifdef _WIN32 @@ -103,10 +95,8 @@ void Standard_Condition::Reset() #endif } -// ======================================================================= -// function : Wait -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Condition::Wait() { #ifdef _WIN32 @@ -121,10 +111,8 @@ void Standard_Condition::Wait() #endif } -// ======================================================================= -// function : Wait -// purpose : -// ======================================================================= +//================================================================================================= + bool Standard_Condition::Wait(int theTimeMilliseconds) { #ifdef _WIN32 @@ -153,10 +141,8 @@ bool Standard_Condition::Wait(int theTimeMilliseconds) #endif } -// ======================================================================= -// function : Check -// purpose : -// ======================================================================= +//================================================================================================= + bool Standard_Condition::Check() { #ifdef _WIN32 @@ -178,10 +164,8 @@ bool Standard_Condition::Check() #endif } -// ======================================================================= -// function : CheckReset -// purpose : -// ======================================================================= +//================================================================================================= + bool Standard_Condition::CheckReset() { #ifdef _WIN32 diff --git a/src/Standard/Standard_Dump.cxx b/src/Standard/Standard_Dump.cxx index 5f5fe49a0d..4602539238 100644 --- a/src/Standard/Standard_Dump.cxx +++ b/src/Standard/Standard_Dump.cxx @@ -15,10 +15,8 @@ #include -// ======================================================================= -// function : AddValuesSeparator -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Dump::AddValuesSeparator(Standard_OStream& theOStream) { Standard_SStream aStream; @@ -207,10 +205,8 @@ Standard_Boolean Standard_Dump::InitValue(const TCollection_AsciiString& theStre return Standard_True; } -// ======================================================================= -// function : GetPointerInfo -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Standard_Dump::GetPointerInfo(const Handle(Standard_Transient)& thePointer, const bool isShortInfo) { @@ -220,10 +216,8 @@ TCollection_AsciiString Standard_Dump::GetPointerInfo(const Handle(Standard_Tran return GetPointerInfo(thePointer.get(), isShortInfo); } -// ======================================================================= -// function : GetPointerInfo -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString Standard_Dump::GetPointerInfo(const void* thePointer, const bool isShortInfo) { diff --git a/src/Standard/Standard_Failure.cxx b/src/Standard/Standard_Failure.cxx index 59e7cfaa64..7e4c670cff 100644 --- a/src/Standard/Standard_Failure.cxx +++ b/src/Standard/Standard_Failure.cxx @@ -31,10 +31,8 @@ namespace static Standard_Integer Standard_Failure_DefaultStackTraceLength = 0; } // namespace -// ======================================================================= -// function : StringRef::allocate_message -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::StringRef* Standard_Failure::StringRef::allocate_message( const Standard_CString theString) { @@ -53,10 +51,8 @@ Standard_Failure::StringRef* Standard_Failure::StringRef::allocate_message( return aStrPtr; } -// ======================================================================= -// function : StringRef::copy_message -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::StringRef* Standard_Failure::StringRef::copy_message( Standard_Failure::StringRef* theString) { @@ -69,10 +65,8 @@ Standard_Failure::StringRef* Standard_Failure::StringRef::copy_message( return theString; } -// ======================================================================= -// function : StringRef::deallocate_message -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::StringRef::deallocate_message(Standard_Failure::StringRef* theString) { if (theString != NULL) @@ -84,10 +78,8 @@ void Standard_Failure::StringRef::deallocate_message(Standard_Failure::StringRef } } -// ======================================================================= -// function : Standard_Failure -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::Standard_Failure() : myMessage(NULL), myStackTrace(NULL) @@ -108,10 +100,8 @@ Standard_Failure::Standard_Failure() } } -// ======================================================================= -// function : Standard_Failure -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::Standard_Failure(const Standard_CString theDesc) : myMessage(NULL), myStackTrace(NULL) @@ -131,10 +121,8 @@ Standard_Failure::Standard_Failure(const Standard_CString theDesc) } } -// ======================================================================= -// function : Standard_Failure -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::Standard_Failure(const Standard_CString theDesc, const Standard_CString theStackTrace) : myMessage(NULL), @@ -144,10 +132,8 @@ Standard_Failure::Standard_Failure(const Standard_CString theDesc, myStackTrace = StringRef::allocate_message(theStackTrace); } -// ======================================================================= -// function : Standard_Failure -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::Standard_Failure(const Standard_Failure& theFailure) : Standard_Transient(theFailure), myMessage(NULL), @@ -157,29 +143,23 @@ Standard_Failure::Standard_Failure(const Standard_Failure& theFailure) myStackTrace = StringRef::copy_message(theFailure.myStackTrace); } -// ======================================================================= -// function : ~Standard_Failure -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Failure::~Standard_Failure() { StringRef::deallocate_message(myMessage); StringRef::deallocate_message(myStackTrace); } -// ======================================================================= -// function : GetMessageString -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Standard_Failure::GetMessageString() const { return myMessage != NULL ? myMessage->GetMessage() : ""; } -// ======================================================================= -// function : SetMessageString -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::SetMessageString(const Standard_CString theDesc) { if (theDesc == GetMessageString()) @@ -191,19 +171,15 @@ void Standard_Failure::SetMessageString(const Standard_CString theDesc) myMessage = StringRef::allocate_message(theDesc); } -// ======================================================================= -// function : GetStackString -// purpose : -// ======================================================================= +//================================================================================================= + Standard_CString Standard_Failure::GetStackString() const { return myStackTrace != NULL ? myStackTrace->GetMessage() : ""; } -// ======================================================================= -// function : SetStackString -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::SetStackString(const Standard_CString theStack) { if (theStack == GetStackString()) @@ -215,59 +191,47 @@ void Standard_Failure::SetStackString(const Standard_CString theStack) myStackTrace = StringRef::allocate_message(theStack); } -// ======================================================================= -// function : Raise -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Raise(const Standard_CString theDesc) { Handle(Standard_Failure) aFailure = new Standard_Failure(); aFailure->Reraise(theDesc); } -// ======================================================================= -// function : Raise -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Raise(const Standard_SStream& theReason) { Handle(Standard_Failure) aFailure = new Standard_Failure(); aFailure->Reraise(theReason); } -// ======================================================================= -// function : Reraise -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Reraise(const Standard_CString theDesc) { SetMessageString(theDesc); Reraise(); } -// ======================================================================= -// function : Reraise -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Reraise(const Standard_SStream& theReason) { SetMessageString(theReason.str().c_str()); Reraise(); } -// ======================================================================= -// function : Reraise -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Reraise() { Throw(); } -// ======================================================================= -// function : Jump -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Jump() { #if defined(OCC_CONVERT_SIGNALS) @@ -278,19 +242,15 @@ void Standard_Failure::Jump() #endif } -// ======================================================================= -// function : Throw -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Throw() const { throw *this; } -// ======================================================================= -// function : Print -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::Print(Standard_OStream& theStream) const { if (myMessage != NULL) @@ -307,38 +267,30 @@ void Standard_Failure::Print(Standard_OStream& theStream) const } } -// ======================================================================= -// function : NewInstance -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Standard_Failure) Standard_Failure::NewInstance(Standard_CString theString) { return new Standard_Failure(theString); } -// ======================================================================= -// function : NewInstance -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Standard_Failure) Standard_Failure::NewInstance(Standard_CString theMessage, Standard_CString theStackTrace) { return new Standard_Failure(theMessage, theStackTrace); } -// ======================================================================= -// function : GetNbStackTraces -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer Standard_Failure::DefaultStackTraceLength() { return Standard_Failure_DefaultStackTraceLength; } -// ======================================================================= -// function : SetNbStackTraces -// purpose : -// ======================================================================= +//================================================================================================= + void Standard_Failure::SetDefaultStackTraceLength(Standard_Integer theNbStackTraces) { Standard_Failure_DefaultStackTraceLength = theNbStackTraces; diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx index 3c5ac2d98d..bfecb2e7d8 100644 --- a/src/StdPrs/StdPrs_BRepFont.cxx +++ b/src/StdPrs/StdPrs_BRepFont.cxx @@ -114,10 +114,8 @@ static TopAbs_State classifyWW(const TopoDS_Wire& theW1, #endif } // namespace -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + StdPrs_BRepFont::StdPrs_BRepFont() : myPrecision(Precision::Confusion()), myScaleUnits(1.0), @@ -129,10 +127,8 @@ StdPrs_BRepFont::StdPrs_BRepFont() init(); } -// ======================================================================= -// function : init -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_BRepFont::init() { mySurface = new Geom_Plane(gp_Pln(gp::XOY())); @@ -141,10 +137,8 @@ void StdPrs_BRepFont::init() myCurvOnSurf.Load(aSurfAdaptor); } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + StdPrs_BRepFont::StdPrs_BRepFont(const NCollection_String& theFontPath, const Standard_Real theSize, const Standard_Integer theFaceId) @@ -165,10 +159,8 @@ StdPrs_BRepFont::StdPrs_BRepFont(const NCollection_String& theFontPath, myFTFont->Init(theFontPath.ToCString(), THE_FONT_PARAMS, theFaceId); } -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= +//================================================================================================= + StdPrs_BRepFont::StdPrs_BRepFont(const NCollection_String& theFontName, const Font_FontAspect theFontAspect, const Standard_Real theSize, @@ -190,20 +182,16 @@ StdPrs_BRepFont::StdPrs_BRepFont(const NCollection_String& theFontName, myFTFont->FindAndInit(theFontName.ToCString(), theFontAspect, THE_FONT_PARAMS, theStrictLevel); } -// ======================================================================= -// function : Release -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_BRepFont::Release() { myCache.Clear(); myFTFont->Release(); } -// ======================================================================= -// function : FindAndCreate -// purpose : -// ======================================================================= +//================================================================================================= + Handle(StdPrs_BRepFont) StdPrs_BRepFont::FindAndCreate(const TCollection_AsciiString& theFontName, const Font_FontAspect theFontAspect, const Standard_Real theSize, @@ -217,10 +205,8 @@ Handle(StdPrs_BRepFont) StdPrs_BRepFont::FindAndCreate(const TCollection_AsciiSt return Handle(StdPrs_BRepFont)(); } -// ======================================================================= -// function : SetCompositeCurveMode -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_BRepFont::SetCompositeCurveMode(const Standard_Boolean theToConcatenate) { if (myIsCompositeCurve != theToConcatenate) @@ -230,10 +216,8 @@ void StdPrs_BRepFont::SetCompositeCurveMode(const Standard_Boolean theToConcaten } } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + bool StdPrs_BRepFont::Init(const NCollection_String& theFontPath, const Standard_Real theSize, const Standard_Integer theFaceId) @@ -248,10 +232,8 @@ bool StdPrs_BRepFont::Init(const NCollection_String& theFontPath, return myFTFont->Init(theFontPath.ToCString(), THE_FONT_PARAMS, theFaceId); } -// ======================================================================= -// function : FindAndInit -// purpose : -// ======================================================================= +//================================================================================================= + bool StdPrs_BRepFont::FindAndInit(const TCollection_AsciiString& theFontName, const Font_FontAspect theFontAspect, const Standard_Real theSize, @@ -270,10 +252,8 @@ bool StdPrs_BRepFont::FindAndInit(const TCollection_AsciiString& theFontName, theStrictLevel); } -// ======================================================================= -// function : RenderGlyph -// purpose : -// ======================================================================= +//================================================================================================= + TopoDS_Shape StdPrs_BRepFont::RenderGlyph(const Standard_Utf32Char& theChar) { TopoDS_Shape aShape; @@ -282,10 +262,8 @@ TopoDS_Shape StdPrs_BRepFont::RenderGlyph(const Standard_Utf32Char& theChar) return aShape; } -// ======================================================================= -// function : to3d -// purpose : -// ======================================================================= +//================================================================================================= + bool StdPrs_BRepFont::to3d(const Handle(Geom2d_Curve)& theCurve2d, const GeomAbs_Shape theContinuity, Handle(Geom_Curve)& theCurve3d) @@ -306,10 +284,8 @@ bool StdPrs_BRepFont::to3d(const Handle(Geom2d_Curve)& theCurve2d, return !theCurve3d.IsNull(); } -// ======================================================================= -// function : buildFaces -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean StdPrs_BRepFont::buildFaces(const NCollection_Sequence& theWires, TopoDS_Shape& theRes) { @@ -441,10 +417,8 @@ Standard_Boolean StdPrs_BRepFont::buildFaces(const NCollection_Sequence -// ======================================================================= -// Function : Perform -// Purpose : -// ======================================================================= +//================================================================================================= + TopoDS_Shape StdPrs_BRepTextBuilder::Perform(StdPrs_BRepFont& theFont, const Handle(Font_TextFormatter)& theFormatter, const gp_Ax3& thePenLoc) @@ -59,10 +57,8 @@ TopoDS_Shape StdPrs_BRepTextBuilder::Perform(StdPrs_BRepFont& t return aResult; } -// ======================================================================= -// Function : Perform -// Purpose : -// ======================================================================= +//================================================================================================= + TopoDS_Shape StdPrs_BRepTextBuilder::Perform(StdPrs_BRepFont& theFont, const NCollection_String& theString, const gp_Ax3& thePenLoc, diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx index 6d3c302bb1..fcadad72b0 100644 --- a/src/StdPrs/StdPrs_ShadedShape.cxx +++ b/src/StdPrs/StdPrs_ShadedShape.cxx @@ -450,10 +450,8 @@ static Handle(Graphic3d_ArrayOfSegments) fillFaceBoundaries(const TopoDS_Shape& } // anonymous namespace -// ======================================================================= -// function : ExploreSolids -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ShadedShape::ExploreSolids(const TopoDS_Shape& theShape, const BRep_Builder& theBuilder, TopoDS_Compound& theClosed, @@ -506,10 +504,8 @@ void StdPrs_ShadedShape::ExploreSolids(const TopoDS_Shape& theShape, } } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ShadedShape::Add(const Handle(Prs3d_Presentation)& thePrs, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, @@ -528,10 +524,8 @@ void StdPrs_ShadedShape::Add(const Handle(Prs3d_Presentation)& thePrs, theGroup); } -// ======================================================================= -// function : Add -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ShadedShape::Add(const Handle(Prs3d_Presentation)& thePrs, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, @@ -627,10 +621,8 @@ void StdPrs_ShadedShape::Add(const Handle(Prs3d_Presentation)& thePrs, } } -// ======================================================================= -// function : FillTriangles -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfTriangles) StdPrs_ShadedShape::FillTriangles( const TopoDS_Shape& theShape, const Standard_Boolean theHasTexels, @@ -641,10 +633,8 @@ Handle(Graphic3d_ArrayOfTriangles) StdPrs_ShadedShape::FillTriangles( return fillTriangles(theShape, theHasTexels, theUVOrigin, theUVRepeat, theUVScale); } -// ======================================================================= -// function : FillFaceBoundaries -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfSegments) StdPrs_ShadedShape::FillFaceBoundaries( const TopoDS_Shape& theShape, GeomAbs_Shape theUpperContinuity) @@ -652,10 +642,8 @@ Handle(Graphic3d_ArrayOfSegments) StdPrs_ShadedShape::FillFaceBoundaries( return fillFaceBoundaries(theShape, theUpperContinuity); } -// ======================================================================= -// function : AddWireframeForFreeElements -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ShadedShape::AddWireframeForFreeElements(const Handle(Prs3d_Presentation)& thePrs, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer) @@ -663,10 +651,8 @@ void StdPrs_ShadedShape::AddWireframeForFreeElements(const Handle(Prs3d_Presenta wireframeFromShape(thePrs, theShape, theDrawer); } -// ======================================================================= -// function : AddWireframeForFacesWithoutTriangles -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ShadedShape::AddWireframeForFacesWithoutTriangles( const Handle(Prs3d_Presentation)& thePrs, const TopoDS_Shape& theShape, diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx index 476c481c11..02308114b5 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx @@ -153,10 +153,8 @@ Standard_Boolean StdPrs_ToolTriangulatedShape::IsTessellated(const TopoDS_Shape& return BRepTools::Triangulation(theShape, GetDeflection(theShape, theDrawer), true); } -// ======================================================================= -// function : Tessellate -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean StdPrs_ToolTriangulatedShape::Tessellate(const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer) { @@ -181,10 +179,8 @@ Standard_Boolean StdPrs_ToolTriangulatedShape::Tessellate(const TopoDS_Shape& return wasRecomputed; } -// ======================================================================= -// function : ClearOnOwnDeflectionChange -// purpose : -// ======================================================================= +//================================================================================================= + void StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange( const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, diff --git a/src/StdPrs/StdPrs_WFShape.cxx b/src/StdPrs/StdPrs_WFShape.cxx index 4d863bc05f..deeca8f6d5 100644 --- a/src/StdPrs/StdPrs_WFShape.cxx +++ b/src/StdPrs/StdPrs_WFShape.cxx @@ -81,10 +81,8 @@ private: const Standard_Real myShapeDeflection; }; -// ========================================================================= -// function : Add -// purpose : -// ========================================================================= +//================================================================================================= + void StdPrs_WFShape::Add(const Handle(Prs3d_Presentation)& thePresentation, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, @@ -232,10 +230,8 @@ void StdPrs_WFShape::Add(const Handle(Prs3d_Presentation)& thePresentation, } } -// ========================================================================= -// function : AddAllEdges -// purpose : -// ========================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfPrimitives) StdPrs_WFShape::AddAllEdges( const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer) @@ -247,10 +243,8 @@ Handle(Graphic3d_ArrayOfPrimitives) StdPrs_WFShape::AddAllEdges( return Prs3d::PrimitivesFromPolylines(aPolylines); } -// ========================================================================= -// function : addEdges -// purpose : -// ========================================================================= +//================================================================================================= + void StdPrs_WFShape::addEdges(const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, Standard_Real theShapeDeflection, @@ -311,10 +305,8 @@ void StdPrs_WFShape::addEdges(const TopoDS_Shape& theShape, } } -// ========================================================================= -// function : AddEdges -// purpose : -// ========================================================================= +//================================================================================================= + void StdPrs_WFShape::addEdges(const TopTools_ListOfShape& theEdges, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Real theShapeDeflection, @@ -397,10 +389,8 @@ void StdPrs_WFShape::addEdges(const TopTools_ListOfShape& theEdges, } } -// ========================================================================= -// function : AddEdgesOnTriangulation -// purpose : -// ========================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfPrimitives) StdPrs_WFShape::AddEdgesOnTriangulation( const TopoDS_Shape& theShape, const Standard_Boolean theToExcludeGeometric) @@ -422,10 +412,8 @@ Handle(Graphic3d_ArrayOfPrimitives) StdPrs_WFShape::AddEdgesOnTriangulation( return aSurfArray; } -// ========================================================================= -// function : AddEdgesOnTriangulation -// purpose : -// ========================================================================= +//================================================================================================= + void StdPrs_WFShape::AddEdgesOnTriangulation(TColgp_SequenceOfPnt& theSegments, const TopoDS_Shape& theShape, const Standard_Boolean theToExcludeGeometric) @@ -449,10 +437,8 @@ void StdPrs_WFShape::AddEdgesOnTriangulation(TColgp_SequenceOfPnt& theSegments, } } -// ========================================================================= -// function : AddVertexes -// purpose : -// ========================================================================= +//================================================================================================= + Handle(Graphic3d_ArrayOfPoints) StdPrs_WFShape::AddVertexes(const TopoDS_Shape& theShape, Prs3d_VertexDrawMode theVertexMode) { diff --git a/src/StdSelect/StdSelect_BRepOwner.cxx b/src/StdSelect/StdSelect_BRepOwner.cxx index 8ef609d2e8..222326a081 100644 --- a/src/StdSelect/StdSelect_BRepOwner.cxx +++ b/src/StdSelect/StdSelect_BRepOwner.cxx @@ -162,10 +162,8 @@ void StdSelect_BRepOwner::UpdateHighlightTrsf(const Handle(V3d_Viewer)& } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void StdSelect_BRepOwner::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/V3d/V3d_AmbientLight.cxx b/src/V3d/V3d_AmbientLight.cxx index abd55cd610..f7f77ecb32 100644 --- a/src/V3d/V3d_AmbientLight.cxx +++ b/src/V3d/V3d_AmbientLight.cxx @@ -19,10 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_AmbientLight, Graphic3d_CLight) -// ======================================================================= -// function : V3d_AmbientLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_AmbientLight::V3d_AmbientLight(const Quantity_Color& theColor) : Graphic3d_CLight(Graphic3d_TypeOfLightSource_Ambient) { diff --git a/src/V3d/V3d_DirectionalLight.cxx b/src/V3d/V3d_DirectionalLight.cxx index a40c20a755..5ed2bd5285 100644 --- a/src/V3d/V3d_DirectionalLight.cxx +++ b/src/V3d/V3d_DirectionalLight.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_DirectionalLight, V3d_PositionLight) -// ======================================================================= -// function : V3d_DirectionalLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_DirectionalLight::V3d_DirectionalLight(const V3d_TypeOfOrientation theDirection, const Quantity_Color& theColor, const Standard_Boolean theIsHeadlight) @@ -31,10 +29,8 @@ V3d_DirectionalLight::V3d_DirectionalLight(const V3d_TypeOfOrientation theDirect SetDirection(V3d::GetProjAxis(theDirection)); } -// ======================================================================= -// function : V3d_DirectionalLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_DirectionalLight::V3d_DirectionalLight(const gp_Dir& theDirection, const Quantity_Color& theColor, const Standard_Boolean theIsHeadlight) @@ -45,10 +41,8 @@ V3d_DirectionalLight::V3d_DirectionalLight(const gp_Dir& theDirection, SetDirection(theDirection); } -// ======================================================================= -// function : SetDirection -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_DirectionalLight::SetDirection(V3d_TypeOfOrientation theDirection) { SetDirection(V3d::GetProjAxis(theDirection)); diff --git a/src/V3d/V3d_Plane.cxx b/src/V3d/V3d_Plane.cxx index 67fdbd0b1a..77e62bc123 100755 --- a/src/V3d/V3d_Plane.cxx +++ b/src/V3d/V3d_Plane.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_Plane, Standard_Transient) -// ======================================================================= -// function : V3d_Plane -// purpose : -// ======================================================================= +//================================================================================================= + V3d_Plane::V3d_Plane(const Standard_Real theA, const Standard_Real theB, const Standard_Real theC, @@ -36,10 +34,8 @@ V3d_Plane::V3d_Plane(const Standard_Real theA, { } -// ======================================================================= -// function : V3d_Plane -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Plane::SetPlane(const Standard_Real theA, const Standard_Real theB, const Standard_Real theC, @@ -52,10 +48,8 @@ void V3d_Plane::SetPlane(const Standard_Real theA, } } -// ======================================================================= -// function : Display -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Plane::Display(const Handle(V3d_View)& theView, const Quantity_Color& theColor) { Handle(V3d_Viewer) aViewer = theView->Viewer(); @@ -90,10 +84,8 @@ void V3d_Plane::Display(const Handle(V3d_View)& theView, const Quantity_Color& t Update(); } -// ======================================================================= -// function : Erase -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Plane::Erase() { if (!myGraphicStructure.IsNull()) @@ -102,10 +94,8 @@ void V3d_Plane::Erase() } } -// ======================================================================= -// function : Plane -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Plane::Plane(Standard_Real& theA, Standard_Real& theB, Standard_Real& theC, @@ -118,10 +108,8 @@ void V3d_Plane::Plane(Standard_Real& theA, theD = anEquation[3]; } -// ======================================================================= -// function : IsDisplayed -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean V3d_Plane::IsDisplayed() const { if (myGraphicStructure.IsNull()) @@ -132,10 +120,8 @@ Standard_Boolean V3d_Plane::IsDisplayed() const return myGraphicStructure->IsDisplayed(); } -// ======================================================================= -// function : Update -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Plane::Update() { if (myGraphicStructure.IsNull()) diff --git a/src/V3d/V3d_PositionLight.cxx b/src/V3d/V3d_PositionLight.cxx index 57fbc3d48e..74cf6f8e03 100644 --- a/src/V3d/V3d_PositionLight.cxx +++ b/src/V3d/V3d_PositionLight.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_PositionLight, Graphic3d_CLight) -// ======================================================================= -// function : V3d_PositionLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_PositionLight::V3d_PositionLight(Graphic3d_TypeOfLightSource theType) : Graphic3d_CLight(theType) { diff --git a/src/V3d/V3d_PositionalLight.cxx b/src/V3d/V3d_PositionalLight.cxx index c211cd6da2..65b8df29cf 100644 --- a/src/V3d/V3d_PositionalLight.cxx +++ b/src/V3d/V3d_PositionalLight.cxx @@ -15,10 +15,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_PositionalLight, V3d_PositionLight) -// ======================================================================= -// function : V3d_PositionalLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_PositionalLight::V3d_PositionalLight(const gp_Pnt& thePos, const Quantity_Color& theColor) : V3d_PositionLight(Graphic3d_TypeOfLightSource_Positional) { diff --git a/src/V3d/V3d_SpotLight.cxx b/src/V3d/V3d_SpotLight.cxx index 58ccaff886..3fd1bc373b 100644 --- a/src/V3d/V3d_SpotLight.cxx +++ b/src/V3d/V3d_SpotLight.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_SpotLight, V3d_PositionLight) -// ======================================================================= -// function : V3d_SpotLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_SpotLight::V3d_SpotLight(const gp_Pnt& thePos, const V3d_TypeOfOrientation theDirection, const Quantity_Color& theColor) @@ -31,10 +29,8 @@ V3d_SpotLight::V3d_SpotLight(const gp_Pnt& thePos, SetDirection(V3d::GetProjAxis(theDirection)); } -// ======================================================================= -// function : V3d_SpotLight -// purpose : -// ======================================================================= +//================================================================================================= + V3d_SpotLight::V3d_SpotLight(const gp_Pnt& thePos, const gp_Dir& theDirection, const Quantity_Color& theColor) @@ -45,10 +41,8 @@ V3d_SpotLight::V3d_SpotLight(const gp_Pnt& thePos, SetDirection(theDirection); } -// ======================================================================= -// function : SetDirection -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_SpotLight::SetDirection(V3d_TypeOfOrientation theDirection) { SetDirection(V3d::GetProjAxis(theDirection)); diff --git a/src/V3d/V3d_Trihedron.cxx b/src/V3d/V3d_Trihedron.cxx index 6f03a81302..51277b087d 100644 --- a/src/V3d/V3d_Trihedron.cxx +++ b/src/V3d/V3d_Trihedron.cxx @@ -75,10 +75,8 @@ private: V3d_Trihedron* myTrihedron; }; -// ============================================================================ -// function : V3d_Trihedron -// purpose : -// ============================================================================ +//================================================================================================= + V3d_Trihedron::V3d_Trihedron() : myScale(1.0), myRatio(0.8), @@ -126,19 +124,15 @@ V3d_Trihedron::V3d_Trihedron() mySphereShadingAspect->SetColor(Quantity_NOC_WHITE); } -// ============================================================================ -// function : V3d_Trihedron -// purpose : -// ============================================================================ +//================================================================================================= + V3d_Trihedron::~V3d_Trihedron() { Erase(); } -// ============================================================================ -// function : SetLabelsColor -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetLabelsColor(const Quantity_Color& theColor) { myTextAspects[V3d_X]->SetColor(theColor); @@ -146,10 +140,8 @@ void V3d_Trihedron::SetLabelsColor(const Quantity_Color& theColor) myTextAspects[V3d_Z]->SetColor(theColor); } -// ============================================================================ -// function : SetLabels -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetLabels(const TCollection_AsciiString& theX, const TCollection_AsciiString& theY, const TCollection_AsciiString& theZ) @@ -164,10 +156,8 @@ void V3d_Trihedron::SetLabels(const TCollection_AsciiString& theX, } } -// ============================================================================ -// function : SetLabelsColor -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetLabelsColor(const Quantity_Color& theXColor, const Quantity_Color& theYColor, const Quantity_Color& theZColor) @@ -177,10 +167,8 @@ void V3d_Trihedron::SetLabelsColor(const Quantity_Color& theXColor, myTextAspects[V3d_Z]->SetColor(theZColor); } -// ============================================================================ -// function : SetArrowsColor -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetArrowsColor(const Quantity_Color& theXColor, const Quantity_Color& theYColor, const Quantity_Color& theZColor) @@ -192,10 +180,8 @@ void V3d_Trihedron::SetArrowsColor(const Quantity_Color& theXColor, } } -// ============================================================================ -// function : SetScale -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetScale(const Standard_Real theScale) { if (Abs(myScale - theScale) > Precision::Confusion()) @@ -205,10 +191,8 @@ void V3d_Trihedron::SetScale(const Standard_Real theScale) myScale = theScale; } -// ======================================================================= -// function : SetSizeRatio -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Trihedron::SetSizeRatio(const Standard_Real theRatio) { if (Abs(myRatio - theRatio) > Precision::Confusion()) @@ -218,10 +202,8 @@ void V3d_Trihedron::SetSizeRatio(const Standard_Real theRatio) myRatio = theRatio; } -// ======================================================================= -// function : SetArrowDiameter -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Trihedron::SetArrowDiameter(const Standard_Real theDiam) { if (Abs(myDiameter - theDiam) > Precision::Confusion()) @@ -231,10 +213,8 @@ void V3d_Trihedron::SetArrowDiameter(const Standard_Real theDiam) myDiameter = theDiam; } -// ======================================================================= -// function : SetNbFacets -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Trihedron::SetNbFacets(const Standard_Integer theNbFacets) { if (Abs(myNbFacettes - theNbFacets) > 0) @@ -244,10 +224,8 @@ void V3d_Trihedron::SetNbFacets(const Standard_Integer theNbFacets) myNbFacettes = theNbFacets; } -// ============================================================================ -// function : Display -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::Display(const V3d_View& theView) { if (myStructure.IsNull()) @@ -270,10 +248,8 @@ void V3d_Trihedron::Display(const V3d_View& theView) myStructure->Display(); } -// ============================================================================ -// function : Erase -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::Erase() { if (!myStructure.IsNull()) @@ -283,10 +259,8 @@ void V3d_Trihedron::Erase() } } -// ============================================================================ -// function : SetPosition -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::SetPosition(const Aspect_TypeOfTriedronPosition thePosition) { Graphic3d_Vec2i anOffset(0, 0); @@ -303,10 +277,8 @@ void V3d_Trihedron::SetPosition(const Aspect_TypeOfTriedronPosition thePosition) myTransformPers->SetOffset2d(anOffset); } -// ============================================================================ -// function : compute -// purpose : -// ============================================================================ +//================================================================================================= + void V3d_Trihedron::compute() { myToCompute = Standard_False; diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 755062eb63..9e72f25b07 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -285,19 +285,15 @@ void V3d_View::Remove() MyWindow.Nullify(); } -// ======================================================================= -// function : AddSubview -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_View::AddSubview(const Handle(V3d_View)& theView) { mySubviews.Append(theView); } -// ======================================================================= -// function : RemoveSubview -// purpose : -// ======================================================================= +//================================================================================================= + bool V3d_View::RemoveSubview(const V3d_View* theView) { for (NCollection_Sequence::Iterator aViewIter(mySubviews); aViewIter.More(); @@ -312,10 +308,8 @@ bool V3d_View::RemoveSubview(const V3d_View* theView) return false; } -// ============================================================================= -// function : PickSubview -// purpose : -// ============================================================================= +//================================================================================================= + Handle(V3d_View) V3d_View::PickSubview(const Graphic3d_Vec2i& thePnt) const { if (thePnt.x() < 0 || thePnt.x() >= MyWindow->Dimensions().x() || thePnt.y() < 0 @@ -420,10 +414,8 @@ Standard_Boolean V3d_View::IsInvalidated() const return !myView->IsDefined() || myView->IsInvalidated(); } -// ======================================================================== -// function : SetAutoZFitMode -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_View::SetAutoZFitMode(const Standard_Boolean theIsOn, const Standard_Real theScaleFactor) { Standard_ASSERT_RAISE(theScaleFactor > 0.0, "Zero or negative scale factor is not allowed."); @@ -2977,10 +2969,8 @@ Standard_Boolean V3d_View::SetImmediateUpdate(const Standard_Boolean theImmediat return aPreviousMode; } -// ======================================================================= -// function : SetCamera -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_View::SetCamera(const Handle(Graphic3d_Camera)& theCamera) { myView->SetCamera(theCamera); @@ -2988,19 +2978,15 @@ void V3d_View::SetCamera(const Handle(Graphic3d_Camera)& theCamera) ImmediateUpdate(); } -// ======================================================================= -// function : GetCamera -// purpose : -// ======================================================================= +//================================================================================================= + const Handle(Graphic3d_Camera)& V3d_View::Camera() const { return myView->Camera(); } -// ======================================================================= -// function : FitMinMax -// purpose : Internal -// ======================================================================= +//================================================================================================= + Standard_Boolean V3d_View::FitMinMax(const Handle(Graphic3d_Camera)& theCamera, const Bnd_Box& theBox, const Standard_Real theMargin, @@ -3019,10 +3005,8 @@ Standard_Boolean V3d_View::FitMinMax(const Handle(Graphic3d_Camera)& theCamera, return Standard_True; } -// ======================================================================= -// function : Scale -// purpose : Internal -// ======================================================================= +//================================================================================================= + void V3d_View::Scale(const Handle(Graphic3d_Camera)& theCamera, const Standard_Real theSizeXv, const Standard_Real theSizeYv) const @@ -3039,10 +3023,8 @@ void V3d_View::Scale(const Handle(Graphic3d_Camera)& theCamera, Invalidate(); } -// ======================================================================= -// function : Translate -// purpose : Internal -// ======================================================================= +//================================================================================================= + void V3d_View::Translate(const Handle(Graphic3d_Camera)& theCamera, const Standard_Real theDXv, const Standard_Real theDYv) const @@ -3062,10 +3044,8 @@ void V3d_View::Translate(const Handle(Graphic3d_Camera)& theCamera, Invalidate(); } -// ======================================================================= -// function : DiagnosticInformation -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& theDict, Graphic3d_DiagnosticInfo theFlags) const { @@ -3079,10 +3059,8 @@ void V3d_View::StatisticInformation(TColStd_IndexedDataMapOfStringString& theDic myView->StatisticInformation(theDict); } -// ======================================================================= -// function : StatisticInformation -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString V3d_View::StatisticInformation() const { return myView->StatisticInformation(); @@ -3630,10 +3608,8 @@ void V3d_View::GraduatedTrihedronErase() myView->GraduatedTrihedronErase(); } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_View::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const { OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) diff --git a/src/V3d/V3d_Viewer.cxx b/src/V3d/V3d_Viewer.cxx index d9e3228062..c15b334cdc 100644 --- a/src/V3d/V3d_Viewer.cxx +++ b/src/V3d/V3d_Viewer.cxx @@ -33,10 +33,8 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_Viewer, Standard_Transient) -// ======================================================================== -// function : V3d_Viewer -// purpose : -// ======================================================================== +//================================================================================================= + V3d_Viewer::V3d_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver) : myDriver(theDriver), myStructureManager(new Graphic3d_StructureManager(theDriver)), @@ -58,19 +56,15 @@ V3d_Viewer::V3d_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver) // } -// ======================================================================== -// function : CreateView -// purpose : -// ======================================================================== +//================================================================================================= + Handle(V3d_View) V3d_Viewer::CreateView() { return new V3d_View(this, myDefaultTypeOfView); } -// ======================================================================== -// function : SetViewOn -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::SetViewOn() { for (V3d_ListOfView::Iterator aDefViewIter(myDefinedViews); aDefViewIter.More(); @@ -80,10 +74,8 @@ void V3d_Viewer::SetViewOn() } } -// ======================================================================== -// function : SetViewOff -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::SetViewOff() { for (V3d_ListOfView::Iterator aDefViewIter(myDefinedViews); aDefViewIter.More(); @@ -93,10 +85,8 @@ void V3d_Viewer::SetViewOff() } } -// ======================================================================== -// function : SetViewOn -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::SetViewOn(const Handle(V3d_View)& theView) { Handle(Graphic3d_CView) aViewImpl = theView->View(); @@ -124,10 +114,8 @@ void V3d_Viewer::SetViewOn(const Handle(V3d_View)& theView) } } -// ======================================================================== -// function : SetViewOff -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::SetViewOff(const Handle(V3d_View)& theView) { Handle(Graphic3d_CView) aViewImpl = theView->View(); @@ -138,10 +126,8 @@ void V3d_Viewer::SetViewOff(const Handle(V3d_View)& theView) } } -// ======================================================================== -// function : Redraw -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::Redraw() const { for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass) @@ -162,10 +148,8 @@ void V3d_Viewer::Redraw() const } } -// ======================================================================== -// function : RedrawImmediate -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::RedrawImmediate() const { for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass) @@ -186,10 +170,8 @@ void V3d_Viewer::RedrawImmediate() const } } -// ======================================================================== -// function : Invalidate -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::Invalidate() const { for (V3d_ListOfView::Iterator aDefViewIter(myDefinedViews); aDefViewIter.More(); @@ -199,28 +181,22 @@ void V3d_Viewer::Invalidate() const } } -// ======================================================================== -// function : Remove -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::Remove() { myStructureManager->Remove(); } -// ======================================================================== -// function : Erase -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::Erase() const { myStructureManager->Erase(); } -// ======================================================================== -// function : UnHighlight -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::UnHighlight() const { myStructureManager->UnHighlight(); @@ -233,19 +209,15 @@ void V3d_Viewer::SetDefaultViewSize(const Standard_Real theSize) myViewSize = theSize; } -// ======================================================================== -// function : IfMoreViews -// purpose : -// ======================================================================== +//================================================================================================= + Standard_Boolean V3d_Viewer::IfMoreViews() const { return myDefinedViews.Size() < myStructureManager->MaxNumOfViews(); } -// ======================================================================== -// function : AddView -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::AddView(const Handle(V3d_View)& theView) { if (!myDefinedViews.Contains(theView)) @@ -254,10 +226,8 @@ void V3d_Viewer::AddView(const Handle(V3d_View)& theView) } } -// ======================================================================== -// function : DelView -// purpose : -// ======================================================================== +//================================================================================================= + void V3d_Viewer::DelView(const V3d_View* theView) { for (V3d_ListOfView::Iterator aViewIter(myActiveViews); aViewIter.More(); aViewIter.Next()) @@ -558,10 +528,8 @@ void V3d_Viewer::DisplayPrivilegedPlane(const Standard_Boolean theOnOff, myPlaneStructure->Display(); } -// ======================================================================= -// function : Grid -// purpose : -// ======================================================================= +//================================================================================================= + Handle(Aspect_Grid) V3d_Viewer::Grid(Aspect_GridType theGridType, bool theToCreate) { switch (theGridType) @@ -588,20 +556,16 @@ Handle(Aspect_Grid) V3d_Viewer::Grid(Aspect_GridType theGridType, bool theToCrea return Handle(Aspect_Grid)(); } -// ======================================================================= -// function : GridDrawMode -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_GridDrawMode V3d_Viewer::GridDrawMode() { Handle(Aspect_Grid) aGrid = Grid(false); return !aGrid.IsNull() ? aGrid->DrawMode() : Aspect_GDM_Lines; } -// ======================================================================= -// function : ActivateGrid -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::ActivateGrid(const Aspect_GridType theType, const Aspect_GridDrawMode theMode) { if (Handle(Aspect_Grid) anOldGrid = Grid(false)) @@ -624,10 +588,8 @@ void V3d_Viewer::ActivateGrid(const Aspect_GridType theType, const Aspect_GridDr } } -// ======================================================================= -// function : DeactivateGrid -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::DeactivateGrid() { Handle(Aspect_Grid) aGrid = Grid(false); @@ -651,20 +613,16 @@ void V3d_Viewer::DeactivateGrid() } } -// ======================================================================= -// function : IsGridActive -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean V3d_Viewer::IsGridActive() { Handle(Aspect_Grid) aGrid = Grid(false); return !aGrid.IsNull() && aGrid->IsActive(); } -// ======================================================================= -// function : RectangularGridValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::RectangularGridValues(Standard_Real& theXOrigin, Standard_Real& theYOrigin, Standard_Real& theXStep, @@ -679,10 +637,8 @@ void V3d_Viewer::RectangularGridValues(Standard_Real& theXOrigin, theRotationAngle = myRGrid->RotationAngle(); } -// ======================================================================= -// function : SetRectangularGridValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetRectangularGridValues(const Standard_Real theXOrigin, const Standard_Real theYOrigin, const Standard_Real theXStep, @@ -698,10 +654,8 @@ void V3d_Viewer::SetRectangularGridValues(const Standard_Real theXOrigin, } } -// ======================================================================= -// function : CircularGridValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::CircularGridValues(Standard_Real& theXOrigin, Standard_Real& theYOrigin, Standard_Real& theRadiusStep, @@ -716,10 +670,8 @@ void V3d_Viewer::CircularGridValues(Standard_Real& theXOrigin, theRotationAngle = myCGrid->RotationAngle(); } -// ======================================================================= -// function : SetCircularGridValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetCircularGridValues(const Standard_Real theXOrigin, const Standard_Real theYOrigin, const Standard_Real theRadiusStep, @@ -739,10 +691,8 @@ void V3d_Viewer::SetCircularGridValues(const Standard_Real theXOrigin, } } -// ======================================================================= -// function : RectangularGridGraphicValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::RectangularGridGraphicValues(Standard_Real& theXSize, Standard_Real& theYSize, Standard_Real& theOffSet) @@ -751,10 +701,8 @@ void V3d_Viewer::RectangularGridGraphicValues(Standard_Real& theXSize, myRGrid->GraphicValues(theXSize, theYSize, theOffSet); } -// ======================================================================= -// function : SetRectangularGridGraphicValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetRectangularGridGraphicValues(const Standard_Real theXSize, const Standard_Real theYSize, const Standard_Real theOffSet) @@ -763,20 +711,16 @@ void V3d_Viewer::SetRectangularGridGraphicValues(const Standard_Real theXSize, myRGrid->SetGraphicValues(theXSize, theYSize, theOffSet); } -// ======================================================================= -// function : CircularGridGraphicValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::CircularGridGraphicValues(Standard_Real& theRadius, Standard_Real& theOffSet) { Grid(Aspect_GT_Circular, true); myCGrid->GraphicValues(theRadius, theOffSet); } -// ======================================================================= -// function : SetCircularGridGraphicValues -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetCircularGridGraphicValues(const Standard_Real theRadius, const Standard_Real theOffSet) { @@ -784,10 +728,8 @@ void V3d_Viewer::SetCircularGridGraphicValues(const Standard_Real theRadius, myCGrid->SetGraphicValues(theRadius, theOffSet); } -// ======================================================================= -// function : SetGridEcho -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetGridEcho(const Standard_Boolean theToShowGrid) { if (myGridEcho == theToShowGrid) @@ -804,10 +746,8 @@ void V3d_Viewer::SetGridEcho(const Standard_Boolean theToShowGrid) myGridEchoStructure->Erase(); } -// ======================================================================= -// function : SetGridEcho -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::SetGridEcho(const Handle(Graphic3d_AspectMarker3d)& theMarker) { if (myGridEchoStructure.IsNull()) @@ -820,10 +760,8 @@ void V3d_Viewer::SetGridEcho(const Handle(Graphic3d_AspectMarker3d)& theMarker) myGridEchoGroup->SetPrimitivesAspect(theMarker); } -// ======================================================================= -// function : ShowGridEcho -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::ShowGridEcho(const Handle(V3d_View)& theView, const Graphic3d_Vertex& theVertex) { if (!myGridEcho) @@ -864,10 +802,8 @@ void V3d_Viewer::ShowGridEcho(const Handle(V3d_View)& theView, const Graphic3d_V myGridEchoStructure->Display(); } -// ======================================================================= -// function : HideGridEcho -// purpose : -// ======================================================================= +//================================================================================================= + void V3d_Viewer::HideGridEcho(const Handle(V3d_View)& theView) { if (myGridEchoStructure.IsNull()) diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 705939d645..d05868108d 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4695,10 +4695,8 @@ inline Standard_Boolean parseTrsfPersFlag(const TCollection_AsciiString& theFlag return Standard_True; } -// ============================================================================= -// function : ParseCorner -// purpose : -// ============================================================================= +//================================================================================================= + Standard_Boolean ViewerTest::ParseCorner(Standard_CString theArg, Aspect_TypeOfTriedronPosition& theCorner) { diff --git a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx index 77c4287924..f4f05288c8 100644 --- a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx +++ b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx @@ -18,20 +18,16 @@ #include #include -// ======================================================================= -// function : Instance -// purpose : -// ======================================================================= +//================================================================================================= + ViewerTest_ContinuousRedrawer& ViewerTest_ContinuousRedrawer::Instance() { static ViewerTest_ContinuousRedrawer aRedrawer; return aRedrawer; } -// ======================================================================= -// function : ViewerTest_ContinuousRedrawer -// purpose : -// ======================================================================= +//================================================================================================= + ViewerTest_ContinuousRedrawer::ViewerTest_ContinuousRedrawer() : myThread(doThreadWrapper), myWakeEvent(false), @@ -42,19 +38,15 @@ ViewerTest_ContinuousRedrawer::ViewerTest_ContinuousRedrawer() // } -// ======================================================================= -// function : ~ViewerTest_ContinuousRedrawer -// purpose : -// ======================================================================= +//================================================================================================= + ViewerTest_ContinuousRedrawer::~ViewerTest_ContinuousRedrawer() { Stop(); } -// ======================================================================= -// function : Start -// purpose : -// ======================================================================= +//================================================================================================= + void ViewerTest_ContinuousRedrawer::Start(const Handle(V3d_View)& theView, Standard_Real theTargetFps) { @@ -82,10 +74,8 @@ void ViewerTest_ContinuousRedrawer::Start(const Handle(V3d_View)& theView, } } -// ======================================================================= -// function : Stop -// purpose : -// ======================================================================= +//================================================================================================= + void ViewerTest_ContinuousRedrawer::Stop(const Handle(V3d_View)& theView) { if (!theView.IsNull() && myView != theView) @@ -104,10 +94,8 @@ void ViewerTest_ContinuousRedrawer::Stop(const Handle(V3d_View)& theView) myView.Nullify(); } -// ======================================================================= -// function : Pause -// purpose : -// ======================================================================= +//================================================================================================= + void ViewerTest_ContinuousRedrawer::Pause() { if (!myToPause) @@ -117,10 +105,8 @@ void ViewerTest_ContinuousRedrawer::Pause() } } -// ======================================================================= -// function : doThreadLoop -// purpose : -// ======================================================================= +//================================================================================================= + void ViewerTest_ContinuousRedrawer::doThreadLoop() { Handle(Aspect_DisplayConnection) aDisp = new Aspect_DisplayConnection(); diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 52b5b3b71a..118170e7f9 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -145,10 +145,8 @@ ViewerTest_EventManager::~ViewerTest_EventManager() } } -// ======================================================================= -// function : UpdateMouseClick -// purpose : -// ======================================================================= +//================================================================================================= + bool ViewerTest_EventManager::UpdateMouseClick(const Graphic3d_Vec2i& thePoint, Aspect_VKeyMouse theButton, Aspect_VKeyFlags theModifiers, @@ -334,10 +332,8 @@ void ViewerTest_EventManager::ProcessInput() #endif } -// ======================================================================= -// function : navigationKeyModifierSwitch -// purpose : -// ======================================================================= +//================================================================================================= + bool ViewerTest_EventManager::navigationKeyModifierSwitch(unsigned int theModifOld, unsigned int theModifNew, double theTimeStamp) @@ -750,10 +746,8 @@ static EM_BOOL onWasmFocusCallback(int theEventType, const EmscriptenFocusEvent* } #endif -// ============================================================================== -// function : SetupWindowCallbacks -// purpose : -// ============================================================================== +//================================================================================================= + void ViewerTest_EventManager::SetupWindowCallbacks(const Handle(Aspect_Window)& theWin) { #ifdef _WIN32 diff --git a/src/ViewerTest/ViewerTest_V3dView.cxx b/src/ViewerTest/ViewerTest_V3dView.cxx index 15ebb060c1..f7f563746b 100644 --- a/src/ViewerTest/ViewerTest_V3dView.cxx +++ b/src/ViewerTest/ViewerTest_V3dView.cxx @@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(ViewerTest_V3dView, V3d_View) -// ======================================================================= -// function : ViewerTest_V3dView -// purpose : -// ======================================================================= +//================================================================================================= + ViewerTest_V3dView::ViewerTest_V3dView(const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView theType, bool theIs2dMode) @@ -30,10 +28,8 @@ ViewerTest_V3dView::ViewerTest_V3dView(const Handle(V3d_Viewer)& theViewer, // } -// ======================================================================= -// function : ViewerTest_V3dView -// purpose : -// ======================================================================= +//================================================================================================= + ViewerTest_V3dView::ViewerTest_V3dView(const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& theView) : V3d_View(theViewer, theView), @@ -45,10 +41,8 @@ ViewerTest_V3dView::ViewerTest_V3dView(const Handle(V3d_Viewer)& theViewer, } } -// ======================================================================= -// function : IsCurrentViewIn2DMode -// purpose : -// ======================================================================= +//================================================================================================= + bool ViewerTest_V3dView::IsCurrentViewIn2DMode() { if (Handle(ViewerTest_V3dView) aV3dView = @@ -59,10 +53,8 @@ bool ViewerTest_V3dView::IsCurrentViewIn2DMode() return false; } -// ======================================================================= -// function : SetCurrentView2DMode -// purpose : -// ======================================================================= +//================================================================================================= + void ViewerTest_V3dView::SetCurrentView2DMode(bool theIs2d) { if (Handle(ViewerTest_V3dView) aV3dView = diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 117949a620..348b356f03 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -2412,10 +2412,8 @@ static void VProcessEvents(ClientData theDispX, int) } } #elif !defined(__APPLE__) -// ======================================================================= -// function : ViewerMainLoop -// purpose : -// ======================================================================= +//================================================================================================= + int ViewerMainLoop(Standard_Integer, const char**) { // unused @@ -5594,10 +5592,8 @@ static int VMemGpu(Draw_Interpretor& theDI, Standard_Integer theArgNb, const cha return 0; } -// ============================================================================== -// function : VReadPixel -// purpose : -// ============================================================================== +//================================================================================================= + static int VReadPixel(Draw_Interpretor& theDI, Standard_Integer theArgNb, const char** theArgVec) { // get the active view diff --git a/src/WNT/WNT_HIDSpaceMouse.cxx b/src/WNT/WNT_HIDSpaceMouse.cxx index 1107acb5d1..fe0544caf0 100644 --- a/src/WNT/WNT_HIDSpaceMouse.cxx +++ b/src/WNT/WNT_HIDSpaceMouse.cxx @@ -146,10 +146,8 @@ static SpaceVKey hidToSpaceKey(unsigned long theProductId, unsigned short theKey } // namespace -// ======================================================================= -// function : WNT_HIDSpaceMouse -// purpose : -// ======================================================================= +//================================================================================================= + WNT_HIDSpaceMouse::WNT_HIDSpaceMouse(unsigned long theProductId, const Standard_Byte* theData, Standard_Size theSize) @@ -161,10 +159,8 @@ WNT_HIDSpaceMouse::WNT_HIDSpaceMouse(unsigned long theProductId, // } -// ======================================================================= -// function : IsKnownProduct -// purpose : -// ======================================================================= +//================================================================================================= + bool WNT_HIDSpaceMouse::IsKnownProduct(unsigned long theProductId) { switch (theProductId) @@ -186,10 +182,8 @@ bool WNT_HIDSpaceMouse::IsKnownProduct(unsigned long theProductId) return false; } -// ======================================================================= -// function : Translation -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3d WNT_HIDSpaceMouse::Translation(bool& theIsIdle, bool theIsQuadric) const { theIsIdle = true; @@ -198,10 +192,8 @@ Graphic3d_Vec3d WNT_HIDSpaceMouse::Translation(bool& theIsIdle, bool theIsQuadri : Graphic3d_Vec3d(); } -// ======================================================================= -// function : Rotation -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3d WNT_HIDSpaceMouse::Rotation(bool& theIsIdle, bool theIsQuadric) const { theIsIdle = true; @@ -216,10 +208,8 @@ Graphic3d_Vec3d WNT_HIDSpaceMouse::Rotation(bool& theIsIdle, bool theIsQuadric) return Graphic3d_Vec3d(); } -// ======================================================================= -// function : fromRawVec3 -// purpose : -// ======================================================================= +//================================================================================================= + Graphic3d_Vec3d WNT_HIDSpaceMouse::fromRawVec3(bool& theIsIdle, const Standard_Byte* theData, bool theIsTrans, @@ -284,10 +274,8 @@ Graphic3d_Vec3d WNT_HIDSpaceMouse::fromRawVec3(bool& theIsIdle, return aVec / (double(myValueRange) * double(myValueRange)); } -// ======================================================================= -// function : HidToSpaceKey -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKey WNT_HIDSpaceMouse::HidToSpaceKey(unsigned short theKeyBit) const { const SpaceVKey aKey = hidToSpaceKey(myProductId, theKeyBit); diff --git a/src/WNT/WNT_Window.cxx b/src/WNT/WNT_Window.cxx index 6a2251e852..376e7abc96 100644 --- a/src/WNT/WNT_Window.cxx +++ b/src/WNT/WNT_Window.cxx @@ -138,10 +138,8 @@ private: bool myIsRegistered; }; -// ======================================================================= -// function : WNT_Window -// purpose : -// ======================================================================= +//================================================================================================= + WNT_Window::WNT_Window(const Standard_CString theTitle, const Handle(WNT_WClass)& theClass, const WNT_Dword& theStyle, @@ -212,10 +210,8 @@ WNT_Window::WNT_Window(const Standard_CString theTitle, SetBackground(theBackColor); } -// ======================================================================= -// function : WNT_Window -// purpose : -// ======================================================================= +//================================================================================================= + WNT_Window::WNT_Window(const Aspect_Handle theHandle, const Quantity_NameOfColor theBackColor) : myHWindow(theHandle), myHParentWindow(GetParent((HWND)theHandle)), @@ -237,10 +233,8 @@ WNT_Window::WNT_Window(const Aspect_Handle theHandle, const Quantity_NameOfColor myYBottom = aPlace.rcNormalPosition.bottom; } -// ======================================================================= -// function : ~WNT_Window -// purpose : -// ======================================================================= +//================================================================================================= + WNT_Window::~WNT_Window() { if (myHWindow == NULL || myIsForeign) @@ -252,19 +246,15 @@ WNT_Window::~WNT_Window() myIsForeign = Standard_False; } -// ======================================================================= -// function : SetCursor -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::SetCursor(const Aspect_Handle theCursor) const { ::SetClassLongPtrW((HWND)myHWindow, GCLP_HCURSOR, (LONG_PTR)theCursor); } -// ======================================================================= -// function : IsMapped -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean WNT_Window::IsMapped() const { if (IsVirtual()) @@ -278,10 +268,8 @@ Standard_Boolean WNT_Window::IsMapped() const return !(aPlace.showCmd == SW_HIDE || aPlace.showCmd == SW_MINIMIZE); } -// ======================================================================= -// function : Map -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::Map() const { if (!IsVirtual()) @@ -290,10 +278,8 @@ void WNT_Window::Map() const } } -// ======================================================================= -// function : Map -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::Map(const Standard_Integer theMapMode) const { if (IsVirtual()) @@ -305,19 +291,15 @@ void WNT_Window::Map(const Standard_Integer theMapMode) const ::UpdateWindow((HWND)myHWindow); } -// ======================================================================= -// function : Unmap -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::Unmap() const { Map(SW_HIDE); } -// ======================================================================= -// function : DoResize -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_TypeOfResize WNT_Window::DoResize() { if (IsVirtual()) @@ -379,10 +361,8 @@ Aspect_TypeOfResize WNT_Window::DoResize() return Aspect_TOR_UNKNOWN; } -// ======================================================================= -// function : Ratio -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real WNT_Window::Ratio() const { if (IsVirtual()) @@ -395,10 +375,8 @@ Standard_Real WNT_Window::Ratio() const return Standard_Real(aRect.right - aRect.left) / Standard_Real(aRect.bottom - aRect.top); } -// ======================================================================= -// function : Position -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::Position(Standard_Integer& theX1, Standard_Integer& theY1, Standard_Integer& theX2, @@ -435,10 +413,8 @@ void WNT_Window::Position(Standard_Integer& theX1, theY2 = aPntRight.y; } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) const { if (IsVirtual()) @@ -454,10 +430,8 @@ void WNT_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) c theHeight = aRect.bottom; } -// ======================================================================= -// function : SetPos -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::SetPos(const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theX1, @@ -469,20 +443,16 @@ void WNT_Window::SetPos(const Standard_Integer theX, myYBottom = theY1; } -// ======================================================================= -// function : SetTitle -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::SetTitle(const TCollection_AsciiString& theTitle) { const TCollection_ExtendedString aTitleW(theTitle); SetWindowTextW((HWND)myHWindow, aTitleW.ToWideString()); } -// ======================================================================= -// function : InvalidateContent -// purpose : -// ======================================================================= +//================================================================================================= + void WNT_Window::InvalidateContent(const Handle(Aspect_DisplayConnection)&) { if (myHWindow != NULL) @@ -491,10 +461,8 @@ void WNT_Window::InvalidateContent(const Handle(Aspect_DisplayConnection)&) } } -// ======================================================================= -// function : VirtualKeyFromNative -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKey WNT_Window::VirtualKeyFromNative(Standard_Integer theKey) { if (theKey >= Standard_Integer('0') && theKey <= Standard_Integer('9')) @@ -663,10 +631,8 @@ Aspect_VKey WNT_Window::VirtualKeyFromNative(Standard_Integer theKey) return Aspect_VKey_UNKNOWN; } -// ======================================================================= -// function : MouseKeyFlagsFromEvent -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKeyFlags WNT_Window::MouseKeyFlagsFromEvent(WPARAM theKeys) { Aspect_VKeyFlags aFlags = Aspect_VKeyFlags_NONE; @@ -685,10 +651,8 @@ Aspect_VKeyFlags WNT_Window::MouseKeyFlagsFromEvent(WPARAM theKeys) return aFlags; } -// ======================================================================= -// function : MouseKeyFlagsAsync -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKeyFlags WNT_Window::MouseKeyFlagsAsync() { Aspect_VKeyFlags aFlags = Aspect_VKeyFlags_NONE; @@ -707,10 +671,8 @@ Aspect_VKeyFlags WNT_Window::MouseKeyFlagsAsync() return aFlags; } -// ======================================================================= -// function : MouseButtonsFromEvent -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKeyMouse WNT_Window::MouseButtonsFromEvent(WPARAM theKeys) { Aspect_VKeyMouse aButtons = Aspect_VKeyMouse_NONE; @@ -729,10 +691,8 @@ Aspect_VKeyMouse WNT_Window::MouseButtonsFromEvent(WPARAM theKeys) return aButtons; } -// ======================================================================= -// function : MouseButtonsAsync -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKeyMouse WNT_Window::MouseButtonsAsync() { Aspect_VKeyMouse aButtons = Aspect_VKeyMouse_NONE; @@ -753,10 +713,8 @@ Aspect_VKeyMouse WNT_Window::MouseButtonsAsync() return aButtons; } -// ======================================================================= -// function : RegisterRawInputDevices -// purpose : -// ======================================================================= +//================================================================================================= + int WNT_Window::RegisterRawInputDevices(unsigned int theRawDeviceMask) { if (IsVirtual() || myHWindow == NULL) @@ -812,10 +770,8 @@ int WNT_Window::RegisterRawInputDevices(unsigned int theRawDeviceMask) return 0; } -// ======================================================================= -// function : ProcessMessage -// purpose : -// ======================================================================= +//================================================================================================= + bool WNT_Window::ProcessMessage(Aspect_WindowInputListener& theListener, MSG& theMsg) { if (myTouchInputHelper.IsNull()) diff --git a/src/Wasm/Wasm_Window.cxx b/src/Wasm/Wasm_Window.cxx index 374c031f3f..b616ab4aff 100644 --- a/src/Wasm/Wasm_Window.cxx +++ b/src/Wasm/Wasm_Window.cxx @@ -25,10 +25,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Wasm_Window, Aspect_Window) -// ======================================================================= -// function : Wasm_Window -// purpose : -// ======================================================================= +//================================================================================================= + Wasm_Window::Wasm_Window(const TCollection_AsciiString& theCanvasId, const bool theToScaleBacking) : myCanvasId(theCanvasId), mySize(0), @@ -55,19 +53,15 @@ Wasm_Window::Wasm_Window(const TCollection_AsciiString& theCanvasId, const bool #endif } -// ======================================================================= -// function : ~Wasm_Window -// purpose : -// ======================================================================= +//================================================================================================= + Wasm_Window::~Wasm_Window() { // } -// ======================================================================= -// function : DoResize -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_TypeOfResize Wasm_Window::DoResize() { if (IsVirtual()) @@ -94,10 +88,8 @@ Aspect_TypeOfResize Wasm_Window::DoResize() return Aspect_TOR_UNKNOWN; } -// ======================================================================= -// function : Ratio -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Wasm_Window::Ratio() const { Graphic3d_Vec2i aCanvasSize = mySize; @@ -113,10 +105,8 @@ Standard_Real Wasm_Window::Ratio() const : 1.0; } -// ======================================================================= -// function : Position -// purpose : -// ======================================================================= +//================================================================================================= + void Wasm_Window::Position(Standard_Integer& theX1, Standard_Integer& theY1, Standard_Integer& theX2, @@ -136,10 +126,8 @@ void Wasm_Window::Position(Standard_Integer& theX1, #endif } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + void Wasm_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) const { if (IsVirtual()) @@ -154,10 +142,8 @@ void Wasm_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) #endif } -// ======================================================================= -// function : SetSizeLogical -// purpose : -// ======================================================================= +//================================================================================================= + void Wasm_Window::SetSizeLogical(const Graphic3d_Vec2d& theSize) { mySize = Graphic3d_Vec2i(theSize * myDevicePixelRatio); @@ -172,10 +158,8 @@ void Wasm_Window::SetSizeLogical(const Graphic3d_Vec2d& theSize) #endif } -// ======================================================================= -// function : SetSizeBacking -// purpose : -// ======================================================================= +//================================================================================================= + void Wasm_Window::SetSizeBacking(const Graphic3d_Vec2i& theSize) { mySize = theSize; @@ -192,19 +176,15 @@ void Wasm_Window::SetSizeBacking(const Graphic3d_Vec2i& theSize) #endif } -// ======================================================================= -// function : InvalidateContent -// purpose : -// ======================================================================= +//================================================================================================= + void Wasm_Window::InvalidateContent(const Handle(Aspect_DisplayConnection)&) { // } -// ======================================================================= -// function : ProcessMessage -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessMessage(Aspect_WindowInputListener& theListener, int theEventType, const void* theEvent) @@ -254,10 +234,8 @@ bool Wasm_Window::ProcessMessage(Aspect_WindowInputListener& theListener, #endif } -// ======================================================================= -// function : ProcessMouseEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessMouseEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenMouseEvent* theEvent) @@ -353,10 +331,8 @@ bool Wasm_Window::ProcessMouseEvent(Aspect_WindowInputListener& theListener, #endif } -// ======================================================================= -// function : ProcessWheelEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessWheelEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenWheelEvent* theEvent) @@ -407,10 +383,8 @@ bool Wasm_Window::ProcessWheelEvent(Aspect_WindowInputListener& theListener, #endif } -// ======================================================================= -// function : ProcessTouchEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessTouchEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenTouchEvent* theEvent) @@ -477,10 +451,8 @@ bool Wasm_Window::ProcessTouchEvent(Aspect_WindowInputListener& theListener, return hasUpdates || theListener.HasTouchPoints(); } -// ======================================================================= -// function : ProcessKeyEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessKeyEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenKeyboardEvent* theEvent) @@ -525,10 +497,8 @@ bool Wasm_Window::ProcessKeyEvent(Aspect_WindowInputListener& theListener, return false; } -// ======================================================================= -// function : ProcessUiEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessUiEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenUiEvent*) @@ -545,10 +515,8 @@ bool Wasm_Window::ProcessUiEvent(Aspect_WindowInputListener& theListener, return true; } -// ======================================================================= -// function : ProcessFocusEvent -// purpose : -// ======================================================================= +//================================================================================================= + bool Wasm_Window::ProcessFocusEvent(Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenFocusEvent*) @@ -569,10 +537,8 @@ bool Wasm_Window::ProcessFocusEvent(Aspect_WindowInputListener& theListener, return true; } -// ======================================================================= -// function : MouseButtonsFromNative -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKeyMouse Wasm_Window::MouseButtonsFromNative(unsigned short theButtons) { Aspect_VKeyMouse aButtons = Aspect_VKeyMouse_NONE; @@ -591,10 +557,8 @@ Aspect_VKeyMouse Wasm_Window::MouseButtonsFromNative(unsigned short theButtons) return aButtons; } -// ======================================================================= -// function : VirtualKeyFromNative -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKey Wasm_Window::VirtualKeyFromNative(Standard_Integer theKey) { #if defined(__EMSCRIPTEN__) diff --git a/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx index 533ca96cf0..ec03e400c3 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx @@ -98,10 +98,7 @@ Standard_Integer XCAFDoc_AssemblyGraph::NbLinks() const return aNumLinks; } -// ======================================================================= -// function : GetUsageOccurrenceQuantity -// purpose : -// ======================================================================= +//================================================================================================= Standard_Integer XCAFDoc_AssemblyGraph::NbOccurrences(const Standard_Integer theNode) const { diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index 1b17f0885a..57417d09ed 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -239,10 +239,8 @@ Standard_Boolean XCAFDoc_Editor::Extract(const TDF_Label& theSrcLabel, return Extract(aSeq, theDstLabel, theIsNoVisMat); } -// ======================================================================= -// function : CloneShapeLebel -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_Editor::CloneShapeLabel(const TDF_Label& theSrcLabel, const Handle(XCAFDoc_ShapeTool)& theSrcShapeTool, const Handle(XCAFDoc_ShapeTool)& theDstShapeTool, diff --git a/src/XCAFDoc/XCAFDoc_Note.cxx b/src/XCAFDoc/XCAFDoc_Note.cxx index 92f8a1775c..7a4e83fd14 100644 --- a/src/XCAFDoc/XCAFDoc_Note.cxx +++ b/src/XCAFDoc/XCAFDoc_Note.cxx @@ -35,25 +35,19 @@ enum ChildLab ChildLab_Presentation }; -// ======================================================================= -// function : IsMine -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_Note::IsMine(const TDF_Label& theLabel) { return !Get(theLabel).IsNull(); } -// ======================================================================= -// function : XCAFDoc_Note -// purpose : -// ======================================================================= +//================================================================================================= + XCAFDoc_Note::XCAFDoc_Note() {} -// ======================================================================= -// function : Get -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_Note) XCAFDoc_Note::Get(const TDF_Label& theLabel) { Handle(XCAFDoc_Note) aNote; @@ -66,10 +60,8 @@ Handle(XCAFDoc_Note) XCAFDoc_Note::Get(const TDF_Label& theLabel) return aNote; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_Note::Set(const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp) { @@ -79,20 +71,16 @@ void XCAFDoc_Note::Set(const TCollection_ExtendedString& theUserName, myTimeStamp = theTimeStamp; } -// ======================================================================= -// function : IsOrphan -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_Note::IsOrphan() const { Handle(XCAFDoc_GraphNode) aFather; return !Label().FindAttribute(XCAFDoc::NoteRefGUID(), aFather) || (aFather->NbChildren() == 0); } -// ======================================================================= -// function : GetObject -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFNoteObjects_NoteObject) XCAFDoc_Note::GetObject() const { Handle(XCAFNoteObjects_NoteObject) anObj = new XCAFNoteObjects_NoteObject(); @@ -141,10 +129,8 @@ Handle(XCAFNoteObjects_NoteObject) XCAFDoc_Note::GetObject() const return anObj; } -// ======================================================================= -// function : SetObject -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_Note::SetObject(const Handle(XCAFNoteObjects_NoteObject)& theObject) { Backup(); @@ -183,30 +169,24 @@ void XCAFDoc_Note::SetObject(const Handle(XCAFNoteObjects_NoteObject)& theObject } } -// ======================================================================= -// function : Restore -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_Note::Restore(const Handle(TDF_Attribute)& theAttr) { myUserName = Handle(XCAFDoc_Note)::DownCast(theAttr)->myUserName; myTimeStamp = Handle(XCAFDoc_Note)::DownCast(theAttr)->myTimeStamp; } -// ======================================================================= -// function : Paste -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_Note::Paste(const Handle(TDF_Attribute)& theAttrInto, const Handle(TDF_RelocationTable)& /*theRT*/) const { Handle(XCAFDoc_Note)::DownCast(theAttrInto)->Set(myUserName, myTimeStamp); } -// ======================================================================= -// function : Dump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_OStream& XCAFDoc_Note::Dump(Standard_OStream& theOS) const { TDF_Attribute::Dump(theOS); diff --git a/src/XCAFDoc/XCAFDoc_NoteBalloon.cxx b/src/XCAFDoc/XCAFDoc_NoteBalloon.cxx index 31904a6503..18f4b01408 100644 --- a/src/XCAFDoc/XCAFDoc_NoteBalloon.cxx +++ b/src/XCAFDoc/XCAFDoc_NoteBalloon.cxx @@ -18,20 +18,16 @@ IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment) -// ======================================================================= -// function : GetID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteBalloon::GetID() { static Standard_GUID s_ID("1127951D-87D5-4ecc-89D5-D1406576C43F"); return s_ID; } -// ======================================================================= -// function : Get -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteBalloon) XCAFDoc_NoteBalloon::Get(const TDF_Label& theLabel) { Handle(XCAFDoc_NoteBalloon) aThis; @@ -39,10 +35,8 @@ Handle(XCAFDoc_NoteBalloon) XCAFDoc_NoteBalloon::Get(const TDF_Label& theLabel) return aThis; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteBalloon) XCAFDoc_NoteBalloon::Set(const TDF_Label& theLabel, const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -59,16 +53,12 @@ Handle(XCAFDoc_NoteBalloon) XCAFDoc_NoteBalloon::Set(const TDF_Label& return aNoteBalloon; } -// ======================================================================= -// function : XCAFDoc_NoteBalloon -// purpose : -// ======================================================================= +//================================================================================================= + XCAFDoc_NoteBalloon::XCAFDoc_NoteBalloon() {} -// ======================================================================= -// function : ID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteBalloon::ID() const { return GetID(); diff --git a/src/XCAFDoc/XCAFDoc_NoteBinData.cxx b/src/XCAFDoc/XCAFDoc_NoteBinData.cxx index 1fe6bcb9c9..664de34d91 100644 --- a/src/XCAFDoc/XCAFDoc_NoteBinData.cxx +++ b/src/XCAFDoc/XCAFDoc_NoteBinData.cxx @@ -19,20 +19,16 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBinData, XCAFDoc_Note) -// ======================================================================= -// function : GetID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteBinData::GetID() { static Standard_GUID s_ID("E9055501-F0FC-4864-BE4B-284FDA7DDEAC"); return s_ID; } -// ======================================================================= -// function : Get -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Get(const TDF_Label& theLabel) { Handle(XCAFDoc_NoteBinData) aThis; @@ -40,10 +36,8 @@ Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Get(const TDF_Label& theLabel) return aThis; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Set(const TDF_Label& theLabel, const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -64,10 +58,8 @@ Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Set(const TDF_Label& return aNoteBinData; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Set(const TDF_Label& theLabel, const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -86,16 +78,12 @@ Handle(XCAFDoc_NoteBinData) XCAFDoc_NoteBinData::Set(const TDF_Label& return aNoteBinData; } -// ======================================================================= -// function : XCAFDoc_NoteBinData -// purpose : -// ======================================================================= +//================================================================================================= + XCAFDoc_NoteBinData::XCAFDoc_NoteBinData() {} -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NoteBinData::Set(const TCollection_ExtendedString& theTitle, const TCollection_AsciiString& theMIMEtype, OSD_File& theFile) @@ -120,10 +108,8 @@ Standard_Boolean XCAFDoc_NoteBinData::Set(const TCollection_ExtendedString& theT return Standard_True; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteBinData::Set(const TCollection_ExtendedString& theTitle, const TCollection_AsciiString& theMIMEtype, const Handle(TColStd_HArray1OfByte)& theData) @@ -135,28 +121,22 @@ void XCAFDoc_NoteBinData::Set(const TCollection_ExtendedString& theTitle, myMIMEtype = theMIMEtype; } -// ======================================================================= -// function : ID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteBinData::ID() const { return GetID(); } -// ======================================================================= -// function : NewEmpty -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TDF_Attribute) XCAFDoc_NoteBinData::NewEmpty() const { return new XCAFDoc_NoteBinData(); } -// ======================================================================= -// function : Restore -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteBinData::Restore(const Handle(TDF_Attribute)& theAttr) { XCAFDoc_Note::Restore(theAttr); @@ -170,10 +150,8 @@ void XCAFDoc_NoteBinData::Restore(const Handle(TDF_Attribute)& theAttr) } } -// ======================================================================= -// function : Paste -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteBinData::Paste(const Handle(TDF_Attribute)& theAttrInto, const Handle(TDF_RelocationTable)& theRT) const { @@ -184,10 +162,8 @@ void XCAFDoc_NoteBinData::Paste(const Handle(TDF_Attribute)& theAttrInto, aMine->Set(myTitle, myMIMEtype, myData); } -// ======================================================================= -// function : Dump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_OStream& XCAFDoc_NoteBinData::Dump(Standard_OStream& theOS) const { XCAFDoc_Note::Dump(theOS); diff --git a/src/XCAFDoc/XCAFDoc_NoteComment.cxx b/src/XCAFDoc/XCAFDoc_NoteComment.cxx index 787ca87dc8..7c21ab0846 100644 --- a/src/XCAFDoc/XCAFDoc_NoteComment.cxx +++ b/src/XCAFDoc/XCAFDoc_NoteComment.cxx @@ -18,20 +18,16 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteComment, XCAFDoc_Note) -// ======================================================================= -// function : GetID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteComment::GetID() { static Standard_GUID s_ID("FDEA4C52-0F54-484c-B590-579E18F7B5D4"); return s_ID; } -// ======================================================================= -// function : Get -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteComment) XCAFDoc_NoteComment::Get(const TDF_Label& theLabel) { Handle(XCAFDoc_NoteComment) aThis; @@ -39,10 +35,8 @@ Handle(XCAFDoc_NoteComment) XCAFDoc_NoteComment::Get(const TDF_Label& theLabel) return aThis; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NoteComment) XCAFDoc_NoteComment::Set(const TDF_Label& theLabel, const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -59,16 +53,12 @@ Handle(XCAFDoc_NoteComment) XCAFDoc_NoteComment::Set(const TDF_Label& return aNoteComment; } -// ======================================================================= -// function : XCAFDoc_NoteComment -// purpose : -// ======================================================================= +//================================================================================================= + XCAFDoc_NoteComment::XCAFDoc_NoteComment() {} -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteComment::Set(const TCollection_ExtendedString& theComment) { Backup(); @@ -76,28 +66,22 @@ void XCAFDoc_NoteComment::Set(const TCollection_ExtendedString& theComment) myComment = theComment; } -// ======================================================================= -// function : ID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NoteComment::ID() const { return GetID(); } -// ======================================================================= -// function : NewEmpty -// purpose : -// ======================================================================= +//================================================================================================= + Handle(TDF_Attribute) XCAFDoc_NoteComment::NewEmpty() const { return new XCAFDoc_NoteComment(); } -// ======================================================================= -// function : Restore -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteComment::Restore(const Handle(TDF_Attribute)& theAttr) { XCAFDoc_Note::Restore(theAttr); @@ -107,10 +91,8 @@ void XCAFDoc_NoteComment::Restore(const Handle(TDF_Attribute)& theAttr) myComment = aMine->myComment; } -// ======================================================================= -// function : Paste -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NoteComment::Paste(const Handle(TDF_Attribute)& theAttrInto, const Handle(TDF_RelocationTable)& theRT) const { @@ -121,10 +103,8 @@ void XCAFDoc_NoteComment::Paste(const Handle(TDF_Attribute)& theAttrInto, aMine->Set(myComment); } -// ======================================================================= -// function : Dump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_OStream& XCAFDoc_NoteComment::Dump(Standard_OStream& theOS) const { XCAFDoc_Note::Dump(theOS); diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.cxx b/src/XCAFDoc/XCAFDoc_NotesTool.cxx index f33cb3894f..d9fed8a996 100644 --- a/src/XCAFDoc/XCAFDoc_NotesTool.cxx +++ b/src/XCAFDoc/XCAFDoc_NotesTool.cxx @@ -45,20 +45,16 @@ enum NotesTool_RootLabels NotesTool_AnnotatedItemsRoot }; -// ======================================================================= -// function : GetID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NotesTool::GetID() { static Standard_GUID s_ID("8F8174B1-6125-47a0-B357-61BD2D89380C"); return s_ID; } -// ======================================================================= -// function : Set -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_NotesTool) XCAFDoc_NotesTool::Set(const TDF_Label& theLabel) { Handle(XCAFDoc_NotesTool) aTool; @@ -70,34 +66,26 @@ Handle(XCAFDoc_NotesTool) XCAFDoc_NotesTool::Set(const TDF_Label& theLabel) return aTool; } -// ======================================================================= -// function : XCAFDoc_NotesTool -// purpose : -// ======================================================================= +//================================================================================================= + XCAFDoc_NotesTool::XCAFDoc_NotesTool() {} -// ======================================================================= -// function : GetNotesLabel -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::GetNotesLabel() const { return Label().FindChild(NotesTool_NotesRoot); } -// ======================================================================= -// function : GetAnnotatedItemsLabel -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::GetAnnotatedItemsLabel() const { return Label().FindChild(NotesTool_AnnotatedItemsRoot); } -// ======================================================================= -// function : NbNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::NbNotes() const { Standard_Integer nbNotes = 0; @@ -110,10 +98,8 @@ Standard_Integer XCAFDoc_NotesTool::NbNotes() const return nbNotes; } -// ======================================================================= -// function : NbAnnotatedItems -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::NbAnnotatedItems() const { Standard_Integer nbItems = 0; @@ -126,10 +112,8 @@ Standard_Integer XCAFDoc_NotesTool::NbAnnotatedItems() const return nbItems; } -// ======================================================================= -// function : GetNotes -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NotesTool::GetNotes(TDF_LabelSequence& theNoteLabels) const { for (TDF_ChildIterator anIter(GetNotesLabel()); anIter.More(); anIter.Next()) @@ -140,10 +124,8 @@ void XCAFDoc_NotesTool::GetNotes(TDF_LabelSequence& theNoteLabels) const } } -// ======================================================================= -// function : GetAnnotatedItems -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NotesTool::GetAnnotatedItems(TDF_LabelSequence& theItemLabels) const { for (TDF_ChildIDIterator anIter(GetAnnotatedItemsLabel(), XCAFDoc_AssemblyItemRef::GetID()); @@ -154,28 +136,22 @@ void XCAFDoc_NotesTool::GetAnnotatedItems(TDF_LabelSequence& theItemLabels) cons } } -// ======================================================================= -// function : IsAnnotatedItem -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::IsAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const { return !FindAnnotatedItem(theItemId).IsNull(); } -// ======================================================================= -// function : IsAnnotatedItem -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::IsAnnotatedItem(const TDF_Label& theItemLabel) const { return IsAnnotatedItem(labeledItem(theItemLabel)); } -// ======================================================================= -// function : FindAnnotatedItem -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const { for (TDF_ChildIDIterator anIter(GetAnnotatedItemsLabel(), XCAFDoc_AssemblyItemRef::GetID()); @@ -190,19 +166,15 @@ TDF_Label XCAFDoc_NotesTool::FindAnnotatedItem(const XCAFDoc_AssemblyItemId& the return TDF_Label(); } -// ======================================================================= -// function : FindAnnotatedItem -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItem(const TDF_Label& theItemLabel) const { return FindAnnotatedItem(labeledItem(theItemLabel)); } -// ======================================================================= -// function : FindAnnotatedItemAttr -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId, const Standard_GUID& theGUID) const { @@ -219,20 +191,16 @@ TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& return TDF_Label(); } -// ======================================================================= -// function : FindAnnotatedItemAttr -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemAttr(const TDF_Label& theItemLabel, const Standard_GUID& theGUID) const { return FindAnnotatedItemAttr(labeledItem(theItemLabel), theGUID); } -// ======================================================================= -// function : FindAnnotatedItemSubshape -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId, Standard_Integer theSubshapeIndex) const { @@ -249,20 +217,16 @@ TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemSubshape(const XCAFDoc_AssemblyIte return TDF_Label(); } -// ======================================================================= -// function : FindAnnotatedItemSubshape -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFDoc_NotesTool::FindAnnotatedItemSubshape(const TDF_Label& theItemLabel, Standard_Integer theSubshapeIndex) const { return FindAnnotatedItemSubshape(labeledItem(theItemLabel), theSubshapeIndex); } -// ======================================================================= -// function : CreateComment -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateComment( const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -274,10 +238,8 @@ Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateComment( return XCAFDoc_NoteComment::Set(aNoteLabel, theUserName, theTimeStamp, theComment); } -// ======================================================================= -// function : CreateBalloon -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBalloon( const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -289,10 +251,8 @@ Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBalloon( return XCAFDoc_NoteBalloon::Set(aNoteLabel, theUserName, theTimeStamp, theComment); } -// ======================================================================= -// function : CreateBinData -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBinData( const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -311,10 +271,8 @@ Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBinData( theFile); } -// ======================================================================= -// function : CreateBinData -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBinData( const TCollection_ExtendedString& theUserName, const TCollection_ExtendedString& theTimeStamp, @@ -333,10 +291,8 @@ Handle(XCAFDoc_Note) XCAFDoc_NotesTool::CreateBinData( theData); } -// ======================================================================= -// function : GetNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::GetNotes(const XCAFDoc_AssemblyItemId& theItemId, TDF_LabelSequence& theNoteLabels) const { @@ -358,20 +314,16 @@ Standard_Integer XCAFDoc_NotesTool::GetNotes(const XCAFDoc_AssemblyItemId& theIt return theNoteLabels.Length(); } -// ======================================================================= -// function : GetNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::GetNotes(const TDF_Label& theItemLabel, TDF_LabelSequence& theNoteLabels) const { return GetNotes(labeledItem(theItemLabel), theNoteLabels); } -// ======================================================================= -// function : GetAttrNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId, const Standard_GUID& theGUID, TDF_LabelSequence& theNoteLabels) const @@ -394,10 +346,8 @@ Standard_Integer XCAFDoc_NotesTool::GetAttrNotes(const XCAFDoc_AssemblyItemId& t return theNoteLabels.Length(); } -// ======================================================================= -// function : GetAttrNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::GetAttrNotes(const TDF_Label& theItemLabel, const Standard_GUID& theGUID, TDF_LabelSequence& theNoteLabels) const @@ -405,10 +355,8 @@ Standard_Integer XCAFDoc_NotesTool::GetAttrNotes(const TDF_Label& theItemLab return GetAttrNotes(labeledItem(theItemLabel), theGUID, theNoteLabels); } -// ======================================================================= -// function : GetSubshapeNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId, Standard_Integer theSubshapeIndex, TDF_LabelSequence& theNoteLabels) const @@ -431,10 +379,8 @@ Standard_Integer XCAFDoc_NotesTool::GetSubshapeNotes(const XCAFDoc_AssemblyItemI return theNoteLabels.Length(); } -// ======================================================================= -// function : AddNote -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNote(const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId) { @@ -481,20 +427,16 @@ Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNote(const TDF_Label& theN return anItemRef; } -// ======================================================================= -// function : AddNote -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNote(const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel) { return AddNote(theNoteLabel, labeledItem(theItemLabel)); } -// ======================================================================= -// function : AddNoteToAttr -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToAttr( const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId, @@ -545,10 +487,8 @@ Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToAttr( return anItemRef; } -// ======================================================================= -// function : AddNoteToAttr -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToAttr(const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel, const Standard_GUID& theGUID) @@ -556,10 +496,8 @@ Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToAttr(const TDF_Label return AddNoteToAttr(theNoteLabel, labeledItem(theItemLabel), theGUID); } -// ======================================================================= -// function : AddNoteToSubshape -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToSubshape( const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId, @@ -610,10 +548,8 @@ Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToSubshape( return anItemRef; } -// ======================================================================= -// function : AddNoteToSubshape -// purpose : -// ======================================================================= +//================================================================================================= + Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToSubshape( const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel, @@ -622,10 +558,8 @@ Handle(XCAFDoc_AssemblyItemRef) XCAFDoc_NotesTool::AddNoteToSubshape( return AddNoteToSubshape(theNoteLabel, labeledItem(theItemLabel), theSubshapeIndex); } -// ======================================================================= -// function : RemoveNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveNote(const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId, Standard_Boolean theDelIfOrphan) @@ -657,10 +591,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveNote(const TDF_Label& the return Standard_True; } -// ======================================================================= -// function : RemoveNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveNote(const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel, Standard_Boolean theDelIfOrphan) @@ -668,10 +600,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveNote(const TDF_Label& theNoteLabel, return RemoveNote(theNoteLabel, labeledItem(theItemLabel), theDelIfOrphan); } -// ======================================================================= -// function : RemoveSubshapeNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveSubshapeNote(const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId, Standard_Integer theSubshapeIndex, @@ -704,10 +634,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveSubshapeNote(const TDF_Label& return Standard_True; } -// ======================================================================= -// function : RemoveSubshapeNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveSubshapeNote(const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel, Standard_Integer theSubshapeIndex, @@ -719,10 +647,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveSubshapeNote(const TDF_Label& theNoteL theDelIfOrphan); } -// ======================================================================= -// function : RemoveAttrNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAttrNote(const TDF_Label& theNoteLabel, const XCAFDoc_AssemblyItemId& theItemId, const Standard_GUID& theGUID, @@ -755,10 +681,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAttrNote(const TDF_Label& return Standard_True; } -// ======================================================================= -// function : RemoveAttrNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAttrNote(const TDF_Label& theNoteLabel, const TDF_Label& theItemLabel, const Standard_GUID& theGUID, @@ -767,10 +691,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAttrNote(const TDF_Label& theNoteL return RemoveAttrNote(theNoteLabel, labeledItem(theItemLabel), theGUID, theDelIfOrphan); } -// ======================================================================= -// function : RemoveAllNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAllNotes(const XCAFDoc_AssemblyItemId& theItemId, Standard_Boolean theDelIfOrphan) { @@ -799,20 +721,16 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAllNotes(const XCAFDoc_AssemblyItemId& return Standard_True; } -// ======================================================================= -// function : RemoveAllNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAllNotes(const TDF_Label& theItemLabel, Standard_Boolean theDelIfOrphan) { return RemoveAllNotes(labeledItem(theItemLabel), theDelIfOrphan); } -// ======================================================================= -// function : RemoveAllSubshapeNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAllSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId, Standard_Integer theSubshapeIndex, Standard_Boolean theDelIfOrphan) @@ -842,10 +760,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAllSubshapeNotes(const XCAFDoc_Assembl return Standard_True; } -// ======================================================================= -// function : RemoveAllAttrNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAllAttrNotes(const XCAFDoc_AssemblyItemId& theItemId, const Standard_GUID& theGUID, Standard_Boolean theDelIfOrphan) @@ -875,10 +791,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAllAttrNotes(const XCAFDoc_AssemblyIte return Standard_True; } -// ======================================================================= -// function : RemoveAllAttrNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::RemoveAllAttrNotes(const TDF_Label& theItemLabel, const Standard_GUID& theGUID, Standard_Boolean theDelIfOrphan) @@ -886,10 +800,8 @@ Standard_Boolean XCAFDoc_NotesTool::RemoveAllAttrNotes(const TDF_Label& theI return RemoveAllAttrNotes(labeledItem(theItemLabel), theGUID, theDelIfOrphan); } -// ======================================================================= -// function : DeleteNote -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean XCAFDoc_NotesTool::DeleteNote(const TDF_Label& theNoteLabel) { Handle(XCAFDoc_Note) aNote = XCAFDoc_Note::Get(theNoteLabel); @@ -912,10 +824,8 @@ Standard_Boolean XCAFDoc_NotesTool::DeleteNote(const TDF_Label& theNoteLabel) return Standard_False; } -// ======================================================================= -// function : DeleteNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::DeleteNotes(TDF_LabelSequence& theNoteLabels) { Standard_Integer nbNotes = 0; @@ -927,10 +837,8 @@ Standard_Integer XCAFDoc_NotesTool::DeleteNotes(TDF_LabelSequence& theNoteLabels return nbNotes; } -// ======================================================================= -// function : DeleteAllNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::DeleteAllNotes() { Standard_Integer nbNotes = 0; @@ -942,10 +850,8 @@ Standard_Integer XCAFDoc_NotesTool::DeleteAllNotes() return nbNotes; } -// ======================================================================= -// function : NbOrphanNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::NbOrphanNotes() const { Standard_Integer nbNotes = 0; @@ -959,10 +865,8 @@ Standard_Integer XCAFDoc_NotesTool::NbOrphanNotes() const return nbNotes; } -// ======================================================================= -// function : GetOrphanNotes -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFDoc_NotesTool::GetOrphanNotes(TDF_LabelSequence& theNoteLabels) const { for (TDF_ChildIterator anIter(GetNotesLabel()); anIter.More(); anIter.Next()) @@ -974,10 +878,8 @@ void XCAFDoc_NotesTool::GetOrphanNotes(TDF_LabelSequence& theNoteLabels) const } } -// ======================================================================= -// function : DeleteOrphanNotes -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Integer XCAFDoc_NotesTool::DeleteOrphanNotes() { Standard_Integer nbNotes = 0; @@ -991,19 +893,15 @@ Standard_Integer XCAFDoc_NotesTool::DeleteOrphanNotes() return nbNotes; } -// ======================================================================= -// function : ID -// purpose : -// ======================================================================= +//================================================================================================= + const Standard_GUID& XCAFDoc_NotesTool::ID() const { return GetID(); } -// ======================================================================= -// function : Dump -// purpose : -// ======================================================================= +//================================================================================================= + Standard_OStream& XCAFDoc_NotesTool::Dump(Standard_OStream& theOS) const { theOS << "Notes : " << NbNotes() << "\n" diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx index 77a1fe67ed..453e5fcdfa 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx @@ -106,10 +106,8 @@ void XCAFDoc_VisMaterial::Paste(const Handle(TDF_Attribute)& theInto, anOther->myFaceCulling = myFaceCulling; } -// ======================================================================= -// function : BaseColor -// purpose : -// ======================================================================= +//================================================================================================= + Quantity_ColorRGBA XCAFDoc_VisMaterial::BaseColor() const { if (myPbrMat.IsDefined) diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx index 5476edbdfc..f64a4935fd 100644 --- a/src/XCAFPrs/XCAFPrs_AISObject.cxx +++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx @@ -300,10 +300,8 @@ void XCAFPrs_AISObject::DefaultStyle(XCAFPrs_Style& theStyle) const theStyle.SetColorCurv(Quantity_NOC_WHITE); } -// ======================================================================= -// function : SetMaterial -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_AISObject::SetMaterial(const Graphic3d_MaterialAspect& theMaterial) { XCAFPrs_Style aDefStyle; diff --git a/src/XCAFPrs/XCAFPrs_DocumentExplorer.cxx b/src/XCAFPrs/XCAFPrs_DocumentExplorer.cxx index 9d9cd64e5f..894496c339 100644 --- a/src/XCAFPrs/XCAFPrs_DocumentExplorer.cxx +++ b/src/XCAFPrs/XCAFPrs_DocumentExplorer.cxx @@ -82,10 +82,8 @@ static XCAFPrs_Style mergedStyle(const Handle(XCAFDoc_ColorTool)& theColor } } // namespace -// ======================================================================= -// function : DefineChildId -// purpose : -// ======================================================================= +//================================================================================================= + TCollection_AsciiString XCAFPrs_DocumentExplorer::DefineChildId( const TDF_Label& theLabel, const TCollection_AsciiString& theParentId) @@ -95,10 +93,8 @@ TCollection_AsciiString XCAFPrs_DocumentExplorer::DefineChildId( return !theParentId.IsEmpty() ? theParentId + "/" + anEntryId + "." : anEntryId + "."; } -// ======================================================================= -// function : FindLabelFromPathId -// purpose : -// ======================================================================= +//================================================================================================= + TDF_Label XCAFPrs_DocumentExplorer::FindLabelFromPathId(const Handle(TDocStd_Document)& theDocument, const TCollection_AsciiString& theId, TopLoc_Location& theParentLocation, @@ -132,10 +128,8 @@ TDF_Label XCAFPrs_DocumentExplorer::FindLabelFromPathId(const Handle(TDocStd_Doc return anInstanceLabel; } -// ======================================================================= -// function : FindShapeFromPathId -// purpose : -// ======================================================================= +//================================================================================================= + TopoDS_Shape XCAFPrs_DocumentExplorer::FindShapeFromPathId( const Handle(TDocStd_Document)& theDocument, const TCollection_AsciiString& theId) @@ -164,10 +158,8 @@ TopoDS_Shape XCAFPrs_DocumentExplorer::FindShapeFromPathId( return aShape; } -// ======================================================================= -// function : XCAFPrs_DocumentExplorer -// purpose : -// ======================================================================= +//================================================================================================= + XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer() : myTop(-1), myHasMore(Standard_False), @@ -176,10 +168,8 @@ XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer() // } -// ======================================================================= -// function : XCAFPrs_DocumentExplorer -// purpose : -// ======================================================================= +//================================================================================================= + XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer(const Handle(TDocStd_Document)& theDocument, const XCAFPrs_DocumentExplorerFlags theFlags, const XCAFPrs_Style& theDefStyle) @@ -193,10 +183,8 @@ XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer(const Handle(TDocStd_Document Init(theDocument, aRootLabels, theFlags, theDefStyle); } -// ======================================================================= -// function : XCAFPrs_DocumentExplorer -// purpose : -// ======================================================================= +//================================================================================================= + XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, @@ -208,10 +196,8 @@ XCAFPrs_DocumentExplorer::XCAFPrs_DocumentExplorer(const Handle(TDocStd_Document Init(theDocument, theRoots, theFlags, theDefStyle); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_DocumentExplorer::Init(const Handle(TDocStd_Document)& theDocument, const TDF_Label& theRoot, const XCAFPrs_DocumentExplorerFlags theFlags, @@ -222,10 +208,8 @@ void XCAFPrs_DocumentExplorer::Init(const Handle(TDocStd_Document)& theDocum Init(theDocument, aSeq, theFlags, theDefStyle); } -// ======================================================================= -// function : Init -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_DocumentExplorer::Init(const Handle(TDocStd_Document)& theDocument, const TDF_LabelSequence& theRoots, const XCAFPrs_DocumentExplorerFlags theFlags, @@ -249,10 +233,8 @@ void XCAFPrs_DocumentExplorer::Init(const Handle(TDocStd_Document)& theDocum initRoot(); } -// ======================================================================= -// function : initRoot -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_DocumentExplorer::initRoot() { for (;;) @@ -294,10 +276,8 @@ void XCAFPrs_DocumentExplorer::initRoot() } } -// ======================================================================= -// function : initCurrent -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_DocumentExplorer::initCurrent(Standard_Boolean theIsAssembly) { myCurrent = XCAFPrs_DocumentNode(); @@ -342,10 +322,8 @@ void XCAFPrs_DocumentExplorer::initCurrent(Standard_Boolean theIsAssembly) } } -// ======================================================================= -// function : Next -// purpose : -// ======================================================================= +//================================================================================================= + void XCAFPrs_DocumentExplorer::Next() { if (!myHasMore) diff --git a/src/XDEDRAW/XDEDRAW_Colors.cxx b/src/XDEDRAW/XDEDRAW_Colors.cxx index f4a97d8948..8a8ea87960 100644 --- a/src/XDEDRAW/XDEDRAW_Colors.cxx +++ b/src/XDEDRAW/XDEDRAW_Colors.cxx @@ -740,10 +740,8 @@ static Standard_Integer setStyledcolor(Draw_Interpretor&, Standard_Integer argc, return 0; } -// ================================================================ -// Function : XGetAllVisMaterials -// Purpose : -// ================================================================ +//================================================================================================= + static Standard_Integer XGetAllVisMaterials(Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) @@ -806,10 +804,8 @@ static Standard_Integer XGetAllVisMaterials(Draw_Interpretor& theDI, return 0; } -// ================================================================ -// Function : XGetVisMaterial -// Purpose : -// ================================================================ +//================================================================================================= + static Standard_Integer XGetVisMaterial(Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) @@ -931,10 +927,8 @@ static Standard_Integer XGetVisMaterial(Draw_Interpretor& theDI, return 0; } -// ================================================================ -// Function : XAddVisMaterial -// Purpose : -// ================================================================ +//================================================================================================= + static Standard_Integer XAddVisMaterial(Draw_Interpretor&, Standard_Integer theNbArgs, const char** theArgVec) @@ -1191,10 +1185,8 @@ static Standard_Integer XAddVisMaterial(Draw_Interpretor&, return 0; } -// ================================================================ -// Function : XRemoveVisMaterial -// Purpose : -// ================================================================ +//================================================================================================= + static Standard_Integer XRemoveVisMaterial(Draw_Interpretor&, Standard_Integer theNbArgs, const char** theArgVec) @@ -1225,10 +1217,8 @@ static Standard_Integer XRemoveVisMaterial(Draw_Interpretor&, return 0; } -// ================================================================ -// Function : XSetVisMaterial -// Purpose : -// ================================================================ +//================================================================================================= + static Standard_Integer XSetVisMaterial(Draw_Interpretor&, Standard_Integer theNbArgs, const char** theArgVec) diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx index fe79ca8c13..68de4bb186 100644 --- a/src/Xw/Xw_Window.cxx +++ b/src/Xw/Xw_Window.cxx @@ -30,10 +30,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Xw_Window, Aspect_Window) -// ======================================================================= -// function : Xw_Window -// purpose : -// ======================================================================= +//================================================================================================= + Xw_Window::Xw_Window(const Handle(Aspect_DisplayConnection)& theXDisplay, const Standard_CString theTitle, const Standard_Integer thePxLeft, @@ -123,10 +121,8 @@ Xw_Window::Xw_Window(const Handle(Aspect_DisplayConnection)& theXDisplay, #endif } -// ======================================================================= -// function : Xw_Window -// purpose : -// ======================================================================= +//================================================================================================= + Xw_Window::Xw_Window(const Handle(Aspect_DisplayConnection)& theXDisplay, const Aspect_Drawable theXWin, const Aspect_FBConfig theFBConfig) @@ -172,10 +168,8 @@ Xw_Window::Xw_Window(const Handle(Aspect_DisplayConnection)& theXDisplay, #endif } -// ======================================================================= -// function : ~Xw_Window -// purpose : -// ======================================================================= +//================================================================================================= + Xw_Window::~Xw_Window() { if (myIsOwnWin && myXWindow != 0 && !myDisplay.IsNull()) @@ -186,10 +180,8 @@ Xw_Window::~Xw_Window() } } -// ======================================================================= -// function : IsMapped -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Boolean Xw_Window::IsMapped() const { if (myXWindow == 0) @@ -211,10 +203,8 @@ Standard_Boolean Xw_Window::IsMapped() const #endif } -// ======================================================================= -// function : Map -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::Map() const { if (IsVirtual() || myXWindow == 0) @@ -228,10 +218,8 @@ void Xw_Window::Map() const #endif } -// ======================================================================= -// function : Unmap -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::Unmap() const { if (IsVirtual() || myXWindow == 0) @@ -246,10 +234,8 @@ void Xw_Window::Unmap() const #endif } -// ======================================================================= -// function : DoResize -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_TypeOfResize Xw_Window::DoResize() { if (IsVirtual() || myXWindow == 0) @@ -321,10 +307,8 @@ Aspect_TypeOfResize Xw_Window::DoResize() #endif } -// ======================================================================= -// function : Ratio -// purpose : -// ======================================================================= +//================================================================================================= + Standard_Real Xw_Window::Ratio() const { if (IsVirtual() || myXWindow == 0) @@ -343,10 +327,8 @@ Standard_Real Xw_Window::Ratio() const #endif } -// ======================================================================= -// function : Position -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::Position(Standard_Integer& theX1, Standard_Integer& theY1, Standard_Integer& theX2, @@ -383,10 +365,8 @@ void Xw_Window::Position(Standard_Integer& theX1, #endif } -// ======================================================================= -// function : Size -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) const { if (IsVirtual() || myXWindow == 0) @@ -406,10 +386,8 @@ void Xw_Window::Size(Standard_Integer& theWidth, Standard_Integer& theHeight) co #endif } -// ======================================================================= -// function : SetTitle -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::SetTitle(const TCollection_AsciiString& theTitle) { if (myXWindow != 0) @@ -422,10 +400,8 @@ void Xw_Window::SetTitle(const TCollection_AsciiString& theTitle) } } -// ======================================================================= -// function : InvalidateContent -// purpose : -// ======================================================================= +//================================================================================================= + void Xw_Window::InvalidateContent(const Handle(Aspect_DisplayConnection)& theDisp) { if (myXWindow == 0) @@ -448,10 +424,8 @@ void Xw_Window::InvalidateContent(const Handle(Aspect_DisplayConnection)& theDis #endif } -// ======================================================================= -// function : VirtualKeyFromNative -// purpose : -// ======================================================================= +//================================================================================================= + Aspect_VKey Xw_Window::VirtualKeyFromNative(unsigned long theKey) { #if defined(HAVE_XLIB) @@ -599,10 +573,8 @@ Aspect_VKey Xw_Window::VirtualKeyFromNative(unsigned long theKey) return Aspect_VKey_UNKNOWN; } -// ======================================================================= -// function : ProcessMessage -// purpose : -// ======================================================================= +//================================================================================================= + bool Xw_Window::ProcessMessage(Aspect_WindowInputListener& theListener, XEvent& #if defined(HAVE_XLIB) // msvc before VS2015 had problems with (void )theMsg diff --git a/src/gp/gp_Mat.cxx b/src/gp/gp_Mat.cxx index 943f4ab2bf..56021c24d5 100644 --- a/src/gp/gp_Mat.cxx +++ b/src/gp/gp_Mat.cxx @@ -25,10 +25,8 @@ #include #include -// ======================================================================= -// function : gp_Mat -// purpose : -// ======================================================================= +//================================================================================================= + gp_Mat::gp_Mat(const gp_XYZ& theCol1, const gp_XYZ& theCol2, const gp_XYZ& theCol3) { myMat[0][0] = theCol1.X(); @@ -42,10 +40,8 @@ gp_Mat::gp_Mat(const gp_XYZ& theCol1, const gp_XYZ& theCol2, const gp_XYZ& theCo myMat[2][2] = theCol3.Z(); } -// ======================================================================= -// function : SetCol -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetCol(const Standard_Integer theCol, const gp_XYZ& theValue) { Standard_OutOfRange_Raise_if(theCol < 1 || theCol > 3, " "); @@ -69,10 +65,8 @@ void gp_Mat::SetCol(const Standard_Integer theCol, const gp_XYZ& theValue) } } -// ======================================================================= -// function : SetCols -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetCols(const gp_XYZ& theCol1, const gp_XYZ& theCol2, const gp_XYZ& theCol3) { myMat[0][0] = theCol1.X(); @@ -86,10 +80,8 @@ void gp_Mat::SetCols(const gp_XYZ& theCol1, const gp_XYZ& theCol2, const gp_XYZ& myMat[2][2] = theCol3.Z(); } -// ======================================================================= -// function : SetCross -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetCross(const gp_XYZ& theRef) { const Standard_Real X = theRef.X(); @@ -104,10 +96,8 @@ void gp_Mat::SetCross(const gp_XYZ& theRef) myMat[2][1] = X; } -// ======================================================================= -// function : SetDot -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetDot(const gp_XYZ& theRef) { const Standard_Real X = theRef.X(); @@ -124,10 +114,8 @@ void gp_Mat::SetDot(const gp_XYZ& theRef) myMat[2][1] = myMat[1][2]; } -// ======================================================================= -// function : SetRotation -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetRotation(const gp_XYZ& theAxis, const Standard_Real theAng) { // Rot = I + sin(Ang) * M + (1. - cos(Ang)) * M*M @@ -148,10 +136,8 @@ void gp_Mat::SetRotation(const gp_XYZ& theAxis, const Standard_Real theAng) Add(aTemp); } -// ======================================================================= -// function : SetRow -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetRow(const Standard_Integer theRow, const gp_XYZ& theValue) { Standard_OutOfRange_Raise_if(theRow < 1 || theRow > 3, " "); @@ -175,10 +161,8 @@ void gp_Mat::SetRow(const Standard_Integer theRow, const gp_XYZ& theValue) } } -// ======================================================================= -// function : SetRows -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::SetRows(const gp_XYZ& theRow1, const gp_XYZ& theRow2, const gp_XYZ& theRow3) { myMat[0][0] = theRow1.X(); @@ -192,10 +176,8 @@ void gp_Mat::SetRows(const gp_XYZ& theRow1, const gp_XYZ& theRow2, const gp_XYZ& myMat[2][2] = theRow3.Z(); } -// ======================================================================= -// function : Column -// purpose : -// ======================================================================= +//================================================================================================= + gp_XYZ gp_Mat::Column(const Standard_Integer theCol) const { Standard_OutOfRange_Raise_if(theCol < 1 || theCol > 3, "gp_Mat::Column() - wrong index"); @@ -206,19 +188,15 @@ gp_XYZ gp_Mat::Column(const Standard_Integer theCol) const return gp_XYZ(myMat[0][2], myMat[1][2], myMat[2][2]); } -// ======================================================================= -// function : Diagonal -// purpose : -// ======================================================================= +//================================================================================================= + gp_XYZ gp_Mat::Diagonal() const { return gp_XYZ(myMat[0][0], myMat[1][1], myMat[2][2]); } -// ======================================================================= -// function : Row -// purpose : -// ======================================================================= +//================================================================================================= + gp_XYZ gp_Mat::Row(const Standard_Integer theRow) const { Standard_OutOfRange_Raise_if(theRow < 1 || theRow > 3, "gp_Mat::Row() - wrong index"); @@ -229,10 +207,8 @@ gp_XYZ gp_Mat::Row(const Standard_Integer theRow) const return gp_XYZ(myMat[2][0], myMat[2][1], myMat[2][2]); } -// ======================================================================= -// function : Invert -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::Invert() { Standard_Real aNewMat[3][3]; @@ -263,10 +239,8 @@ void gp_Mat::Invert() Multiply(aDet); } -// ======================================================================= -// function : Inverted -// purpose : -// ======================================================================= +//================================================================================================= + gp_Mat gp_Mat::Inverted() const { gp_Mat aNewMat; @@ -289,10 +263,8 @@ gp_Mat gp_Mat::Inverted() const return aNewMat; } -// ======================================================================= -// function : Power -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::Power(const Standard_Integer theN) { if (theN == 1) @@ -329,10 +301,8 @@ void gp_Mat::Power(const Standard_Integer theN) } } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_VECTOR_CLASS(theOStream, diff --git a/src/gp/gp_Mat2d.cxx b/src/gp/gp_Mat2d.cxx index 725483b82c..245eb713b2 100644 --- a/src/gp/gp_Mat2d.cxx +++ b/src/gp/gp_Mat2d.cxx @@ -25,10 +25,8 @@ #include #include -// ======================================================================= -// function : gp_Mat2d -// purpose : -// ======================================================================= +//================================================================================================= + gp_Mat2d::gp_Mat2d(const gp_XY& theCol1, const gp_XY& theCol2) { myMat[0][0] = theCol1.X(); @@ -37,10 +35,8 @@ gp_Mat2d::gp_Mat2d(const gp_XY& theCol1, const gp_XY& theCol2) myMat[1][1] = theCol2.Y(); } -// ======================================================================= -// function : SetCol -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::SetCol(const Standard_Integer theCol, const gp_XY& theValue) { Standard_OutOfRange_Raise_if(theCol < 1 || theCol > 2, "gp_Mat2d::SetCol() - invalid index"); @@ -56,10 +52,8 @@ void gp_Mat2d::SetCol(const Standard_Integer theCol, const gp_XY& theValue) } } -// ======================================================================= -// function : SetCols -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::SetCols(const gp_XY& theCol1, const gp_XY& theCol2) { myMat[0][0] = theCol1.X(); @@ -68,10 +62,8 @@ void gp_Mat2d::SetCols(const gp_XY& theCol1, const gp_XY& theCol2) myMat[1][1] = theCol2.Y(); } -// ======================================================================= -// function : SetRow -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::SetRow(const Standard_Integer theRow, const gp_XY& theValue) { Standard_OutOfRange_Raise_if(theRow < 1 || theRow > 2, "gp_Mat2d::SetRow() - invalid index"); @@ -87,10 +79,8 @@ void gp_Mat2d::SetRow(const Standard_Integer theRow, const gp_XY& theValue) } } -// ======================================================================= -// function : SetRows -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::SetRows(const gp_XY& theRow1, const gp_XY& theRow2) { myMat[0][0] = theRow1.X(); @@ -99,10 +89,8 @@ void gp_Mat2d::SetRows(const gp_XY& theRow1, const gp_XY& theRow2) myMat[1][1] = theRow2.Y(); } -// ======================================================================= -// function : Column -// purpose : -// ======================================================================= +//================================================================================================= + gp_XY gp_Mat2d::Column(const Standard_Integer theCol) const { Standard_OutOfRange_Raise_if(theCol < 1 || theCol > 2, "gp_Mat2d::Column() - invalid index"); @@ -113,19 +101,15 @@ gp_XY gp_Mat2d::Column(const Standard_Integer theCol) const return gp_XY(myMat[0][1], myMat[1][1]); } -// ======================================================================= -// function : Diagonal -// purpose : -// ======================================================================= +//================================================================================================= + gp_XY gp_Mat2d::Diagonal() const { return gp_XY(myMat[0][0], myMat[1][1]); } -// ======================================================================= -// function : Row -// purpose : -// ======================================================================= +//================================================================================================= + gp_XY gp_Mat2d::Row(const Standard_Integer theRow) const { Standard_OutOfRange_Raise_if(theRow < 1 || theRow > 2, "gp_Mat2d::Row() - invalid index"); @@ -136,10 +120,8 @@ gp_XY gp_Mat2d::Row(const Standard_Integer theRow) const return gp_XY(myMat[1][0], myMat[1][1]); } -// ======================================================================= -// function : Invert -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::Invert() { Standard_Real aNewMat[2][2]; @@ -157,10 +139,8 @@ void gp_Mat2d::Invert() myMat[1][1] = aNewMat[1][1] * aDet; } -// ======================================================================= -// function : Power -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Mat2d::Power(const Standard_Integer theN) { if (theN == 1) diff --git a/src/gp/gp_Vec.cxx b/src/gp/gp_Vec.cxx index 95d6180a37..1af6d16735 100644 --- a/src/gp/gp_Vec.cxx +++ b/src/gp/gp_Vec.cxx @@ -142,10 +142,8 @@ gp_Vec gp_Vec::Mirrored(const gp_Ax2& A2) const return Vres; } -// ======================================================================= -// function : DumpJson -// purpose : -// ======================================================================= +//================================================================================================= + void gp_Vec::DumpJson(Standard_OStream& theOStream, Standard_Integer) const { OCCT_DUMP_VECTOR_CLASS(theOStream, "gp_Vec", 3, coord.X(), coord.Y(), coord.Z())