Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding - Isolate long attached comments for clang-format #259

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions src/AIS/AIS_Animation.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ struct AIS_AnimationProgress
{
Standard_Real Pts; //!< global presentation timestamp
Standard_Real LocalPts; //!< presentation within current animation
// clang-format off
Standard_Real LocalNormalized; //!< normalized position within current animation within 0..1 range
// clang-format on

AIS_AnimationProgress() : Pts (-1.0), LocalPts (-1.0), LocalNormalized (-1.0) {}
};
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_ColorScale.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,9 @@ void AIS_ColorScale::drawColorBar (const Handle(Prs3d_Presentation)& thePrs,
// (thus the halves of first and last intervals have solid color)
aTriangles = new Graphic3d_ArrayOfTriangles ((aColors.Length() + 1) * 4, // quads
(aColors.Length() + 1) * 2 * 3, // quads as triangles
// clang-format off
false, true); // per-vertex colors
// clang-format on
Quantity_Color aColor1 (aColors.Value (1)), aColor2;
Standard_Integer aSizeY = Standard_Integer(aStepY / 2);
const Standard_Integer anYBottom = theBarBottom + aSizeY;
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_ColorScale.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ private:

Standard_Real myMin; //!< values range - minimal value
Standard_Real myMax; //!< values range - maximal value
// clang-format off
Graphic3d_Vec3d myColorHlsMin; //!< HLS color corresponding to minimum value
Graphic3d_Vec3d myColorHlsMax; //!< HLS color corresponding to maximum value
TCollection_ExtendedString myTitle; //!< optional title string
Expand All @@ -479,6 +480,7 @@ private:
Aspect_SequenceOfColor myColors; //!< sequence of custom colors
TColStd_SequenceOfExtendedString myLabels; //!< sequence of custom text labels
Aspect_TypeOfColorScalePosition myLabelPos; //!< label position relative to the color scale
// clang-format on
Aspect_TypeOfColorScalePosition myTitlePos; //!< title position
Standard_Integer myXPos; //!< left position
Standard_Integer myYPos; //!< bottom position
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_ColoredShape.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,9 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
aMapIter.More(); aMapIter.Next())
{
const Handle(AIS_ColoredDrawer)& aCustomDrawer = aMapIter.Key();
// clang-format off
const TopoDS_Compound& aShapeDraw = aMapIter.Value(); // compound of subshapes with <aShType> type
// clang-format on
Handle(Prs3d_Drawer) aDrawer;
if (!aCustomDrawer.IsNull())
{
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_InteractiveObject.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ protected:

protected:

// clang-format off
AIS_InteractiveContext* myCTXPtr; //!< pointer to Interactive Context, where object is currently displayed; @sa SetContext()
// clang-format on
Handle(Standard_Transient) myOwner; //!< application-specific owner object

};
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_LightSource.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ protected:

Handle(Graphic3d_CLight) myLightSource; //!< displayed light source

// clang-format off
Handle(Graphic3d_AspectMarker3d) myDisabledMarkerAspect; //!< disabled light source marker style
Handle(Graphic3d_AspectLine3d) myArrowLineAspectShadow; //!< arrow shadow style
Handle(Graphic3d_MarkerImage) myMarkerImages[2]; //!< icon of disabled (0) and enabled (1) light
Expand All @@ -268,6 +269,7 @@ protected:
Standard_Integer mySensSphereArcSize; //! sensitive sphere arc size in pixels
Standard_Boolean myIsZoomable; //!< flag to allow/disallow transform-persistence when possible
Standard_Boolean myIsDraggable; //!< flag to allow/disallow rotate directional light source by dragging
// clang-format on
Standard_Boolean myToDisplayName; //!< flag to show/hide name
Standard_Boolean myToDisplayRange; //!< flag to show/hide range of positional/spot light
Standard_Boolean myToSwitchOnClick; //!< flag to handle mouse click to turn light on/off
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_Manipulator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,10 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe
// overlapping of sensitive areas when size of manipulator is small.
// Sensitivity is calculated relative to the default size of the manipulator (100.0f).
const Standard_ShortReal aSensitivityCoef = myAxes[0].Size() / 100.0f;
// clang-format off
const Standard_Integer aHighSensitivity = Max (Min (RealToInt (aSensitivityCoef * 15), 15), 3); // clamp sensitivity within range [3, 15]
const Standard_Integer aLowSensitivity = Max (Min (RealToInt (aSensitivityCoef * 10), 10), 2); // clamp sensitivity within range [2, 10]
// clang-format on

switch (aMode)
{
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_Manipulator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ protected:

Axis myAxes[3]; //!< Tree axes of the manipulator.
Sphere myCenter; //!< Visual part displaying the center sphere of the manipulator.
// clang-format off
gp_Ax2 myPosition; //!< Position of the manipulator object. it displays its location and position of its axes.

Standard_Integer myCurrentIndex; //!< Index of active axis.
Expand All @@ -691,6 +692,7 @@ protected: //! @name Fields for interactive transformation. Fields only for inte

NCollection_Sequence<gp_Trsf> myStartTrsfs; //!< Owning object transformation for start. It is used internally.
Standard_Boolean myHasStartedTransformation; //!< Shows if transformation is processed (sequential calls of Transform()).
// clang-format on
gp_Ax2 myStartPosition; //! Start position of manipulator.
gp_Pnt myStartPick; //! 3d point corresponding to start mouse pick.
Standard_Real myPrevState; //! Previous value of angle during rotation.
Expand Down
2 changes: 2 additions & 0 deletions src/AIS/AIS_Trihedron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ AIS_Trihedron::AIS_Trihedron (const Handle(Geom_Axis2Placement)& theComponent)

// selection priorities
memset (mySelectionPriority, 0, sizeof(mySelectionPriority));
// clang-format off
mySelectionPriority[Prs3d_DatumParts_None] = 5; // complete trihedron: priority 5 (same as faces)
// clang-format on
mySelectionPriority[Prs3d_DatumParts_Origin] = 8; // origin: priority 8
for (int aPartIter = Prs3d_DatumParts_XAxis; aPartIter <= Prs3d_DatumParts_ZAxis; ++aPartIter)
{
Expand Down
4 changes: 4 additions & 0 deletions src/AIS/AIS_ViewController.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,9 @@ void AIS_ViewController::handlePanning (const Handle(V3d_View)& theView)
const gp_Dir& aDir = aCam->Direction();
const gp_Ax3 aCameraCS (aCam->Center(), aDir.Reversed(), aDir ^ aCam->Up());
const gp_XYZ anEyeToPnt = myPanPnt3d.XYZ() - aCam->Eye().XYZ();
// clang-format off
const gp_Pnt aViewDims = aCam->ViewDimensions (anEyeToPnt.Dot (aCam->Direction().XYZ())); // view dimensions at 3D point
// clang-format on
const Graphic3d_Vec2d aDxy (-aViewDims.X() * myGL.Panning.Delta.x() / double(aWinSize.x()),
-aViewDims.X() * myGL.Panning.Delta.y() / double(aWinSize.x()));

Expand Down Expand Up @@ -3501,7 +3503,9 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)&
}
handleMoveTo (theCtx, theView);
handleCameraActions (theCtx, theView, aWalk);
// clang-format off
theView->View()->SynchronizeXRPosedToBaseCamera(); // handleCameraActions() may modify posed camera position - copy this modifications also to the base camera
// clang-format on
handleXRPresentations (theCtx, theView);

handleViewRedraw (theCtx, theView);
Expand Down
4 changes: 4 additions & 0 deletions src/AIS/AIS_ViewController.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ protected:
AIS_ViewInputBuffer myUI; //!< buffer for UI thread
AIS_ViewInputBuffer myGL; //!< buffer for rendering thread

// clang-format off
Standard_Real myLastEventsTime; //!< last fetched events timer value for computing delta/progress
Standard_Boolean myToAskNextFrame; //!< flag indicating that another frame should be drawn right after this one
Standard_Boolean myIsContinuousRedraw; //!< continuous redrawing (without immediate rendering optimization)
Expand Down Expand Up @@ -743,6 +744,7 @@ protected:
protected: //! @name XR input variables

NCollection_Array1<Handle(AIS_XRTrackedDevice)> myXRPrsDevices; //!< array of XR tracked devices presentations
// clang-format on
Quantity_Color myXRLaserTeleColor; //!< color of teleport laser
Quantity_Color myXRLaserPickColor; //!< color of picking laser
Aspect_XRTrackedDeviceRole myXRLastTeleportHand;//!< active hand for teleport
Expand All @@ -753,6 +755,7 @@ protected: //! @name XR input variables
Standard_Real myXRLastPickDepthLeft; //!< last picking depth for left hand
Standard_Real myXRLastPickDepthRight; //!< last picking depth for right hand
Standard_Real myXRTurnAngle; //!< discrete turn angle for XR trackpad
// clang-format off
Standard_Boolean myToDisplayXRAuxDevices; //!< flag to display auxiliary tracked XR devices
Standard_Boolean myToDisplayXRHands; //!< flag to display XR hands

Expand Down Expand Up @@ -809,6 +812,7 @@ protected: //! @name rotation/panning transient state variables
gp_Vec myCamStartOpToCenter; //!< vector from rotation gravity point to camera Center at the beginning of rotation
gp_Vec myCamStartOpToEye; //!< vector from rotation gravity point to camera Eye at the beginning of rotation
Graphic3d_Vec3d myRotateStartYawPitchRoll; //!< camera yaw pitch roll at the beginning of rotation
// clang-format on

};

