diff --git a/doc/coreModules.doxy b/doc/coreModules.doxy new file mode 100644 index 00000000..97156108 --- /dev/null +++ b/doc/coreModules.doxy @@ -0,0 +1,58 @@ +/** + \defgroup core GLM Core + + \brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible. + + The GLM core consists of \ref core_types "C++ types that mirror GLSL types", + \ref core_funcs "C++ functions that mirror the GLSL functions". It also includes + \ref core_precision "a set of precision-based types" that can be used in the appropriate + functions. The C++ types are all based on a basic set of \ref core_template "template types". +**/ + + +/** + \defgroup core_types Core GLSL Types + + \brief The standard types defined by the GLSL specification. + + These types are all typedefs of more generalized, template types. To see the definiton + of the equivalent template types, go to \ref core_template. + + \ingroup core +**/ + +/** + \defgroup core_precision Core Precision Types + + \brief Non-GLSL types that are used to define precision-based types. + + The GLSL language allows the user to define the precision of a particular variable. + In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility + with OpenGL ES's precision qualifiers, where they \em do have an effect. + + C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: + a number of typedefs of the \ref core_template that use a particular precision. + + None of these types make any guarantees about the actual precision used. + + \ingroup core +**/ + +/** + \defgroup core_template Core Template Types + + \brief The generic template types used as the basis for the core types. + + These types are all templates used to define the actual \ref core_types. + + \ingroup core +**/ + +/** + \defgroup core_funcs Core GLSL Functions + + \brief The functions defined by the GLSL specification. + + \ingroup core +**/ + diff --git a/doc/doxyfile b/doc/doxyfile index 75a915c3..128e5113 100644 --- a/doc/doxyfile +++ b/doc/doxyfile @@ -590,7 +590,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../glm +INPUT = ../glm . # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -607,7 +607,7 @@ INPUT_ENCODING = UTF-8 # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = *.hpp +FILE_PATTERNS = *.hpp *.doxy # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -641,7 +641,7 @@ EXCLUDE_PATTERNS = # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = detail +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see diff --git a/doc/experimentalModules.doxy b/doc/experimentalModules.doxy new file mode 100644 index 00000000..21085ba6 --- /dev/null +++ b/doc/experimentalModules.doxy @@ -0,0 +1,114 @@ +/** + \defgroup gtc GLM Core Extensions + + \brief Functions and types that GLSL does not provide, but are useful to have. + + Core extensions differ from \ref gtx "experimental extensions" in that core extensions + are fairly stable. The API for experimental extensions is expected to change + significantly between versions. + + You can bring all of the extensions, core or experimental, in by + including Otherwise, you will have to include each extension + by including a specific file. +**/ + +/** + \defgroup gtc_half_float Half Float Core Extension + \ingroup gtc + + \brief Defines the half-float type, along with various typedefs for vectors and matrices. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_matrix_access Matrix Access Core Extension + \ingroup gtc + + \brief Defines functions that allow you to access rows or columns of a matrix easily. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_matrix_integer Integer Matrix Core Extension + \ingroup gtc + + \brief Defines a number of matrices with integer types. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_matrix_inverse Matrix Inverse Core Extension + \ingroup gtc + + \brief Defines additional matrix inverting functions. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_matrix_transform Matrix Transform Core Extension + \ingroup gtc + + \brief Defines functions that generate common transformation matrices. + + The matrices generated by this extension use standard OpenGL fixed-function + conventions. For example, the lookAt function generates a transform from world + space into the specific eye space that the projective matrix functions ( + perspective, ortho, etc) are designed to expect. The OpenGL compatibility + specifications defines the particular layout of this eye space. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_quaternion Quaternion Core Extension + \ingroup gtc + + \brief Defines a templated quaternion type and several quaternion operations. + + You must include to get this functionality. +**/ + +/** + \defgroup gtc_type_precision Type Precision Core Extension + \ingroup gtc + + \brief Defines specific C++-based precision types. + + \ref core_precision defines types based on GLSL's precision qualifiers. This + extension defines types based on explicitly-sized C++ data types. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtc_type_ptr Pointer Access Core Extension + \ingroup gtc + + \brief Used to get a pointer to the memory layout of a basic type. + + This extension defines an overloaded function, glm::value_ptr, which + takes any of the \ref core_template "core template types". It returns + a pointer to the memory layout of the object. Matrix types store their values + in row-major order. + + This is useful for uploading data to matrices or copying data to buffer objects. + + Example: + + \code +#include +#include +glm::vec3 aVector(3); +glm::mat4 someMatrix(1.0); + +glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); +glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); + \endcode + + You must include the file to get this functionality. +**/ + diff --git a/doc/gtcModules.doxy b/doc/gtcModules.doxy new file mode 100644 index 00000000..e37e74a8 --- /dev/null +++ b/doc/gtcModules.doxy @@ -0,0 +1,500 @@ +/** + \defgroup gtx GLM Experimental Extensions + + \brief Functions and types that GLSL does not provide, but are useful to have. + + Experimental extensions are useful functions and types, but the development of + their API and functionality is not necessarily stable. They can change substantially + between versions. Backwards compatibility is not much of an issue for them. + + You can bring all of the extensions, core or experimental, in by + including Otherwise, you will have to include each extension + by including a specific file. +**/ + +/** + \defgroup gtx_associated_min_max Associated Min/Max Experimental Extension + \ingroup gtx + + \brief Min and max functions that return associated values not the compared onces. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_bit Bitwise Operations Experimental Extension + \ingroup gtx + + \brief Allow to perform bit operations on integer values + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_closest_point Find Closest Point Experimental Extension + \ingroup gtx + + \brief Find the point on a straight line which is the closet of a point. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_color_cast Color Conversion Experimental Extension + \ingroup gtx + + \brief Conversion between two color types. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_color_space RGB to HSV Conversion Experimental Extension + \ingroup gtx + + \brief Related to RGB to HSV conversions and operations. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_color_space_YCoCg RGB to YCoCg Conversion Experimental Extension + \ingroup gtx + + \brief RGB to YCoCg conversions and operations + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_compatibility Cg and HLSL Compatibility Experimental Extension + \ingroup gtx + + \brief Provide functions to increase the compatibility with Cg and HLSL languages + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_component_wise Component Wise Experimental Extension + \ingroup gtx + + \brief Operations between components of a type + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_epsilon Epsilon Comparison Experimental Extension + \ingroup gtx + + \brief Comparison functions for a user defined epsilon values. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_euler_angles Matrix From Euler Angles Experimental Extension + \ingroup gtx + + \brief Build matrices from Euler angles. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_extend Position Extending Experimental Extension + \ingroup gtx + + \brief Extend a position from a source to a position at a defined length. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_extented_min_max Extended Min Max Experimental Extension + \ingroup gtx + + \brief Min and max functions for 3 to 4 parameters. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_fast_exponential Fast Exponentiation Experimental Extension + \ingroup gtx + + \brief Fast but less accurate implementations of exponential based functions. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_fast_square_root Fast Square Root Experimental Extension + \ingroup gtx + + \brief Fast but less accurate implementations of square root based functions. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_fast_trigonometry Fast Trig Experimental Extension + \ingroup gtx + + \brief Fast but less accurate implementations of trigonometric functions. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_handed_coordinate_space Space Handedness Experimental Extension + \ingroup gtx + + \brief To know if a set of three basis vectors defines a right or left-handed coordinate system. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_inertia Intertial Matrix Experimental Extension + \ingroup gtx + + \brief Create inertia matrices + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_int_10_10_10_2 Packed Integer Experimental Extension + \ingroup gtx + + \brief Add support for integer for core functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_integer Integer Function Experimental Extension + \ingroup gtx + + \brief Add support for integer for core functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_intersect Intersection Test Experimental Extension + \ingroup gtx + + \brief Add intersection functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_log_base Log With Base Experimental Extension + \ingroup gtx + + \brief Logarithm for any base. base can be a vector or a scalar. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_matrix_cross_product Cross Product Matrices Experimental Extension + \ingroup gtx + + \brief Build cross product matrices + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_matrix_major_storage Build Matrix Experimental Extension + \ingroup gtx + + \brief Build matrices with specific matrix order, row or column + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_matrix_operation Diagonal Matrix Experimental Extension + \ingroup gtx + + \brief Build diagonal matrices from vectors. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_matrix_query Query Matrix Properties Experimental Extension + \ingroup gtx + + \brief Query to evaluate matrix properties + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_mixed_product Mixed Product Experimental Extension + \ingroup gtx + + \brief Mixed product of 3 vectors. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_multiple Multiples Experimental Extension + \ingroup gtx + + \brief Find the closest number of a number multiple of other number. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_norm Vector Norm Experimental Extension + \ingroup gtx + + \brief Various way to compute vector norms. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_normal Compute Normal Experimental Extension + \ingroup gtx + + \brief Compute the normal of a triangle. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_normalize_dot Normalize Dot Product Experimental Extension + \ingroup gtx + + \brief Dot product of vectors that need to be normalize with a single square root. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_number_precision Number Precision Experimental Extension + \ingroup gtx + + \brief Defined size types. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_ocl_type OpenCL Types Experimental Extension + \ingroup gtx + + \brief OpenCL types. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_optimum_pow Optimum Pow Experimental Extension + \ingroup gtx + + \brief Integer exponentiation of power functions. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_orthonormalize Orthonormalize Experimental Extension + \ingroup gtx + + \brief Orthonormalize matrices. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_perpendicular Perpendicular Experimental Extension + \ingroup gtx + + \brief Perpendicular of a vector from other one + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_polar_coordinates Polar Coordinates Experimental Extension + \ingroup gtx + + \brief Conversion from Euclidean space to polar space and revert. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_projection Projection Experimental Extension + \ingroup gtx + + \brief Projection of a vector to other one + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_quaternion Quaternion Experimental Extension + \ingroup gtx + + \brief Quaternion types and functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_random Random Experimental Extension + \ingroup gtx + + \brief Generate random number from various distribution methods + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_raw_data Raw Data Experimental Extension + \ingroup gtx + + \brief Projection of a vector to other one + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_reciprocal Reciprocal Experimental Extension + \ingroup gtx + + \brief Define secant, cosecant and cotangent functions. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_rotate_vector Rotate Vector Experimental Extension + \ingroup gtx + + \brief Function to directly rotate a vector + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_simd_mat4 SIMD Mat4 Experimental Extension + \ingroup gtx + + \brief SIMD implementation of mat4 type. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_simd_vec4 SIMD Vec4 Experimental Extension + \ingroup gtx + + \brief SIMD implementation of vec4 type. + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_spline Spline Experimental Extension + \ingroup gtx + + \brief Spline functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_string_cast String Cast Experimental Extension + \ingroup gtx + + \brief Setup strings for GLM type values + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_transform Transformation Matrices Experimental Extension + \ingroup gtx + + \brief Add transformation matrices + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_transform2 Extra Transform Matrices Experimental Extension + \ingroup gtx + + \brief Add extra transformation matrices + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_unsigned_int Unsigned Int Experimental Extension + \ingroup gtx + + \brief Add support for unsigned integer for core functions + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_vector_access Vector Access Experimental Extension + \ingroup gtx + + \brief Function to set values to vectors + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_vector_angle Vector Angle Experimental Extension + \ingroup gtx + + \brief Compute angle between vectors + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_vector_query Vector Query Experimental Extension + \ingroup gtx + + \brief Query informations of vector types + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_verbose_operator Verbose Operator Experimental Extension + \ingroup gtx + + \brief Use words to replace operators + + You must include the file to get this functionality. +**/ + +/** + \defgroup gtx_wrap Wrap Experimental Extension + \ingroup gtx + + \brief Wrapping mode using my texture samping. + + You must include the file to get this functionality. +**/ + diff --git a/doc/pages.doxy b/doc/pages.doxy new file mode 100644 index 00000000..cf1d9005 --- /dev/null +++ b/doc/pages.doxy @@ -0,0 +1,268 @@ +/** + \mainpage OpenGL Mathematics + OpenGL Mathematics (GLM) is a C++ mathematics library for 3D applications based + on the OpenGL Shading Language (GLSL) specification. + + GLM provides 3D programmers with math classes and functions that are similar to + GLSL or any high level GPU programming language. The idea is to have a library + that has identical naming conventions and functionalities than GLSL so that when + developers know GLSL, they know how to use GLM. + + GLM is not limited strictly to GLSL features. + + However, this project isn't limited by GLSL features. An extension system, based + on the GLSL extension conventions, allows extended capabilities. + + This library can be used with OpenGL but also for software rendering (Raytracing + / Rasterisation), image processing and as much contexts as a simple math library + could be used for. + + GLM is written as a platform independent library. The following compilers are + officially supported: + \li GNU GCC 3.4 and higher + \li Microsoft Visual Studio 8.0 and higher + + The source code is under the + MIT licence. + + Any feedback is welcome and can be sent to glm@g-truc.net. + + \li \subpage started + \li \subpage faq + \li \subpage issues + \li \subpage reference +**/ + +/** + \page started Getting Started + + \section started_compiler Compiler Setup + + GLM is a header library. Therefore, it doesn't require to be built separately. All that + is necessary to use GLM is to add the GLM install path to your compiler's include + search paths. (-I option with GCC) Alternatively, you can copy the GLM files directly into your + project's source directory. + + GLM makes heavy use of C++ templates. This may significantly increase the compile + time for files that use GLM. If this is a problem for your needs, precompiled headers + are a good solution for avoiding this issue. + + \section started_core Core Features + + After initial compiler setup, all core features of GLM (core GLSL features) can be accessed + by including the glm.hpp header. The line: #include is used for a typical + compiler setup. + + Note that by default there are no dependencies on external headers like gl.h, gl3.h, glu.h or + windows.h. + + \section started_swizzle Setup of Swizzle Operators + + A common feature of shader languages like GLSL is components swizzling. This involves + being able to select which components of a vector are used and in what order. For + example, "variable.x", "variable.xxy", "variable.zxyy" are examples of swizzling. + + However in GLM, swizzling operators are disabled by default. To enable swizzling the + define GLM_SWIZZLE must be defined to one of GLM_SWIZZLE_XYZW, GLM_SWIZZLE_RGBA, + GLM_SWIZZLE_STQP or GLM_SWIZZLE_FULL depending on what swizzle syntax is required. + + To enable swizzling, it is suggested that setup.hpp be included first, then custom + settings and finally glm.hpp. For + example: + + \code +#include +#define GLM_SWIZZLE GLM_SWIZZLE_FULL +#include + \endcode + + These custom setup lines can then be placed in a common project header or precompiled + header. + + \section started_sample Basic Use of GLM Core + + \code +#include + +int foo() +{ + glm::vec4 Position = glm::vec4(glm::vec3(0.0), 1.0); + glm::mat4 Model = glm::mat4(1.0); + Model[4] = glm::vec4(1.0, 1.0, 0.0, 1.0); + glm::vec4 Transformed = Model * Position; + return 0; +} + \endcode + + \section started_extensions GLM Extensions + + GLM extends the core GLSL feature set with extensions. These extensions include: + quaternion, transformation, spline, matrix inverse, color spaces, etc. + Note that some extensions are incompatible with other extension as and may result in C++ + name collisions when used together. + + To use a particular extension, simply include the extension header file. All + extension features are added to the glm namespace. + + \code +#include +#include + +int foo() +{ + glm::vec4 Position = glm::vec4(glm::vec3(0.0f), 1.0f); + glm::mat4 Model = glm::translate(1.0f, 1.0f, 1.0f); + glm::vec4 Transformed = Model * Position; + return 0; +} + \endcode + + \section started_depend Dependencies + + When is included, GLM provides all the GLSL features it implements in C++. + + By including all the features of all extensions of GLM are included. + + When you include a specific extension, all the dependent extensions will be included as well. + All the extensions depend on GLM core. () + + GLM has no dependencies on external libraries. However, if is + included before the GLM headers, boost::static_assert will be used all over GLM code. +**/ + +/** + \page faq FAQ + + \section faq1 Why GLM follows GLSL specification and conventions? + + Following GLSL conventions is a really strict policy of GLM. GLM has been designed following + the idea that everyone does its own math library with his own conventions. The idea is that + brilliant developers (the OpenGL ARB) worked together and agreed to make GLSL. Following + GLSL conventions is a way to find consensus. Moreover, basically when a developer knows + GLSL, he knows GLM. + + \section faq2 Would it be possible to add my feature? + + YES. Every feature request could be added by submitting it here: + https://sourceforge.net/apps/trac/ogl-math/newticket + + These requests would mainly take the form of extensions and if you provide an + implementation, the feature will be added automatically in the next GLM release. + + A SourceForge.net account is required to create a ticket. + + \section faq3 Does GLM run GLSL program? + + No, GLM is a C++ implementation of a subset of GLSL. + + \section faq4 Does a GLSL compiler build GLM codes? + + Not directly but it can be easy to port. However, the difference between a shader and C++ + program at software design level will probably make this idea unlikely or impossible. + + \section faq5 Should I use GTX extensions? + + GTX extensions are qualified to be experimental extensions. In GLM this means that these + extensions might change from version to version without restriction. In practice, it doesn't + really change except time to time. GTC extensions are stabled, tested and perfectly reliable + in time. Many GTX extensions extend GTC extensions and provide a way to explore features + and implementations before becoming stable by a promotion as GTC extensions. This is + fairly the way OpenGL features are developed through extensions. + + \section faq6 Would it be possible to change GLM to do glVertex3fv(glm::vec3(0))? + + It's possible to implement such thing in C++ with the implementation of the appropriate cast + operator. In this example it's likely because it would result as a transparent cast, however, + most of the time it's really unlikely resulting of build with no error and programs running + with unexpected behaviors. + + GLM_GTC_type_ptr extension provide a safe solution: + + \code +glm::vec4 v(0); +glm::mat4 m(0); + +glVertex3fv(glm::value_ptr(v)) +glLoadMatrixfv(glm::value_ptr(m)); + \endcode + + Another solution inspired by STL: + + \code +glVertex3fv(&v[0]); +glLoadMatrixfv(&m[0][0]); + \endcode + + \section faq7 Where can I ask my questions? + + A good place is the OpenGL Toolkits forum on OpenGL.org: + http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1 + + \section faq8 Where can I report a bug? + + Just like feature requests: + https://sourceforge.net/apps/trac/ogl-math/newticket + + A SourceForge account is required to create a ticket. + + \section faq8 Where can I find the documentation of extensions? + + The Doxygen generated documentation includes a complete list of all extensions available. + Explore this documentation to get a complete view of all GLM capabilities! + http://glm.g-truc.net/html/index.html + + \section faq9 Should I use 'using namespace glm;'? + + NO! Chances are that if 'using namespace glm;' is called, name collisions will happen + because GLM is based on GLSL and GLSL is also a consensus on tokens so these tokens are + probably used quite often. +**/ + +/** + \page issues Known Issues + + \section issue1 Swizzle Operators + + Enabling the swizzle operator can result in name collisions with the Win32 API. + Consequently swizzle operators are disable by default. A safer way to do swizzling is to use + the member function 'swizzle'. Future version of GLM should remove this limitation. + + \section issue2 not Function + + The GLSL keyword not is also a keyword in C++. To prevent name collisions, the GLSL not + function has been implemented with the name not_. + + \section issue3 Half Based Types + GLM supports half float number types through the extension GLM_GTC_half_float. This + extension provides the types half, hvec*, hmat*x* and hquat*. + + Unfortunately, C++ norm doesn't support anonymous unions which limit hvec* vector + components access to x, y, z and w. + + However, Visual C++ does support anonymous unions. When + GLM_USE_ANONYMOUS_UNION is define, it enables the support of all component names + (x,y,z,w ; r,g,b,a ; s,t,p,q). With GCC it will result in a build error. +**/ + +/** + \page reference References + + OpenGL 4.1 core specification: + http://www.opengl.org/registry/doc/glspec41.core.20100725.pdf + + GLSL 4.10 specification: + http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf + + GLM HEAD snapshot: + http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz + + GLM Trac, for bug report and feature request: + https://sourceforge.net/apps/trac/ogl-math + + GLM website: + http://glm.g-truc.net + + G-Truc Creation page: + http://www.g-truc.net/project-0016.html +**/ + diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index 2a5f0e92..df3ac062 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -21,6 +21,9 @@ namespace glm //! Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace. namespace common{ + /// \addtogroup core_funcs + ///@{ + //! Returns x if x >= 0; otherwise, it returns -x. //! (From GLSL 1.30.08 specification, section 8.3) template @@ -262,6 +265,8 @@ namespace glm template genType ldexp(genType const & x, genIType const & exp); + ///@} + }//namespace common }//namespace function }//namespace core diff --git a/glm/core/func_exponential.hpp b/glm/core/func_exponential.hpp index 2197b0f7..b5a027f0 100644 --- a/glm/core/func_exponential.hpp +++ b/glm/core/func_exponential.hpp @@ -21,6 +21,9 @@ namespace glm //! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace. namespace exponential{ + /// \addtogroup core_funcs + ///@{ + //! Returns x raised to the y power. //! (From GLSL 1.30.08 specification, section 8.2) template @@ -59,6 +62,8 @@ namespace glm template genType inversesqrt(genType const & x); + ///@} + }//namespace exponential }//namespace function }//namespace core diff --git a/glm/core/func_geometric.hpp b/glm/core/func_geometric.hpp index 24029994..a6bdc37e 100644 --- a/glm/core/func_geometric.hpp +++ b/glm/core/func_geometric.hpp @@ -21,6 +21,9 @@ namespace glm //! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace. namespace geometric{ + /// \addtogroup core_funcs + ///@{ + //! Returns the length of x, i.e., sqrt(x * x). //! (From GLSL 1.30.08 specification, section 8.4) template @@ -80,6 +83,8 @@ namespace glm genType const & N, typename genType::value_type const & eta); + ///@} + }//namespace geometric }//namespace function }//namespace core diff --git a/glm/core/func_integer.hpp b/glm/core/func_integer.hpp index 03319f36..4c50bb9f 100644 --- a/glm/core/func_integer.hpp +++ b/glm/core/func_integer.hpp @@ -21,6 +21,9 @@ namespace glm //! Define integer functions from Section 8.8 of GLSL 4.00.8 specification. namespace integer{ + /// \addtogroup core_funcs + ///@{ + //! Adds 32-bit unsigned integer x and y, returning the sum //! modulo pow(2, 32). The value carry is set to 0 if the sum was //! less than pow(2, 32), or to 1 otherwise. @@ -128,6 +131,8 @@ namespace glm template class C> typename C::signed_type findMSB(C const & Value); + ///@} + }//namespace integer }//namespace function }//namespace core diff --git a/glm/core/func_matrix.hpp b/glm/core/func_matrix.hpp index 28ef155a..4ea7ce07 100644 --- a/glm/core/func_matrix.hpp +++ b/glm/core/func_matrix.hpp @@ -21,6 +21,9 @@ namespace glm //! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace. namespace matrix{ + /// \addtogroup core_funcs + ///@{ + //! Multiply matrix x by matrix y component-wise, i.e., //! result[i][j] is the scalar product of x[i][j] and y[i][j]. //! (From GLSL 1.30.08 specification, section 8.5) @@ -80,6 +83,8 @@ namespace glm detail::tmat4x4 inverse( detail::tmat4x4 const & m); + ///@} + }//namespace matrix }//namespace function }//namespace core diff --git a/glm/core/func_noise.hpp b/glm/core/func_noise.hpp index 99600bad..4af5f7d4 100644 --- a/glm/core/func_noise.hpp +++ b/glm/core/func_noise.hpp @@ -21,6 +21,9 @@ namespace glm // Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace. namespace noise{ + /// \addtogroup core_funcs + ///@{ + // Returns a 1D noise value based on the input value x. // From GLSL 1.30.08 specification, section 8.9. template @@ -41,6 +44,8 @@ namespace glm template detail::tvec4 noise4(genType const & x); + ///@} + }//namespace noise }//namespace function }//namespace core diff --git a/glm/core/func_packing.hpp b/glm/core/func_packing.hpp index 619b9391..9704d70a 100644 --- a/glm/core/func_packing.hpp +++ b/glm/core/func_packing.hpp @@ -21,6 +21,9 @@ namespace glm //! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification namespace packing { + /// \addtogroup core_funcs + ///@{ + detail::uint32 packUnorm2x16(detail::tvec2 const & v); detail::uint32 packUnorm4x8(detail::tvec4 const & v); detail::uint32 packSnorm4x8(detail::tvec4 const & v); @@ -32,6 +35,8 @@ namespace glm double packDouble2x32(detail::tvec2 const & v); detail::tvec2 unpackDouble2x32(double const & v); + ///@} + }//namespace packing }//namespace function }//namespace core diff --git a/glm/core/func_trigonometric.hpp b/glm/core/func_trigonometric.hpp index 47a6e97a..4d147bfb 100644 --- a/glm/core/func_trigonometric.hpp +++ b/glm/core/func_trigonometric.hpp @@ -23,6 +23,9 @@ namespace glm //! Included in glm namespace. namespace trigonometric{ + /// \addtogroup core_funcs + ///@{ + //! Converts degrees to radians and returns the result. //! (From GLSL 1.30.08 specification, section 8.1) template @@ -111,6 +114,8 @@ namespace glm template genType atanh(genType const & x); + ///@} + }//namespace trigonometric }//namespace function }//namespace core diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp index a6f5047d..66932279 100644 --- a/glm/core/func_vector_relational.hpp +++ b/glm/core/func_vector_relational.hpp @@ -24,6 +24,9 @@ namespace glm //! Included in glm namespace. namespace vector_relational { + /// \addtogroup core_funcs + ///@{ + //! Returns the component-wise comparison result of x < y. //! (From GLSL 1.30.08 specification, section 8.6) template class vecType> @@ -183,6 +186,8 @@ namespace glm return Result; } + ///@} + }//namespace vector_relational }//namespace function }//namespace core diff --git a/glm/core/type.hpp b/glm/core/type.hpp index f4d9f042..599163ba 100644 --- a/glm/core/type.hpp +++ b/glm/core/type.hpp @@ -80,64 +80,79 @@ namespace type #else //! 2 components vector of floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_vec2 vec2; //! 3 components vector of floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_vec3 vec3; //! 4 components vector of floating-point numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_vec4 vec4; //! 2 columns of 2 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat2x2 mat2x2; //! 2 columns of 3 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat2x3 mat2x3; //! 2 columns of 4 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat2x4 mat2x4; //! 3 columns of 2 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat3x2 mat3x2; //! 3 columns of 3 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat3x3 mat3x3; //! 3 columns of 4 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat3x4 mat3x4; //! 4 columns of 2 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat4x2 mat4x2; //! 4 columns of 3 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat4x3 mat4x3; //! 4 columns of 4 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef precision::mediump_mat4x4 mat4x4; #endif//GLM_PRECISION //! 2 columns of 2 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef mat2x2 mat2; //! 3 columns of 3 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef mat3x3 mat3; //! 4 columns of 4 components matrix of floating-point numbers. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices) + //! \ingroup core_types typedef mat4x4 mat4; ////////////////////////// @@ -158,14 +173,17 @@ namespace type #else //! 2 components vector of signed integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_ivec2 ivec2; //! 3 components vector of signed integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_ivec3 ivec3; //! 4 components vector of signed integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_ivec4 ivec4; #endif//GLM_PRECISION @@ -187,14 +205,17 @@ namespace type #else //! 2 components vector of unsigned integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_uvec2 uvec2; //! 3 components vector of unsigned integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_uvec3 uvec3; //! 4 components vector of unsigned integer numbers. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef precision::mediump_uvec4 uvec4; #endif//GLM_PRECISION @@ -203,14 +224,17 @@ namespace type //! 2 components vector of boolean. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef detail::tvec2 bvec2; //! 3 components vector of boolean. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef detail::tvec3 bvec3; //! 4 components vector of boolean. //! From GLSL 1.30.8 specification, section 4.1.5 Vectors. + //! \ingroup core_types typedef detail::tvec4 bvec4; ////////////////////////// @@ -218,62 +242,77 @@ namespace type //! Vector of 2 double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tvec2 dvec2; //! Vector of 3 double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tvec3 dvec3; //! Vector of 4 double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tvec4 dvec4; //! 2 * 2 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat2x2 dmat2; //! 3 * 3 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat3x3 dmat3; //! 4 * 4 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat4x4 dmat4; //! 2 * 2 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat2x2 dmat2x2; //! 2 * 3 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat2x3 dmat2x3; //! 2 * 4 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat2x4 dmat2x4; //! 3 * 2 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat3x2 dmat3x2; //! 3 * 3 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat3x3 dmat3x3; //! 3 * 4 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat3x4 dmat3x4; //! 4 * 2 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat4x2 dmat4x2; //! 4 * 3 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat4x3 dmat4x3; //! 4 * 4 matrix of double-precision floating-point numbers. //! From GLSL 4.00.8 specification, section 4.1 Basic Types. + //! \ingroup core_types typedef detail::tmat4x4 dmat4x4; }//namespace type diff --git a/glm/core/type_float.hpp b/glm/core/type_float.hpp index a274857d..43aabb41 100644 --- a/glm/core/type_float.hpp +++ b/glm/core/type_float.hpp @@ -38,16 +38,19 @@ namespace glm typedef double highp_float_t; //! Low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification + //! \ingroup core_precision typedef lowp_float_t lowp_float; //! Medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification + //! \ingroup core_precision typedef mediump_float_t mediump_float; //! High precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification + //! \ingroup core_precision typedef highp_float_t highp_float; } //namespace precision diff --git a/glm/core/type_half.hpp b/glm/core/type_half.hpp index d451e5d8..cc8fed60 100644 --- a/glm/core/type_half.hpp +++ b/glm/core/type_half.hpp @@ -27,6 +27,8 @@ namespace glm float toFloat32(hdata value); hdata toFloat16(float const & value); + ///16-bit floating point type. + /// \ingroup gtc_half_float class thalf { public: diff --git a/glm/core/type_int.hpp b/glm/core/type_int.hpp index 2d046911..e788d333 100644 --- a/glm/core/type_int.hpp +++ b/glm/core/type_int.hpp @@ -63,32 +63,39 @@ namespace glm namespace core{ namespace type{ + ///namespace for precision stuff. namespace precision { //! Low precision signed integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::lowp_int_t lowp_int; //! Medium precision signed integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::mediump_int_t mediump_int; //! High precision signed integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::highp_int_t highp_int; //! Low precision unsigned integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::lowp_uint_t lowp_uint; //! Medium precision unsigned integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::mediump_uint_t mediump_uint; //! High precision unsigned integer. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification. + //! \ingroup core_precision typedef detail::highp_uint_t highp_uint; } //namespace precision diff --git a/glm/core/type_mat2x2.hpp b/glm/core/type_mat2x2.hpp index 692ec5e8..aecd36e0 100644 --- a/glm/core/type_mat2x2.hpp +++ b/glm/core/type_mat2x2.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 2 * 2 matrix of floating-point numbers. + //! \brief Template for 2 * 2 matrix of floating-point numbers. + //! \ingroup core_template template struct tmat2x2 { @@ -222,16 +223,19 @@ namespace glm namespace precision { //! 2 columns of 2 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x2 lowp_mat2x2; //! 2 columns of 2 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x2 mediump_mat2x2; //! 2 columns of 2 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x2 highp_mat2x2; } //namespace precision diff --git a/glm/core/type_mat2x3.hpp b/glm/core/type_mat2x3.hpp index 81b14ebf..647d1ebe 100644 --- a/glm/core/type_mat2x3.hpp +++ b/glm/core/type_mat2x3.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 2 columns and 3 rows matrix of floating-point numbers. + //! \brief Template for 2 columns and 3 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat2x3 { @@ -189,16 +190,19 @@ namespace glm namespace precision { //! 2 columns of 3 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x3 lowp_mat2x3; //! 2 columns of 3 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x3 mediump_mat2x3; //! 2 columns of 3 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat2x3 highp_mat2x3; } //namespace precision diff --git a/glm/core/type_mat2x4.hpp b/glm/core/type_mat2x4.hpp index 5b16b082..e0c00ffb 100644 --- a/glm/core/type_mat2x4.hpp +++ b/glm/core/type_mat2x4.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 2 columns and 4 rows matrix of floating-point numbers. + //! Template for 2 columns and 4 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat2x4 { @@ -189,15 +190,15 @@ namespace glm namespace precision { //! 2 columns of 4 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4 lowp_mat2x4; //! 2 columns of 4 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4 mediump_mat2x4; //! 2 columns of 4 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat2x4 highp_mat2x4; } diff --git a/glm/core/type_mat3x2.hpp b/glm/core/type_mat3x2.hpp index 2fc42c52..5a2bd8f0 100644 --- a/glm/core/type_mat3x2.hpp +++ b/glm/core/type_mat3x2.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 3 columns and 2 rows matrix of floating-point numbers. + //! \brief Template for 3 columns and 2 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat3x2 { @@ -191,15 +192,15 @@ namespace glm namespace precision { //! 3 columns of 2 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2 lowp_mat3x2; //! 3 columns of 2 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2 mediump_mat3x2; //! 3 columns of 2 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x2 highp_mat3x2; } diff --git a/glm/core/type_mat3x3.hpp b/glm/core/type_mat3x3.hpp index 30a12676..e5edfaff 100644 --- a/glm/core/type_mat3x3.hpp +++ b/glm/core/type_mat3x3.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 3 * 3 matrix of floating-point numbers. + //! \brief Template for 3 * 3 matrix of floating-point numbers. + //! \ingroup core_template template struct tmat3x3 { @@ -221,16 +222,19 @@ namespace glm namespace precision { //! 3 columns of 3 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat3x3 lowp_mat3x3; //! 3 columns of 3 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat3x3 mediump_mat3x3; //! 3 columns of 3 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat3x3 highp_mat3x3; } //namespace precision diff --git a/glm/core/type_mat3x4.hpp b/glm/core/type_mat3x4.hpp index 03b7e5f2..6f68b4cd 100644 --- a/glm/core/type_mat3x4.hpp +++ b/glm/core/type_mat3x4.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 3 columns and 4 rows matrix of floating-point numbers. + //! \brief Template for 3 columns and 4 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat3x4 { @@ -191,15 +192,15 @@ namespace glm namespace precision { //! 3 columns of 4 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x4 lowp_mat3x4; //! 3 columns of 4 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x4 mediump_mat3x4; //! 3 columns of 4 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) typedef detail::tmat3x4 highp_mat3x4; } diff --git a/glm/core/type_mat4x2.hpp b/glm/core/type_mat4x2.hpp index a705d127..3d90e3ac 100644 --- a/glm/core/type_mat4x2.hpp +++ b/glm/core/type_mat4x2.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 4 columns and 2 rows matrix of floating-point numbers. + //! \brief Template for 4 columns and 2 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat4x2 { @@ -193,16 +194,19 @@ namespace glm namespace precision { //! 4 columns of 2 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x2 lowp_mat4x2; //! 4 columns of 2 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x2 mediump_mat4x2; //! 4 columns of 2 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x2 highp_mat4x2; } //namespace precision diff --git a/glm/core/type_mat4x3.hpp b/glm/core/type_mat4x3.hpp index 2fb7bcef..d9a311ad 100644 --- a/glm/core/type_mat4x3.hpp +++ b/glm/core/type_mat4x3.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 4 columns and 3 rows matrix of floating-point numbers. + //! \brief Template for 4 columns and 3 rows matrix of floating-point numbers. + //! \ingroup core_template template struct tmat4x3 { @@ -193,16 +194,19 @@ namespace glm namespace precision { //! 4 columns of 3 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x3 lowp_mat4x3; //! 4 columns of 3 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x3 mediump_mat4x3; //! 4 columns of 3 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x3 highp_mat4x3; } //namespace precision diff --git a/glm/core/type_mat4x4.hpp b/glm/core/type_mat4x4.hpp index 47ca4a91..05325a1e 100644 --- a/glm/core/type_mat4x4.hpp +++ b/glm/core/type_mat4x4.hpp @@ -35,7 +35,8 @@ namespace glm template struct tmat4x3; template struct tmat4x4; - //!< \brief Template for 4 * 4 matrix of floating-point numbers. + //! \brief Template for 4 * 4 matrix of floating-point numbers. + //! \ingroup core_template template struct tmat4x4 { @@ -221,16 +222,19 @@ namespace glm namespace precision { //! 4 columns of 4 components matrix of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x4 lowp_mat4x4; //! 4 columns of 4 components matrix of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x4 mediump_mat4x4; //! 4 columns of 4 components matrix of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers) + //! \ingroup core_precision typedef detail::tmat4x4 highp_mat4x4; } //namespace precision diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 91cdbc69..3e212c88 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -32,6 +32,8 @@ namespace glm template struct tvec3; template struct tvec4; + //! The basic 2D vector type. + //! \ingroup core_template template struct tvec2 { @@ -203,42 +205,51 @@ namespace glm namespace precision { //! 2 components vector of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 highp_vec2; //! 2 components vector of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 mediump_vec2; //! 2 components vector of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 lowp_vec2; //! 2 components vector of high precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 highp_ivec2; //! 2 components vector of medium precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 mediump_ivec2; //! 2 components vector of low precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 lowp_ivec2; //! 2 components vector of high precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 highp_uvec2; //! 2 components vector of medium precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 mediump_uvec2; //! 2 components vector of low precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec2 lowp_uvec2; } //namespace precision diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 2a3025db..189950ab 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -31,6 +31,8 @@ namespace glm template struct tvec2; template struct tvec4; + //! Basic 3D vector type. + //! \ingroup core_template template struct tvec3 { @@ -208,42 +210,51 @@ namespace glm namespace precision { //! 3 components vector of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 highp_vec3; //! 3 components vector of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 mediump_vec3; //! 3 components vector of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 lowp_vec3; //! 3 components vector of high precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 highp_ivec3; //! 3 components vector of medium precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 mediump_ivec3; //! 3 components vector of low precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 lowp_ivec3; //! 3 components vector of high precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 highp_uvec3; //! 3 components vector of medium precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 mediump_uvec3; //! 3 components vector of low precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec3 lowp_uvec3; } //namespace precision diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 02d88817..803bf685 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -32,6 +32,8 @@ namespace glm template struct tvec2; template struct tvec3; + ///Basic 4D vector type. + //! \ingroup core_template template struct tvec4 { @@ -225,42 +227,51 @@ namespace glm namespace precision { //! 4 components vector of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 highp_vec4; //! 4 components vector of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 mediump_vec4; //! 4 components vector of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 lowp_vec4; //! 4 components vector of high precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 highp_ivec4; //! 4 components vector of medium precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 mediump_ivec4; //! 4 components vector of low precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 lowp_ivec4; //! 4 components vector of high precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 highp_uvec4; //! 4 components vector of medium precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 mediump_uvec4; //! 4 components vector of low precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers. + //! \ingroup core_precision typedef detail::tvec4 lowp_uvec4; } //namespace precision diff --git a/glm/glm.hpp b/glm/glm.hpp index 0dc9b3e5..c18da216 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -7,26 +7,6 @@ // File : glm/glm.hpp /////////////////////////////////////////////////////////////////////////////////////////////////// -/*! \mainpage OpenGL Mathematics - * - * OpenGL Mathematics (GLM) is a C++ mathematics library for 3D applications based on the OpenGL Shading Language (GLSL) specification. - * - * GLM provides 3D programmers with math classes and functions that are similar to GLSL or any high level GPU programming language. The idea is to have a library that has identical naming conventions and functionalities than GLSL so that when developers know GLSL, they know how to use GLM. - * - * However, this project isn't limited by GLSL features. An extension system, based on the GLSL extension conventions, allows extended capabilities. - * - * This library can be used with OpenGL but also for software rendering (Raytracing / Rasterisation), image processing and as much contexts as a simple math library could be used for. - * - * GLM is written as a platform independent library and supports the following compilers: - * - GNU GCC 3.4 and higher - * - Microsoft Visual Studio 8.0 and higher - * - * The source code is under the MIT licence. - * - * Any feedback is welcome and can be sent to glm@g-truc.net. - * - */ - #ifndef glm_glm #define glm_glm diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index 1d78d995..9c9d81e1 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -326,6 +326,9 @@ namespace glm //! GLM_GTC_half_float extension: Add support for half precision floating-point types namespace half_float { + /// \addtogroup gtc_half_float + ///@{ + //! Type for half-precision floating-point numbers. //! From GLM_GTC_half_float extension. typedef detail::thalf half; @@ -354,6 +357,8 @@ namespace glm //! From GLM_GTC_half_float extension. typedef detail::tmat4x4 hmat4; + ///@} + }//namespace half_float }//namespace gtc }//namespace glm diff --git a/glm/gtc/matrix_access.hpp b/glm/gtc/matrix_access.hpp index 28fe3fa2..d5c54655 100644 --- a/glm/gtc/matrix_access.hpp +++ b/glm/gtc/matrix_access.hpp @@ -25,6 +25,9 @@ namespace gtc{ //! GLM_GTC_matrix_access extension: Set a column or a row of a matrix namespace matrix_access { + /// \addtogroup gtc_matrix_access + ///@{ + //! Get a specific row of a matrix. //! From GLM_GTC_matrix_access extension. template @@ -55,6 +58,8 @@ namespace matrix_access int index, typename genType::col_type const & x); + ///@} + }//namespace matrix_access }//namespace gtc }//namespace glm diff --git a/glm/gtc/matrix_integer.hpp b/glm/gtc/matrix_integer.hpp index 9c1c455c..079dafc8 100644 --- a/glm/gtc/matrix_integer.hpp +++ b/glm/gtc/matrix_integer.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTC_matrix_integer extension: Add integer matrices namespace matrix_integer { + /// \addtogroup gtc_matrix_integer + ///@{ + typedef detail::tmat2x2 highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) typedef detail::tmat3x3 highp_imat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) typedef detail::tmat4x4 highp_imat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) @@ -201,6 +204,8 @@ namespace glm typedef mediump_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #endif//GLM_PRECISION + ///@} + }//namespace matrix_integer }//namespace gtc }//namespace glm diff --git a/glm/gtc/matrix_inverse.hpp b/glm/gtc/matrix_inverse.hpp index c2c6ecfd..32fac849 100644 --- a/glm/gtc/matrix_inverse.hpp +++ b/glm/gtc/matrix_inverse.hpp @@ -25,6 +25,9 @@ namespace gtc{ //! GLM_GTC_matrix_inverse extension: Inverse matrix functions namespace matrix_inverse { + /// \addtogroup gtc_matrix_inverse + ///@{ + //! Fast matrix inverse for affine matrix. //! From GLM_GTC_matrix_inverse extension. template @@ -36,6 +39,8 @@ namespace matrix_inverse inline typename genType::value_type inverseTranspose( genType const & m); + ///@} + }//namespace matrix_inverse }//namespace gtc }//namespace glm diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 477dc2eb..55c244a4 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -31,6 +31,9 @@ namespace glm //! GLM_GTC_matrix_transform extension: Add transformation matrices namespace matrix_transform { + /// \addtogroup gtc_matrix_transform + ///@{ + //! Builds a translation 4 * 4 matrix created from a vector of 3 components. //! From GLM_GTC_matrix_transform extension. template @@ -141,6 +144,7 @@ namespace glm detail::tvec3 const & center, detail::tvec3 const & up); + ///@} }//namespace matrix_transform }//namespace gtc }//namespace glm diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 34da0401..0907a935 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -36,6 +36,7 @@ namespace glm { //! \brief Template for quaternion. //! From GLM_GTC_quaternion extension. + /// \ingroup gtc_quaternion template struct tquat// : public genType { @@ -124,6 +125,9 @@ namespace glm //! GLM_GTC_quaternion extension: Quaternion types and functions namespace quaternion { + /// \addtogroup gtc_quaternion + ///@{ + //! Returns the length of the quaternion x. //! From GLM_GTC_quaternion extension. template @@ -218,6 +222,8 @@ namespace glm //! From GLM_GTC_quaternion extension. typedef detail::tquat dquat; + ///@} + }//namespace quaternion }//namespace gtc } //namespace glm diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index 5c51f280..ab307277 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -43,6 +43,9 @@ namespace glm /////////////////////////// // Signed int vector types + /// \addtogroup gtc_type_precision + ///@{ + typedef detail::int8 int8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension) typedef detail::int16 int16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension) typedef detail::int32 int32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension) @@ -210,6 +213,8 @@ namespace glm typedef detail::tquat f32quat; //!< \brief Single-precision floating-point quaternion. (from GLM_GTC_type_precision extension) typedef detail::tquat f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension) + ///@} + }//namespace type_precision }//namespace gtc }//namespace glm diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index 887fcdfc..5aeea5af 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTC_type_ptr extension: Get access to vectors & matrices value type address. namespace type_ptr{ + /// \addtogroup gtc_type_ptr + ///@{ + //! Get the const address of the vector content. //! From GLM_GTC_type_ptr extension. template @@ -291,6 +294,8 @@ namespace glm return &(mat[0].x); } + ///@} + }//namespace type_ptr }//namespace gtc }//namespace glm diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index 285be5e7..15c74c34 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -32,6 +32,9 @@ namespace glm //! GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces. namespace associated_min_max { + /// \addtogroup gtx_associated_min_max + ///@{ + //! \brief Min comparison between 2 variables template genTypeU associatedMin( @@ -73,6 +76,7 @@ namespace glm const genTypeT& y, const genTypeU& b, const genTypeT& z, const genTypeU& c, const genTypeT& w, const genTypeU& d); + ///@} }//namespace associated_min_max diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp index d011f7dd..240502c4 100644 --- a/glm/gtx/bit.hpp +++ b/glm/gtx/bit.hpp @@ -34,6 +34,8 @@ namespace glm { using namespace gtc::half_float; + /// \addtogroup gtx_bit + ///@{ //! Build a mask of 'count' bits //! From GLM_GTX_bit extension. template @@ -97,6 +99,7 @@ namespace glm //! From GLM_GTX_bit extension. template genType bitRotateLeft(genType const & In, std::size_t Shift); + ///@} }//namespace bit }//namespace gtx diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index 7e2da8f0..7e74927a 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point. namespace closest_point{ + /// \addtogroup gtx_closest_point + ///@{ + //! Find the point on a straight line which is the closet of a point. //! From GLM_GTX_closest_point extension. template @@ -37,6 +40,7 @@ namespace glm detail::tvec3 const & point, detail::tvec3 const & a, detail::tvec3 const & b); + ///@} }//namespace closest_point }//namespace gtx diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp index 0052be9e..0dc4e720 100644 --- a/glm/gtx/color_cast.hpp +++ b/glm/gtx/color_cast.hpp @@ -34,6 +34,9 @@ namespace glm { using namespace gtx::number_precision; + /// \addtogroup gtx_color_cast + ///@{ + //! Conversion of a floating value into a 8bit unsigned int value. //! From GLM_GTX_color_cast extension. template gtc::type_precision::uint8 u8channel_cast(valType a); @@ -97,6 +100,8 @@ namespace glm template gtc::type_precision::f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) template gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) template gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + ///@} }//namespace color_space }//namespace gtx }//namespace glm diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index 081d9adf..b754d731 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations namespace color_space { + /// \addtogroup gtx_color_space + ///@{ + //! Converts a color from HSV color space to its color in RGB color space. //! From GLM_GTX_color_space extension. template @@ -67,6 +70,8 @@ namespace glm template valType luminosity( detail::tvec3 const & color); + + ///@} }//namespace color_space }//namespace gtx diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index 5161aab5..ca93986d 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations namespace color_space_YCoCg { + /// \addtogroup gtx_color_space_YCoCg + ///@{ + //! Convert a color from RGB color space to YCoCg color space. //! From GLM_GTX_color_space_YCoCg extension. template @@ -56,6 +59,7 @@ namespace glm detail::tvec3 YCoCgR2rgb( detail::tvec3 const & YCoCgColor); + ///@} }//namespace color_space_YCoCg }//namespace gtx }//namespace glm diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 0e4487f2..8f901aca 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -38,6 +38,9 @@ namespace glm //! GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages namespace compatibility { + /// \addtogroup gtx_compatibility + ///@{ + template inline T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template inline detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template inline detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) @@ -151,6 +154,8 @@ namespace glm typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + ///@} + }//namespace compatibility }//namespace gtx }//namespace glm diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index 612d5948..f9cd362b 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_component_wise extension: Operations between components of a type namespace component_wise { + /// \addtogroup gtx_component_wise + ///@{ + //! Add all vector components together. //! From GLM_GTX_component_wise extension. template @@ -54,6 +57,8 @@ namespace glm typename genType::value_type compMax( genType const & v); + ///@} + }//namespace component_wise }//namespace gtx }//namespace glm diff --git a/glm/gtx/epsilon.hpp b/glm/gtx/epsilon.hpp index 35e55170..f362edc1 100644 --- a/glm/gtx/epsilon.hpp +++ b/glm/gtx/epsilon.hpp @@ -29,9 +29,12 @@ namespace glm }//namespace test namespace gtx{ - //! GLM_GTX_epsilon extension: Comparaison functions for a user defined epsilon values. + //! GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values. namespace epsilon { + /// \addtogroup gtx_epsilon + ///@{ + //! Returns the component-wise compare of |x - y| < epsilon. //! From GLM_GTX_epsilon extension. template @@ -48,6 +51,8 @@ namespace glm genTypeT const & y, genTypeU const & epsilon); + ///@} + }//namespace epsilon }//namespace gtx }//namespace glm diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index df7dc994..d16ba5e6 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -29,9 +29,12 @@ namespace glm { namespace gtx{ - //! GLM_GTX_euler_angles extension: Build matrices from euler angles. + //! GLM_GTX_euler_angles extension: Build matrices from Euler angles. namespace euler_angles { + /// \addtogroup gtx_euler_angles + ///@{ + //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. //! From GLM_GTX_euler_angles extension. template @@ -127,6 +130,8 @@ namespace glm //! From GLM_GTX_euler_angles extension. template detail::tmat4x4 orientate4(detail::tvec3 const & angles); + + ///@} }//namespace euler_angles }//namespace gtx }//namespace glm diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index cba75953..9bda8cd1 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_extend extension: Extend a position from a source to a position at a defined length. namespace extend { + /// \addtogroup gtx_extend + ///@{ + //! Extends of Length the Origin position using the (Source - Origin) direction. //! From GLM_GTX_extend extension. template @@ -38,6 +41,8 @@ namespace glm genType const & Source, typename genType::value_type const Length); + ///@} + }//namespace extend }//namespace gtx }//namespace glm diff --git a/glm/gtx/extented_min_max.hpp b/glm/gtx/extented_min_max.hpp index 6953be39..bf496576 100644 --- a/glm/gtx/extented_min_max.hpp +++ b/glm/gtx/extented_min_max.hpp @@ -32,6 +32,9 @@ namespace glm //! GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters. namespace extented_min_max { + /// \addtogroup gtx_extented_min_max + ///@{ + //< Return the minimum component-wise values of 3 inputs //< From GLM_GTX_extented_min_max extension template @@ -166,6 +169,8 @@ namespace glm C const & z, C const & w); + ///@} + }//namespace extented_min_max }//namespace gtx }//namespace glm diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index 64ac5c3a..cc4c75ca 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -33,6 +33,8 @@ namespace glm namespace fast_exponential { using namespace gtc::half_float; + /// \addtogroup gtx_fast_exponential + ///@{ //! Faster than the common pow function but less accurate. //! From GLM_GTX_fast_exponential extension. @@ -73,6 +75,8 @@ namespace glm template T fastLn(const T& x); + ///@} + }//namespace fast_exponential }//namespace gtx }//namespace glm diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index 66b7ec23..863cb6b3 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -34,6 +34,9 @@ namespace glm //! GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions. namespace fast_square_root { + /// \addtogroup gtx_fast_square_root + ///@{ + //! Faster than the common sqrt function but less accurate. //! From GLM_GTX_fast_square_root extension. template @@ -59,6 +62,8 @@ namespace glm template genType fastNormalize(genType const & x); + ///@} + }//namespace fast_square_root }// namespace gtx }//namespace glm diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp index 3bf9a906..2b1228bb 100644 --- a/glm/gtx/fast_trigonometry.hpp +++ b/glm/gtx/fast_trigonometry.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions. namespace fast_trigonometry { + /// \addtogroup gtx_fast_trigonometry + ///@{ + //! Faster than the common sin function but less accurate. //! Defined between -2pi and 2pi. //! From GLM_GTX_fast_trigonometry extension. @@ -72,6 +75,8 @@ namespace glm template T fastAtan(const T& angle); + ///@} + }//namespace fast_trigonometry }//namespace gtx }//namespace glm diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index b7c13ca5..e159b13f 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -23,9 +23,12 @@ namespace glm { namespace gtx{ - //! GLM_GTX_handed_coordinate_space extension: To know if a triedron is right or left handed + //! GLM_GTX_handed_coordinate_space extension: To know if a set of three basis vectors defines a right or left-handed coordinate system. namespace handed_coordinate_space { + /// \addtogroup gtx_handed_coordinate_space + ///@{ + //! Return if a trihedron right handed or not. //! From GLM_GTX_handed_coordinate_space extension. template @@ -42,6 +45,8 @@ namespace glm detail::tvec3 const & binormal, detail::tvec3 const & normal); + ///@} + }//namespace handed_coordinate_space }//namespace gtx }//namespace glm diff --git a/glm/gtx/inertia.hpp b/glm/gtx/inertia.hpp index 2c29697f..69a81d31 100644 --- a/glm/gtx/inertia.hpp +++ b/glm/gtx/inertia.hpp @@ -26,6 +26,9 @@ namespace glm //! GLM_GTX_inertia extension: Create inertia matrices namespace inertia { + /// \addtogroup gtx_inertia + ///@{ + //! Build an inertia matrix for a box. //! From GLM_GTX_inertia extension. template @@ -82,6 +85,8 @@ namespace glm const T Mass, const T Radius); + ///@} + }//namespace inertia }//namespace gtx }//namespace glm diff --git a/glm/gtx/int_10_10_10_2.hpp b/glm/gtx/int_10_10_10_2.hpp index 38c2c736..ca1e50b4 100644 --- a/glm/gtx/int_10_10_10_2.hpp +++ b/glm/gtx/int_10_10_10_2.hpp @@ -29,10 +29,15 @@ namespace glm { using namespace gtx::raw_data; + /// \addtogroup gtx_int_10_10_10_2 + ///@{ + //! From GLM_GTX_int_10_10_10_2 extension. //! Cast a vec4 to an u_10_10_10_2. dword uint10_10_10_2_cast(glm::vec4 const & v); + ///@} + }//namespace integer }//namespace gtx }//namespace glm diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp index 7afb1623..e60b936c 100644 --- a/glm/gtx/integer.hpp +++ b/glm/gtx/integer.hpp @@ -26,6 +26,9 @@ namespace glm //! GLM_GTX_integer extension: Add support for integer for core functions namespace integer { + /// \addtogroup gtx_integer + ///@{ + //! Returns x raised to the y power. //! From GLM_GTX_integer extension. int pow(int x, int y); @@ -43,6 +46,8 @@ namespace glm template genType factorial(genType const & x); + ///@} + }//namespace integer }//namespace gtx }//namespace glm diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index 5da484aa..c473a83e 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -32,7 +32,10 @@ namespace glm //! GLM_GTX_intersect extension: Add intersection functions namespace intersect { - //! Compute the intersection of a ray and a triangle. + /// \addtogroup gtx_intersect + ///@{ + + //! Compute the intersection of a ray and a triangle. //! From GLM_GTX_intersect extension. template bool intersectRayTriangle( @@ -64,6 +67,8 @@ namespace glm genType const & center, typename genType::value_type radius, genType & position, genType & normal); + ///@} + }//namespace intersect }//namespace gtx }//namespace glm diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index 8002cb35..bf7b5eea 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar. namespace log_base { + /// \addtogroup gtx_log_base + ///@{ + //! Logarithm for any base. //! From GLM_GTX_log_base. template @@ -37,6 +40,8 @@ namespace glm genType const & x, genType const & base); + ///@} + }//namespace extend }//namespace gtx }//namespace glm diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 91245c79..2ccdd6b1 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_matrix_cross_product: Build cross product matrices namespace matrix_cross_product { + /// \addtogroup gtx_matrix_cross_product + ///@{ + //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. template @@ -42,6 +45,8 @@ namespace glm detail::tmat4x4 matrixCross4( detail::tvec3 const & x); + ///@} + }//namespace matrix_cross_product }//namespace gtx }//namespace glm diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 11a23500..9746e771 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -23,9 +23,12 @@ namespace glm { namespace gtx{ - //! GLM_GTX_matrix_cross_product: Build matrices with specific matrix order, row or column + //! GLM_GTX_matrix_major_storage: Build matrices with specific matrix order, row or column namespace matrix_major_storage { + /// \addtogroup gtx_matrix_major_storage + ///@{ + //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. template @@ -109,6 +112,8 @@ namespace glm template detail::tmat4x4 colMajor4( const detail::tmat4x4& m); + + ///@} }//namespace matrix_major_storage }//namespace gtx diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index 6c3fa30d..c4834093 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -27,9 +27,12 @@ namespace glm }//namespace test namespace gtx{ - //! GLM_GTX_matrix_operation: Build cross product matrices + //! GLM_GTX_matrix_operation: Build diagonal matrices namespace matrix_operation { + /// \addtogroup gtx_matrix_operation + ///@{ + //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template @@ -84,6 +87,8 @@ namespace glm detail::tmat4x4 diagonal4x4( detail::tvec4 const & v); + ///@} + }//namespace matrix_operation }//namespace gtx }//namespace glm diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index 9dcfec79..222f1f88 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -27,9 +27,12 @@ namespace glm }//namespace test namespace gtx{ - //! GLM_GTX_matrix_query: Query to evaluate matrices properties + //! GLM_GTX_matrix_query: Query to evaluate matrix properties namespace matrix_query { + /// \addtogroup gtx_matrix_query + ///@{ + //! Return if a matrix a null matrix. //! From GLM_GTX_matrix_query extension. template @@ -86,6 +89,7 @@ namespace glm const genType& m, const typename genType::value_type epsilon = std::numeric_limits::epsilon()); + ///@} }//namespace matrix_query }//namespace gtx }//namespace glm diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index ca955c84..cad47e9e 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -30,12 +30,17 @@ namespace glm //! GLM_GTX_mixed_product extension: Mixed product of 3 vectors. namespace mixed_product { + /// \addtogroup gtx_mixed_product + ///@{ + //! \brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) template valType mixedProduct( detail::tvec3 const & v1, detail::tvec3 const & v2, detail::tvec3 const & v3); + + ///@} }//namespace mixed_product }//namespace gtx }//namespace glm diff --git a/glm/gtx/multiple.hpp b/glm/gtx/multiple.hpp index 5c406816..5cf1e855 100644 --- a/glm/gtx/multiple.hpp +++ b/glm/gtx/multiple.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_multiple: Find the closest number of a number multiple of other number. namespace multiple { + /// \addtogroup gtx_multiple + ///@{ + //! Higher Multiple number of Source. //! From GLM_GTX_multiple extension. template @@ -44,6 +47,8 @@ namespace glm genType const & Source, genType const & Multiple); + ///@} + }//namespace multiple }//namespace gtx }//namespace glm diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index 4384d107..599a3995 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -32,9 +32,12 @@ namespace glm }//namespace test namespace gtx{ - //! GLM_GTX_norm extension: Varius way to compute vector norms. + //! GLM_GTX_norm extension: Various way to compute vector norms. namespace norm { + /// \addtogroup gtx_norm + ///@{ + //! Returns the squared length of x. //! From GLM_GTX_norm extension. template @@ -134,6 +137,8 @@ namespace glm const detail::tvec3& x, unsigned int Depth); + ///@} + }//namespace norm }//namespace gtx }//namespace glm diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 870a8517..8c27798d 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_normal extension: Compute the normal of a triangle. namespace normal { + /// \addtogroup gtx_normal + ///@{ + //! Computes triangle normal from triangle points. //! From GLM_GTX_normal extension. template @@ -38,6 +41,8 @@ namespace glm detail::tvec3 const & p2, detail::tvec3 const & p3); + ///@} + }//namespace normal }//namespace gtx }//namespace glm diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp index c664717b..4f519698 100644 --- a/glm/gtx/normalize_dot.hpp +++ b/glm/gtx/normalize_dot.hpp @@ -30,6 +30,9 @@ namespace glm { using namespace gtx::fast_square_root; + /// \addtogroup gtx_normalize_dot + ///@{ + //! Normalize parameters and returns the dot product of x and y. //! It's faster that dot(normalize(x), normalize(y)). //! From GLM_GTX_normalize_dot extension. @@ -46,6 +49,8 @@ namespace glm genType const & x, genType const & y); + ///@} + }//namespace normalize_dot }//namespace gtx }//namespace glm diff --git a/glm/gtx/number_precision.hpp b/glm/gtx/number_precision.hpp index 22c6191c..4a4b68cb 100644 --- a/glm/gtx/number_precision.hpp +++ b/glm/gtx/number_precision.hpp @@ -33,6 +33,9 @@ namespace number_precision ///////////////////////////// // Unsigned int vector types + /// \addtogroup gtx_number_precision + ///@{ + typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension) typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension) typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension) @@ -55,6 +58,7 @@ namespace number_precision typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) + ///@} }//namespace number_precision }//namespace gtx }//namespace glm diff --git a/glm/gtx/ocl_type.hpp b/glm/gtx/ocl_type.hpp index f3341e9a..8ab15952 100644 --- a/glm/gtx/ocl_type.hpp +++ b/glm/gtx/ocl_type.hpp @@ -28,6 +28,9 @@ namespace ocl_type /////////////////////////// // Scalar types + /// \addtogroup gtx_ocl_type + ///@{ + typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::int32 cl_int; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) @@ -96,6 +99,8 @@ namespace ocl_type //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + ///@} + }//namespace ocl_type }//namespace gtx }//namespace glm diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index c9280547..90bd0966 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -27,9 +27,12 @@ namespace glm }//namespace test namespace gtx{ - //! GLM_GTX_optimum_pow extension: Integer exponenciation of power functions. + //! GLM_GTX_optimum_pow extension: Integer exponentiation of power functions. namespace optimum_pow { + /// \addtogroup gtx_optimum_pow + ///@{ + //! Returns x raised to the power of 2. //! From GLM_GTX_optimum_pow extension. template @@ -61,6 +64,8 @@ namespace glm //! From GLM_GTX_optimum_pow extension. detail::tvec4 powOfTwo(const detail::tvec4& x); + ///@} + }//namespace optimum_pow }//namespace gtx }//namespace glm diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index ef2d85cb..73d8625c 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -30,7 +30,10 @@ namespace glm //! GLM_GTX_orthonormalize extension: Orthonormalize matrices. namespace orthonormalize { - //! Returns the orthonormalized matrix of m. + /// \addtogroup gtx_orthonormalize + ///@{ + + //! Returns the orthonormalized matrix of m. //! From GLM_GTX_orthonormalize extension. template detail::tmat3x3 orthonormalize( @@ -43,6 +46,8 @@ namespace glm const detail::tvec3& x, const detail::tvec3& y); + ///@} + }//namespace orthonormalize }//namespace gtx }//namespace glm diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp index e7b950f6..c9212e68 100644 --- a/glm/gtx/perpendicular.hpp +++ b/glm/gtx/perpendicular.hpp @@ -32,7 +32,10 @@ namespace glm //! GLM_GTX_perpendicular extension: Perpendicular of a vector from other one namespace perpendicular { - //! Projects x a perpendicular axis of Normal. + /// \addtogroup gtx_perpendicular + ///@{ + + //! Projects x a perpendicular axis of Normal. //! From GLM_GTX_perpendicular extension. template detail::tvec2 perp( @@ -52,6 +55,9 @@ namespace glm detail::tvec4 perp( detail::tvec4 const & x, detail::tvec4 const & Normal); + + + ///@} }//namespace perpendicular }//namespace gtx diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index 633d60a7..2387ce66 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -26,6 +26,9 @@ namespace glm //! GLM_GTX_polar_coordinates extension: Conversion from Euclidean space to polar space and revert. namespace polar_coordinates { + /// \addtogroup gtx_polar_coordinates + ///@{ + //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. //! From GLM_GTX_polar_coordinates extension. template @@ -36,6 +39,8 @@ namespace glm template detail::tvec3 euclidean(const detail::tvec3& polar); + ///@} + }//namespace polar_coordinates }//namespace gtx }//namespace glm diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp index 83401d68..4f4f0dc5 100644 --- a/glm/gtx/projection.hpp +++ b/glm/gtx/projection.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_projection extension: Projection of a vector to other one namespace projection { + /// \addtogroup gtx_projection + ///@{ + //! Projects x on Normal. //! From GLM_GTX_projection extension. template @@ -50,6 +53,8 @@ namespace glm detail::tvec4 proj( detail::tvec4 const & x, detail::tvec4 const & Normal); + + ///@} }//namespace projection }//namespace gtx diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index b0bda231..91ca1751 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -33,7 +33,10 @@ namespace glm { using namespace gtc::quaternion; - //! Compute a cross product between a quaternion and a vector. + /// \addtogroup gtx_quaternion + ///@{ + + //! Compute a cross product between a quaternion and a vector. //! From GLM_GTX_quaternion extension. template detail::tvec3 cross( @@ -188,6 +191,8 @@ namespace glm detail::tquat toQuat( detail::tmat4x4 const & x){return gtc::quaternion::quat_cast(x);} + ///@} + }//namespace quaternion }//namespace gtx } //namespace glm diff --git a/glm/gtx/random.hpp b/glm/gtx/random.hpp index aa871e20..dad34ddd 100644 --- a/glm/gtx/random.hpp +++ b/glm/gtx/random.hpp @@ -25,9 +25,12 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_random extension: Generate random number from varius distribution methods +//! GLM_GTX_random extension: Generate random number from various distribution methods namespace random { + /// \addtogroup gtx_random + ///@{ + //! Generate a random number in the interval [-1, 1], according a linear distribution. //! From GLM_GTX_random extension. template T signedRand1(); @@ -75,6 +78,7 @@ namespace random template detail::tvec3 gaussRand3(const detail::tvec3& mean, const detail::tvec3& std_deviation); //!< \brief Gererate 3 random floating numbers according a Gauss distribution. (From GLM_GTX_random extension) template detail::tvec4 gaussRand4(const detail::tvec4& mean, const detail::tvec4& std_deviation); //!< \brief Gererate 4 random floating numbers according a Gauss distribution. (From GLM_GTX_random extension) + ///@} }//namespace random }//namespace gtx }//namespace glm diff --git a/glm/gtx/raw_data.hpp b/glm/gtx/raw_data.hpp index 6e7d3e7a..d0e11757 100644 --- a/glm/gtx/raw_data.hpp +++ b/glm/gtx/raw_data.hpp @@ -29,6 +29,9 @@ namespace gtx { using namespace gtc::type_precision; + /// \addtogroup gtx_raw_data + ///@{ + //! Type for byte numbers. //! From GLM_GTX_raw_data extension. typedef uint8 byte; @@ -44,6 +47,8 @@ namespace gtx //! Type for qword numbers. //! From GLM_GTX_raw_data extension. typedef uint64 qword; + + ///@} } }//namespace gtx }//namespace glm diff --git a/glm/gtx/reciprocal.hpp b/glm/gtx/reciprocal.hpp index 668666a1..27763c22 100644 --- a/glm/gtx/reciprocal.hpp +++ b/glm/gtx/reciprocal.hpp @@ -27,6 +27,9 @@ namespace glm //! GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions. namespace reciprocal { + /// \addtogroup gtx_reciprocal + ///@{ + //! Secant function. //! hypotenuse / adjacent or 1 / cos(x) //! From GLM_GTX_reciprocal extension. @@ -90,6 +93,8 @@ namespace glm template genType acoth(genType const & x); + ///@} + }//namespace reciprocal }//namespace gtx }//namespace glm diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index 618062ba..2b420772 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -29,14 +29,17 @@ namespace glm { using namespace transform; - //! Rotate a two dimentionnals vector. + /// \addtogroup gtx_rotate_vector + ///@{ + + //! Rotate a two dimensional vector. //! From GLM_GTX_rotate_vector extension. template detail::tvec2 rotate( const detail::tvec2& v, T angle); - //! Rotate a three dimentionnals vector around an axis. + //! Rotate a three dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec3 rotate( @@ -44,28 +47,28 @@ namespace glm T angle, const detail::tvec3& normal); - //! Rotate a four dimentionnals vector around an axis. + //! Rotate a four dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec4 rotate( const detail::tvec4& v, T angle, const detail::tvec3& normal); - //! Rotate a three dimentionnals vector around the X axis. + //! Rotate a three dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec3 rotateX( const detail::tvec3& v, T angle); - //! Rotate a three dimentionnals vector around the Y axis. + //! Rotate a three dimensional vector around the Y axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec3 rotateY( const detail::tvec3& v, T angle); - //! Rotate a three dimentionnals vector around the Z axis. + //! Rotate a three dimensional vector around the Z axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec3 rotateZ( @@ -79,14 +82,14 @@ namespace glm const detail::tvec4& v, T angle); - //! Rotate a four dimentionnals vector around the X axis. + //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec4 rotateY( const detail::tvec4& v, T angle); - //! Rotate a four dimentionnals vector around the X axis. + //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template detail::tvec4 rotateZ( @@ -99,6 +102,8 @@ namespace glm detail::tmat4x4 orientation( const detail::tvec3& Normal, const detail::tvec3& Up); + + ///@} }//namespace rotate_vector }//namespace gtx diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index f48df975..3b9963c1 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -32,6 +32,8 @@ namespace glm { namespace detail { + /// 4x4 Matrix implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_mat4 GLM_ALIGN(16) struct fmat4x4SIMD { enum ctor{null}; @@ -129,11 +131,14 @@ namespace glm }//namespace detail namespace gtx{ - //! GLM_GTX_simd_mat4 extension: SIMD implementation of vec4 type. + //! GLM_GTX_simd_mat4 extension: SIMD implementation of mat4 type. namespace simd_mat4 { typedef detail::fmat4x4SIMD simdMat4; + /// \addtogroup gtx_simd_mat4 + ///@{ + //! Convert a simdMat4 to a mat4. //! (From GLM_GTX_simd_mat4 extension) detail::tmat4x4 mat4_cast( @@ -169,6 +174,8 @@ namespace glm detail::fmat4x4SIMD simdInverse( detail::fmat4x4SIMD const & m); + ///@} + }//namespace simd_mat4 }//namespace gtx }//namespace glm diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 186fd045..efa73220 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -32,6 +32,8 @@ namespace glm { namespace detail { + /// 4-dimensional vector implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_vec4 GLM_ALIGN(4) struct fvec4SIMD { enum ctor{null}; @@ -117,6 +119,9 @@ namespace glm { typedef detail::fvec4SIMD simdVec4; + /// \addtogroup gtx_simd_vec4 + ///@{ + //! Convert a simdVec4 to a vec4. //! (From GLM_GTX_simd_vec4 extension) detail::tvec4 vec4_cast( @@ -401,6 +406,8 @@ namespace glm detail::fvec4SIMD const & I, detail::fvec4SIMD const & N, float const & eta); + + ///@} }//namespace simd_vec4 }//namespace gtx }//namespace glm diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 60a9f277..d00bf572 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -29,7 +29,10 @@ namespace glm { using namespace gtx::optimum_pow; - //! Return a point from a catmull rom curve. + /// \addtogroup gtx_spline + ///@{ + + //! Return a point from a catmull rom curve. //! From GLM_GTX_spline extension. template genType catmullRom( @@ -59,6 +62,8 @@ namespace glm const genType& v4, const GLMvalType& s); + ///@} + }//namespace spline }//namespace gtx }//namespace glm diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index 5e47dbfe..565268f6 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -43,11 +43,16 @@ namespace glm using namespace gtx::unsigned_int; using namespace gtx::quaternion; + /// \addtogroup gtx_string_cast + ///@{ + //! Create a string from a GLM type value. //! From GLM_GTX_string_cast extension. template std::string to_string(genType const & x); + ///@} + }//namespace string_cast }//namespace gtx }//namespace glm diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index fdb7f5e1..adf18639 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -34,6 +34,9 @@ namespace glm { using namespace gtc::matrix_transform; + /// \addtogroup gtx_transform + ///@{ + //! Builds a translation 4 * 4 matrix created from 3 scalars. //! From GLM_GTX_transform extension. template @@ -94,6 +97,8 @@ namespace glm detail::tmat4x4 scale( detail::tvec3 const & v); + ///@} + }//namespace transform }//namespace gtx }//namespace glm diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index f24ff729..90b13f29 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -34,6 +34,9 @@ namespace glm { using namespace gtx::transform; + /// \addtogroup gtx_transform2 + ///@{ + //! Transforms a matrix with a shearing on X axis. //! From GLM_GTX_transform2 extension. template @@ -109,6 +112,8 @@ namespace glm valType scale, valType bias); + ///@} + }//namespace transform2 }//namespace gtx }//namespace glm diff --git a/glm/gtx/unsigned_int.hpp b/glm/gtx/unsigned_int.hpp index 9f43d94d..a8f210d0 100644 --- a/glm/gtx/unsigned_int.hpp +++ b/glm/gtx/unsigned_int.hpp @@ -34,6 +34,9 @@ namespace glm { using namespace gtx::integer; + /// \addtogroup gtx_unsigned_int + ///@{ + //! 32bit signed integer. //! From GLM_GTX_unsigned_int extension. typedef signed int sint; @@ -50,6 +53,8 @@ namespace glm //! From GLM_GTX_unsigned_int extension. uint mod(uint x, uint y); + ///@} + }//namespace unsigned_int }//namespace gtx }//namespace glm diff --git a/glm/gtx/vec1.hpp b/glm/gtx/vec1.hpp index f47ee5b9..0da37451 100644 --- a/glm/gtx/vec1.hpp +++ b/glm/gtx/vec1.hpp @@ -34,41 +34,41 @@ namespace glm namespace precision { //! 1 component vector of high precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::highp_vec1_t highp_vec1; //! 1 component vector of medium precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::mediump_vec1_t mediump_vec1; //! 1 component vector of low precision floating-point numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::lowp_vec1_t lowp_vec1; //! 1 component vector of high precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::highp_ivec1_t highp_ivec1; //! 1 component vector of medium precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::mediump_ivec1_t mediump_ivec1; //! 1 component vector of low precision signed integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::lowp_ivec1_t lowp_ivec1; //! 1 component vector of high precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::highp_uvec1_t highp_uvec1; //! 1 component vector of medium precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::mediump_uvec1_t mediump_uvec1; //! 1 component vector of low precision unsigned integer numbers. - //! There is no garanty on the actual precision. + //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::lowp_uvec1_t lowp_uvec1; }//namespace precision diff --git a/glm/gtx/vector_access.hpp b/glm/gtx/vector_access.hpp index eb5688fc..1968d4f9 100644 --- a/glm/gtx/vector_access.hpp +++ b/glm/gtx/vector_access.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_vector_access extension: Function to set values to vectors namespace vector_access { + /// \addtogroup gtx_vector_access + ///@{ + //! Set values to a 2 components vector. //! From GLM_GTX_vector_access extension. template @@ -57,6 +60,8 @@ namespace glm valType const & z, valType const & w); + ///@} + }//namespace vector_access }//namespace gtx }//namespace glm diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index 48f6ade3..2dacbe81 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -37,6 +37,9 @@ namespace glm using namespace quaternion; using namespace epsilon; + /// \addtogroup gtx_vector_angle + ///@{ + //! Returns the absolute angle between x and y. //! Parameters need to be normalized. //! From GLM_GTX_vector_angle extension @@ -61,6 +64,8 @@ namespace glm vecType const & x, vecType const & y, detail::tvec3 const & ref); + + ///@} }//namespace vector_angle }//namespace gtx }//namespace glm diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 1629c666..776a99ed 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -32,7 +32,10 @@ namespace glm //! GLM_GTX_vector_query extension: Query informations of vector types namespace vector_query { - //! Check if two vectors are collinears. + /// \addtogroup gtx_vector_query + ///@{ + + //! Check if two vectors are collinears. //! From GLM_GTX_vector_query extensions. template bool areCollinear( @@ -86,6 +89,8 @@ namespace glm const genType& v1, const GLMvalType epsilon = std::numeric_limits::epsilon()); + ///@} + }//namespace vector_query }//namespace gtx }//namespace glm diff --git a/glm/gtx/verbose_operator.hpp b/glm/gtx/verbose_operator.hpp index 1ac56b2e..951ea47f 100644 --- a/glm/gtx/verbose_operator.hpp +++ b/glm/gtx/verbose_operator.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_verbose_operator extension: Use words to replace operators namespace verbose_operator { + /// \addtogroup gtx_verbose_operator + ///@{ + //! Addition of two values //! From GLM_GTX_verbose_operator extension. template @@ -54,6 +57,8 @@ namespace glm //! From GLM_GTX_verbose_operator extension. template genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); + + ///@} }//namespace verbose_operator }//namespace gtx }//namespace glm diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp index 67bfd401..caac013c 100644 --- a/glm/gtx/wrap.hpp +++ b/glm/gtx/wrap.hpp @@ -30,6 +30,9 @@ namespace glm //! GLM_GTX_wrap: Wrapping mode using my texture samping. namespace wrap { + /// \addtogroup gtx_wrap + ///@{ + //! Simulate GL_CLAMP OpenGL wrap mode //! From GLM_GTX_wrap extension. template @@ -45,6 +48,8 @@ namespace glm template genType mirrorRepeat(genType const & Texcoord); + ///@} + }//namespace wrap }//namespace gtx }//namespace glm