Home | History | Annotate | Download | only in gtx
      1 ///////////////////////////////////////////////////////////////////////////////////
      2 /// OpenGL Mathematics (glm.g-truc.net)
      3 ///
      4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
      5 /// Permission is hereby granted, free of charge, to any person obtaining a copy
      6 /// of this software and associated documentation files (the "Software"), to deal
      7 /// in the Software without restriction, including without limitation the rights
      8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
      9 /// copies of the Software, and to permit persons to whom the Software is
     10 /// furnished to do so, subject to the following conditions:
     11 ///
     12 /// The above copyright notice and this permission notice shall be included in
     13 /// all copies or substantial portions of the Software.
     14 ///
     15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     21 /// THE SOFTWARE.
     22 ///
     23 /// @ref gtx_associated_min_max
     24 /// @file glm/gtx/associated_min_max.hpp
     25 /// @date 2008-03-10 / 2011-06-07
     26 /// @author Christophe Riccio
     27 ///
     28 /// @see core (dependence)
     29 /// @see gtx_extented_min_max (dependence)
     30 ///
     31 /// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max
     32 /// @ingroup gtx
     33 ///
     34 /// @brief Min and max functions that return associated values not the compared onces.
     35 /// <glm/gtx/associated_min_max.hpp> need to be included to use these functionalities.
     36 ///////////////////////////////////////////////////////////////////////////////////
     37 
     38 #ifndef GLM_GTX_associated_min_max
     39 #define GLM_GTX_associated_min_max
     40 
     41 // Dependency:
     42 #include "../glm.hpp"
     43 
     44 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
     45 #	pragma message("GLM: GLM_GTX_associated_min_max extension included")
     46 #endif
     47 
     48 namespace glm
     49 {
     50 	/// @addtogroup gtx_associated_min_max
     51 	/// @{
     52 
     53 	/// Min comparison between 2 variables
     54 	/// @see gtx_associated_min_max
     55 	template<typename genTypeT, typename genTypeU>
     56 	GLM_FUNC_DECL genTypeU associatedMin(
     57 		const genTypeT& x, const genTypeU& a,
     58 		const genTypeT& y, const genTypeU& b);
     59 
     60 	/// Min comparison between 3 variables
     61 	/// @see gtx_associated_min_max
     62 	template<typename genTypeT, typename genTypeU>
     63 	GLM_FUNC_DECL genTypeU associatedMin(
     64 		const genTypeT& x, const genTypeU& a,
     65 		const genTypeT& y, const genTypeU& b,
     66 		const genTypeT& z, const genTypeU& c);
     67 
     68 	/// Min comparison between 4 variables
     69 	/// @see gtx_associated_min_max
     70 	template<typename genTypeT, typename genTypeU>
     71 	GLM_FUNC_DECL genTypeU associatedMin(
     72 		const genTypeT& x, const genTypeU& a,
     73 		const genTypeT& y, const genTypeU& b,
     74 		const genTypeT& z, const genTypeU& c,
     75 		const genTypeT& w, const genTypeU& d);
     76 
     77 	/// Max comparison between 2 variables
     78 	/// @see gtx_associated_min_max
     79 	template<typename genTypeT, typename genTypeU>
     80 	GLM_FUNC_DECL genTypeU associatedMax(
     81 		const genTypeT& x, const genTypeU& a,
     82 		const genTypeT& y, const genTypeU& b);
     83 
     84 	/// Max comparison between 3 variables
     85 	/// @see gtx_associated_min_max
     86 	template<typename genTypeT, typename genTypeU>
     87 	GLM_FUNC_DECL genTypeU associatedMax(
     88 		const genTypeT& x, const genTypeU& a,
     89 		const genTypeT& y, const genTypeU& b,
     90 		const genTypeT& z, const genTypeU& c);
     91 
     92 	/// Max comparison between 4 variables
     93 	/// @see gtx_associated_min_max
     94 	template<typename genTypeT, typename genTypeU>
     95 	GLM_FUNC_DECL genTypeU associatedMax(
     96 		const genTypeT& x, const genTypeU& a,
     97 		const genTypeT& y, const genTypeU& b,
     98 		const genTypeT& z, const genTypeU& c,
     99 		const genTypeT& w, const genTypeU& d);
    100 
    101 	/// @}
    102 } //namespace glm
    103 
    104 #include "associated_min_max.inl"
    105 
    106 #endif//GLM_GTX_associated_min_max
    107