Skip to content

Commit fe3f4be

Browse files
authored
DistanceMap & History group comments reworked in doxygen format (#148)
1 parent 39d5f6e commit fe3f4be

14 files changed

+298
-241
lines changed

source/MRMesh/MRChangeMeshAction.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
namespace MR
99
{
1010

11-
// Undo action for ObjectMesh mesh change
11+
/// \defgroup HistoryGroup History group
12+
/// \{
13+
14+
/// Undo action for ObjectMesh mesh change
1215
class ChangeMeshAction : public HistoryAction
1316
{
1417
public:
1518
using Obj = ObjectMesh;
1619

17-
// use this constructor to remember object's mesh before making any changes in it
20+
/// use this constructor to remember object's mesh before making any changes in it
1821
ChangeMeshAction( std::string name, const std::shared_ptr<ObjectMesh>& obj ) :
1922
objMesh_{ obj },
2023
name_{ std::move( name ) }
@@ -57,13 +60,13 @@ class ChangeMeshAction : public HistoryAction
5760
std::string name_;
5861
};
5962

60-
// Undo action for ObjectMesh points only (not topology) change
63+
/// Undo action for ObjectMesh points only (not topology) change
6164
class ChangeMeshPointsAction : public HistoryAction
6265
{
6366
public:
6467
using Obj = ObjectMesh;
6568

66-
// use this constructor to remember object's mesh points before making any changes in it
69+
/// use this constructor to remember object's mesh points before making any changes in it
6770
ChangeMeshPointsAction( std::string name, const std::shared_ptr<ObjectMesh>& obj ) :
6871
objMesh_{ obj },
6972
name_{ std::move( name ) }
@@ -109,13 +112,13 @@ class ChangeMeshPointsAction : public HistoryAction
109112
std::string name_;
110113
};
111114

112-
// Undo action for ObjectMesh topology only (not points) change
115+
/// Undo action for ObjectMesh topology only (not points) change
113116
class ChangeMeshTopologyAction : public HistoryAction
114117
{
115118
public:
116119
using Obj = ObjectMesh;
117120

118-
// use this constructor to remember object's mesh points before making any changes in it
121+
/// use this constructor to remember object's mesh points before making any changes in it
119122
ChangeMeshTopologyAction( std::string name, const std::shared_ptr<ObjectMesh>& obj ) :
120123
objMesh_{ obj },
121124
name_{ std::move( name ) }
@@ -161,4 +164,6 @@ class ChangeMeshTopologyAction : public HistoryAction
161164
std::string name_;
162165
};
163166

167+
/// \}
168+
164169
} // namespace MR

source/MRMesh/MRChangeNameAction.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
namespace MR
99
{
1010

11-
// This action to undo/redo the change of object name
11+
/// This action to undo/redo the change of object name
12+
/// \ingroup HistoryGroup
1213
class ChangeNameAction : public HistoryAction
1314
{
1415
public:
15-
// construct before giving new name to the object
16+
/// construct before giving new name to the object
1617
ChangeNameAction( const std::string& actionName, std::shared_ptr<Object> obj ) :
1718
obj_{ std::move( obj ) },
1819
actionName_{ actionName }
@@ -47,4 +48,4 @@ class ChangeNameAction : public HistoryAction
4748
std::string actionName_;
4849
};
4950

50-
} //namespace MR
51+
} // namespace MR

