Browse Source

Documentation: organizing the classes into "modules".

While namespaces act for hierarchy, modules are something like "tags" -
usable when you want to check related classes of e.g. CubeMapTexture.

Not sure how to name module for Math and Physics namespaces and
Contexts/Trade, though.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
79945ab6fc
  1. 29
      doc/groups.dox
  2. 5
      doc/mainpage.dox
  3. 9
      doc/namespaces.dox
  4. 2
      src/AbstractImage.h
  5. 2
      src/AbstractShaderProgram.h
  6. 2
      src/AbstractTexture.h
  7. 2
      src/Buffer.h
  8. 6
      src/BufferedImage.h
  9. 2
      src/BufferedTexture.h
  10. 2
      src/Camera.h
  11. 2
      src/CubeMapTexture.h
  12. 2
      src/CubeMapTextureArray.h
  13. 2
      src/Framebuffer.h
  14. 6
      src/Image.h
  15. 2
      src/IndexedMesh.h
  16. 2
      src/Light.h
  17. 2
      src/Math/MathTypeTraits.h
  18. 2
      src/Mesh.h
  19. 2
      src/MeshTools/Clean.h
  20. 2
      src/MeshTools/CombineIndexedArrays.h
  21. 6
      src/MeshTools/CompressIndices.h
  22. 6
      src/MeshTools/FlipNormals.h
  23. 2
      src/MeshTools/GenerateFlatNormals.h
  24. 6
      src/MeshTools/Interleave.h
  25. 2
      src/MeshTools/Subdivide.h
  26. 2
      src/MeshTools/Tipsify.h
  27. 2
      src/Object.h
  28. 2
      src/Primitives/Capsule.h
  29. 4
      src/Primitives/Cube.h
  30. 4
      src/Primitives/Icosphere.h
  31. 2
      src/Primitives/Plane.h
  32. 4
      src/Primitives/UVSphere.h
  33. 6
      src/Query.h
  34. 2
      src/Renderbuffer.h
  35. 4
      src/Scene.h
  36. 2
      src/Shader.h
  37. 2
      src/Shaders/PhongShader.h
  38. 6
      src/SizeTraits.h
  39. 6
      src/Texture.h
  40. 6
      src/TypeTraits.h

29
doc/groups.dox

@ -0,0 +1,29 @@
namespace Magnum {
/** @page modules */
/**
@defgroup scene Scene graph
@brief %Scene hierarchy, cameras, lights and other objects
*/
/**
@defgroup mesh Meshes
@brief Creating, modifying and rendering meshes
*/
/**
@defgroup rendering Rendering
@brief %Shader, buffer and mesh management, render queries
*/
/** @ingroup rendering
@defgroup textures Textures
@brief Access to OpenGL textures, image data wrappers and framebuffer operations
*/
/**
@defgroup utility Utility
@brief Various supporting utility classes
*/
}

5
doc/mainpage.dox

@ -50,6 +50,11 @@ in step-by-step tutorial. Then you can dig deeper and try @ref example-index
"other examples", read about fundamental principles in the documentation or "other examples", read about fundamental principles in the documentation or
start experimenting on your own! start experimenting on your own!
@subsection module-overview Module overview
Classes in %Magnum are grouped into a few modules for a better orientation.
Check the @ref modules "module index" for more information about all classes.
@subsection getting-started-hacking Hacking Magnum @subsection getting-started-hacking Hacking Magnum
If you want to hack on this engine, if you spotted a bug, need an feature or If you want to hack on this engine, if you spotted a bug, need an feature or

9
doc/namespaces.dox

