Browse Source

Documentation updates, "markdownization".

All HTML code and Doxygen shortcuts such as @c, @b and @em are now
rewritten using Markdown syntax, which makes it more readable.

Also updated Doxyfile. Doxygen 1.8 at least is required to generate
the documentation now.
pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
1cf69616a3
  1. 117
      Doxyfile
  2. 33
      doc/MainPage.dox
  3. 12
      src/AbstractShaderProgram.h
  4. 14
      src/AbstractTexture.h
  5. 4
      src/Camera.h
  6. 20
      src/CubeMapTexture.h
  7. 4
      src/Math/GeometryUtils.h
  8. 2
      src/Math/Math.h
  9. 9
      src/Math/Matrix.h
  10. 6
      src/Math/Vector.h
  11. 2
      src/Mesh.h
  12. 2
      src/MeshTools/Clean.h
  13. 4
      src/MeshTools/CompressIndices.h
  14. 4
      src/MeshTools/Subdivide.h
  15. 7
      src/MeshTools/Tipsify.h
  16. 26
      src/SizeTraits.h
  17. 11
      src/Texture.h
  18. 9
      src/Trade/AbstractImporter.h

117
Doxyfile

@ -1,4 +1,4 @@
# Doxyfile 1.7.5.1
# Doxyfile 1.8.0
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@ -195,6 +195,13 @@ TAB_SIZE = 8
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
# "class=itcl::class" will allow you to use the command class in the
# itcl::class meaning.
TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
@ -233,6 +240,15 @@ OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
# comments according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you
# can mix doxygen, HTML, and XML commands with Markdown formatting.
# Disable only in case of backward compatibilities issues.
MARKDOWN_SUPPORT = YES
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
@ -315,10 +331,21 @@ TYPEDEF_HIDES_STRUCT = NO
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 0
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
# same symbol appear multiple times in the code, doxygen keeps a cache of
# pre-resolved symbols. If the cache is too small doxygen will become slower.
# If the cache is too large, memory is wasted. The cache size is given by this
# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@ -335,6 +362,10 @@ EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
EXTRACT_PACKAGE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
@ -565,7 +596,8 @@ LAYOUT_FILE =
# .bib extension is automatically appended if omitted. Using this command
# requires the bibtex tool to be installed. See also
# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
# of the bibliography can be controlled using LATEX_BIB_STYLE.
# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
# feature you need bibtex and perl available in the search path.
CITE_BIB_FILES =
@ -658,14 +690,15 @@ FILE_PATTERNS = *.cpp \
RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
# Note that relative paths are relative to directory from which doxygen is run.
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
@ -854,7 +887,7 @@ HTML_FILE_EXTENSION = .html
# standard header. Note that when using a custom header you are responsible
# for the proper inclusion of any scripts and style sheets that doxygen
# needs, which is dependent on the configuration options used.
# It is adviced to generate a default header using "doxygen -w html
# It is advised to generate a default header using "doxygen -w html
# header.html footer.html stylesheet.css YourConfigFile" and then modify
# that header. Note that the header is subject to change so you typically
# have to redo this when upgrading to a newer version of doxygen or when
@ -873,7 +906,7 @@ HTML_FOOTER =
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet. Note that doxygen will try to copy
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
# style sheet in the HTML output directory as well, or it will be erased!
HTML_STYLESHEET =
@ -887,7 +920,7 @@ HTML_STYLESHEET =
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
# Doxygen will adjust the colors in the stylesheet and background images
# Doxygen will adjust the colors in the style sheet and background images
# according to this color. Hue is specified as an angle on a colorwheel,
# see http://en.wikipedia.org/wiki/Hue for more information.
# For instance the value 0 represents red, 60 is yellow, 120 is green,
@ -1082,19 +1115,14 @@ GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
# at top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it. Since the tabs have the same information as the
# navigation tree you can set this option to NO if you already set
# GENERATE_TREEVIEW to YES.
DISABLE_INDEX = NO
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
# (range [0,1..20]) that doxygen will group on one line in the generated HTML
# documentation. Note that a value of 0 will completely suppress the enum
# values from appearing in the overview section.
ENUM_VALUES_PER_LINE = 4
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information.
# If the tag value is set to YES, a side panel will be generated
@ -1102,9 +1130,18 @@ ENUM_VALUES_PER_LINE = 4
# is generated for HTML Help). For this to work a browser that supports
# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
# Windows users are probably better off using the HTML help feature.
# Since the tree basically has the same information as the tab index you
# could consider to set DISABLE_INDEX to NO when enabling this option.
GENERATE_TREEVIEW = NO
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
# (range [0,1..20]) that doxygen will group on one line in the generated HTML
# documentation. Note that a value of 0 will completely suppress the enum
# values from appearing in the overview section.
ENUM_VALUES_PER_LINE = 4
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
# and Class Hierarchy pages using a tree view instead of an ordered list.
@ -1141,7 +1178,7 @@ FORMULA_TRANSPARENT = YES
# (see http://www.mathjax.org) which uses client side Javascript for the
# rendering instead of using prerendered bitmaps. Use this if you do not
# have LaTeX installed or if you want to formulas look prettier in the HTML
# output. When enabled you also need to install MathJax separately and
# output. When enabled you may also need to install MathJax separately and
# configure the path to it using the MATHJAX_RELPATH option.
USE_MATHJAX = NO
@ -1150,10 +1187,11 @@ USE_MATHJAX = NO
# HTML output directory using the MATHJAX_RELPATH option. The destination
# directory should contain the MathJax.js script. For instance, if the mathjax
# directory is located at the same level as the HTML output directory, then
# MATHJAX_RELPATH should be ../mathjax. The default value points to the
# mathjax.org site, so you can quickly see the result without installing
# MathJax, but it is strongly recommended to install a local copy of MathJax
# before deployment.
# MATHJAX_RELPATH should be ../mathjax. The default value points to
# the MathJax Content Delivery Network so you can quickly see the result without
# installing MathJax.
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
@ -1312,7 +1350,7 @@ COMPACT_RTF = NO
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# Load style sheet definitions from file. Syntax is similar to doxygen's
# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
@ -1503,22 +1541,18 @@ SKIP_FUNCTION_MACROS = YES
# Configuration::additions related to external references
#---------------------------------------------------------------------------
# The TAGFILES option can be used to specify one or more tagfiles.
# Optionally an initial location of the external documentation
# can be added for each tagfile. The format of a tag file without
# this location is as follows:
# The TAGFILES option can be used to specify one or more tagfiles. For each
# tag file the location of the external documentation should be added. The
# format of a tag file without this location is as follows:
#
# TAGFILES = file1 file2 ...
# Adding location for the tag files is done as follows:
#
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
# does not have to be run to correct the links.
# Note that each tag file must have a unique name
# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
# where "loc1" and "loc2" can be relative or absolute paths
# or URLs. Note that each tag file must have a unique name (where the name does
# NOT include the path). If a tag file is not located in the directory in which
# doxygen is run, you must also specify the path to the tagfile here.
TAGFILES =
@ -1609,7 +1643,7 @@ DOT_FONTPATH =
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
# CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
@ -1631,6 +1665,15 @@ GROUP_GRAPHS = YES
UML_LOOK = NO
# If the UML_LOOK tag is enabled, the fields and methods are shown inside
# the class node. If there are many fields or methods and many nodes the
# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
# threshold limits the number of items for each type to make the size more
# managable. Set this to 0 for no limit. Note that the threshold may be
# exceeded by 50% before the limit is enforced.
UML_LIMIT_NUM_FIELDS = 10
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.