source/MRMesh/MRChangeObjectAction.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
namespace MR
99
{
1010

11+
/// History action for object change
12+
/// \ingroup HistoryGroup
1113
class ChangeObjectAction : public HistoryAction
1214
{
1315
public:
14-
// Constructed from original Object
16+
/// Constructed from original Object
1517
ChangeObjectAction( const std::string& name, const std::shared_ptr<Object>& obj ):
1618
obj_{ obj },
1719
name_{name}

source/MRMesh/MRChangePointCloudAction.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
namespace MR
1010
{
1111

12-
// Undo action for ObjectMesh mesh change
12+
/// Undo action for ObjectMesh mesh change
13+
/// \ingroup HistoryGroup
1314
class ChangePointCloudAction : public HistoryAction
1415
{
1516
public:
1617
using Obj = ObjectPoints;
1718

18-
// use this constructor to remember object's point cloud before making any changes in it
19+
/// use this constructor to remember object's point cloud before making any changes in it
1920
ChangePointCloudAction( std::string name, const std::shared_ptr<ObjectPoints>& obj ) :
2021
objPoints_{ obj },
2122
name_{ std::move( name ) }

source/MRMesh/MRChangeSceneAction.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace MR
88
{
99

10+
/// Change scene action
11+
/// \ingroup HistoryGroup
1012
class MRMESH_CLASS ChangeSceneAction : public HistoryAction
1113
{
1214
public:
@@ -15,7 +17,7 @@ class MRMESH_CLASS ChangeSceneAction : public HistoryAction
1517
AddObject,
1618
RemoveObject
1719
};
18-
// Constructed before removal or addiction
20+
/// Constructed before removal or addiction
1921
MRMESH_API ChangeSceneAction( const std::string& name, const std::shared_ptr<Object>& obj, Type type );
2022

2123
virtual std::string name() const override { return name_; }
@@ -25,11 +27,11 @@ class MRMESH_CLASS ChangeSceneAction : public HistoryAction
2527
[[nodiscard]] MRMESH_API virtual size_t heapBytes() const override;
2628

2729
private:
28-
// updates parent and next child if it was not preset before
30+
/// updates parent and next child if it was not preset before
2931
void updateParent_();
3032

3133
Object* parent_{ nullptr };
32-
std::shared_ptr<Object> nextObj_; // next child of parent (needed to insert child to correct place of tree)
34+
std::shared_ptr<Object> nextObj_; ///< next child of parent (needed to insert child to correct place of tree)
3335
std::shared_ptr<Object> obj_;
3436
std::string name_;
3537
Type type_;

source/MRMesh/MRChangeSceneObjectsOrder.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
namespace MR
88
{
99

10-
class MRMESH_CLASS ChangeSceneObjectsOrder : public HistoryAction
10+
/// History action for scene objects order change
11+
/// \ingroup HistoryGroup
12+
class ChangeSceneObjectsOrder : public HistoryAction
1113
{
1214
public:
13-
// Constructed before change order
15+
/// Constructed before change order
1416
ChangeSceneObjectsOrder( const std::string& name, const std::shared_ptr<Object>& obj ) :
1517
obj_( obj ),
1618
name_( name )

source/MRMesh/MRChangeSelectionAction.h

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
namespace MR
77
{
88

9-
// Undo action for ObjectMesh face selection
9+
/// \addtogroup HistoryGroup
10+
/// \{
11+
12+
/// Undo action for ObjectMesh face selection
1013
class ChangeMeshFaceSelectionAction : public HistoryAction
1114
{
1215
public:
1316
using Obj = ObjectMesh;
1417

15-
// use this constructor to remember object's face selection before making any changes in it
18+
/// use this constructor to remember object's face selection before making any changes in it
1619
ChangeMeshFaceSelectionAction( const std::string& name, const std::shared_ptr<ObjectMesh>& objMesh ):
1720
name_{name},
1821
objMesh_{objMesh}
@@ -35,7 +38,7 @@ class ChangeMeshFaceSelectionAction : public HistoryAction
3538

3639
const FaceBitSet & selection() const { return selection_; }
3740

38-
// empty because set dirty is inside selectFaces
41+
/// empty because set dirty is inside selectFaces
3942
static void setObjectDirty( const std::shared_ptr<ObjectMesh>& ) {}
4043

4144
[[nodiscard]] virtual size_t heapBytes() const override
@@ -49,13 +52,13 @@ class ChangeMeshFaceSelectionAction : public HistoryAction
4952
FaceBitSet selection_;
5053
};
5154

52-
// Undo action for ObjectMesh edge selection
55+
/// Undo action for ObjectMesh edge selection
5356
class ChangeMeshEdgeSelectionAction : public HistoryAction
5457
{
5558
public:
5659
using Obj = ObjectMesh;
5760

58-
// use this constructor to remember object's edge selection before making any changes in it
61+
/// use this constructor to remember object's edge selection before making any changes in it
5962
ChangeMeshEdgeSelectionAction( const std::string& name, const std::shared_ptr<ObjectMesh>& objMesh ) :
6063
name_{ name },
6164
objMesh_{ objMesh }
@@ -78,7 +81,7 @@ class ChangeMeshEdgeSelectionAction : public HistoryAction
7881

7982
const UndirectedEdgeBitSet & selection() const { return selection_; }
8083

81-
// empty because set dirty is inside selectEdges
84+
/// empty because set dirty is inside selectEdges
8285
static void setObjectDirty( const std::shared_ptr<ObjectMesh>& ) {}
8386

8487
[[nodiscard]] virtual size_t heapBytes() const override
@@ -92,13 +95,13 @@ class ChangeMeshEdgeSelectionAction : public HistoryAction
9295
UndirectedEdgeBitSet selection_;
9396
};
9497

95-
// Undo action for ObjectMesh creases
98+
/// Undo action for ObjectMesh creases
9699
class ChangeMeshCreasesAction : public HistoryAction
97100
{
98101
public:
99102
using Obj = ObjectMesh;
100103

101-
// use this constructor to remember object's creases before making any changes in it
104+
/// use this constructor to remember object's creases before making any changes in it
102105
ChangeMeshCreasesAction( const std::string& name, const std::shared_ptr<ObjectMesh>& objMesh ) :
103106
name_{ name },
104107
objMesh_{ objMesh }
@@ -121,7 +124,7 @@ class ChangeMeshCreasesAction : public HistoryAction
121124

122125
const UndirectedEdgeBitSet & creases() const { return creases_; }
123126

124-
// empty because set dirty is inside setCreases
127+
/// empty because set dirty is inside setCreases
125128
static void setObjectDirty( const std::shared_ptr<ObjectMesh>& ) {}
126129

127130
[[nodiscard]] virtual size_t heapBytes() const override
@@ -135,13 +138,13 @@ class ChangeMeshCreasesAction : public HistoryAction
135138
UndirectedEdgeBitSet creases_;
136139
};
137140

138-
// Undo action for ObjectPoints point selection
141+
/// Undo action for ObjectPoints point selection
139142
class ChangePointPointSelectionAction : public HistoryAction
140143
{
141144
public:
142145
using Obj = ObjectPoints;
143146

144-
// use this constructor to remember object's vertex selection before making any changes in it
147+
/// use this constructor to remember object's vertex selection before making any changes in it
145148
ChangePointPointSelectionAction( const std::string& name, const std::shared_ptr<ObjectPoints>& objPoints ) :
146149
name_{ name },
147150
objPoints_{ objPoints }
@@ -164,7 +167,7 @@ class ChangePointPointSelectionAction : public HistoryAction
164167

165168
const VertBitSet& selection() const { return selection_; }
166169

167-
// empty because set dirty is inside selectPoints
170+
/// empty because set dirty is inside selectPoints
168171
static void setObjectDirty( const std::shared_ptr<ObjectPoints>& )
169172
{}
170173

@@ -178,4 +181,7 @@ class ChangePointPointSelectionAction : public HistoryAction
178181
std::shared_ptr<ObjectPoints> objPoints_;
179182
VertBitSet selection_;
180183
};
181-
}
184+
185+
/// \}
186+
187+
}

source/MRMesh/MRChangeXfAction.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
namespace MR
88
{
99

10+
/// History action for xf change
11+
/// \ingroup HistoryGroup
1012
class ChangeXfAction : public HistoryAction
1113
{
1214
public:
13-
// Constructed from original obj
15+
/// Constructed from original obj
1416
ChangeXfAction( const std::string& name, const std::shared_ptr<Object>& obj ) :
1517
obj_{ obj },
1618
xf_{ obj->xf() },
@@ -42,4 +44,5 @@ class ChangeXfAction : public HistoryAction
4244
AffineXf3f xf_;
4345
std::string name_;
4446
};
45-
}
47+
48+
}

source/MRMesh/MRCombinedHistoryAction.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
namespace MR
77
{
88

9+
/// History action for combine some history actions
10+
/// \ingroup HistoryGroup
911
class MRMESH_CLASS CombinedHistoryAction : public HistoryAction
1012
{
1113
public:
12-
// Will call action() for each actions in given order (undo in reverse, redo in forward)
14+
/// Will call action() for each actions in given order (undo in reverse, redo in forward)
1315
MRMESH_API CombinedHistoryAction( const std::string& name, const std::vector<std::shared_ptr<HistoryAction>>& actions );
1416

1517
virtual std::string name() const override

0 commit comments

Comments
 (0)