mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Coding - Isolate long attached comments for clang-format #259
Automatically update code with clang-format disabling for avoiding formatting. You can check the python script in GitHub PR
This commit is contained in:
@@ -54,7 +54,9 @@ private:
|
||||
|
||||
Handle(Graphic3d_NMapOfTransient) myDisabledObjects; //!< disabled objects.
|
||||
//! Selection isn't applied to these objects.
|
||||
// clang-format off
|
||||
SelectMgr_FilterType myFilterType; //!< selection filter type. SelectMgr_TypeFilter_OR by default.
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif // _SelectMgr_AndOrFilter_HeaderFile
|
||||
|
@@ -161,6 +161,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// clang-format off
|
||||
NCollection_List<Handle(Select3D_SensitiveEntity)> myBVHToBuildList; //!< list of queued sensitive entities
|
||||
NCollection_Array1<BVHThread> myBVHThreads; //!< threads to build BVH
|
||||
Standard_Boolean myToStopBVHThread; //!< flag to stop BVH threads
|
||||
@@ -168,6 +169,7 @@ protected:
|
||||
Standard_Condition myWakeEvent; //!< raises when any sensitive is added to the BVH list
|
||||
Standard_Condition myIdleEvent; //!< raises when BVH list become empty
|
||||
Standard_Boolean myIsStarted; //!< indicates that threads are running
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -285,7 +285,9 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// clang-format off
|
||||
Handle(Graphic3d_Camera) myCamera; //!< camera definition (if builder isn't NULL it is the same as its camera)
|
||||
// clang-format on
|
||||
SelectMgr_SelectionType mySelectionType; //!< type of selection
|
||||
};
|
||||
|
||||
|
@@ -210,9 +210,11 @@ public:
|
||||
protected:
|
||||
|
||||
SelectMgr_SelectableObject* mySelectable; //!< raw pointer to selectable object
|
||||
// clang-format off
|
||||
Standard_Integer mypriority; //!< selection priority (for result with the same depth)
|
||||
Standard_Boolean myIsSelected; //!< flag indicating selected state
|
||||
Standard_Boolean myFromDecomposition; //!< flag indicating this owner points to a part of object (TRUE) or to entire object (FALSE)
|
||||
// clang-format on
|
||||
|
||||
};
|
||||
|
||||
|
@@ -152,10 +152,12 @@ protected:
|
||||
gp_Vec myPlanes[N + 2]; //!< Plane equations
|
||||
gp_Pnt myVertices[N * 2]; //!< Vertices coordinates
|
||||
|
||||
// clang-format off
|
||||
Standard_Real myMaxVertsProjections[N + 2]; //!< Cached projections of vertices onto frustum plane directions
|
||||
Standard_Real myMinVertsProjections[N + 2]; //!< Cached projections of vertices onto frustum plane directions
|
||||
Standard_Real myMaxOrthoVertsProjections[3]; //!< Cached projections of vertices onto directions of ortho unit vectors
|
||||
Standard_Real myMinOrthoVertsProjections[3]; //!< Cached projections of vertices onto directions of ortho unit vectors
|
||||
// clang-format on
|
||||
|
||||
gp_Vec myEdgeDirs[6]; //!< Cached edge directions
|
||||
};
|
||||
|
@@ -40,7 +40,9 @@ void SelectMgr_RectangularFrustum::segmentSegmentDistance (const gp_Pnt& theSegP
|
||||
SelectBasics_PickResult& thePickResult) const
|
||||
{
|
||||
gp_XYZ anU = theSegPnt2.XYZ() - theSegPnt1.XYZ();
|
||||
// clang-format off
|
||||
gp_XYZ aV = myFarPickedPnt.XYZ() - myNearPickedPnt.XYZ(); // use unnormalized vector instead of myViewRayDir to clip solutions behind Far plane
|
||||
// clang-format on
|
||||
gp_XYZ aW = theSegPnt1.XYZ() - myNearPickedPnt.XYZ();
|
||||
|
||||
Standard_Real anA = anU.Dot (anU);
|
||||
@@ -110,7 +112,9 @@ bool SelectMgr_RectangularFrustum::segmentPlaneIntersection (const gp_Vec& thePl
|
||||
const gp_Pnt& thePntOnPlane,
|
||||
SelectBasics_PickResult& thePickResult) const
|
||||
{
|
||||
// clang-format off
|
||||
gp_XYZ anU = myFarPickedPnt.XYZ() - myNearPickedPnt.XYZ(); // use unnormalized vector instead of myViewRayDir to clip solutions behind Far plane by > 1.0 check
|
||||
// clang-format on
|
||||
gp_XYZ aW = myNearPickedPnt.XYZ() - thePntOnPlane.XYZ();
|
||||
Standard_Real aD = thePlane.Dot (anU);
|
||||
Standard_Real aN = -thePlane.Dot (aW);
|
||||
@@ -234,7 +238,9 @@ void SelectMgr_RectangularFrustum::cacheVertexProjections (SelectMgr_Rectangular
|
||||
// to simplify calculations.
|
||||
Standard_Integer aVertIdxs[6] = { LeftTopNear, LeftBottomNear, // opposite planes in height direction
|
||||
LeftBottomNear, RightBottomNear, // opposite planes in width direction
|
||||
// clang-format off
|
||||
LeftBottomFar, RightBottomNear }; // opposite planes in depth direction
|
||||
// clang-format on
|
||||
for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < 5; aPlaneIdx += 2)
|
||||
{
|
||||
Standard_Real aProj1 = theFrustum->myPlanes[aPlaneIdx].XYZ().Dot (theFrustum->myVertices[aVertIdxs[aPlaneIdx]].XYZ());
|
||||
|
@@ -257,11 +257,13 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
// clang-format off
|
||||
SelectionRectangle mySelRectangle; //!< parameters for selection by point or box (it is used to build frustum)
|
||||
gp_Pnt myNearPickedPnt; //!< 3d projection of user-picked selection point onto near view plane
|
||||
gp_Pnt myFarPickedPnt; //!< 3d projection of user-picked selection point onto far view plane
|
||||
gp_Dir myViewRayDir; //!< view ray direction
|
||||
Standard_Real myScale; //!< Scale factor of applied transformation, if there was any
|
||||
// clang-format on
|
||||
|
||||
};
|
||||
|
||||
|
@@ -191,8 +191,10 @@ protected:
|
||||
protected:
|
||||
|
||||
SelectMgr_SequenceOfSelection myselections; //!< list of selections
|
||||
// clang-format off
|
||||
Handle(Prs3d_Presentation) mySelectionPrs; //!< optional presentation for highlighting selected object
|
||||
Handle(Prs3d_Presentation) myHilightPrs; //!< optional presentation for highlighting detected object
|
||||
// clang-format on
|
||||
Standard_Integer myGlobalSelMode; //!< global selection mode
|
||||
Standard_Boolean myAutoHilight; //!< auto-highlighting flag defining
|
||||
|
||||
|
@@ -414,7 +414,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
|
||||
|| myLastViewState.IsChanged (aViewState)
|
||||
|| isWinSizeChanged))
|
||||
{
|
||||
// clang-format off
|
||||
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
|
||||
// clang-format on
|
||||
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
|
||||
// construct adaptor over private fields to provide direct access for the BVH builder
|
||||
@@ -434,7 +436,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
|
||||
|| myLastViewState.IsProjectionChanged (aViewState)
|
||||
|| isWinSizeChanged))
|
||||
{
|
||||
// clang-format off
|
||||
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
|
||||
// clang-format on
|
||||
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
|
||||
// construct adaptor over private fields to provide direct access for the BVH builder
|
||||
|
@@ -240,12 +240,14 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
// clang-format off
|
||||
NCollection_IndexedMap<Handle(SelectMgr_SelectableObject)> myObjects[BVHSubsetNb]; //!< Map of objects for each subset
|
||||
opencascade::handle<BVH_Tree<Standard_Real, 3> > myBVH[BVHSubsetNb]; //!< BVH tree computed for each subset
|
||||
Handle(Select3D_BVHBuilder3d) myBuilder[BVHSubsetNb]; //!< Builder allocated for each subset
|
||||
Standard_Boolean myIsDirty[BVHSubsetNb]; //!< Dirty flag for each subset
|
||||
Graphic3d_WorldViewProjState myLastViewState; //!< Last view-projection state used for construction of BVH
|
||||
Graphic3d_Vec2i myLastWinSize; //!< Last viewport's (window's) width used for construction of BVH
|
||||
// clang-format on
|
||||
friend class Iterator;
|
||||
};
|
||||
|
||||
|
@@ -288,10 +288,12 @@ public:
|
||||
|
||||
private:
|
||||
Handle(SelectMgr_BaseIntersector) myActiveSelectingVolume;
|
||||
// clang-format off
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) myViewClipPlanes; //!< view clipping planes
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) myObjectClipPlanes; //!< object clipping planes
|
||||
SelectMgr_ViewClipRange myViewClipRange;
|
||||
Standard_Boolean myToAllowOverlap; //!< Defines if partially overlapped entities will me detected or not
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -285,7 +285,9 @@ namespace
|
||||
: SelectMgr_SelectionImageFiller (thePixMap, theSelector)
|
||||
{
|
||||
// generate standard modes in proper order, consider custom objects would use similar scheme
|
||||
// clang-format off
|
||||
myMapSelectionModeColors.Bind ( 0, Quantity_NOC_WHITE); // default (entire object selection)
|
||||
// clang-format on
|
||||
myMapSelectionModeColors.Bind ( 1, Quantity_NOC_YELLOW); // TopAbs_VERTEX
|
||||
myMapSelectionModeColors.Bind ( 2, Quantity_NOC_GREEN); // TopAbs_EDGE
|
||||
myMapSelectionModeColors.Bind ( 3, Quantity_NOC_RED); // TopAbs_WIRE
|
||||
|
@@ -89,9 +89,11 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
// clang-format off
|
||||
SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
|
||||
SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives
|
||||
Standard_Integer myNbEntityWithPersistence; //!< number of sensitive entities that have own transform persistence
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif // _SelectMgr_SensitiveEntitySet_HeaderFile
|
||||
|
@@ -31,12 +31,14 @@ public:
|
||||
gp_Pnt Point; //!< 3D point
|
||||
Graphic3d_Vec3 Normal; //!< surface normal or 0 vector if undefined
|
||||
Standard_Real Depth; //!< distance from the view plane to the entity
|
||||
// clang-format off
|
||||
Standard_Real MinDist; //!< distance from the clicked point to the entity on the view plane
|
||||
Standard_Real Tolerance; //!< tolerance used for selecting candidates
|
||||
Standard_Integer SelectionPriority; //!< selection priority
|
||||
Standard_Integer DisplayPriority; //!< display priority
|
||||
Standard_Integer ZLayerPosition; //!< ZLayer rendering order index, stronger than a depth
|
||||
Standard_Integer NbOwnerMatches; //!< overall number of entities collected for the same owner
|
||||
// clang-format on
|
||||
Standard_Boolean IsPreferPriority; //!< flag to signal comparison to be done over priority
|
||||
|
||||
public:
|
||||
|
@@ -185,7 +185,9 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
// clang-format off
|
||||
SelectionTriangle mySelTriangle; //!< parameters of selection triangle (it is used to build triangle frustum)
|
||||
// clang-format on
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -195,6 +195,7 @@ private:
|
||||
private:
|
||||
|
||||
SelectMgr_TriangFrustums myFrustums; //!< set of triangular frustums
|
||||
// clang-format off
|
||||
SelectionPolyline mySelPolyline; //!< parameters of selection polyline (it is used to build triangle frustum set)
|
||||
TColgp_Array1OfPnt myBoundaryPoints; //!< boundary points
|
||||
//! 1_____2
|
||||
@@ -204,6 +205,7 @@ private:
|
||||
//! | / \ |
|
||||
//! 8|/_________\|7
|
||||
Standard_Boolean myToAllowOverlap; //!< flag to detect only fully included sensitives or not
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif // _SelectMgr_TriangularFrustumSet_HeaderFile
|
||||
|
Reference in New Issue
Block a user