@ -41,7 +41,8 @@ Functions for computing intersections, distances, areas and volumes.
/** @dir MeshTools /** @dir MeshTools
* @brief Namespace Magnum::MeshTools * @brief Namespace Magnum::MeshTools
*/ */
/** @namespace Magnum::MeshTools /** @ingroup mesh
@namespace Magnum::MeshTools
@brief %Mesh tools @brief %Mesh tools
Tools for generating, optimizing and cleaning meshes. Tools for generating, optimizing and cleaning meshes.
@ -50,7 +51,8 @@ Tools for generating, optimizing and cleaning meshes.
/** @dir Primitives /** @dir Primitives
* @brief Namespace Magnum::Primitives * @brief Namespace Magnum::Primitives
*/ */
/** @namespace Magnum::Primitives /** @ingroup mesh
@namespace Magnum::Primitives
@brief Primitive library @brief Primitive library
Basic primitives for testing purposes. Basic primitives for testing purposes.
@ -59,7 +61,8 @@ Basic primitives for testing purposes.
/** @dir Shaders /** @dir Shaders
* @brief Namespace Magnum::Shaders * @brief Namespace Magnum::Shaders
*/ */
/** @namespace Magnum::Shaders /** @ingroup rendering
@namespace Magnum::Shaders
@brief Sample shaders @brief Sample shaders
Collection of shaders for testing purposes. Collection of shaders for testing purposes.

2
src/AbstractImage.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief Non-templated base for one-, two- or three-dimensional images @brief Non-templated base for one-, two- or three-dimensional images
See Image, BufferedImage, Trade::ImageData documentation for more information. See Image, BufferedImage, Trade::ImageData documentation for more information.

2
src/AbstractShaderProgram.h

@ -27,7 +27,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup rendering
@brief Base class for shaders @brief Base class for shaders
@section AbstractShaderProgramSubclassing Subclassing workflow @section AbstractShaderProgramSubclassing Subclassing workflow

2
src/AbstractTexture.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief Base for textures @brief Base for textures
@attention Don't forget to call @ref Texture::setWrapping() "setWrapping()", @attention Don't forget to call @ref Texture::setWrapping() "setWrapping()",

2
src/Buffer.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup rendering
@brief Class for managing buffers @brief Class for managing buffers
@todo Support for buffer copying (OpenGL 3.1, ARB_copy_buffer) @todo Support for buffer copying (OpenGL 3.1, ARB_copy_buffer)

6
src/BufferedImage.h

@ -25,6 +25,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup textures
* @{
*/
/** /**
@brief %Buffered image @brief %Buffered image
@ -110,6 +114,8 @@ typedef BufferedImage<2> BufferedImage2D;
/** @brief Three-dimensional buffered image */ /** @brief Three-dimensional buffered image */
typedef BufferedImage<3> BufferedImage3D; typedef BufferedImage<3> BufferedImage3D;
/*@}*/
} }
#endif #endif

2
src/BufferedTexture.h

@ -24,7 +24,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief Buffered texture @brief Buffered texture
This texture is, unlike classic textures such as Texture or CubeMapTexture, This texture is, unlike classic textures such as Texture or CubeMapTexture,

2
src/Camera.h

@ -28,7 +28,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup scene
@brief %Camera object @brief %Camera object
*/ */
class MAGNUM_EXPORT Camera: public Object { class MAGNUM_EXPORT Camera: public Object {

2
src/CubeMapTexture.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief Cube map texture @brief Cube map texture
%Texture used mainly for environemnt maps. See AbstractTexture documentation %Texture used mainly for environemnt maps. See AbstractTexture documentation

2
src/CubeMapTextureArray.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief Cube map texture array @brief Cube map texture array
For information about usage, see CubeMapTexture documentation. For information about usage, see CubeMapTexture documentation.

2
src/Framebuffer.h

@ -26,7 +26,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief %Framebuffer @brief %Framebuffer
@requires_gl30 Extension @extension{EXT,framebuffer_object} @requires_gl30 Extension @extension{EXT,framebuffer_object}

6
src/Image.h

@ -24,6 +24,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup textures
* @{
*/
/** /**
@brief %Image @brief %Image
@ -124,6 +128,8 @@ typedef Image<2> Image2D;
/** @brief Three-dimensional image */ /** @brief Three-dimensional image */
typedef Image<3> Image3D; typedef Image<3> Image3D;
/*@}*/
} }
#endif #endif

2
src/IndexedMesh.h

@ -24,7 +24,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup rendering mesh
* @brief Indexed mesh * @brief Indexed mesh
*/ */
class MAGNUM_EXPORT IndexedMesh: public Mesh { class MAGNUM_EXPORT IndexedMesh: public Mesh {

2
src/Light.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup scene
* @brief Basic light object * @brief Basic light object
* *
* Provides cached light position. * Provides cached light position.

2
src/Math/MathTypeTraits.h

@ -33,7 +33,7 @@
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
/** /** @ingroup utility
@brief Traits class for numeric types @brief Traits class for numeric types
Traits classes are usable for detecting type features at compile time without Traits classes are usable for detecting type features at compile time without

2
src/Mesh.h

@ -30,7 +30,7 @@ namespace Magnum {
class Buffer; class Buffer;
/** /** @ingroup rendering mesh
@brief Base class for managing non-indexed meshes @brief Base class for managing non-indexed meshes
@todo Support for normalized values (e.g. for color as char[4] passed to @todo Support for normalized values (e.g. for color as char[4] passed to

2
src/MeshTools/Clean.h

@ -119,7 +119,7 @@ template<class Vertex, size_t vertexSize = Vertex::Size> class Clean {
} }
#endif #endif
/** /** @ingroup mesh
@brief %Clean the mesh @brief %Clean the mesh
@tparam Vertex Vertex data type @tparam Vertex Vertex data type
@tparam vertexSize How many initial vertex fields are important (for example, @tparam vertexSize How many initial vertex fields are important (for example,

2
src/MeshTools/CombineIndexedArrays.h

@ -89,7 +89,7 @@ class CombineIndexedArrays {
} }
#endif #endif
/** /** @ingroup mesh
@brief Combine indexed arrays @brief Combine indexed arrays
@param indexedArrays Index and attribute arrays @param indexedArrays Index and attribute arrays
@return Array with resulting indices @return Array with resulting indices

6
src/MeshTools/CompressIndices.h

@ -73,6 +73,10 @@ class CompressIndices {
} }
#endif #endif
/** @addtogroup mesh
* @{
*/
/** /**
@brief Compress vertex indices @brief Compress vertex indices
@param indices Index array @param indices Index array
@ -115,6 +119,8 @@ inline void compressIndices(IndexedMesh* mesh, Buffer::Usage usage, const std::v
return Implementation::CompressIndices{indices}(mesh, usage); return Implementation::CompressIndices{indices}(mesh, usage);
} }
/*@}*/
}} }}
#endif #endif

