From 96a0a678ad1f9387d48058a6808d226a9d036a8c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 16 May 2011 18:44:16 +0100 Subject: [PATCH] Updated doxygen comment convensions --- glm/core/_fixes.hpp | 34 +++- glm/glm.hpp | 87 ++++++---- glm/gtc/matrix_transform.hpp | 325 +++++++++++++++++------------------ 3 files changed, 239 insertions(+), 207 deletions(-) diff --git a/glm/core/_fixes.hpp b/glm/core/_fixes.hpp index ba708003..2f217f53 100644 --- a/glm/core/_fixes.hpp +++ b/glm/core/_fixes.hpp @@ -1,11 +1,29 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-02-21 -// Updated : 2011-02-21 -// Licence : This source is under MIT License -// File : glm/core/_fixes.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file glm/core/_fixes.hpp +/// @date 2011-02-21 / 2011-02-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// //! Workaround for compatibility with other libraries #ifdef max diff --git a/glm/glm.hpp b/glm/glm.hpp index ec5afbb1..bda8427b 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -1,11 +1,31 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-01-14 -// Updated : 2011-01-19 -// Licence : This source is under MIT License -//! \file glm/glm.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file glm/glm.hpp +/// @date 2005-01-14 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @ref core +/////////////////////////////////////////////////////////////////////////////////// #include "core/_fixes.hpp" @@ -24,39 +44,34 @@ #endif//GLM_MESSAGE //! GLM namespace, it contains all GLSL based features. -namespace glm +namespace glm{ +namespace test { - namespace test - { - bool main_bug(); - bool main_core(); - }//namespace test + bool main_bug(); + bool main_core(); +}//namespace test - //! GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace. - namespace core - { - //! Scalar, vectors and matrices - //! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section, - //! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification. - //! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification. - namespace type{} +/// GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace. +namespace core +{ + //! Scalar, vectors and matrices + //! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section, + //! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification. + //! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification. + namespace type{} - //! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification. - //! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions. - namespace function{} - } - //namespace core + //! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification. + //! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions. + namespace function{} +} +//namespace core - //! G-Truc Creation stable extensions. - namespace gtc{} - - //! G-Truc Creation experimental extensions. - //! The interface could change between releases. - namespace gtx{} - - //! VIRTREV extensions. - namespace img{} +/// G-Truc Creation stable extensions. +namespace gtc{} +/// G-Truc Creation experimental extensions. +/// The interface could change between releases. +namespace gtx{} } //namespace glm #include "./core/_detail.hpp" diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 8362f5bc..09acf6c4 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -1,34 +1,34 @@ /////////////////////////////////////////////////////////////////////////////////// -//! OpenGL Mathematics (glm.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////// -//! Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -//! Permission is hereby granted, free of charge, to any person obtaining a copy -//! of this software and associated documentation files (the "Software"), to deal -//! in the Software without restriction, including without limitation the rights -//! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -//! copies of the Software, and to permit persons to whom the Software is -//! furnished to do so, subject to the following conditions: -//! -//! The above copyright notice and this permission notice shall be included in -//! all copies or substantial portions of the Software. -//! -//! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -//! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -//! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -//! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -//! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -//! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -//! THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// -//! \ref gtc_matrix_transform -//! \file glm/gtc/matrix_transform.hpp -//! \date 2009-04-29 / 2011-05-16 -//! \author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -//! \sa core (dependence) -//! \sa gtc_matrix_transform -//! \sa gtx_transform -//! \sa gtx_transform2 +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file glm/gtc/matrix_transform.hpp +/// @date 2009-04-29 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @ref gtc_matrix_transform +/// @see core (dependence) +/// @see gtc_matrix_transform +/// @see gtx_transform +/// @see gtx_transform2 /////////////////////////////////////////////////////////////////////////////////// #ifndef glm_gtc_matrix_transform @@ -41,155 +41,154 @@ # pragma message("GLM: GLM_GTC_matrix_transform extension included") #endif -namespace glm +namespace glm{ +namespace test{ + bool main_gtc_matrix_transform(); +}//namespace test + +namespace gtc{ +/// GLM_GTC_matrix_transform extension: Add transformation matrices +namespace matrix_transform { - namespace test{ - bool main_gtc_matrix_transform(); - }//namespace test + /// @addtogroup gtc_matrix_transform + /// @{ - namespace gtc{ - //! 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. - //! \sa - gtc_matrix_transform - //! \sa - gtx_transform: - //! - glm::gtx::transform::translate(T x, T y, T z) - //! - glm::gtx::transform::translate(detail::tmat4x4 const & m, T x, T y, T z) - template - detail::tmat4x4 translate( - detail::tmat4x4 const & m, - detail::tvec3 const & v); + /// Builds a translation 4 * 4 matrix created from a vector of 3 components. + /// @see - gtc_matrix_transform + /// @see - gtx_transform: + /// - @link glm::gtx::transform::translate(T x, T y, T z) translate(T x, T y, T z) @endlink + /// - @link glm::gtx::transform::translate(detail::tmat4x4 const & m, T x, T y, T z) translate(mat4x4 const & m, T x, T y, T z) @endlink + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + detail::tvec3 const & v); - //! Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees. - //! \sa - gtc_matrix_transform - //! \sa - gtx_transform: - //! - \link glm::gtx::transform::rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) \endlink - //! - \link glm::gtx::transform::rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) rotate(mat4x4 const & m, T const & angle, T const & x, T const & y, T const & z) \endlink - template - detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T const & angle, - detail::tvec3 const & v); + /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees. + /// @see - gtc_matrix_transform + /// @see - gtx_transform: + /// - @link glm::gtx::transform::rotate(T angle, T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink + /// - @link glm::gtx::transform::rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) rotate(mat4x4 const & m, T const & angle, T const & x, T const & y, T const & z) @endlink + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v); - //! Builds a scale 4 * 4 matrix created from 3 scalars. - //! \sa - gtc_matrix_transform - //! \sa - gtx_transform: - //! - \link glm::gtx::transform::scale(T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) \endlink - //! - \link glm::gtx::transform::scale(detail::tmat4x4 const & m, T x, T y, T z) rotate(mat4x4 const & m, T const & angle, T const & x, T const & y, T const & z) \endlink - template - detail::tmat4x4 scale( - detail::tmat4x4 const & m, - detail::tvec3 const & v); + /// Builds a scale 4 * 4 matrix created from 3 scalars. + /// @see - gtc_matrix_transform + /// @see - gtx_transform: + /// - @link glm::gtx::transform::scale(T x, T y, T z) rotate(T const & angle, T const & x, T const & y, T const & z) @endlink + /// - @link glm::gtx::transform::scale(detail::tmat4x4 const & m, T x, T y, T z) rotate(mat4x4 const & m, T const & angle, T const & x, T const & y, T const & z) @endlink + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + detail::tvec3 const & v); - //! Creates a matrix for an orthographic parallel viewing volume. - //! \sa - gtc_matrix_transform: - //! - \link glm::gtc::matrix_transform::ortho(T const & left, T const & right, T const & bottom, T const & top) ortho(T const & left, T const & right, T const & bottom, T const & top) \endlink - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & zNear, - T const & zFar); + /// Creates a matrix for an orthographic parallel viewing volume. + /// @see - gtc_matrix_transform: + /// - @link glm::gtc::matrix_transform::ortho(T const & left, T const & right, T const & bottom, T const & top) ortho(T const & left, T const & right, T const & bottom, T const & top) @endlink + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & zNear, + T const & zFar); - //! Creates a matrix for projecting two-dimensional coordinates onto the screen. - //! \sa - gtc_matrix_transform: - //! - \link glm::gtc::matrix_transform::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) \endlink - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top); + /// Creates a matrix for projecting two-dimensional coordinates onto the screen. + /// @see - gtc_matrix_transform: + /// - @link glm::gtc::matrix_transform::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) @endlink + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top); - //! Creates a frustum matrix. - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 frustum( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & nearVal, - T const & farVal); + /// Creates a frustum matrix. + /// @see - gtc_matrix_transform + template + detail::tmat4x4 frustum( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & nearVal, + T const & farVal); - //! Creates a matrix for a symetric perspective-view frustum. - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 perspective( - T const & fovy, - T const & aspect, - T const & zNear, - T const & zFar); + /// Creates a matrix for a symetric perspective-view frustum. + /// @see - gtc_matrix_transform + template + detail::tmat4x4 perspective( + T const & fovy, + T const & aspect, + T const & zNear, + T const & zFar); - //! Builds a perspective projection matrix based on a field of view - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 perspectiveFov( - valType const & fov, - valType const & width, - valType const & height, - valType const & zNear, - valType const & zFar); + /// Builds a perspective projection matrix based on a field of view + /// @see - gtc_matrix_transform + template + detail::tmat4x4 perspectiveFov( + valType const & fov, + valType const & width, + valType const & height, + valType const & zNear, + valType const & zFar); - //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite . - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 infinitePerspective( - T fovy, T aspect, T zNear); + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite . + /// @see - gtc_matrix_transform + template + detail::tmat4x4 infinitePerspective( + T fovy, T aspect, T zNear); - //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 tweakedInfinitePerspective( - T fovy, T aspect, T zNear); + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. + /// @see - gtc_matrix_transform + template + detail::tmat4x4 tweakedInfinitePerspective( + T fovy, T aspect, T zNear); - //! Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. - //! \sa - gtc_matrix_transform - template - detail::tvec3 project( - detail::tvec3 const & obj, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); + /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. + /// @see - gtc_matrix_transform + template + detail::tvec3 project( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); - //! Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. - //! \sa - gtc_matrix_transform - template - detail::tvec3 unProject( - detail::tvec3 const & win, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); + /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. + /// @see - gtc_matrix_transform + template + detail::tvec3 unProject( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); - //! Define a picking region - //! \sa - gtc_matrix_transform - template - detail::tmat4x4 pickMatrix( - detail::tvec2 const & center, - detail::tvec2 const & delta, - detail::tvec4 const & viewport); + /// Define a picking region + /// @see - gtc_matrix_transform + template + detail::tmat4x4 pickMatrix( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport); - //! Build a look at view matrix. - //! \sa - gtc_matrix_transform: - //! - \link frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)\endlink - //! \param eye Position of the camera - //! \param center Position where the camera is looking at - //! \param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) - template - detail::tmat4x4 lookAt( - detail::tvec3 const & eye, - detail::tvec3 const & center, - detail::tvec3 const & up); + /// Build a look at view matrix. + /// @see - gtc_matrix_transform: + /// - @link frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) @endlink + /// @param eye Position of the camera + /// @param center Position where the camera is looking at + /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) + template + detail::tmat4x4 lookAt( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up); - ///@} - }//namespace matrix_transform - }//namespace gtc + /// @} +}//namespace matrix_transform +}//namespace gtc }//namespace glm #include "matrix_transform.inl"