Skip to content

Commit 4030136

Browse files
Fix documentation errors in code
1 parent 88201b6 commit 4030136

18 files changed

Lines changed: 137 additions & 47 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
path = testbed/extern/nanogui
33
url = https://github.com/mitsuba-renderer/nanogui.git
44
ignore = dirty
5+
[submodule "documentation/doxygen-awesome-css"]
6+
path = documentation/doxygen-awesome-css
7+
url = https://github.com/jothepro/doxygen-awesome-css.git

documentation/doxygen-awesome-css

Submodule doxygen-awesome-css added at 5b27b3a

include/reactphysics3d/collision/narrowphase/NarrowPhaseInfoBatch.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ struct ContactPointInfo;
4747
*/
4848
struct NarrowPhaseInfoBatch {
4949

50+
// Struct NarrowPhaseInfo
51+
/**
52+
* A potential collision between two colliders from the middle-phase algorithm
53+
* that have to be tested during narrow-phase collision detection.
54+
*/
5055
struct NarrowPhaseInfo {
5156

5257
/// Broadphase overlapping pairs ids

include/reactphysics3d/collision/shapes/TriangleShape.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,8 @@ RP3D_FORCE_INLINE AABB TriangleShape::getLocalBounds() const {
221221

222222
// Return the local inertia tensor of the triangle shape
223223
/**
224-
* @param[out] tensor The 3x3 inertia tensor matrix of the shape in local-space
225-
* coordinates
226224
* @param mass Mass to use to compute the inertia tensor of the collision shape
225+
* @return A vector with the three diagonal values of the local inertia tensor
227226
*/
228227
RP3D_FORCE_INLINE Vector3 TriangleShape::getLocalInertiaTensor(decimal /*mass*/) const {
229228
return Vector3(0, 0, 0);

include/reactphysics3d/containers/Pair.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class Pair {
7070

7171
}
7272

73-
// Hash function for a reactphysics3d Pair
7473
namespace std {
7574

75+
// Hash function for a reactphysics3d Pair
7676
template <typename T1, typename T2> struct hash<reactphysics3d::Pair<T1, T2>> {
7777

7878
size_t operator()(const reactphysics3d::Pair<T1, T2>& pair) const {

include/reactphysics3d/engine/Entity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ RP3D_FORCE_INLINE bool Entity::operator!=(const Entity& entity) const {
125125

126126
}
127127

128-
// Hash function for a reactphysics3d Entity
129128
namespace std {
130129

130+
// Hash function for a reactphysics3d Entity
131131
template <> struct hash<reactphysics3d::Entity> {
132132

133133
size_t operator()(const reactphysics3d::Entity& entity) const {

include/reactphysics3d/engine/OverlappingPairs.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ class OverlappingPairs {
109109

110110
public:
111111

112+
// Struct OverlappingPair
113+
/**
114+
* A base overlapping pair
115+
*/
112116
struct OverlappingPair {
113117

114118
/// Ids of the convex vs convex pairs
@@ -156,7 +160,10 @@ class OverlappingPairs {
156160
virtual ~OverlappingPair() = default;
157161
};
158162

159-
// Overlapping pair between two convex colliders
163+
// Struct ConvexOverlappingPair
164+
/**
165+
* An overlapping pair between two convex colliders
166+
*/
160167
struct ConvexOverlappingPair : public OverlappingPair {
161168

162169
/// Temporal coherence collision data for each overlapping collision shapes of this pair.
@@ -173,7 +180,10 @@ class OverlappingPairs {
173180
}
174181
};
175182

176-
// Overlapping pair between two a convex collider and a concave collider
183+
// Struct ConvexOverlappingPair
184+
/**
185+
* An overlapping pair between a convex collider and a concave collider
186+
*/
177187
struct ConcaveOverlappingPair : public OverlappingPair {
178188

179189
private:

include/reactphysics3d/utils/DebugRenderer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ RP3D_FORCE_INLINE void DebugRenderer::setContactNormalLength(decimal contactNorm
378378

379379
}
380380

381-
// Hash function for a DebugItem
382381
namespace std {
383382

383+
// Hash function for a DebugItem
384384
template <> struct hash<reactphysics3d::DebugRenderer::DebugItem> {
385385

386386
size_t operator()(const reactphysics3d::DebugRenderer::DebugItem& debugItem) const {

include/reactphysics3d/utils/DefaultLogger.h

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class DefaultLogger : public Logger {
104104

105105
};
106106

107+
// Class TextFormatter
108+
/**
109+
* Format the logs with simple text
110+
*/
107111
class TextFormatter : public Formatter {
108112

109113
public:
@@ -168,6 +172,10 @@ class DefaultLogger : public Logger {
168172
}
169173
};
170174

175+
// Class HtmlFormatter
176+
/**
177+
* Format the logs with HTML
178+
*/
171179
class HtmlFormatter : public Formatter {
172180

173181
private:
@@ -344,7 +352,10 @@ class DefaultLogger : public Logger {
344352
};
345353

346354

347-
/// Log destination
355+
// Class Destination
356+
/**
357+
* destination for the logs
358+
*/
348359
class Destination {
349360

350361
public:
@@ -373,6 +384,10 @@ class DefaultLogger : public Logger {
373384
virtual size_t getSizeBytes() const=0;
374385
};
375386

387+
// Class FileDestination
388+
/**
389+
* File destination for the logs
390+
*/
376391
class FileDestination : public Destination {
377392

378393
private:
@@ -423,7 +438,10 @@ class DefaultLogger : public Logger {
423438
}
424439
};
425440

426-
/// Stream destination to output the logs into a stream
441+
// Class TextFormatter
442+
/**
443+
* Stream destination for the logs
444+
*/
427445
class StreamDestination : public Destination {
428446

429447
private:
@@ -514,9 +532,9 @@ class DefaultLogger : public Logger {
514532

515533
}
516534

517-
// Hash function for struct VerticesPair
518535
namespace std {
519536

537+
// Hash function for struct VerticesPair
520538
template<> struct hash<reactphysics3d::DefaultLogger::Format> {
521539

522540
size_t operator()(const reactphysics3d::DefaultLogger::Format format) const {

include/reactphysics3d/utils/quickhull/QHHalfEdgeStructure.h

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,35 @@ class QHHalfEdgeStructure {
5252
using VerticesPair = Pair<uint32, uint32>;
5353
using EdgeVertices = Pair<const Vertex*, const Vertex*>;
5454

55-
/// Edge
55+
// Struct Edge
56+
/**
57+
* An half-edge
58+
*/
5659
struct Edge {
5760

58-
Vertex* startVertex; // Vertex at the beginning of the edge
59-
Vertex* endVertex; // Vertex at the end of the edge
60-
Face* face; // Adjacent face of the edge
61-
Edge* previousEdge; // Previous edge in the linked-list of edges
62-
Edge* nextEdge; // Next edge in the linked-list of edges
63-
Edge* previousFaceEdge; // Previous edge around the face of the edge
64-
Edge* nextFaceEdge; // Next edge around the face of the edge
65-
Edge* twinEdge; // Twin edge
61+
/// Vertex at the beginning of the edge
62+
Vertex* startVertex;
63+
64+
/// Vertex at the end of the edge
65+
Vertex* endVertex;
66+
67+
/// Adjacent face of the edge
68+
Face* face;
69+
70+
/// Previous edge in the linked-list of edges
71+
Edge* previousEdge;
72+
73+
/// Next edge in the linked-list of edges
74+
Edge* nextEdge;
75+
76+
/// Previous edge around the face of the edge
77+
Edge* previousFaceEdge;
78+
79+
/// Next edge around the face of the edge
80+
Edge* nextFaceEdge;
81+
82+
/// Twin edge
83+
Edge* twinEdge;
6684

6785
Edge(Vertex* startVertex, Vertex* endVertex, Face* face)
6886
:startVertex(startVertex), endVertex(endVertex), face(face), previousEdge(nullptr), nextEdge(nullptr),
@@ -88,29 +106,45 @@ class QHHalfEdgeStructure {
88106
}
89107
};
90108

91-
/// Face
109+
// Struct Face
110+
/**
111+
* A face
112+
*/
92113
struct Face {
93114

115+
/// Pointer to the next face
94116
Face* nextFace;
117+
118+
/// Pointer to the previous face
95119
Face* previousFace;
96-
Edge* edge; // One half-edge of the face
120+
121+
/// One half-edge of the face
122+
Edge* edge;
123+
124+
/// Face normal
97125
Vector3 normal;
98-
Vector3 centroid; // Center of the face (average of the face vertices)
99-
decimal area; // Area of the face
100-
Array<uint32> conflictPoints; // Array with some remaining points visible from this face that need to be processed
126+
127+
/// Center of the face (average of the face vertices)
128+
Vector3 centroid;
129+
130+
/// Area of the face
131+
decimal area;
132+
133+
/// Array with some remaining points visible from this face that need to be processed
134+
Array<uint32> conflictPoints;
101135

102136
/// Constructor
103137
Face(MemoryAllocator& allocator)
104138
: nextFace(nullptr), previousFace(nullptr), edge(nullptr), normal(0, 0, 0), area(0), conflictPoints(allocator, 8) {
105139

106140
}
107141

108-
// Return a vertex of the face
142+
/// Return a vertex of the face
109143
const Vertex* getVertex() const {
110144
return edge->startVertex;
111145
}
112146

113-
// Recalculate the face centroid and normal to better fit its new vertices (using Newell method)
147+
/// Recalculate the face centroid and normal to better fit its new vertices (using Newell method)
114148
void recalculateFace(const Array<Vector3>& points) {
115149

116150
centroid.setToZero();
@@ -144,7 +178,7 @@ class QHHalfEdgeStructure {
144178
area = normalLength * decimal(0.5);
145179
}
146180

147-
// Return a string with the vertices of the face
181+
/// Return a string with the vertices of the face
148182
std::string verticesString() const {
149183

150184
std::string verticesString = "(";
@@ -167,13 +201,13 @@ class QHHalfEdgeStructure {
167201
return verticesString;
168202
}
169203

170-
// Return true if the face is a triangle
204+
/// Return true if the face is a triangle
171205
bool isTriangle() {
172206

173207
return edge->nextFaceEdge->nextFaceEdge->nextFaceEdge == edge;
174208
}
175209

176-
// Return true if the face structure is valid (for debugging purpose)
210+
/// Return true if the face structure is valid (for debugging purpose)
177211
bool isValid() {
178212
bool isValid = true;
179213

@@ -198,12 +232,19 @@ class QHHalfEdgeStructure {
198232

199233
};
200234

201-
/// Vertex
235+
// Struct Vertex
236+
/**
237+
* A vertex
238+
*/
202239
struct Vertex {
203240

204-
uint32 externalIndex; // Index of the vertex point in the user vertex array
241+
/// Index of the vertex point in the user vertex array
242+
uint32 externalIndex;
205243

244+
/// Pointer to the previous vertex
206245
Vertex* previousVertex;
246+
247+
/// Pointer to the next vertex
207248
Vertex* nextVertex;
208249

209250
/// Constructor

0 commit comments

Comments
 (0)