Skip to content
Snippets Groups Projects
Verified Commit 0db3faab authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#96] Added doxygen comments to define modules as groups

parent 9632a747
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
Pipeline #27228 passed
Showing
with 219 additions and 22 deletions
......@@ -36,6 +36,12 @@
namespace vkcv::asset {
/**
* @defgroup vkcv_asset Asset Loader Module
* A module to load assets like scenes, meshes and textures.
* @{
*/
/**
* These return codes are limited to the asset loader module. If unified return
* codes are defined for the vkcv framework, these will be used instead.
......@@ -321,4 +327,6 @@ int loadScene(const std::filesystem::path &path, Scene &scene);
*/
Texture loadTexture(const std::filesystem::path& path);
/** @} */
} // end namespace vkcv::asset
......@@ -8,6 +8,12 @@
namespace vkcv::camera {
/**
* @defgroup vkcv_camera Camera Module
* A module to manage intrinsic and extrinsic parameters with camera instances.
* @{
*/
/**
* @brief Used to create a camera which governs the view and projection matrices.
*/
......@@ -207,4 +213,6 @@ namespace vkcv::camera {
void setUp(const glm::vec3 &up);
};
/** @} */
}
......@@ -5,6 +5,11 @@
namespace vkcv::camera {
/**
* @addtogroup vkcv_camera
* @{
*/
/**
* @brief Used as a base class for defining camera controller classes with different behaviors, e.g. the
* #PilotCameraController.
......@@ -69,4 +74,6 @@ namespace vkcv::camera {
virtual void gamepadCallback(int gamepadIndex, Camera &camera, double frametime) = 0;
};
/** @} */
}
\ No newline at end of file
......@@ -9,6 +9,11 @@
namespace vkcv::camera {
/**
* @addtogroup vkcv_camera
* @{
*/
/**
* @brief Used for specifying existing types of camera controllers when adding a new controller object to the
* #CameraManager.
......@@ -192,4 +197,7 @@ namespace vkcv::camera {
*/
void update(double deltaTime);
};
/** @} */
}
......@@ -4,6 +4,11 @@
namespace vkcv::camera {
/**
* @addtogroup vkcv_camera
* @{
*/
/**
* @brief Used to move around a camera object in world space.
*/
......@@ -111,4 +116,6 @@ namespace vkcv::camera {
void gamepadCallback(int gamepadIndex, Camera &camera, double frametime);
};
/** @} */
}
\ No newline at end of file
......@@ -4,6 +4,11 @@
namespace vkcv::camera {
/**
* @addtogroup vkcv_camera
* @{
*/
/**
* @brief Used to orbit a camera around its center point.
*/
......@@ -106,4 +111,6 @@ namespace vkcv::camera {
void gamepadCallback(int gamepadIndex, Camera &camera, double frametime);
};
/** @} */
}
\ No newline at end of file
......@@ -9,29 +9,73 @@
namespace vkcv::gui {
/**
* @defgroup vkcv_gui GUI Module
* A module to manage ImGUI integration for VkCV applications.
* @{
*/
/**
* Class to manage ImGui integration for VkCV.
*/
class GUI final {
private:
/**
* Window handle of the currently used window to draw user interface on.
*/
WindowHandle m_windowHandle;
/**
* Reference to the current Core instance.
*/
Core& m_core;
/**
* Reference to the current Context instance.
*/
const Context& m_context;
/**
* ImGui context for drawing GUI.
*/
ImGuiContext* m_gui_context;
/**
* Vulkan handle for the ImGui descriptor pool.
*/
vk::DescriptorPool m_descriptor_pool;
/**
* Vulkan handle for the ImGui render pass.
*/
vk::RenderPass m_render_pass;
/**
* Event handle for pressing a mouse button.
*/
event_handle<int,int,int> f_mouseButton;
/**
* Event handle for scrolling with the mouse or touchpad.
*/
event_handle<double,double> f_mouseScroll;
/**
* Event handle for pressing a key.
*/
event_handle<int,int,int,int> f_key;
/**
* Event handle for typing a character.
*/
event_handle<unsigned int> f_char;
public:
/**
* Constructor of a new instance of ImGui management
* Constructor of a new instance for ImGui management.
*
* @param core Valid #Core instance of the framework
* @param window Valid #Window instance of the framework
* @param[in,out] core Valid Core instance of the framework
* @param[in,out] window Valid Window instance of the framework
*/
GUI(Core& core, WindowHandle& windowHandle);
......@@ -42,12 +86,12 @@ namespace vkcv::gui {
GUI& operator=(GUI&& other) = delete;
/**
* Destructor of a #GUI instance
* Destructor of a GUI instance.
*/
virtual ~GUI();
/**
* Sets up a new frame for ImGui to draw
* Sets up a new frame for ImGui to draw.
*/
void beginGUI();
......@@ -59,4 +103,6 @@ namespace vkcv::gui {
};
/** @} */
}
......@@ -6,13 +6,26 @@
#include <vkcv/Handles.hpp>
namespace vkcv::material {
/**
* @defgroup vkcv_material Material Module
* A module to manage standardized materials for rendering.
* @{
*/
/**
* Enum to handle standardized material types.
*/
enum class MaterialType {
PBR_MATERIAL = 1,
UNKNOWN = 0
};
/**
* Class to manage required handles for materials using
* a wide range of textures with separate samplers and factors.
*/
class Material {
private:
struct Texture {
......@@ -70,5 +83,7 @@ namespace vkcv::material {
const float emissiveFactor [3]);
};
/** @} */
}
......@@ -4,15 +4,24 @@
namespace vkcv::meshlet
{
/**
* Reorders the index buffer, simulating a LRU cache, so that vertices are grouped together in close triangle patches
* @param idxBuf current IndexBuffer
* @param vertexCount of the mesh
* @return new reordered index buffer to replace the input index buffer
* References:
* https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html
* https://www.martin.st/thesis/efficient_triangle_reordering.pdf
* https://github.com/vivkin/forsyth/blob/master/forsyth.h
*/
VertexCacheReorderResult forsythReorder(const std::vector<uint32_t> &idxBuf, const size_t vertexCount);
/**
* @addtogroup vkcv_meshlet
* @{
*/
/**
* Reorders the index buffer, simulating a LRU cache, so that vertices are grouped together in close triangle patches
* @param idxBuf current IndexBuffer
* @param vertexCount of the mesh
* @return new reordered index buffer to replace the input index buffer
* References:
* https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html
* https://www.martin.st/thesis/efficient_triangle_reordering.pdf
* https://github.com/vivkin/forsyth/blob/master/forsyth.h
*/
VertexCacheReorderResult forsythReorder(const std::vector<uint32_t> &idxBuf, const size_t vertexCount);
/** @} */
}
......@@ -7,6 +7,12 @@
namespace vkcv::meshlet {
/**
* @defgroup vkcv_meshlet Meshlet Module
* A module to convert meshes into meshlets for rendering via mesh shaders.
* @{
*/
struct Vertex {
glm::vec3 position;
float padding0;
......@@ -56,4 +62,6 @@ namespace vkcv::meshlet {
const std::vector<uint8_t>& indexData,
vkcv::asset::IndexType indexType);
/** @} */
}
\ No newline at end of file
......@@ -5,6 +5,12 @@
#include <iostream>
namespace vkcv::meshlet {
/**
* @addtogroup vkcv_meshlet
* @{
*/
/**
* reorders the IndexBuffer, so all usages of vertices to triangle are as close as possible
* @param indexBuffer32Bit current IndexBuffer
......@@ -20,4 +26,7 @@ namespace vkcv::meshlet {
*/
VertexCacheReorderResult tipsifyMesh(const std::vector<uint32_t> &indexBuffer32Bit,
const int vertexCount, const unsigned int cacheSize = 20);
/** @} */
}
\ No newline at end of file
......@@ -5,6 +5,11 @@
#include <glm/vec3.hpp>
namespace vkcv::scene {
/**
* @addtogroup vkcv_scene
* @{
*/
class Bounds {
private:
......@@ -65,5 +70,7 @@ namespace vkcv::scene {
};
std::ostream& operator << (std::ostream& out, const Bounds& bounds);
/** @} */
}
......@@ -4,9 +4,16 @@
#include "vkcv/scene/Bounds.hpp"
namespace vkcv::scene {
/**
* @addtogroup vkcv_scene
* @{
*/
Bounds transformBounds(const glm::mat4& transform, const Bounds& bounds, bool* negative_w = nullptr);
bool checkFrustum(const glm::mat4& transform, const Bounds& bounds);
/** @} */
}
......@@ -7,6 +7,11 @@
#include "MeshPart.hpp"
namespace vkcv::scene {
/**
* @addtogroup vkcv_scene
* @{
*/
typedef typename event_function<const glm::mat4&, const glm::mat4&, PushConstants&, vkcv::DrawcallInfo&>::type RecordMeshDrawcallFunction;
......@@ -48,5 +53,7 @@ namespace vkcv::scene {
const Bounds& getBounds() const;
};
/** @} */
}
......@@ -9,6 +9,11 @@
#include "Bounds.hpp"
namespace vkcv::scene {
/**
* @addtogroup vkcv_scene
* @{
*/
class Scene;
class Mesh;
......@@ -51,4 +56,6 @@ namespace vkcv::scene {
};
/** @} */
}
......@@ -8,6 +8,11 @@
#include "Mesh.hpp"
namespace vkcv::scene {
/**
* @addtogroup vkcv_scene
* @{
*/
class Scene;
......@@ -57,5 +62,7 @@ namespace vkcv::scene {
const Bounds& getBounds() const;
};
/** @} */
}
......@@ -11,6 +11,12 @@
#include "Node.hpp"
namespace vkcv::scene {
/**
* @defgroup vkcv_scene Scene Module
* A module to manage basic scene rendering with CPU-side frustum culling.
* @{
*/
class Scene {
friend class MeshPart;
......@@ -69,5 +75,7 @@ namespace vkcv::scene {
static Scene load(Core& core, const std::filesystem::path &path);
};
/** @} */
}
\ No newline at end of file
......@@ -8,6 +8,12 @@
#include <vkcv/ShaderStage.hpp>
namespace vkcv::shader {
/**
* @defgroup vkcv_shader Shader Compiler Module
* A module to use runtime shader compilation.
* @{
*/
typedef typename event_function<ShaderStage, const std::filesystem::path&>::type ShaderCompiledFunction;
......@@ -29,5 +35,7 @@ namespace vkcv::shader {
void setDefine(const std::string& name, const std::string& value);
};
/** @} */
}
......@@ -6,6 +6,11 @@
#include "Compiler.hpp"
namespace vkcv::shader {
/**
* @addtogroup vkcv_shader
* @{
*/
class GLSLCompiler : public Compiler {
private:
......@@ -29,5 +34,7 @@ namespace vkcv::shader {
const std::filesystem::path& includePath = "", bool update = false) override;
};
/** @} */
}
......@@ -3,6 +3,11 @@
#include "Upscaling.hpp"
namespace vkcv::upscaling {
/**
* @addtogroup vkcv_upscaling
* @{
*/
class BilinearUpscaling : public Upscaling {
private:
......@@ -15,4 +20,6 @@ namespace vkcv::upscaling {
};
/** @} */
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment