1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Coding - Update method guards for consistency #333

Apply new regex replacement with method's guards in .cxx
Update GH workflow with style checking
This commit is contained in:
Pasukhin Dmitry
2025-02-03 12:16:00 +01:00
committed by GitHub
parent 3ce9ec7651
commit 1f386af59f
283 changed files with 4815 additions and 9694 deletions

View File

@@ -18,48 +18,38 @@
#include <SelectBasics_PickResult.hxx>
#include <SelectMgr_ViewClipRange.hxx>
// =======================================================================
// 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,

View File

@@ -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<BVHThread*>(theTask);

View File

@@ -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)

View File

@@ -22,19 +22,15 @@
#include <SelectMgr_FrustumBuilder.hxx>
#include <SelectMgr_ViewClipRange.hxx>
// =======================================================================
// 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<SelectMgr_Vec4>& thePlaneEquations) const
{

View File

@@ -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
{

View File

@@ -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)

View File

@@ -431,10 +431,8 @@ public:
};
} // namespace
// =======================================================================
// function : CreateFiller
// purpose :
// =======================================================================
//=================================================================================================
Handle(SelectMgr_SelectionImageFiller) SelectMgr_SelectionImageFiller::CreateFiller(
Image_PixMap& thePixMap,
SelectMgr_ViewerSelector* theSelector,

View File

@@ -40,10 +40,8 @@ void SelectMgr_SensitiveEntity::Clear()
mySensitive.Nullify();
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void SelectMgr_SensitiveEntity::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const
{

View File

@@ -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<SelectMgr_Vec4>& thePlaneEquations) const
{

View File

@@ -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<SelectMgr_Vec4>& 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;

View File

@@ -15,10 +15,8 @@
#include <Graphic3d_SequenceOfHClipPlane.hxx>
// =======================================================================
// 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
{