6
src/MeshTools/FlipNormals.h

@ -24,6 +24,10 @@
namespace Magnum { namespace MeshTools { namespace Magnum { namespace MeshTools {
/** @addtogroup mesh
* @{
*/
/** /**
@brief Flip face winding @brief Flip face winding
@ -57,6 +61,8 @@ inline void flipNormals(std::vector<unsigned int>& indices, std::vector<Vector3>
flipNormals(normals); flipNormals(normals);
} }
/*@}*/
}} }}
#endif #endif

2
src/MeshTools/GenerateFlatNormals.h

@ -26,7 +26,7 @@
namespace Magnum { namespace MeshTools { namespace Magnum { namespace MeshTools {
/** /** @ingroup mesh
@brief Generate flat normals @brief Generate flat normals
@param indices Array of triangle face indexes @param indices Array of triangle face indexes
@param vertices Vertex array @param vertices Vertex array

6
src/MeshTools/Interleave.h

@ -95,6 +95,10 @@ class Interleave {
} }
#endif #endif
/** @addtogroup mesh
* @{
*/
/** /**
@brief %Interleave vertex attributes @brief %Interleave vertex attributes
@param attributes Attribute arrays @param attributes Attribute arrays
@ -144,6 +148,8 @@ template<class ...T> inline void interleave(Mesh* mesh, Buffer* buffer, Buffer::
return Implementation::Interleave()(mesh, buffer, usage, attributes...); return Implementation::Interleave()(mesh, buffer, usage, attributes...);
} }
/*@}*/
}} }}
#endif #endif

2
src/MeshTools/Subdivide.h