Expand Down
4 changes: 4 additions & 0 deletions src/AIS/AIS_ViewCube.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ void AIS_ViewCube::setDefaultAttributes()
myDrawer->TextAspect()->SetColor (Quantity_NOC_BLACK);
myDrawer->TextAspect()->SetFont (Font_NOF_SANS_SERIF);
myDrawer->TextAspect()->SetHeight (16.0);
// clang-format off
myDrawer->TextAspect()->Aspect()->SetTextZoomable (true); // the whole object is drawn within transformation-persistence
// this should be forced back-face culling regardless Closed flag
// clang-format on
myDrawer->TextAspect()->Aspect()->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_BackCulled);

Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_UserDefined);
Expand Down Expand Up @@ -661,7 +663,9 @@ void AIS_ViewCube::Compute (const Handle(PrsMgr_PresentationManager)& ,
}

const Standard_Integer aFirstNode = aSegs->VertexNumber();
// clang-format off
for (Standard_Integer aVertIter = (aNbTris - aTriFrom) > 2 ? aTriNodesFrom + 2 : aTriNodesFrom + 1; // skip triangle fan center
// clang-format on
aVertIter <= aTris->VertexNumber(); ++aVertIter)
{
aSegs->AddVertex (aTris->Vertice (aVertIter));
Expand Down
4 changes: 4 additions & 0 deletions src/AIS/AIS_ViewCube.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ protected:
Standard_Real myBoxEdgeGap; //!< gap between box side and box edge
Standard_Real myBoxFacetExtension; //!< box facet extension
Standard_Real myAxesPadding; //!< Padding between box and axes
// clang-format off
Standard_Real myAxesRadius; //!< radius of axes of the trihedron; 1.0 by default
Standard_Real myAxesConeRadius; //!< radius of cone of axes of the trihedron; 3.0 by default
Standard_Real myAxesSphereRadius; //!< radius of sphere (central point) of the trihedron; 4.0 by default
Expand All @@ -661,6 +662,7 @@ protected:
Standard_Boolean myToDisplayEdges; //!< box edges visibility
Standard_Boolean myToDisplayVertices; //!< box corners (vertices) visibility
Standard_Boolean myIsYup; //!< flag indicating that application expects Y-up viewer orientation instead of Z-up
// clang-format on

protected: //! @name Animation options

Expand All @@ -670,7 +672,9 @@ protected: //! @name Animation options
Standard_Boolean myToAutoStartAnim; //!< start animation automatically on click
Standard_Boolean myIsFixedAnimation; //!< fixed-loop animation
Standard_Boolean myToFitSelected; //!< fit selected or fit entire scene
// clang-format off
Standard_Boolean myToResetCameraUp; //!< always reset camera up direction to default
// clang-format on

};