33
doc/MainPage.dox

@ -1,24 +1,31 @@
namespace Magnum {
/** @mainpage
<p><strong>%Magnum</strong> is simple graphical engine written in C++11 and OpenGL 3 Core Profile. Features:</p>
<ul>
<li>Easy-to-use templated @ref Math "mathematical library" for matrix/vector calculations.</li>
<li>Comprehensive use of C++11 features for security, performance and ease of development.</li>
<li>Hierarchical @ref Scene "scene graph" which supports transformation caching for better performance, classes for convenient usage of @ref AbstractShaderProgram "shaders", @ref Buffer "buffers" and @ref Texture "textures".</li>
<li>@ref MeshTools "Mesh tools" for cleaning, optimizing and generating meshes.</li>
<li>Collection of pre-made @ref Primitives "graphic primitives" and @ref Shaders "shaders" for testing purposes.</li>
</ul>
%Magnum is simple graphical engine written in C++11 and OpenGL 3 Core Profile.
Features:
- Easy-to-use templated @ref Math "mathematical library" for matrix/vector
calculations.
- Comprehensive use of C++11 features for security, performance and ease of
development.
- Hierarchical @ref Scene "scene graph" which supports transformation caching
for better performance, classes for convenient usage of
@ref AbstractShaderProgram "shaders", @ref Buffer "buffers" and
@ref Texture "textures".
- @ref MeshTools "Mesh tools" for cleaning, optimizing and generating meshes.
Collection of pre-made @ref Primitives "graphic primitives" and
@ref Shaders "shaders" for testing purposes.
@section BasicUsage Basic usage
<p>%Scene in %Magnum is composed of hierarchically connected object instances.
%Scene in %Magnum is composed of hierarchically connected object instances.
To build the scene, you need Scene object with assigned Camera and some Object
instances. When rendering using Scene::draw(), the engine goes through all
objects connected to the scene and calls Object::draw() on them.</p>
<p>All objects are by default empty. To make object renderable in the scene,
instances. When rendering using Camera::draw(), the engine goes through all
objects connected to camera scene and calls Object::draw() on them.
All objects are by default empty. To make object renderable in the scene,
you must reimplement Object::draw(), and for example bind an
@ref AbstractShaderProgram "shader", @ref Texture "texture" and
render an prepared @ref Mesh "mesh".</p>
render an prepared @ref Mesh "mesh".
*/
}