@ -84,7 +84,7 @@ template<class Vertex, class Interpolator> class Subdivide {
} }
#endif #endif
/** /** @ingroup mesh
@brief %Subdivide the mesh @brief %Subdivide the mesh
@tparam Vertex Vertex data type @tparam Vertex Vertex data type
@tparam Interpolator See `interpolator` function parameter @tparam Interpolator See `interpolator` function parameter

2
src/MeshTools/Tipsify.h

@ -51,7 +51,7 @@ class MESHTOOLS_EXPORT Tipsify {
} }
#endif #endif
/** /** @ingroup mesh
@brief %Tipsify the mesh @brief %Tipsify the mesh
@param indices Indices array to operate on @param indices Indices array to operate on
@param vertexCount Vertex count @param vertexCount Vertex count

2
src/Object.h

@ -38,7 +38,7 @@ class Camera;
not needed) not needed)
*/ */
/** /** @ingroup scene
* @brief Base for all positioned objects * @brief Base for all positioned objects
* *
* @todo Transform transformation when changing parent, so the object stays in * @todo Transform transformation when changing parent, so the object stays in

2
src/Primitives/Capsule.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Primitives { namespace Magnum { namespace Primitives {
/** /** @ingroup mesh
@brief %Capsule primitive @brief %Capsule primitive
Cylinder along Y axis with hemispheres instead of caps. Cylinder along Y axis with hemispheres instead of caps.

4
src/Primitives/Cube.h

@ -23,7 +23,9 @@
namespace Magnum { namespace Primitives { namespace Magnum { namespace Primitives {
/** @brief %Cube primitive */ /** @ingroup mesh
@brief %Cube primitive
*/
class Cube: public Trade::MeshData { class Cube: public Trade::MeshData {
public: public:
/** @brief Constructor */ /** @brief Constructor */

4
src/Primitives/Icosphere.h

@ -27,7 +27,7 @@ namespace Magnum { namespace Primitives {
template<size_t subdivisions> class Icosphere; template<size_t subdivisions> class Icosphere;
/** /** @ingroup mesh
@brief %Icosphere primitive with zero subdivisions @brief %Icosphere primitive with zero subdivisions
@todo Use own computed (and more precise) icosahedron data, not these stolen @todo Use own computed (and more precise) icosahedron data, not these stolen
@ -39,7 +39,7 @@ template<> class Icosphere<0>: public Trade::MeshData {
Icosphere(); Icosphere();
}; };
/** /** @ingroup mesh
* @brief %Icosphere primitive * @brief %Icosphere primitive
* @tparam subdivisions Number of subdivisions * @tparam subdivisions Number of subdivisions
*/ */

2
src/Primitives/Plane.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Primitives { namespace Magnum { namespace Primitives {
/** /** @ingroup mesh
@brief %Plane primitive @brief %Plane primitive
2x2 plane with normals in positive Z direction. 2x2 plane with normals in positive Z direction.

4
src/Primitives/UVSphere.h

@ -23,7 +23,9 @@
namespace Magnum { namespace Primitives { namespace Magnum { namespace Primitives {
/** @brief UV Sphere primitive */ /** @ingroup mesh
@brief UV Sphere primitive
*/
class UVSphere: public Capsule { class UVSphere: public Capsule {
public: public:
/** /**

6
src/Query.h

@ -23,6 +23,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup rendering
* @{
*/
/** /**
@brief Base class for queries @brief Base class for queries
@ -279,6 +283,8 @@ class TimeQuery: public AbstractQuery {
} }
}; };
/*@}*/
} }
#endif #endif

2
src/Renderbuffer.h

@ -23,7 +23,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup textures
@brief %Renderbuffer @brief %Renderbuffer
Attachable to Framebuffer as render target. Attachable to Framebuffer as render target.

4
src/Scene.h

@ -23,7 +23,9 @@
namespace Magnum { namespace Magnum {
/** @brief %Scene */ /** @ingroup scene
@brief %Scene
*/
class MAGNUM_EXPORT Scene: public Object { class MAGNUM_EXPORT Scene: public Object {
public: public:
/** @brief Constructor */ /** @brief Constructor */

2
src/Shader.h

@ -26,7 +26,7 @@
namespace Magnum { namespace Magnum {
/** /** @ingroup rendering
* @brief %Shader * @brief %Shader
* *
* Allows loading and compiling the shader from file or directly from source * Allows loading and compiling the shader from file or directly from source

2
src/Shaders/PhongShader.h

@ -24,7 +24,7 @@
namespace Magnum { namespace Shaders { namespace Magnum { namespace Shaders {
/** /** @ingroup rendering
@brief Phong shader @brief Phong shader
@requires_gl33 The shader is written in GLSL 3.3, although it should be trivial @requires_gl33 The shader is written in GLSL 3.3, although it should be trivial

6
src/SizeTraits.h

@ -23,6 +23,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup utility
* @{
*/
/** /**
@brief Traits class providing suitable types for given data sizes @brief Traits class providing suitable types for given data sizes
@tparam byte Highest byte needed (counting from zero) @tparam byte Highest byte needed (counting from zero)
@ -171,6 +175,8 @@ template<size_t base> struct Log<base, 0> {
}; };
#endif #endif
/*@}*/
} }
#endif #endif

6
src/Texture.h

@ -23,6 +23,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup textures
* @{
*/
/** /**
@brief %Texture @brief %Texture
@ -163,6 +167,8 @@ typedef Texture<2> Texture2D;
/** @brief Three-dimensional texture */ /** @brief Three-dimensional texture */
typedef Texture<3> Texture3D; typedef Texture<3> Texture3D;
/*@}*/
} }
#endif #endif

6
src/TypeTraits.h

@ -23,6 +23,10 @@
namespace Magnum { namespace Magnum {
/** @addtogroup utility
* @{
*/
/** /**
@brief Traits class for plain OpenGL types @brief Traits class for plain OpenGL types
@ -136,6 +140,8 @@ struct MAGNUM_EXPORT TypeInfo {
/** @todo Other texture types, referenced in glTexImage2D function manual */ /** @todo Other texture types, referenced in glTexImage2D function manual */
/** @todo Using Vector3 for textures? */ /** @todo Using Vector3 for textures? */
/*@}*/
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
template<> struct TypeOf<Type::UnsignedByte> { typedef GLubyte Type; }; template<> struct TypeOf<Type::UnsignedByte> { typedef GLubyte Type; };
template<> struct TypeOf<Type::Byte> { typedef GLbyte Type; }; template<> struct TypeOf<Type::Byte> { typedef GLbyte Type; };

Loading…
Cancel
Save