Skip to content

Commit 88201b6

Browse files
Working on documentation
1 parent ccecbd2 commit 88201b6

6 files changed

Lines changed: 41 additions & 42 deletions

File tree

documentation/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
- Doxygen
99
- Sphinx
1010
- Breathe (bridge between Doxygen and Sphinx)
11+
- Exhale (used to better display the API documentation from Doxygen)
1112
- CMake
1213

1314
# How to generate the documentation
1415

16+
1. First, we need to configure CMake to generate the documentation by enabling the RP3D_GENERATE_DOCUMENTATION option
17+
2. The simply run 'make' to generate the documentation
18+
1519

documentation/doxygen/Doxyfile.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
152152
# will be relative from the directory where doxygen is started.
153153
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
154154

155-
STRIP_FROM_PATH =
155+
STRIP_FROM_PATH =
156156

157157
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
158158
# path mentioned in the documentation of a class, which tells the reader which
@@ -161,7 +161,7 @@ STRIP_FROM_PATH =
161161
# specify the list of include paths that are normally passed to the compiler
162162
# using the -I flag.
163163

164-
STRIP_FROM_INC_PATH =
164+
STRIP_FROM_INC_PATH = "../../"
165165

166166
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
167167
# less readable) file names. This can be useful is your file systems doesn't
@@ -774,7 +774,7 @@ WARN_LOGFILE =
774774
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
775775
# Note: If this tag is empty the current directory is searched.
776776

777-
INPUT = "@PROJECT_SOURCE_DIR@/include/reactphysics3d/"
777+
INPUT = "@PROJECT_SOURCE_DIR@/include/reactphysics3d/" "@PROJECT_SOURCE_DIR@/src/"
778778

779779
# This tag can be used to specify the character encoding of the source files
780780
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

documentation/sphinx/source/conf.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9+
# read version from ../VERSION
10+
version = open('../../../VERSION').readlines()[0]
11+
# The full version, including alpha/beta/rc tags.
12+
13+
# The master toctree document.
14+
master_doc = 'index'
15+
916
project = 'ReactPhysics3D'
1017
copyright = '2024, Daniel Chappuis'
1118
author = 'Daniel Chappuis'
12-
release = 'v0.10.0'
19+
release = "v" + version
1320

1421
# -- General configuration ---------------------------------------------------
1522
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1623

17-
extensions = ["breathe"]
24+
extensions = ["breathe", "exhale"]
1825

1926
exclude_patterns = []
2027

@@ -26,4 +33,21 @@
2633
# Breathe Configuration
2734
breathe_default_project = "ReactPhysics3D"
2835

36+
# Setup the exhale extension
37+
exhale_args = {
38+
# These arguments are required
39+
"containmentFolder": "./api",
40+
"rootFileName": "library_root.rst",
41+
"doxygenStripFromPath": "../../../",
42+
# Heavily encouraged optional argument (see docs)
43+
"rootFileTitle": "C++ API Reference",
44+
"afterTitleDescription": "This section describes the API of the library.",
45+
# Suggested optional arguments
46+
"createTreeView": True,
47+
"exhaleExecutesDoxygen": False,
48+
}
49+
50+
# Tell sphinx what the primary language being documented is.
51+
primary_domain = 'cpp'
52+
2953
highlight_language = 'c++'

documentation/sphinx/source/index.rst

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,6 @@ ReactPhysics3D
88

99
.. toctree::
1010
:maxdepth: 2
11-
:caption: Contents:
1211

13-
14-
15-
Indices and tables
16-
==================
17-
18-
* :ref:`genindex`
19-
* :ref:`modindex`
20-
* :ref:`search`
21-
22-
User Manual
23-
===========
24-
25-
26-
.. include:: user_manual/user_manual.rst
27-
28-
C++ API Reference
29-
=================
30-
31-
.. doxygenindex::
12+
introduction
13+
api/library_root

documentation/sphinx/source/user_manual/user_manual.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/body/Body.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ using namespace reactphysics3d;
3636

3737
// Constructor
3838
/**
39-
* @param transform The transform of the body
40-
* @param world The physics world where the body is created
41-
* @param id ID of the body
39+
* @param world The reference to the physics world where the body is created
40+
* @param entity Entity of the body
4241
*/
4342
Body::Body(PhysicsWorld& world, Entity entity)
4443
: mEntity(entity), mWorld(world), mIsDebugEnabled(false) {
@@ -133,8 +132,8 @@ uint32 Body::getNbColliders() const {
133132

134133
// Return a const pointer to a given collider of the body
135134
/**
136-
* @param index Index of a Collider of the body
137-
* @return The const pointer of a given collider of the body
135+
* @param colliderIndex Index of a Collider of the body
136+
* @return The const pointer to the requested collider
138137
*/
139138
const Collider* Body::getCollider(uint32 colliderIndex) const {
140139

@@ -147,8 +146,8 @@ const Collider* Body::getCollider(uint32 colliderIndex) const {
147146

148147
// Return a pointer to a given collider of the body
149148
/**
150-
* @param index Index of a Collider of the body
151-
* @return The pointer of a given collider of the body
149+
* @param colliderIndex Index of a Collider of the body
150+
* @return The pointer to the requested collider
152151
*/
153152
Collider* Body::getCollider(uint32 colliderIndex) {
154153

0 commit comments

Comments
 (0)