Expand Down
2 changes: 2 additions & 0 deletions src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void APIHeaderSection_MakeHeader::Init (const Standard_CString nameval)
if (fn.IsNull()) fn = new HeaderSection_FileName;
Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(nameval);
fn->SetName(name);
// clang-format off
Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // actually
// clang-format on
Handle(TCollection_HAsciiString) tst =
new TCollection_HAsciiString(timestamp);
fn->SetTimeStamp(tst);
Expand Down
2 changes: 2 additions & 0 deletions src/AppDef/AppDef_Variational.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,9 @@ void AppDef_Variational::Project(const Handle(FEmTool_Curve)& C,
AveErr += Dist;
}

// clang-format off
NumPoints = NumPoints + myFirstPoint - 1;// Setting NumPoints to interval [myFirstPoint, myLastPoint]
// clang-format on

}

Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_OpenVRSession.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_OpenVRSession, Aspect_XRSession)
struct Aspect_OpenVRSession::VRContext
{
#ifdef HAVE_OPENVR
// clang-format off
vr::TrackedDevicePose_t TrackedPoses[vr::k_unMaxTrackedDeviceCount]; //!< array of tracked devices poses
// clang-format on
vr::IVRSystem* System; //!< OpenVR session object

//! Empty constructor.
Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_Touch.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public:

NCollection_Vec2<Standard_Real> From; //!< original touch position
NCollection_Vec2<Standard_Real> To; //!< current touch position
// clang-format off
Standard_Boolean IsPreciseDevice; //!< precise device input (e.g. mouse cursor, NOT emulated from touch screen)
// clang-format on

//! Return values delta.
NCollection_Vec2<Standard_Real> Delta() const { return To - From; }
Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_XRAnalogActionData.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
struct Aspect_XRAnalogActionData
{
uint64_t ActiveOrigin; //!< The origin that caused this action's current state
// clang-format off
float UpdateTime; //!< Time relative to now when this event happened. Will be negative to indicate a past time
NCollection_Vec3<float> VecXYZ; //!< the current state of this action
NCollection_Vec3<float> DeltaXYZ; //!< deltas since the previous update
bool IsActive; //!< whether or not this action is currently available to be bound in the active action set
// clang-format on

//! Return TRUE if delta is non-zero.
bool IsChanged() { return !DeltaXYZ.IsEqual (NCollection_Vec3<float> (0.0f, 0.0f, 0.0f)); }
Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_XRDigitalActionData.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
struct Aspect_XRDigitalActionData
{
uint64_t ActiveOrigin; //!< The origin that caused this action's current state
// clang-format off
float UpdateTime; //!< Time relative to now when this event happened. Will be negative to indicate a past time
bool IsActive; //!< whether or not this action is currently available to be bound in the active action set
bool IsPressed; //!< Aspect_InputActionType_Digital state - The current state of this action; will be true if currently pressed
bool IsChanged; //!< Aspect_InputActionType_Digital state - this is true if the state has changed since the last frame
// clang-format on

//! Empty constructor.
Aspect_XRDigitalActionData() : ActiveOrigin (0), UpdateTime (0.0f), IsActive (false), IsPressed (false), IsChanged (false) {}
Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_XRPoseActionData.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ struct Aspect_XRPoseActionData
{
Aspect_TrackedDevicePose Pose; //!< pose state
uint64_t ActiveOrigin; //!< The origin that caused this action's current state
// clang-format off
bool IsActive; //!< whether or not this action is currently available to be bound in the active action set
// clang-format on

//! Empty constructor.
Aspect_XRPoseActionData() : ActiveOrigin (0), IsActive (false) {}
Expand Down
2 changes: 2 additions & 0 deletions src/Aspect/Aspect_XRSession.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ protected:
protected:

NCollection_Array1<Handle(Aspect_XRAction)>
// clang-format off
myRoleActions[Aspect_XRTrackedDeviceRole_NB]; //!< generic actions
Aspect_XRActionSetMap myActionSets; //!< actions sets
TrackingUniverseOrigin myTrackOrigin; //!< tracking origin
Expand All @@ -252,6 +253,7 @@ protected:
Aspect_FrustumLRBT<double> myFrustumL; //!< left eye projection frustum
Aspect_FrustumLRBT<double> myFrustumR; //!< right eye projection frustum
Standard_Real myUnitFactor; //!< unit scale factor defined as scale factor for m (meters)
// clang-format on
Standard_Real myAspect; //!< aspect ratio
Standard_Real myFieldOfView; //!< field of view
Standard_Real myIod; //!< intra-ocular distance in meters
Expand Down
2 changes: 2 additions & 0 deletions src/BOPAlgo/BOPAlgo_Builder.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ protected: //! @name Post treatment
protected: //! @name Fields

TopTools_ListOfShape myArguments; //!< Arguments of the operation
// clang-format off
TopTools_MapOfShape myMapFence; //!< Fence map providing the uniqueness of the shapes in the list of arguments
BOPAlgo_PPaveFiller myPaveFiller; //!< Pave Filler - algorithm for sub-shapes intersection
BOPDS_PDS myDS; //!< Data Structure - holder of intersection information
Expand All @@ -533,6 +534,7 @@ protected: //! @name Fields
Standard_Boolean myNonDestructive; //!< Safe processing option allows avoiding modification of the input shapes
BOPAlgo_GlueEnum myGlue; //!< Gluing option allows speeding up the intersection of the input shapes
Standard_Boolean myCheckInverted; //!< Check inverted option allows disabling the check of input solids on inverted status
// clang-format on

};

Expand Down
2 changes: 2 additions & 0 deletions src/BOPAlgo/BOPAlgo_CellsBuilder.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder

// fields
TopoDS_Shape myAllParts; //!< All split parts of the arguments
// clang-format off
TopTools_IndexedDataMapOfShapeListOfShape myIndex; //!< Connection map from all splits parts to the argument shapes from which they were created
TopTools_DataMapOfIntegerListOfShape myMaterials; //!< Map of assigned materials (material -> list of shape)
TopTools_DataMapOfShapeInteger myShapeMaterial; //!< Map of assigned materials (shape -> material)
TopTools_DataMapOfShapeShape myMapModified; //!< Local modification map to track unification of the splits
// clang-format on
};

#endif //_BOPAlgo_CellsBuilder_HeaderFile
4 changes: 4 additions & 0 deletions src/BOPAlgo/BOPAlgo_MakePeriodic.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ public: //! @name Definition of the structure to keep all periodicity parameters
Standard_Real myPeriod[3]; //!< Array of XYZ period values. Defining the period for any
//! direction the corresponding flag for that direction in
//! myPeriodic should be set to true
// clang-format off
Standard_Boolean myIsTrimmed[3]; //!< Array of flags defining whether the input shape has to be
//! trimmed to fit the required period in the required direction
Standard_Real myPeriodFirst[3]; //!< Array of start parameters of the XYZ periods: required for trimming
// clang-format on
};


Expand Down Expand Up @@ -585,8 +587,10 @@ protected: //! @name Fields
TopoDS_Shape myShape; //!< Resulting periodic shape (base for repetitions)
TopoDS_Shape myRepeatedShape; //!< Resulting shape after making repetitions of the base
Standard_Real myRepeatPeriod[3]; //!< XYZ repeat period
// clang-format off
TopTools_DataMapOfShapeListOfShape myRepeatedTwins; //!< Map of associations of the identical sub-shapes
//! after repetition of the periodic shape
// clang-format on

// Twins
TopTools_DataMapOfShapeListOfShape myTwins; //!< Map of associations of the identical sub-shapes
Expand Down
Loading
Loading