12
src/AbstractShaderProgram.h

@ -31,16 +31,16 @@ namespace Magnum {
This class is designed to be used via subclassing. Subclasses define these
functions and properties:
- <strong>Attribute location</strong> typedefs defining locations and types
for attribute binding with Mesh::bindAttribute(), for example:
- **Attribute location** typedefs defining locations and types for attribute
binding with Mesh::bindAttribute(), for example:
@code
typedef Attribute<0, Vector4> Vertex;
typedef Attribute<1, Vector3> Normal;
typedef Attribute<2, Vector2> TextureCoords;
@endcode
See also bindAttribute().
- @b Constructor, which attaches particular shaders, links the program, binds
attribute locations and gets uniform locations, for example:
- **Constructor**, which attaches particular shaders, links the program,
binds attribute locations and gets uniform locations, for example:
@code
// Load shaders from file and attach them to the program
Shader* vertexShader = Shader::fromFile(Shader::Vertex, "PhongShader.vert");
@ -63,7 +63,7 @@ typedef Attribute<2, Vector2> TextureCoords;
projectionMatrixUniform = uniformLocation("projectionMatrix");
// more uniforms like light location, colors etc.
@endcode
- <strong>Uniform binding functions</strong>, which set shader uniforms with
- **Uniform binding functions**, which set shader uniforms with
setUniform() and setUniformArray() functions. Example:
@code
void setTransformationMatrixUniform(const Matrix4& matrix) {
@ -90,7 +90,7 @@ class MAGNUM_EXPORT AbstractShaderProgram {
*/
template<size_t i, class T> struct Attribute {
static const size_t Location = i; /**< Location to which the attribute is bound */
typedef T Type; /**< Attribute type */
typedef T Type; /**< %Attribute type */
};
/** @brief Default constructor */

14
src/AbstractTexture.h

@ -135,7 +135,7 @@ class MAGNUM_EXPORT AbstractTexture {
/**
* @brief Constructor
* @param layer %Texture layer (number between 0 and 31)
* @param target Target, e.g. @c GL_TEXTURE_2D.
* @param target Target, e.g. `GL_TEXTURE_2D`.
*
* Creates one OpenGL texture.
*/
@ -197,7 +197,7 @@ class MAGNUM_EXPORT AbstractTexture {
* @brief Set border color
*
* Border color when @ref AbstractTexture::Wrapping "wrapping" is set
* to @c ClampToBorder.
* to `ClampToBorder`.
*/
inline void setBorderColor(const Vector4& color) {
bind();
@ -244,14 +244,14 @@ class MAGNUM_EXPORT AbstractTexture {
/**
* @brief Target for given dimension
*
* Returns @c Target::Texture1D, @c Target::Texture2D or @c Target::Texture3D
* based on dimension count.
* Returns `Target::Texture1D`, `Target::Texture2D` or
* `Target::Texture3D` based on dimension count.
*/
inline constexpr static Target target();
/**
* @brief Set texture wrapping
* @param target Target, such as @c GL_TEXTURE_RECTANGLE
* @param target Target, such as `GL_TEXTURE_RECTANGLE`
* @param wrapping Wrapping type for all texture dimensions
*/
inline static void setWrapping(GLenum target, const Math::Vector<Wrapping, Dimensions>& wrapping);
@ -266,7 +266,7 @@ class MAGNUM_EXPORT AbstractTexture {
* @param type Data type
* @param data %Texture data
*
* Calls @c glTexImage1D, @c glTexImage2D, @c glTexImage3D depending
* Calls `glTexImage1D`, `glTexImage2D`, `glTexImage3D` depending
* on dimension count.
*/
inline static void set(Target target, GLint mipLevel, InternalFormat internalFormat, const Math::Vector<GLsizei, textureDimensions>& dimensions, ColorFormat colorFormat, Type type, const void* data);
@ -293,7 +293,7 @@ class MAGNUM_EXPORT AbstractTexture {
* @param type Data type
* @param data %Texture data
*
* Calls @c glTexSubImage1D, @c glTexSubImage2D, @c glTexSubImage3D
* Calls `glTexSubImage1D`, `glTexSubImage2D`, `glTexSubImage3D`
* depending on dimension count.
*/
inline static void setSub(SubTarget target, GLint mipLevel, const Math::Vector<GLint, textureDimensions>& offset, const Math::Vector<GLsizei, textureDimensions>& dimensions, ColorFormat colorFormat, Type type, const void* data);

4
src/Camera.h

@ -47,7 +47,7 @@ class MAGNUM_EXPORT Camera: public Object {
* @param parent Parent object
*
* Sets orthographic projection to the default OpenGL cube (range
* @f[ [-1; 1] @f] in all directions) and clear color to black.
* @f$ [-1; 1] @f$ in all directions) and clear color to black.
* @see setOrthographic(), setClearColor()
*/
Camera(Object* parent = nullptr);
@ -65,7 +65,7 @@ class MAGNUM_EXPORT Camera: public Object {
* @param far Far clipping plane
*
* The volume of given size will be scaled down to range
* @f[ [-1; 1] @f] on all directions.
* @f$ [-1; 1] @f$ on all directions.
*/
void setOrthographic(GLfloat size, GLfloat near, GLfloat far);

20
src/CubeMapTexture.h

@ -29,16 +29,16 @@ namespace Magnum {
%Texture used mainly for environemnt maps, consisting of 6 square textures
generating 6 faces of the cube as following. Note that all images must be
turned upside down (+Y is top):
<pre>
+----+
| -Y |
+----+----+----+----+
| -Z | -X | +Z | +X |
+----+----+----+----+
| +Y |
+----+
</pre>
When using cube map texture in the shader, use @c samplerCube. Unlike normal
+----+
| -Y |
+----+----+----+----+
| -Z | -X | +Z | +X |
+----+----+----+----+
| +Y |
+----+
When using cube map texture in the shader, use `samplerCube`. Unlike normal
textures, coordinates for cube map textures is signed three-part vector from
the center of the cube, which intersects one of the six sides of the cube map.

4
src/Math/GeometryUtils.h

@ -35,9 +35,9 @@ template<class T> class GeometryUtils {
* @param b Ending point of the line
* @return Value, NaN if the line lies on the plane or infinity if the
* intersection doesn't exist. Intersection point can be then computed
* with <tt>a+intersection(...)*b</tt>. If returned value is in range
* with `a+intersection(...)*b`. If returned value is in range
* @f$ [ 0 ; 1 ] @f$, the intersection is inside the line segment
* defined by @c a and @c b.
* defined by `a` and `b`.
*
* First the parametric equation of the plane is computed,
* @f$ cx + dy + ez = f @f$. Parameters @f$ (c, d, e) @f$ are cross

2
src/Math/Math.h

@ -59,7 +59,7 @@ size_t MAGNUM_EXPORT log(size_t base, size_t number);
* @brief Angle in degrees
*
* Function to make angle entering less error-prone. Converts the value to
* radians at compile time. For example @c deg(180.0f) is converted to @c 3.14f.
* radians at compile time. For example `deg(180.0f)` is converted to `3.14f`.
*/
template<class T> inline constexpr T deg(T value) { return value*PI/180; }

9
src/Math/Matrix.h

@ -56,7 +56,8 @@ template<class T, size_t size> class Matrix {
/**
* @brief Constructor
* @param data One-dimensional array of @c size*size length in column-major order.
* @param data One-dimensional array of `size*size` length in
* column-major order.
*/
inline Matrix(const T* data) { setData(data); }
@ -73,13 +74,15 @@ template<class T, size_t size> class Matrix {
/**
* @brief Raw data
* @return One-dimensional array of @c size*size length in column-major order.
* @return One-dimensional array of `size*size` length in column-major
* order.
*/
inline const T* data() const { return _data; }
/**
* @brief Set raw data
* @param data One-dimensional array of @c size*size length in column-major order.
* @param data One-dimensional array of `size*size` length in
* column-major order.
*
* @bug Creating Matrix<int, 5> from float* ??
*/

6
src/Math/Vector.h

@ -56,7 +56,7 @@ template<class T, size_t size> class Vector {
/**
* @brief Constructor
* @param data Array of @c size length.
* @param data Array with the same size as the vector.
*/
inline Vector(const T* data) { setData(data); }
@ -73,13 +73,13 @@ template<class T, size_t size> class Vector {
/**
* @brief Raw data
* @return Array of @c size length.
* @return Array with the same size as the vector
*/
inline const T* data() const { return _data; }
/**
* @brief Set raw data
* @param data Array of @c size length.
* @param data Array with the same size as the vector
*/
inline void setData(const T* data) {
memcpy(_data, data, size*sizeof(T));

2
src/Mesh.h

@ -187,7 +187,7 @@ class MAGNUM_EXPORT Mesh {
/** @brief Vertex attribute */
struct Attribute {
GLuint attribute; /**< @brief %Attribute ID */
GLint size; /**< @brief How many items of @c type are in the attribute */
GLint size; /**< @brief How many items of `type` are in the attribute */
Type type; /**< @brief %Attribute item type */
GLsizei stride; /**< @brief Distance of two adjacent attributes of this type in interleaved buffer */
const GLvoid* pointer; /**< @brief Pointer to first attribute of this type in the buffer */

2
src/MeshTools/Clean.h

@ -150,7 +150,7 @@ you can just write
@code
MeshTools::clean(indices, vertices, epsilon);
@endcode
However, when you want to specify @c vertexSize template parameter, you have
However, when you want to specify `vertexSize` template parameter, you have
to explicitly specify both of them:
@code
MeshTools::clean<T, 3>(indices, vertices, epsilon);

4
src/MeshTools/CompressIndices.h

@ -108,8 +108,8 @@ class CompressIndices {
This function takes index array and outputs them compressed to smallest
possible size. For example when your indices have maximum number 463, it's
wasteful to store them in array of <tt>unsigned int</tt>s, array of
<tt>unsigned short</tt>s is sufficient.
wasteful to store them in array of `unsigned int`s, array of
`unsigned short`s is sufficient.
This is convenience function supplementing direct usage of CompressIndices
class, instead of

4
src/MeshTools/Subdivide.h

@ -93,11 +93,11 @@ template<class Vertex, class Interpolator> class Subdivide {
/**
@brief %Subdivide the mesh
@tparam Vertex Vertex data type (the same as in MeshBuilder)
@tparam Interpolator See @c interpolator function parameter
@tparam Interpolator See `interpolator` function parameter
@param indices Index array to operate on
@param vertices Vertex array to operate on
@param interpolator Functor or function pointer which interpolates
two adjacent vertices: <tt>Vertex interpolator(Vertex a, Vertex b)</tt>
two adjacent vertices: `Vertex interpolator(Vertex a, Vertex b)`
Goes through all triangle faces and subdivides them into four new. Cleaning
duplicate vertices in the mesh is up to user.

7
src/MeshTools/Tipsify.h

@ -68,10 +68,9 @@ class MESHTOOLS_EXPORT Tipsify {
Optimizes the mesh for vertex-bound applications by rearranging its index
array for beter usage of post-transform vertex cache. Algorithm used:
<em>Pedro V. Sander, Diego Nehab, and Joshua Barczak,
<a href="http://gfx.cs.princeton.edu/pubs/Sander_2007_%3ETR/index.php">Fast
Triangle Reordering for Vertex Locality and Reduced Overdraw</a>, SIGGRAPH
2007</em>.
*Pedro V. Sander, Diego Nehab, and Joshua Barczak - Fast Triangle Reordering
for Vertex Locality and Reduced Overdraw, SIGGRAPH 2007,
http://gfx.cs.princeton.edu/pubs/Sander_2007_%3ETR/index.php*.
This is convenience function supplementing direct usage of Tipsify class,
instead of

26
src/SizeTraits.h

@ -29,18 +29,18 @@ namespace Magnum {
If you use indexed data, you would probably (for performance reasons) want to
use the smallest type which is able to store all indices in given range. This
class provides type suitable for given @b logarithmic size of data. For example,
if you want to store 289 elements, they occupy two bytes, so
<tt>%SizeTraits&lt;<strong>1</strong>&gt;::%SizeType</tt> is @c GLushort. For
convenience you can use Log class to compute logarithms at compile time, e.g.
<tt>%SizeTraits&lt;Log&lt;256, <strong>289</strong>&gt;::%value&gt;::%SizeType</tt>.
class provides type suitable for given **logarithmic** size of data. For
example, if you want to store 289 elements, they occupy two bytes, so
`SizeTraits<1>::%SizeType` is `GLushort`. For convenience you can use Log class
to compute logarithms at compile time, e.g.
`SizeTraits<Log<256, 289>::%value>::%SizeType`.
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
template<size_t byte> struct SizeTraits {
/**
* @brief (Unsigned) type able to index the data
*
* Not implemented for large sizes (> 2<sup>32</sup> elements), because
* Not implemented for large sizes (@f$ > 2^{32} @f$ elements), because
* OpenGL doesn't have any type which would be able to store the indices.
*/
typedef T SizeType;
@ -66,8 +66,8 @@ template<> struct SizeTraits<4> {
/**
@brief Functor for calling templated function with type based on size
@tparam Base Base struct with templated function <tt>run()</tt>. See below
for example.
@tparam Base Base struct with templated function `run()`. See below for
example.
If you have templated function which you want to call with type suitable for
indexing data of some size, you will probably use cascade of IFs, like this:
@ -84,8 +84,8 @@ else if(dataSize < 65536)
@endcode
But this approach leads to repetitive and unmaintainable code, especially if
there are many arguments needed to pass to each function. The solution is to
use this class. The only thing you need is to rename your function to
<tt>run()</tt> and wrap it in a @c struct:
use this class. The only thing you need is to rename your function to `run()`
and wrap it in a `struct`:
@code
struct Foo {
template<class IndexType> Bar run(Arg1 arg1, Arg2 arg2, ...);
@ -106,10 +106,10 @@ template<class Base> struct SizeBasedCall: public Base {
/**
* @brief Functor
* @param arguments Arguments passed to @c Base::run
* @return Return value of @c Base::run
* @param arguments Arguments passed to `Base::run()`
* @return Return value of `Base::run()`
*
* Calls @c Base::run based on data size (given in constructor). If there
* Calls `Base::run()` based on data size (given in constructor). If there
* is no suitable type for indexing given data size, prints message to
* error output and returns default-constructed value.
*/

11
src/Texture.h

@ -27,8 +27,7 @@ namespace Magnum {
@brief %Texture
@tparam dimensions %Texture dimension count
@tparam target %Target. If not set, target is based on dimension
count (@c Target::Texture1D, @c Target::Texture2D or
@c Target::Texture3D).
count (`Target::Texture1D`, `Target::Texture2D` or `Target::Texture3D`).
Template class for one- to three-dimensional textures.
@ -38,16 +37,16 @@ unusable.
The texture is bound via bind() and setting texture uniform on the shader to the
texture (see AbstractShaderProgram::setUniform(GLint, const AbstractTexture*)).
In shader, the texture is used via @c sampler1D, @c sampler2D or @c sampler3D
In shader, the texture is used via `sampler1D`, `sampler2D` or `sampler3D`
depending on dimension count. Note that you can have more than one texture bound
to the shader - the only requirement is to have each texture in another layer.
@section RectangleTextures Rectangle textures
If you want to use rectangle textures, set target in constructor to
@c Target::Rectangle and in shader use @c sampler2DRect. Unlike @c sampler2D,
which accepts coordinates between 0 and 1, @c sampler2DRect accepts coordinates
between 0 and @c textureSizeInGivenDirection-1. Note that rectangle textures
`Target::Rectangle` and in shader use `sampler2DRect`. Unlike `sampler2D`,
which accepts coordinates between 0 and 1, `sampler2DRect` accepts coordinates
between 0 and `textureSizeInGivenDirection-1`. Note that rectangle textures
don't support mipmapping and repeating wrapping modes, see @ref Texture::Filter
"Filter", @ref Texture::Mipmap "Mipmap" and generateMipmap() documentation
for more information.

9
src/Trade/AbstractImporter.h

@ -47,13 +47,14 @@ Importer is used for importing data like scenes, lights, objects, images,
textures etc.
@section AbstractImporterSubclassing Subclassing
<p>Plugin implements function features(), one or more open() functions,
Plugin implements function features(), one or more open() functions,
function close() and one or more pairs of data access functions, based on
which features are supported in given format.</p>
<p>For multi-data formats file opening shouldn't take long, all parsing should
which features are supported in given format.
For multi-data formats file opening shouldn't take long, all parsing should
be done in data parsing functions, because the user might want to import only
some data. This is obviously not the case for single-data formats like images,
as the file contains all data user wants to import.</p>
as the file contains all data user wants to import.
*/
class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::Plugin {
PLUGIN_INTERFACE("cz.mosra.magnum.Trade.AbstractImporter/0.1")

Loading…
Cancel
Save