diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index e1afb52f..43cbd252 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -1,6 +1,9 @@ find_program(SPHINXBUILD_EXECUTABLE sphinx-build DOC "The location of the sphinx-build executable") if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE) + message(STATUS "Found `sphinx-build` at ${SPHINXBUILD_EXECUTABLE}") + set(BUILD_MANUAL YES PARENT_SCOPE) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY) #Generates the HTML docs and the Qt help file which can be opened with "assistant -collectionFile thermite.qhc" #add_custom_target(manual ${SPHINXBUILD_EXECUTABLE} -b qthelp ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${QT_QCOLLECTIONGENERATOR_EXECUTABLE} polyvox.qhcp -o polyvox.qhc) @@ -8,8 +11,9 @@ if(SPHINXBUILD_EXECUTABLE AND QT_QCOLLECTIONGENERATOR_EXECUTABLE) ${SPHINXBUILD_EXECUTABLE} -b html -c ${CMAKE_CURRENT_BINARY_DIR} #Load the conf.py from the binary dir ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Building PolyVox manual" ) - set(BUILD_MANUAL YES PARENT_SCOPE) + add_dependencies(manual doc) else() message(STATUS "`sphinx-build` was not found. Try setting SPHINXBUILD_EXECUTABLE to its location.") set(BUILD_MANUAL NO PARENT_SCOPE) diff --git a/documentation/conf.in.py b/documentation/conf.in.py index 93b7d6aa..c1c64eb7 100644 --- a/documentation/conf.in.py +++ b/documentation/conf.in.py @@ -54,7 +54,7 @@ release = '@POLYVOX_VERSION@' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -227,3 +227,6 @@ doxylink = { qthelp_basename = "polyvox" primary_domain = "c++" + +# Default higlighting scheme to use for `code-block` directives +highlight_language = "c++" diff --git a/documentation/index.rst b/documentation/index.rst index 6d076325..27e53a1e 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -9,7 +9,9 @@ Welcome to PolyVox's documentation! Contents: .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + + install Introduction ------------ @@ -26,7 +28,7 @@ The most fundermental construct when working with PolyVox is that of the volume. .. code-block:: c++ - Volume volData(64, 64, 64); + Volume volData(64, 64, 64); As can be seen, the Volume class is templated upon the voxel type. This means it is straight forward to create a volume of integers, floats, or a custom voxel type (see the :polyvox:`Volume documentation ` for more details). In this particular case we have created a volume in which each voxel is an instance of :polyvox:`MaterialDensityPair44`. Each instance of MaterialDensityPair44 holds both a material and a density and uses four bits of data for each. This means that both the material and the density have a range of 0-15, and each voxel requires one byte of storage. For more information about materials and densities please consult the *principles-of-polyvox* document. @@ -45,6 +47,5 @@ Indices and tables ================== * :ref:`genindex` -* :ref:`modindex` * :ref:`search`