commit 25b03fe24c96746eba5866dfa0862ba90018244e Author: Christophe Riccio Date: Wed Apr 14 13:23:59 2010 +0100 Initial commit based on GLM 0.9.B.1 code diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..f91d2bb0 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 2.6 FATAL_ERROR) +cmake_policy(VERSION 2.6) + +project(glm) + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) +#add_definitions(-mfpmath=sse) +#add_definitions(-msse3) +#add_definitions(-Wextra) + +add_subdirectory(glm) +add_subdirectory(doc) +add_subdirectory(sample) +add_subdirectory(test) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 00000000..6d9f918b --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,10 @@ +set(NAME glm-doc) + +file(GLOB ROOT_CPP src/*.cpp) +file(GLOB ROOT_XML src/*.xml) +file(GLOB ROOT_XSL src/*.xsl) + +source_group("XML Files" FILES ${ROOT_XML}) +source_group("XSL Files" FILES ${ROOT_XSL}) + +add_executable(${NAME} ${ROOT_CPP} ${ROOT_XML} ${ROOT_XSL}) diff --git a/doc/build/XalanMessages_1_7_0.dll b/doc/build/XalanMessages_1_7_0.dll new file mode 100644 index 00000000..65834439 Binary files /dev/null and b/doc/build/XalanMessages_1_7_0.dll differ diff --git a/doc/build/build.bat b/doc/build/build.bat new file mode 100644 index 00000000..18062b06 --- /dev/null +++ b/doc/build/build.bat @@ -0,0 +1,9 @@ +xalan -m -o ..\index.html ..\src\data.xml ..\src\news.xsl +xalan -m -o ..\download.html ..\src\data.xml ..\src\download.xsl +xalan -m -o ..\changelog.html ..\src\data.xml ..\src\changelog.xsl +xalan -m -o ..\issue.html ..\src\data.xml ..\src\issue.xsl +xalan -m -o ..\link.html ..\src\data.xml ..\src\link.xsl +xalan -m -o ..\goodies.html ..\src\data.xml ..\src\goodies.xsl +xalan -m -o ..\about.html ..\src\data.xml ..\src\about.xsl +xalan -m -o ..\code.html ..\src\data.xml ..\src\code.xsl +pause \ No newline at end of file diff --git a/doc/build/msvcp71.dll b/doc/build/msvcp71.dll new file mode 100644 index 00000000..9ed0d17e Binary files /dev/null and b/doc/build/msvcp71.dll differ diff --git a/doc/build/msvcr71.dll b/doc/build/msvcr71.dll new file mode 100644 index 00000000..9d9e0286 Binary files /dev/null and b/doc/build/msvcr71.dll differ diff --git a/doc/build/xalan-c_1_7_0.dll b/doc/build/xalan-c_1_7_0.dll new file mode 100644 index 00000000..319c14dd Binary files /dev/null and b/doc/build/xalan-c_1_7_0.dll differ diff --git a/doc/build/xalan.exe b/doc/build/xalan.exe new file mode 100644 index 00000000..62deedc5 Binary files /dev/null and b/doc/build/xalan.exe differ diff --git a/doc/build/xerces-c_2_5_0.dll b/doc/build/xerces-c_2_5_0.dll new file mode 100644 index 00000000..1a9b5112 Binary files /dev/null and b/doc/build/xerces-c_2_5_0.dll differ diff --git a/doc/code/01.png b/doc/code/01.png new file mode 100644 index 00000000..2099e56f Binary files /dev/null and b/doc/code/01.png differ diff --git a/doc/code/02.png b/doc/code/02.png new file mode 100644 index 00000000..83412c00 Binary files /dev/null and b/doc/code/02.png differ diff --git a/doc/code/03.png b/doc/code/03.png new file mode 100644 index 00000000..6774fc77 Binary files /dev/null and b/doc/code/03.png differ diff --git a/doc/common/doxygen/doxygen.css b/doc/common/doxygen/doxygen.css new file mode 100644 index 00000000..65123996 --- /dev/null +++ b/doc/common/doxygen/doxygen.css @@ -0,0 +1,475 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { + font-weight: bold +} +DIV.qindex { + width: 100%; + background-color: #ff8000;/*#e8eef2;*/ + border: 1px solid #ff8000; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navpath { + width: 100%; + background-color: #ff8000;/*e8eef2*/ + border: 1px solid #ff8000; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #ff8000;/*#e8eef2;*/ + border: 1px solid #ff8000; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #ff8000; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #ff8000 +} +A.qindex:hover { + text-decoration: none; + background-color: #ffe0c0; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #ffe0c0; + color: #ffffff; + border: 1px double #ffe0c0; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #ffe0c0; + color: #ffffff; +} +A.qindexHL:visited { + text-decoration: none; + background-color: #ffe0c0; + color: #ffffff +} +A.el { + text-decoration: none; + font-weight: bold +} +A.elRef { + font-weight: bold +} +A.code:link { + text-decoration: none; + font-weight: normal; + color: #ff8000 +} +A.code:visited { + text-decoration: none; + font-weight: normal; + color: #ff8000 +} +A.codeRef:link { + font-weight: normal; + color: #ff8000 +} +A.codeRef:visited { + font-weight: normal; + color: #ff8000 +} +A:hover { + text-decoration: none; + background-color: #f2f2ff +} +DL.el { + margin-left: -1cm +} +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: 90% +} +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #fff0e0;/*#e8eef2;*/ + font-weight : normal; + padding-right : 10px; + padding-top : 8px; + padding-left : 10px; + padding-bottom : 8px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 0px solid #CCCCCC; + -moz-border-radius: 8px 8px 8px 8px; +} +TD.indexvalue { + background-color: #fff0e0;/*#e8eef2;*/ + font-style: italic; + padding-right : 10px; + padding-top : 8px; + padding-left : 10px; + padding-bottom : 8px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 0px solid #CCCCCC; + -moz-border-radius: 8px 8px 8px 8px; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { + text-align: center; +} +IMG.formulaDsp { +} +IMG.formulaInl { + vertical-align: middle; +} +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +SPAN.vhdldigit { color: #ff00ff } +SPAN.vhdlchar { color: #000000 } +SPAN.vhdlkeyword { color: #700070 } +SPAN.vhdllogic { color: #ff0000 } + +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { + color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { + font-size: 75%; + color: #402000; + font-weight: normal; + background-color: #ffe0c0; +} +TD.tiny { + font-size: 75%; +} +a { + color: #402000; +} +a:visited { + color: #804000; +} +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #fff0e0; +} +TH.dirtab { + background: #fff0e0; + font-weight: bold; +} +HR { + height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #ffe0c0; + border: 1px solid #ffe0c0; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #fff0e0; + border-width: 1px; + border-style: solid; + border-color: #fff0e0; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #ffe0c0; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #ffe0c0; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +/* these are for tree view when used as main index */ +.directory { + font-size: 9pt; + font-weight: bold; +} +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* The following two styles can be used to replace the root node title */ +/* with an image of your choice. Simply uncomment the next two styles, */ +/* specify the name of your image and be sure to set 'height' to the */ +/* proper pixel height of your image. */ + +/* .directory h3.swap { */ +/* height: 61px; */ +/* background-repeat: no-repeat; */ +/* background-image: url("yourimage.gif"); */ +/* } */ +/* .directory h3.swap span { */ +/* display: none; */ +/* } */ + +.directory > h3 { + margin-top: 0; +} +.directory p { + margin: 0px; + white-space: nowrap; +} +.directory div { + display: none; + margin: 0px; +} +.directory img { + vertical-align: -30%; +} +/* these are for tree view when not used as main index */ +.directory-alt { + font-size: 100%; + font-weight: bold; +} +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} +.directory-alt > h3 { + margin-top: 0; +} +.directory-alt p { + margin: 0px; + white-space: nowrap; +} +.directory-alt div { + display: none; + margin: 0px; +} +.directory-alt img { + vertical-align: -30%; +} + diff --git a/doc/common/doxygen/doxygen.png b/doc/common/doxygen/doxygen.png new file mode 100644 index 00000000..c2877691 Binary files /dev/null and b/doc/common/doxygen/doxygen.png differ diff --git a/doc/common/doxygen/tab_b.gif b/doc/common/doxygen/tab_b.gif new file mode 100644 index 00000000..eeb81d48 Binary files /dev/null and b/doc/common/doxygen/tab_b.gif differ diff --git a/doc/common/doxygen/tab_l.gif b/doc/common/doxygen/tab_l.gif new file mode 100644 index 00000000..73cb1c57 Binary files /dev/null and b/doc/common/doxygen/tab_l.gif differ diff --git a/doc/common/doxygen/tab_r.gif b/doc/common/doxygen/tab_r.gif new file mode 100644 index 00000000..f404572d Binary files /dev/null and b/doc/common/doxygen/tab_r.gif differ diff --git a/doc/common/doxygen/tabs.css b/doc/common/doxygen/tabs.css new file mode 100644 index 00000000..308ff66d --- /dev/null +++ b/doc/common/doxygen/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #FF8000; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #000000;/*#1A419D;*/ +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.navpath +{ + background : none; + border : none; + border-bottom : 1px solid #FF8000; +} diff --git a/doc/common/email.png b/doc/common/email.png new file mode 100644 index 00000000..a5c71db1 Binary files /dev/null and b/doc/common/email.png differ diff --git a/doc/common/g-truc.jpg b/doc/common/g-truc.jpg new file mode 100644 index 00000000..50e2f8db Binary files /dev/null and b/doc/common/g-truc.jpg differ diff --git a/doc/common/logo.png b/doc/common/logo.png new file mode 100644 index 00000000..f7454290 Binary files /dev/null and b/doc/common/logo.png differ diff --git a/doc/common/opengl.jpg b/doc/common/opengl.jpg new file mode 100644 index 00000000..7819935a Binary files /dev/null and b/doc/common/opengl.jpg differ diff --git a/doc/common/sourceforge.gif b/doc/common/sourceforge.gif new file mode 100644 index 00000000..f4a98c6d Binary files /dev/null and b/doc/common/sourceforge.gif differ diff --git a/doc/common/style.css b/doc/common/style.css new file mode 100644 index 00000000..fb9f4788 --- /dev/null +++ b/doc/common/style.css @@ -0,0 +1,202 @@ +body +{ + background-color:#fff8f0; + width:100%; +} + +table +{ + background-color:#ffffff; + width:800px; + margin-left:auto; + margin-right:auto; +} + +table.principale +{ + background-color:#ff8000; + border-style:none; + border-width:0px; + border-spacing:0px; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + padding-right: 0px; + padding-left: 0px; + padding-bottom: 0px; + padding-top: 0px; + width:100%; +} + +tr.principale +{ + background-color:#ff8000; + border-style:none; + border-width:0px; + border-spacing:0px; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 0px; + padding-right: 0px; + padding-left: 0px; + padding-bottom: 0px; + padding-top: 0px; +} + +div.title1 +{ + text-align:center; + font-size:48px; + border-style:solid; + border-width:0px; + color:#000000; +} + +div.title2 +{ + text-align:left; + font-size:20px; + font-weight:bold; + color:#000000; +} + +div.title3 +{ + text-align:center; + font-size:16px; + border-style:none; + border-width:1px; +} + +div.title4 +{ + text-align:left; + font-size:16px; + font-weight:bolder; + color:#FF8000; +} + +div.title-date +{ + text-align:right; + font-size:16px; + font-weight:bolder; + color:#FF8000; +} + +div.menu1 +{ + text-align:center; + font-size:16px; + font-weight:bolder; +} + +div.menu2 +{ + text-align:center; + font-size:16px; +} + +div.news-separator +{ + text-align:center; + color:#FF8000; +} + +div.email +{ + text-align:center; +} + +div.image +{ + text-align:right; +} + +img.menu-img +{ + text-align:center; + font-size:16px; + border-color:#000000; + border-style:solid; + border-width:0px; +} + +div.paragraph +{ + /*text-indent:32px; */ + text-align:justify; +} + +div.block +{ + padding-right: 16px; + padding-left: 16px; +} + +div.include +{ + color:#0000FF; +} + +spam.key +{ + color:#0000FF; +} + +div.comment +{ + color:#008000; +} + +td.page +{ + vertical-align:top; + padding-right: 32px; + padding-left: 32px; + padding-bottom: 0px; + padding-top: 0px; + width:100%; +} + +td.menu +{ + vertical-align:top; + text-align:right; + border-width:0px; + border-right-style:solid; + border-color:#000000; + width:160px; + padding-right: 32px; + padding-left: 0px; + padding-bottom: 0px; + padding-top: 0px; +} +/* +a.menu +{ + color:#FF8000; + font-weight:bolder; +} +*/ +a.menu +{ + color:#008000; +} + +a +{ + color:#008000; +} + +div.issue-content +{ + text-indent:32px; +} + +div.issue-title +{ + font-weight:bold; +} diff --git a/doc/common/title.png b/doc/common/title.png new file mode 100644 index 00000000..76129551 Binary files /dev/null and b/doc/common/title.png differ diff --git a/doc/doxyfile b/doc/doxyfile new file mode 100644 index 00000000..c8d424f0 --- /dev/null +++ b/doc/doxyfile @@ -0,0 +1,1572 @@ +# Doxyfile 1.6.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = GLM + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = "Version 0.9.A.1" + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = . + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = "C:/Documents and Settings/Groove/ " + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set +# FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = YES + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = NO + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = YES + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = NO + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +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 +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.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 + +# 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. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ../../include/glm/gtx/vecx.hpp \ + ../../include/glm/gtx/matx.hpp \ + ../../include/glm/gtx/statistics_operation.hpp + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = detail + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = NO + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = YES + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = glm.rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = YES + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 1000 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/doc/glm-manual.doc b/doc/glm-manual.doc new file mode 100644 index 00000000..40f6a54f Binary files /dev/null and b/doc/glm-manual.doc differ diff --git a/doc/glm-manual.pdf b/doc/glm-manual.pdf new file mode 100644 index 00000000..a23a28b4 Binary files /dev/null and b/doc/glm-manual.pdf differ diff --git a/doc/goodies/logo1024x0640.png b/doc/goodies/logo1024x0640.png new file mode 100644 index 00000000..5d059de3 Binary files /dev/null and b/doc/goodies/logo1024x0640.png differ diff --git a/doc/goodies/logo1280x0800.png b/doc/goodies/logo1280x0800.png new file mode 100644 index 00000000..8f2dacde Binary files /dev/null and b/doc/goodies/logo1280x0800.png differ diff --git a/doc/goodies/logo1600x1000.png b/doc/goodies/logo1600x1000.png new file mode 100644 index 00000000..34207cda Binary files /dev/null and b/doc/goodies/logo1600x1000.png differ diff --git a/doc/goodies/logo1920x1200.png b/doc/goodies/logo1920x1200.png new file mode 100644 index 00000000..3e50912a Binary files /dev/null and b/doc/goodies/logo1920x1200.png differ diff --git a/doc/goodies/logo2560x1600.png b/doc/goodies/logo2560x1600.png new file mode 100644 index 00000000..a4870c37 Binary files /dev/null and b/doc/goodies/logo2560x1600.png differ diff --git a/doc/goodies/tenby-five.otf b/doc/goodies/tenby-five.otf new file mode 100644 index 00000000..454b9658 Binary files /dev/null and b/doc/goodies/tenby-five.otf differ diff --git a/doc/image/0029-mini.jpg b/doc/image/0029-mini.jpg new file mode 100644 index 00000000..8f062d36 Binary files /dev/null and b/doc/image/0029-mini.jpg differ diff --git a/doc/image/0029.jpg b/doc/image/0029.jpg new file mode 100644 index 00000000..c597c624 Binary files /dev/null and b/doc/image/0029.jpg differ diff --git a/doc/image/font-mini.png b/doc/image/font-mini.png new file mode 100644 index 00000000..8f350b18 Binary files /dev/null and b/doc/image/font-mini.png differ diff --git a/doc/image/font.png b/doc/image/font.png new file mode 100644 index 00000000..e36acdf5 Binary files /dev/null and b/doc/image/font.png differ diff --git a/doc/image/logo-mini.png b/doc/image/logo-mini.png new file mode 100644 index 00000000..80b5f9d4 Binary files /dev/null and b/doc/image/logo-mini.png differ diff --git a/doc/image/logo.png b/doc/image/logo.png new file mode 100644 index 00000000..2886a8e2 Binary files /dev/null and b/doc/image/logo.png differ diff --git a/doc/readme.txt b/doc/readme.txt new file mode 100644 index 00000000..7edadbd3 --- /dev/null +++ b/doc/readme.txt @@ -0,0 +1,248 @@ +============================= +GLM 0.9.A.1 final: 2010-02-09 +----------------------------- +- Removed deprecated features +- Internal redesign + +============================= +GLM 0.8.4.4 final: 2010-01-25 +----------------------------- +- Fixed warnings + +============================= +GLM 0.8.4.3 final: 2009-11-16 +----------------------------- +- Fixed Half float arithmetic +- Fixed setup defines + +============================= +GLM 0.8.4.2 final: 2009-10-19 +----------------------------- +- Fixed Half float adds + +============================= +GLM 0.8.4.1 final: 2009-10-05 +----------------------------- +- Updated documentation +- Fixed MacOS X build + +============================= +GLM 0.8.4.0 final: 2009-09-16 +----------------------------- +- Added GCC 4.4 and VC2010 support +- Added matrix optimizations + +============================= +GLM 0.8.3.5 final: 2009-08-11 +----------------------------- +- Fixed bugs + +============================= +GLM 0.8.3.4 final: 2009-08-10 +----------------------------- +- Updated GLM according GLSL 1.5 spec +- Fixed bugs + +============================= +GLM 0.8.3.3 final: 2009-06-25 +----------------------------- +- Fixed bugs + +============================= +GLM 0.8.3.2 final: 2009-06-04 +----------------------------- +- Added GLM_GTC_quaternion +- Added GLM_GTC_type_precision + +============================= +GLM 0.8.3.1 final: 2009-05-21 +----------------------------- +- Fixed old extension system. + +============================= +GLM 0.8.3.0 final: 2009-05-06 +----------------------------- +- Added stable extensions. +- Added new extension system. + +============================= +GLM 0.8.2.3 final: 2009-04-01 +----------------------------- +- Fixed bugs. + +============================= +GLM 0.8.2.2 final: 2009-02-24 +----------------------------- +- Fixed bugs. + +============================= +GLM 0.8.2.1 final: 2009-02-13 +----------------------------- +- Fixed bugs. + +============================= +GLM 0.8.2 final: 2009-01-21 +----------------------------- +- Fixed bugs. + +============================= +GLM 0.8.1 final: 2008-10-30 +----------------------------- +- Fixed bugs. + +============================= +GLM 0.8.0 final: 2008-10-23 +----------------------------- +- New method to use extension. + +============================= +GLM 0.8.0 beta3: 2008-10-10 +----------------------------- +- Added CMake support for GLM tests. + +============================= +GLM 0.8.0 beta2: 2008-10-04 +----------------------------- +- Improved half scalars and vectors support. + +============================= +GLM 0.8.0 beta1: 2008-09-26 +----------------------------- +- Improved GLSL conformance +- Added GLSL 1.30 support +- Improved API documentation + +============================= +GLM 0.7.6 final: 2008-08-08 +--------------------------- +- Improved C++ standard comformance +- Added Static assert for types checking + +=========================== +GLM 0.7.5 final: 2008-07-05 +--------------------------- +- Added build message system with Visual Studio +- Pedantic build with GCC + +=========================== +GLM 0.7.4 final: 2008-06-01 +--------------------------- +- Added external dependencies system. + +=========================== +GLM 0.7.3 final: 2008-05-24 +--------------------------- +- Fixed bugs +- Added new extension group + +=========================== +GLM 0.7.2 final: 2008-04-27 +--------------------------- +- Updated documentation +- Added preprocessor options + +=========================== +GLM 0.7.1 final: 2008-03-24 +--------------------------- +- Disabled half on GCC +- Fixed extensions + +=========================== +GLM 0.7.0 final: 2008-03-22 +--------------------------- +- Changed to MIT license +- Added new documentation + +=========================== +GLM 0.6.4 : 2007-12-10 +--------------------------- +- Fixed swizzle operators + +=========================== +GLM 0.6.3 : 2007-11-05 +--------------------------- +- Fixed type data accesses +- Fixed 3DSMax sdk conflict + +=========================== +GLM 0.6.2 : 2007-10-08 +--------------------------- +- Fixed extension + +=========================== +GLM 0.6.1 : 2007-10-07 +--------------------------- +- Fixed a namespace error +- Added extensions + +=========================== +GLM 0.6.0 : 2007-09-16 +--------------------------- +- Added new extension namespace mecanium +- Added Automatic compiler detection + +=========================== +GLM 0.5.1 : 2007-02-19 +--------------------------- +- Fixed swizzle operators + +=========================== +GLM 0.5.0 : 2007-01-06 +--------------------------- +- Upgrated to GLSL 1.2 +- Added swizzle operators +- Added setup settings + +=========================== +GLM 0.4.1 : 2006-05-22 +--------------------------- +- Added OpenGL examples + +=========================== +GLM 0.4.0 : 2006-05-17 +--------------------------- +- Added missing operators to vec* and mat* +- Added first GLSL 1.2 features +- Fixed windows.h before glm.h when windows.h required + +=========================== +GLM 0.3.2 : 2006-04-21 +--------------------------- +- Fixed texcoord components access. +- Fixed mat4 and imat4 division operators. + +=========================== +GLM 0.3.1 : 2006-03-28 +--------------------------- +- Added GCC 4.0 support under MacOS X. +- Added GCC 4.0 and 4.1 support under Linux. +- Added code optimisations. + +=========================== +GLM 0.3 : 2006-02-19 +--------------------------- +- Improved GLSL type conversion and construction compliance. +- Added experimental extensions. +- Added Doxygen Documentation. +- Added code optimisations. +- Fixed bugs. + +=========================== +GLM 0.2: 2005-05-05 +--------------------------- +- Improve adaptative from GLSL. +- Add experimental extensions based on OpenGL extension process. +- Fixe bugs. + +=========================== +GLM 0.1: 2005-02-21 +--------------------------- +- Add vec2, vec3, vec4 GLSL types +- Add ivec2, ivec3, ivec4 GLSL types +- Add bvec2, bvec3, bvec4 GLSL types +- Add mat2, mat3, mat4 GLSL types +- Add almost all functions + +=========================== +Christophe [Groove] Riccio, glm|AT|g-truc|DOT|net + diff --git a/doc/src/about.xsl b/doc/src/about.xsl new file mode 100644 index 00000000..6ca8854c --- /dev/null +++ b/doc/src/about.xsl @@ -0,0 +1,68 @@ + + + + + + + + + + OpenGL Mathematics : About + + + + + + + + + + + +
+
+ OpenGL Mathematics +
+ +
+ + + +
_________________
+
+ +
+ + +
+ + +
+
+ +
+
+ +
+
+ + + + + + + +
+
_________________
+
+
+
+ +
diff --git a/doc/src/bug.xsl b/doc/src/bug.xsl new file mode 100644 index 00000000..47f4057a --- /dev/null +++ b/doc/src/bug.xsl @@ -0,0 +1,116 @@ + + + + + + + + + + OpenGL Mathematics : Bugs + + + + + + +
+ OpenGL Mathematics +
+ + + + + +
+ +
+ + G-Truc Creation + + + +
+ + +
+
Bugs
+
+ +
+
+ + +
+ )
+
+
+ +
+
+ STATUE : , +
+
+
+
+ + +
+ : +
+
+ +
diff --git a/doc/src/changelog.xsl b/doc/src/changelog.xsl new file mode 100644 index 00000000..eb440b4b --- /dev/null +++ b/doc/src/changelog.xsl @@ -0,0 +1,55 @@ + + + + + + + + + + OpenGL Mathematics : Changelog + + + + + + + + + + + +
+
+ OpenGL Mathematics +
+ +
+ + +
+ + +
+ + +
+ :
+
+ +
_________________
+
+
+ + +
+ -
+
+
+ +
diff --git a/doc/src/code.xsl b/doc/src/code.xsl new file mode 100644 index 00000000..73a90189 --- /dev/null +++ b/doc/src/code.xsl @@ -0,0 +1,111 @@ + + + + + + + + + + OpenGL Mathematics: Code + + + + + + + + + + + +
+ +
OpenGL Mathematics
+ +
+ + +
+ + +
+ + +
+
+ | +
+
+ +
+
_________________
+
+
+
+ + +
diff --git a/doc/src/data.xml b/doc/src/data.xml new file mode 100644 index 00000000..70e42103 --- /dev/null +++ b/doc/src/data.xml @@ -0,0 +1,2302 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
+ +
+
+ +
+
+ + Euler angles operation with specified rotation order + Cast to other toolkit (D3D, some engines) + Arrays + SIMD optimisations + Standard output stream + In place operations + + + GLSL 1.30, more templated code, better API documentation, use of CMake. + Hint. + First GTC extensions. + More tests. + Arrays. + SIMD optimizations. + In place operations. + + + bit rotation. + frexp + RGBE. + row matrices. + Optimize *mat4 inverse. + fixed numbers + row and column major matrices + + + + Promoted double types + + + Removed global inclusion. + Removed auto cast setup. + Removed compatibility setup. + Clean up and simplify setup.hpp + Fixed website links + + + Added missing inline. + Added common vecType for vector based types. + Updated copyright date. + Refactoring of type precision + GLM types are now more generic + Extract vec1 code + Reduced namespaces count + + + GLM 0.8.4.4 released. + + + Fixed warnings. + + + Added texcoord wrapping through GLM_IMG_wrap extension. + + + Reorganized SVN directory. + + + GLM 0.8.4.3 released. + + + Fixed half arithmetic. + + + Added scalars support for GLM_IMG_multiple. + + + Fixed setup defines. + + + Added GLM_IMG_multiple extensions and unit tests. + + + GLM 0.8.4.2 released. + + + Fixed half. + + + GLM 0.8.4.1 released. + + + Updated documentation. + + + Updated manual. + Added static assert implementation. + Removed unuse GLM_SWIZZLE_FUNC. + + + Some progress on fixing GLM for MacOSX comflics. + + + Fixed GLM_GTX_quaternion extension: cross and intermediate. + + + Fixed quaternion angle. + + + Updated documentation. + GLM 0.8.4.0 released. + + + Added Visual Studio 2010 support. + Fixed build on GCC. + Added GCC 4.4 support. + + + Added no initilization constructor to vec4. + + + Added no initilization constructor to mat4. + Updated GLM_GTC_matrix_transform: faster rotate. + + + Added GLM_GTX_matrix_operation: build diagonal matrix. + Updated GLM_GTC_matrix_transform: faster scaling. + + + Fixed transpose function for mat4x3. + Optimized translate function for mat4 matrix: ~184 cycles instead of ~592 cycles on Q6600. + + + Fixed OpenGL dependence. + Added OpenGL 3 dependence. + + + Fixed parameter definition and definition mismatch. + + + Fixed GLM_GTC_matrix_projection. + Updated GLM_GTX_transform: Added missing entry points. + GLM 0.8.3.5 released. + + + Move inverse function to core following GLSL 1.4 specification. + Move determinant function to core following GLSL 1.5 specification. + GLM 0.8.3.4 released. + + + Fixed GLM_GTX_matrix_query extension: Fixed row_size and col_size() calls. + Fixed GLM_GTX_matrix_access extension: Fixed row_size calls. + + + Fixed GLM_GTX_string_cast extension: Build on GCC 4. + Fixed GLM_GTC_quaternion extension: rotate function build. + + + Fixed GLM_GTC_matrix_transform extension: Fixed matrix operation order; like OpenGL instead of like Direct3D. + GLM 0.8.3.3 released. + + + Fixed GLM_GTX_rotate_vector extension: Fixed rotate function. + + + Fixed matrix external operators. + + + Added GLM_GTC_type_precision extension. + GLM 0.8.3.2 released. + + + Fixed GLM_GTC_matrix_transform: Fixed mat4 inverse function. + + + Added GLM_GTC_quaternion extension. + Updated GLM_GTC_quaternion extension. + Fixed GLM_GTC_matrix_transform extension. + + + GLM 0.8.3.1 released. + + + Updated GLM_GTX_bit extension: Added lowestBit functions. + Fixed old extention inclusion method. + + + Updated sse mat4 implementation. + + + Updated GLM_GTX_bit extension: Added bitRevert, bitRotateRight and bitRotateLeft functions. + + + Added intrinsic like functions for mat4 product and inverse. + + + Added intrinsic like functions for mat4 and vec4 products. + + + Fixed GLM_GTX_type_ptr extension. + GLM 0.8.3.0 released. + + + Fixed GLM_GTC_matrix_projection: glm::project build. + + + Added new extensions inclusion system. + + + Fixed GLM_GTX_determinant extension. + Reorganized extensions. + Removed GLM_GTX_vector_comp_mult and GLM_GTX_mat4x3 extensions. + Renamed .h files to .hpp. + + + Added GLM_GTC_half_float. + + + Fixed GLM_GTX_perpendicular extension. + Fixed GLM_GTX_matrix_projection extension. + Fixed GLM_GTX_transform2 extension. + + + Added GLM_GTC_matrix_operation. + Added GLM_GTC_matrix_transform. + Added GLM_GTC_matrix_projection. + Added GLM_GTC_double_float. + + + Fixed bug 2774738. + Fixed bug 2774015. + + + GLM 0.8.2.3 released. + + + Updaded mix function: Makes it more flexible, types wise. + + + Fixed GLM_GTX_perpendicular and GLM_GTX_projection. + Added GLM_GTX_radial_gradient extensions. + + + Fixed GCC 4.3 pedantic build. + GLM 0.8.2.2 released. + + + Removed all deprecated ARB conventions. + + + Fixed highp_int_t and highp_uint_t with Linux 64. + Fixed GCC 4.3 'extra ;' with pedentic build. + + + Fixed build. + GLM 0.8.2.1 released. + + + Fixed build. + Added extensions build test. + + + GLM 0.8.2 released. + + + Fixed GLM_GTX_intersect: intersectRayTriangle. + + + Fixed vectors access operators. + Fixed unresolved with quaternions. + + + Fixed GLM_GTX_norm: Include issue. + + + Fixed left value swizzle operators. + + + Fixed GLM_GTX intersect extension: intersectRayTriangleGTX with GCC. + Typo. + + + Fixed GLM_GTX inverse_transpose extension. + + + Updated quaternion implementation. + + + Added GLM_GTX_raw_data extension. + + + Updated GLM_GTX_bit extension: Added mask function. + + + Updated GLM_GTX_bit extension: Added extractField function. + Fixed STATIC_ASSERT with 64bits integers. + + + GLM 0.8.1 released. + + + Fixed mix function with boolean parameter. + Fixed value_size issue. + + + Fixed GLM_GTX_component_wise extension. + Added GLM_GTX_color_space_YCoCg extension. + + + Added GLM_GTX_comparison extension: Defined comparison operators for vectors. + + + Added GLM_GTX_log_base extension. + + + Fixed 64 bits integers with GCC. + Deleted deprecated half number setup options. + Updated GLM_GTX_number_precision: Clean up and added missing type definitions. + Updated GLM_GTX_color_cast: Clean up and fixes. + + + Updated manuel and documentation. + GLM 0.8.0 final released. + + + Fixed glm::size_t possible collisions with std::size_t. glm::size_t is now named glm::sizeType. + Updated GLM_VIRTREV_address extension: Added none const fonctions. + Updated GLM_GTX_double_float extension: Typo. + Added new API to use extension. + + + Added logos in varius resolutions. + + + Updated website. + Added website builder. + + + Updated GLM_GTX_number_precision: No more warning with type size tests. + Fixed none consistent size_t. + + + Updated website. + + + Fixed build. + Updated manual. + GLM 0.8.0 beta3 released. + + + Added GLM_GTX_reciprocal extension: Define sec, csc, cot, asec, acsc, acot, sech, csch, coth, asech, acsch and acoth functions. + + + Updated GLM_GTX_euler_angles extension: Added functions to build rotation matrices. + + + Fixed GLM_GTX_color_space: Fixed conflits with swizzle operators. + Fixed virtrev.h, didn't build. + Fixed genType build. + Fixed GLM_GTX_compatibility build. + Added GLM_VIRTREV_address: Get the address of internal vector or matrix contents. + Fixed code typo and clean up. + + + Added genType class. For long term base class for all types though template specialization. + Updated project directory. + Added CMakeFile in test directory. + Fixed code typo and clean up. + Fixed GLM_GTX_string_cast: Missing some matrix definitions, some wrong behaviours with matrices. + + + Added glm::sizeType type which is used to defined size of all vectors and matrices. Defined as std::size_t. + row_size, col_size and is_matrix are now functions. + Fixed use inline on *mat4 function declaration. + Deleted auto cast from *mat4x3. + Fixed missing ++ -- and - operators to some matrix types. + Fixed typo. + + + GLM 0.8.0 beta2 released. + + + value_size and is_vector are now functions. + + + Added GLM_USE_ANONYMOUS_UNION: To use anonymous union to provide multiple component names access for class valType. Visual C++ only. + Removed noise function from documentation. + + + Fixed build with GCC. + Updated manual. + + + Updated GLM_GTX_bit implementation. + Added GLM_USE_ONLY_XYZW to disable multiple component names. + Updated GLM_GTX_euler_angles extension: added yawPitchRoll function. + + + Fixed half vector build. + Updated GLM_GTX_vector_angle: Added orientedAngleFromRef function. + Deprecated GLM_GTX_mul extension. Features moved in GLM_GTX_verbose_operator. + Updated GLM_GTX_verbose_operator: Added mad function. + + + Fixed missing inline in tvec3 and tvec4 definisions. + New implementation of hvec3 thought specialisation of tvec3 template. + New implementation of hvec4 thought specialisation of tvec4 template. + Fixed tvec4 operators than where applied just on 3 components. + + + Added build option for build that support anonymous structure. + Fixed missing inline in tvec2 definision. + New implementation of hvec2 thought specialisation of tvec2 template. + + + Updated documentation. + GLM 0.8.0 beta1 released. + + + Fixed static asserts within vector and matrix types. + Updated mix function implementation, support for boolean vectors. + + + Fixed static asserts. + Added some asserts. + Updated matrices operator[]. + + + Added GLM_VIRTREV_equal_operator: Operators that compare vectors. + Fixed build errors from static asserts. + + + Fixed build errors with GCC. + Fixed func_trigonometric.h encoding. + + + Deleted GLM_GTX_INCLUDED. + Fixed build errors. + Fixed GLM_GTX_random: Bad assert definition. + + + Updated manual. + Updated swizzle operators with swizzle function. + Added modf definition. + + + Added namespaces to sort type and function in the API documentation. + Deleted some documentations from {__}*GTX types and functions from extensions. + Updated vectors and matrices documentation. + Updated scalars and precisions documentation. + Fixed some vectors and matrices declaration missing in some cases. + Updated overall documentation. + + + Included all types in type namespace. + + + Added type namespace in glm namespace for documentation purpose. + + + Added modf definition for vec2, vec3 and vec4. + Updated static assert to exponential, geometric, matrix, noise, trigonometric and vector relational functions. + Added GLM_GTC_matrix_transformation extensions: API and translate, rotate and scale definisions. + Deprecated GLM_GTX_gpu_shader4, GLM_GTX_hyperbolic, GLM_GTX_flexible_mix, GLM_GTX_round. + Added definition of mix with last parameter being booleans. + Added hint classes. + Updated GLM_GTX_integer, GLM_GTX_unsigned_int, GLM_GTX_half and GLM_GTX_double_float extensions. + + + Added trait code (class type) to detect bool, float, int and uint numbers. + Updated static assert to common functions. + + + Updated noise function definitions... Still unsure for staying in GLM 0.8.0. + + + Updated overall documentation, doxygen documentation. + + + Updated documentation and implementation of all matrix functions. + Added declaration of main functions for each function group namespace. + Updated documentation and API of all noise functions... Should be deleted becose of bad implementation? + + + Updated documentation and implementation of all vector relational functions. + Added transpose_type typedef to all matrix types. + Added is_matrix static constantes to all matrix types for static assert usage. + Added is_vector static constantes to all vector types for static assert usage. + + + Updated documentation and implementation of all geometric functions. + + + Updated documentation and implementation of all exponential functions. + + + Added isinf and isnan GLSL 1.3 functions. + Updated common functions code, mostly syntax. + Added trunc, round and roundEven GLSL 1.3 functions. + Added sinh, cosh, tanh, asinh, acosh and atanh GLSL 1.3 functions. + Updated documentation and implementation of all trigonometric functions. + + + Added bool_type implementation detail to vector types. + + + Added API and documentation of all common functions. + + + Updated GLM_GTX_extensions: Define operator* as a cross product. Still in WIP... + + + Updated *vec2 and *vec3 with precision types missed and documentation. + + + Fixed 2085925 bug: rotateGTX didn't use it quaternion parameter. + + + Added test files. + Updated *vec4 with precision types missed and documentation. + + + Renamed implementation files. + Updated type pre-declarations. + + + Fixed GLM_GTX_matrix_projection extension: frustum function gave a wrong result. + + + Updated matrix types functions and extensions according new vectors types. + + + Added new vector types implementation. + + + Added support for new GLSL 1.30 precision model. + + + Added GLSL 1.30.08 unsigned int types support + + + Added detail::vec1 type. + Added detail::desc for types description and higher templatisation. + + + Started work on GLM 0.8.x based on GLSL 1.3 specification. + Visual Studio .NET 2003 (7.1) is now deprecated. + GLM_FORCE_HALF_COMPATIBILITY is now deprecated. + GLM_AUTO_CAST is now deprecated. + + + Updated GLM_GTX_fast_square_root implementation: Updated fastInverseSqrt + + + Updated documentation. + GLM 0.7.6 released. + + + gl_svec* (for GLshort) added in GLM_virtrev_gl extension. + Updated detail implementation of vector types. + Make Visual C++ build with Visual C++ extensions disabled. + Rename "not" to "not_" for compatibility. + Fixed GLM_GTX_fast_square_root build. + + + Fixed GLM_GTX_component_wise extension. + + + Updated mix functions for optimization purpose. + Fixed mix functions static assert. + Updated test files. + Updated GLM_GTX_statistics_operation. + + + Fixed GLM_GTX_bit extension: isPowerOfTwoGTX works for signed int too. + Updated GLM_GTX_norm extension: Added distance2, l2norm and lxNorm functions. + Added some boost static assert. + + + Added GLM_GTX_std_based_type: Types based on C++ conventions. + Added files for extension tests. + + + Fixed GLM_GTX_fast_square_root: Updated fastDistance. + + + Fixed GLM_GTX_fast_square_root: Wrong const and updated fastLenght. + Optimized mix core function + + + Fixed GLM_GTX_epsilon: Wrong function definitions for y, z and w components. + + + Fixed GLM_GTX_flexible: Flexible with scalar only failed. + Fixed GLM_GTX_quaternion: One rotate overloaded function undefined. + + + Some fixes on GLM_GTX_intersect extension. + + + GLM 0.7.5 released. + + + Updated documentation. + + + Updated message system. + + + Added new message system. + + + Fixed GLM_GTX_normal extension. + + + Updated GLM_GTX_unsigned_int extension. (New typedef extensions) + + + Added new precompiler system. + + + Increase C++ conformance. + + + Fixed build errors. + GLM 0.7.4 released. + + + Updated external dependencies system. + Updated manual. + Fixed GLM_GTX_random extension: Fixed build with GCC. + Fixed GLM_GTX_string_cast extension: Fixed build with GCC 3.4 due to GCC anonymuous namespace bug. + + + Fixed GLM_GTX_transform2 extension: scaleBias didn't built. + + + Added GLM_VIRTREV_xstream extension: XML output for GLM types. + Added external library system + + + Updated GLM_GTX_string_cast extension: Support of non-square matrices. + GLM 0.7.3 released. + + + Fixed mat2 product. + + + Fixed GLM_GTX_transform2 dependencies. + + + Added GLM_VIRTREV_gl extension: Vector and matrix integration with OpenGL. + + + Updated GLM_GTX_number_precision extension: Added uint type. + Added GLM_GTX_string_cast extension: Create formated string from GLM type instances. + Updated GLM_GTX_transform2: added scaleBias matrix build + + + GLM 0.7.2 released. + + + Added GLM_AUTO_CAST setup option. + Updated documentation + + + Updated GLM_GTX_inverse, added affine inverse functions for fast matrix inverts. + Updated overall documentation + Added trait typedef to all GLM data types + + + Updated GLM_GTX_compatibility documentation. + Fixed GLM_GTX_random, gauss functions didn't build. + + + Added few SSE code. + Fixed matrix projections. + + + Added GLM_SWIZZLE_FUNC swizzle option. + + + Updated GLM_GTX_euler_angles documentation. + + + Updated documentation. + + + Fixed GLM_GTX_associated_min_max build on GCC. + Updated GLM_GTX_matrix_projection. + GLM 0.7.1 released. + + + GLM 0.7.0 released. + + + Updated manual. + + + Updated documentation. + Added GLM_GTX_associated_min_max extension. + + + Fixed not function with GCC. + + + Fixed interger pow function for the case of a null power. + + + Fixed mat4x2 and mat4x3 GCC build. + Updated documentation. + Reseted glmsetup.h to default values. + + + Fixed missing xvec4 constructor with bool argument definition. + Fixed namespace collision in quaternion inverse function. + Fixed swizzle operators involved in operations. + Change license from GNU LGPL to MIT. + + + Fixed missing xvec4 ++ and -- operator definition. + + + Move some implementation details into detail namespace. + + + Fixed cast between matrices of different sizes. + + + Fixed matNxM type cast to other matNxM type. + + + Fixed GLM_GTX_matrix_projection extension. + + + GLM 0.6.4 released. + + + Fixed swizzle operators. + + + Fixed GLM_GTX_matrix_selection extension. + + + Updated GLM_GTX_color_space extension. Added luminosity function. + + + GLM 0.6.3 released. + + + Fixed 3DSMax SDK conflict with GLM. + + + Updated GLM_GTX_quaternion. Added sqrt function. + + + Updated GLM_GTX_random extension. + Updated GLM_GTX_half extension. + + + Fixed matrices operator const T*() const. + + + Fixed GLM_GTX_normalize_dot extension. + GLM 0.6.2 released. + + + GLM 0.6.1 released. + + + Added GLM_GTX_normalize_dot extension: Faster way to normalize parameters before a dot product + + + Fixed namespace error on GLM_GTX_matx extension + + + Added GLM_GTX_flexible_mix extension: mix function can take different types parameters + + + Updated documentation. + GLM 0.6.0 released. + + + Added GLM_SINGLE_COMP_NAME to fixed multiple component names on half types with GCC. + + + Added #define GLM_GTX_INCLUDED to automatically include all GTX extensions in the language. + + + Updated extensions documentation. + Updated GLM_GTX_quaternion extension: squad, euler angles conversions + + + Updated GLM_GTX_compatibility extension: Added isfinite isinf, and isnan. + + + Updated GLM_GTX_random extension: Gauss distribution, spherical distribution, linear distribution. + + + Fixed namespace issues with Visual Studio 8.0 SP1. + + + Updated GLM_GTX_gpu_shader4 extension: Add bit operators. + Updated GLM_GTX_integer extension: Delete some code duplications. + Added GLM_GTX_unsigned_int extension. + + + Fixed namespace issues with Visual Studio 8.0 SP1. + Added new namespace management for extensions. + Added automatic compiler ditection, no more compiler setup. + + + Updated GLM_GTX_number_precision extension. + Updated usertype.dat for Visual Studio. + Updated GLM_GTX_random extension. + + + Added GLM_GTX_color_cast extension. + Updated GLM_GTX_quaternion extension. + + + Added GLM_GTX_verbose_operator extension. + + + Added GLM_GTX_component_wise extension. + + + Added GLM_GTX_number_precision extension. + + + Updated GLM_GTX_bit extension. + + + Updated GLM_GTX_bit extension. + + + Updated GLM_GTX_fast_square_root extension. + Updated GLM_GTX_fast_trigonometry extension. + Updated GLM_GTX_fast_exponential extension. + Added GLM_GTX_mul extension. + Fixed GLM_GTX_epsilon extension. + + + Added GLM_GTX_mixed_product extension. + Added GLM_GTX_intersect extension. + Updated GLM_GTX_matrix_access extension. + + + Added bits operators in comment for vec2, vec3 and vec4. + Fixed friendly conformance to GLM_GTX_double. + + + Fixed size_type errors. + + + Updated GLM_GTX_quaternion extension. + Added GLM_GTX_bit extension. + Added value_type, size_type and value_size typedefs and value to all types. + + + Updated GLM_GTX_compatibility extension. + Fixed GLM_GTX_color_space extension. + + + Added GLM_GTX_polar_coordinates extension. + + + Added GLM_GTX_vector_query extension. + Added GLM_GTX_matrix_query extension. + + + Fixed square matrices division operators. + + + Added GLM_GTX_mat_mn extension. + + + Updated GLM_GTX_color_space extension. + + + Added GLM_GTX_vecx extension. + Added GLM_GTX_matx extension. + + + GLM 0.5.1 released. + + + Updated Visual Studio projects. + + + Updated GLM_GTX_compatibility extension. + + + Added GLM_GTX_hyperbolic extension. + Added GLM_GTX_spline extension. + Fixed unProject and project functions from GLM_GTX_matrix_projection extension. + + + Added GLM_GTX_compatibility extension. + + + Add some undefined write swizzle operators from bvec* + Fixed vectors component access operators[] from bvec* + Fixed bvec* equal operators with write swizzle operators + Fixed various vector constructors + Updated swizzle operators, _xvec* and _bvec* share the same code + + + Add some undefined write swizzle operators from xvec* + Fixed some write operator considered as read operator from xvec* + Fixed vectors component access operators[] from xvec* + Fixed not function setup according compilers + + + Added user manual. + GLM 0.5.0 released. + + + Updated overloaded functions of matrixCompMult. + Added transpose and outerProduct functions in the GLM core. + + + Fixed GLM_GTX_rotate_vector extension. + + + Fixed GLM_GTX_interger extension conformance. + + + Improved "friendly conformance" support. + Improved quaternion implementation. + + + Updated setup options. + + + Added new setup options for swizzle operators. + + + Updated GLM_GTX_integer extension. + + + Added GLM_GTX_gpu_shader4 extension. + Added extension errors management. + Added compilers management. + Added conformance management. + + + Added GLM_GTX_rotate_vector extension. + + + Updated product operators to non-squared matrices + + + Updated tmat4x3 and tmat3x4 types + Added tmat2x3, tmat3x2, tmat2x4 and tmat4x2 + Clarified ToDo comments for missing operators with non-squared matrices types + + + Added GLSL 1.2 mat4x3 and mat3x4 + Added missing declaration of mat* operators + Added _xmat* with _xvec* division operators + + + Added GLSL 1.2 non-squared matrices files + + + fastCos and fastSin are defined between -2 pi and 2 pi + + + Added swizzle operators for xvec4 + Added swizzle operators for bvec4 + + + Added swizzle operators for bvec2> + Implicit conversion from *ref* to *vec* + Added swizzles operators for xvec3 + Added swizzles operators for bvec3 + + + Separated _*ref* types in different files + Added _bref* types + Updated _xref* types + + + Added operators for tvec2 swizzles operators management + + + GLM 0.4.1 released. + + + Add 4 examples of use with OpenGL under Windows and Linux + + + GLM 0.4.0 released. + + + It's not anymore required to include windows.h before glm.h whether windows.h is required + + + Improved tvec3 conversions + Improved tvec2 conversions + Added left hand side vec2 swizzle operators + Improved bvec4 conversions + Improved bvec3 conversions + Improved bvec2 conversions + + + Added _xref* structures for swizzle operators implementation + Seperated bvec* and xvec* types in different files + Updated core functions code + + + Fixed texture coordinate components access + Added GLM_GTX_mul extension. + Added GLM_GTX_inertia extension. + GLM 0.3.2 released. + + + Added right hand side vec2 swizzle operators + Improved tvec4 conversions + + + Updated GLM_GTX_quaterion, added log and exp functions + Added GLM_GTX_matrix_major_storage extension. + + + Reorganize types code + Complete addition and subtraction vertrices operators + + + Complete addition and subtraction matrices operators + Optimize increment and decrement operators + + + Fixed tmat4x4 division + + + Added GLM_GTX_outer_product extension. + + + GLM 0.3.1 released. + + + Added Linux support under GCC 4.0 and 4.1. + + + Optimisation of increment and decrement operators. + + + Added MacOS X support under GCC 4.0. + + + Added GLM_GTX_extend extension to wishlist in position 27. + Added GLM_GTX_euler_angles extension to wishlist in position 28. + Added Doxygen documentation. + GLM 0.3.0 released. + + + Optimized GLM_GTX_integer implementation. + + + Deleted explicit conversions from array to type to prevent unespected conversions. + + + Fixed bugs + Improved types conversions. + Added GLM_GTX_vector_access extension to wishlist in position 25. + Added GLM_GTX_random extension to wishlist in position 26. + + + Fixed bugs + + + Updated GLM_GTX_integer extension. + + + Added GLM_GTX_fast_exponential extension to wishlist in position 24. + + + Optimized _xvec* copy. + + + Added GLM_GTX_fast_trigonometry extension to wishlist in position 23. + Added factorial function to GLM_GTX_integer extension. + + + Added GLM_GTX_half extension to wishlist in position 21. + Optimized normalize function. + Global optimisation for debugging time + Added GLM_GTX_integer extension to wishlist in position 18. + Optimized clamp function. + + + Added GLM_GTX_fast_square_root extension to wishlist in position 19. + Added GLM_GTX_inverse_transpose extension to wishlist in position 20. + Fixed missing of vec4 * mat4 operator. + + + Reorganization of extensions. + Fixed vec2 constructeur bug. + + + Updated GLM_GTX_length2 extension. + Renamed GLM_GTX_length2 extension to GLM_GTX_norm. + + + Fixed GLM_GTX_quaterion implémentation bugs. + + + Updated GLM_GTX_projection extension. + + + Added GLM_GTX_transform2 extension to wishlist in position 18. + + + Updated for GCC 4.0. + + + Fixed normalization bug with LookAtGTX. + + + Add array conversion to GLM types. + + + Added GL_GTX_euler_angles extension to wishlist in position 17. + + + Added GLM_GTX_matrix_selection extension to wishlist in position 16. + Added GLM_GTX_matrix_selection extension support. + + + Updated GLM_GTX_projection extension to wishlist in position 15. + + + Added GLM_GTX_projection extension to wishlist in position 15. + + + Fixed bug from rotateGTX with quaternion. + Fixed matrix vector product. + Add vector usage to describe transformations axis. + + + Added GLM_GTX_quaternion extension support + GLM 0.2 released. + + + Add GLM_GTX_transform 2D transform support + + + Add GLM_GTX_transform 3D transform support + + + Updated GLM_GTX_transform extension to wishlist in position 2 + + + Added GLM_GTX_vector_comp_mult extension to whislist in position 14 + Added GLM_GTX_vector_comp_mult extension support + + + Added GLM_GTX_color_space extension to whislist in position 13 + Added GLM_GTX_color_space extension support + Added GLM_GTX_double extension support + + + Overload of GLSL functions used by extentions instead of create new functions + + + Added GLM_GTX_optimum_pow extension to whislist in position 11 + Added GLM_GTX_double extension to wishlist in position 12 + + + Updated GLM_GTX_matrix_cross_product extension to wishlist in position 8 + Added GLM_GTX_matrix_cross_product extension support + Added GLM_GTX_projection extension to whislist in position 9 + Added GLM_GTX_perpendicular extension to wishlist in position 10 + Added GLM_GTX_projection extension support + Added GLM_GTX_perpendicular extension support + Changed extensions organisation + + + Added *vec* by *mat* product + Updated GLM_GTX_determinant extension to wishlist in position 4 + Updated GLM_GTX_inverse extension to wishlist in position 5 + Updated GLM_GTX_length2 extension to wishlist in position 6 + Updated GLM_GTX_orthonormalize extension to wishlist in position 7 + Added GLM_GTX_determinant extension support + Added GLM_GTX_inverse extension support + Added GLM_GTX_length2 extension support + Added GLM_GTX_orthonormalize extension support + + + Added bug #7 : Vector constructor non conform + Updated issue #13 : Only ARB can allow extensions adding new operators + + + Added GLM_GTX_orthonormalize extension to wishlist in position 7 + Added GLM_GTX_matrix_cross_product extension to wishlist in position 8 + Updated issue #10 : Using template functions members + Updated *vec* types following issue #10 guidance + + + Fixed bug #2 with '#error' + + + Updated issue #4 + + + Updated issue #13 + Updated issue #8 + Updated issue #6 + Updated issue #4 + + + Bugs #2 and #5 are now one + Updated / operator for vec* types with support of the divisibility of two vectors, and the divisibility term to term + + + Updated GLM_GTX_transpose extension to wishlist in position 8 + Added GLM_GTX_transpose extension support + Fixed mat* types constructor scalar-parameted + + + Fixed mat* types product by a scalar + + + Updated function 'not' + Defined identificators following compilers + Added GLM_GTX_length2 extension to wishlist in position 6 + Optimized mat3 type divide operator + + + GLM 0.1 released + + + Updated issue #4 + Updated issue #6 + Updated issue #9 + Updated issue #12 + Updated issue #13 + Updated issues ordering + + + Updated vec* types + operator. Can now add a vector and a scalar, term by term + Updated vec* types - operator. Can now minus a vector and a scalar, term by term + Updated vec* types * operator. Can now multiply a vector and a scalar, term by term + Deleted issue #11, which was erroneous + + + Deleted from wishlist extension #6 : refract function is defined by version 1.10.59 from GLSL specs + Updated reflect function tests + Added fucntion reflect with its tests + Using typename 'genType' for functions templates + Added bug #5 + Updated function sqrt + Added function log with its tests + Added function exp with its tests + Added function log2 with its tests + Updated cross function + Updated bvec* types data implementation + Added bug #6 + + + Updated issue #13 + Converted text files into XML + Modified files hierarchy + + + Updated clamp function + Added function noise1 with its tests + Added function noise2 with its tests + Added function noise3 with its tests + Added function noise4 with its tests + + + Enhanced mat4 type division operator + Added function sqrt with its tests + Added function inversesqrt with its tests + Added function exp2 with its tests + Added function log2 with its tests + + + Modified *vec* types constructors implementation, chooses initialisation instead of affectation + Added function reflect with its tests + Updated tan function + Fixed mat4 type * operator + + + Added GLM_GTX_refract extension to wishlist in position 5. + + + Added default constructor for mat* types + + + Added mat2 and vec2 type * operator + Added mat3 and vec3 type * operator + Added mat4 and vec4 type * operator + + + Added GLM_GTX_transpose extension to wishlist in position 3 + Added GLM_GTX_determinant extension to wishlist in position 4 + Added GLM_GTX_inverse extension to wishlist in position 5 + Added / operator for two mat3 types + Enhanced *vec* types conception + Enhanced *mat* types conception + + + Updated bug #3 + Updated issue #10 + Added function matrixCompMult with its tests + Updated mat* type constant access operators + Added bug #4 : Conversion problem between two different *vec* types + + + Added bug #1 : Inability to select multiple components + Added bug #2 : Some *vec* types conversions are not available + Added bug #3 : 'not' is a C++ ISO keyword + Added * operator for two mat3 types + Added * operator for two mat4 types + Updated mat* types + Updated GLM_GTX_quaternion extension to wishlist in position 1 + Updated GLM_GTX_transform extension to wishlist in position 2 + + + Added mat2 type + Added * operator for two mat2 types + Added issue #14 + Added issue #15 + Added mat3 type + Added mat4 type + + + Added function mix with its tests + Added function step with its tests + Added function smoothstep with its tests + Updated issue #10 + Updated issue #12 + Updated issue #8 + Added type bvec4 forgotten declaration + Added function lessThan with its tests + Added function lessThanEqual with its tests + Added function greaterThan with its tests + Added function greaterThanEqual with its tests + Added function equal with its tests + Added function notEqual with its tests + Added function any with its tests + Added function all with its tests + Added function not with its tests + + + Added function fract with its tests + Added function mod with its tests + Added function clamp with its tests + + + Added function mod with its tests + Added function abs with its tests + Added function sign with its tests + Added function floor with its tests + Added function ceil with its tests + Added function min with its tests + Added function max with its tests + + + Updated issue #13 + Added temporary namespace called 'glm' + Added function pow with its tests + + + Updated sin function tests + Enhanced trigonometrics functions + Enhanced geometric functions + + + Added xvec* type constructor taking a single scalar as parameter. + Added xvec* into xvec3 type conversion + Added xvec* into xvec4 type conversion + Added xvec* into bvec2 type conversion + Added xvec* into bvec3 type conversion + Added xvec* into bvec4 type conversion + Added function sin with its tests + Added function cos with its tests + Added function tan with its tests + Added function asin with its tests + Added function acos with its tests + Added function atan with its tests + Added issue #13 + + + Added function radians with its tests + Added function degrees with its tests + Added issue #9 + + + Separated *vec* types definition from declaration + Added xvec* into xvec2 type conversion + Updated issue #11 + Added issue #12 + + + Using 'union' for multiple access to *vec* types components + Added issue #11 + Deleted __*vec1GT following issue #11 guidance + Closed issue #2 + + + Added function normalize with its tests + Added function faceforward with its tests + + + Added function cross with its tests + Added a function that can determine *vec* types size, and write beyond GLSL 1.051 specs + Added function lenght with its tests + Added function distance with its tests + Added function dot with its tests + Closed issue #1 + + + Renamed intern types _vec* into _xvec* + Separated _xvec* types data, operators and accesses + Added bvec2 type + Added __bvec1GT type beyond GLSL 1.051 specs + + + Added types vec2 and ivec2 + Added types vec3 and ivec3 + Added types vec4 and ivec4 + Added types __vec1GT and __ivec1GT, write beyond GLSL 1.051 specs + + + + + + + + Groove + + This update fixes some problem of Alpha 1 but also brings some improvements in case of errors when using GLM to provide more relevant messages. + + GLM 0.9.A.2 (zip, 1.3 MB) + GLM 0.9.A.2 (7z, 726 KB) + Full changelog + + + + Groove + + First step until a major release for GLM with this first alpha of GLM 0.9. + + + This version brings a large internal redesign to improve the library reliability and optimized some parts. + It removed the deprecated features and API which implies that GLM 0.9 isn't backward compatible. + + + For most users the build issues when upgrading to GLM 0.9 should be reduced especially if they follow the deprecation policy. + + + This release is still UNSTABLE and not recommanded for commertial products. + + GLM 0.9.A.1 (zip, 950 KB) + GLM 0.9.A.1 (7z, 391 KB) + Full changelog + + + + Groove + + This update just removes some warnings + + + By the way, if you have questions about GLM, a good place for those is the OpenGL.org Toolkits forum. + + GLM 0.8.4.4 (zip, 1.1 MB) + GLM 0.8.4.4 (7z, 479 KB) + Full changelog + + + + Groove + + This version fixed half scalars and half vectors arithmetics. + This is a really slow practice that should be avoid. + Half floating point value should be use only to store GPU data. + GPUs have native support for half values, not x86 CPUs. + + GLM 0.8.4.3 (zip, 1.1 MB) + GLM 0.8.4.3 (7z, 463 KB) + Full changelog + + + + Groove + + This version is a really minor updates, fixing single issue with half float types. + + GLM 0.8.4.2 (zip, 1.1 MB) + GLM 0.8.4.2 (7z, 443 KB) + Full changelog + + + + Groove + + This version fixes few bugs and provides an major update of the manual thanks to Damian Trebilco. + + GLM 0.8.4.1 (zip, 1.1 MB) + GLM 0.8.4.1 (7z, 443 KB) + Full changelog + + + + Groove + + This new version mainly adds support for Visual Studio 2010 and GCC 4.4. It also provides various code optimization, bug fixes and an extension. + + GLM 0.8.4.0 (zip, 1.1 MB) + GLM 0.8.4.0 (7z, 439 KB) + Full changelog + + + + Groove + + Fixed extension bugs introduced by core update. + + GLM 0.8.3.5 (zip, 971 KB) + GLM 0.8.3.5 (7z, 405 KB) + Full changelog + + + + Groove + + Fixed varius bugs. Move determinant fonction to core following GLSL 1.5 specification. + + GLM 0.8.3.4 (zip, 971 KB) + GLM 0.8.3.4 (7z, 405 KB) + Full changelog + + + + Groove + + Fixed varius bugs. + + GLM 0.8.3.3 (zip, 971 KB) + GLM 0.8.3.3 (7z, 405 KB) + Full changelog + + + + Groove + + Add GLM_GTC_quaternion and GLM_GTC_type_precision extensions both subset of GLM_GTX_quaternion and GLM_GTX_number_precision + + GLM 0.8.3.2 (zip, 971 KB) + GLM 0.8.3.2 (7z, 405 KB) + Full changelog + + + + Groove + + The old way to use extensions have been fixed and GLM_GTX_bit extension gets updated with more functions to manipulate bit fields. + + GLM 0.8.3.1 (zip, 954 KB) + GLM 0.8.3.1 (7z, 402 KB) + Full changelog + + + + Groove + + This version brings to main changed: Stable extensions and a new extension system. + + + The first stable GLM extensions are: GLM_GTC_double_float and GLM_GTC_half_float for higher and lower vectors and matrices floating point precision. GLM_GTC_matrix_operation provides determinant and inverse matrix calculation. GLM_GTC_matrix_transform allows to build scale, rotate and translate matrices and GLM_GTC_matrix_projection provides varius functions to build projection matrices. Few stable extensions yet but the number is going to grow with the next release! + + + Both GLM 0.8.2.x extensions use method are deprecated (but still working) and replace by a new one. If you wnat to use GLM_GTC_half_float just include "glm/gtc/half_float.hpp" and it is going to be included in GLM namespace. + + + Finally, quite some file have been renamed, using "hpp" instead of ".h". Old file have been deprecated but are still available so that GLM 0.8.3.0 is fully compatible with GLM 0.8.2.x. + + GLM 0.8.3.0 (zip, 896 KB) + GLM 0.8.3.0 (7z, 359 KB) + Code samples page + Manual + Full changelog + + + + Groove + GLM 0.8.2.3 (zip, 963 KB) + GLM 0.8.2.3 (7z, 381 KB) + Manual + Full changelog + + + + Groove + + A new release is available and inogurate a patch number. The goal of this patch number is to release faster fixes from bug reports. + + GLM 0.8.2.1 (zip, 963 KB) + GLM 0.8.2.1 (7z, 381 KB) + Manual + Full changelog + + + + Groove + + This release only fixes bugs. Left sided swizzle operators, quaternion operators, vectors access operators for the main onces. + + GLM 0.8.2 (zip, 963 KB) + GLM 0.8.2 (7z, 381 KB) + Manual + Full changelog + + + + Groove + + Some artifacts have been added to the tracker to give a picture of what you could expect for the next releases. + + + If you need something else you can add some artifacts to the tracker. Any comment on added entries is welcome. + + + Furthermore, no more release of GLM 0.7.x will be done. Please upgrade to GLM 0.8.1. + + + Finally, a pack of programmable oriented OpenGL samples using GLM is under development and planed to be release in December. + + Tracker + + + + Groove + + GLM 0.8.1 is released. This new version mainly fixes 64 bit integers with GCC and various bugs. + + GLM 0.8.1 (zip, 938 KB) + GLM 0.8.1 (7z, 372 KB) + GLM 0.8.1 Manual + Full changelog + + + + Groove + + GLM 0.8.0 is released. This new version is now based on GLSL 1.30 specification which provided new functions and precision qualifiers. + + + Beyond this, lot of changes have been done to make GLM easier to use, easier to develop, more reliable, more conform to C++ ISO98 standard and GLSL specifications. + + + It involves that GLM 0.8.x is not backward compatible with GLM 0.7.x... However, an application port from GLM 0.7.x to GLM 0.8.x isn't a huge work and actually for some, it won’t be work at all. + + + On GLM core side, based on GLSL features, vector types can't be automatically cast to pointer anymore for code safety purposes. Vector constructors require a single scalar parameter of the exact number of components. + + + On GLM extension side, the mechanism to use them has changed. The old [__]***GTX way doesn't exist anymore. Have a look on the manual for more information. + + + Have a look on the manual and the changelog for more information. Don't forget to send your feedback and enjoy! + + GLM 0.8.0 (zip, 936 KB) + GLM 0.8.0 (7z, 370 KB) + GLM 0.8.0 Manual + Full changelog + Post a comment + + + + Groove + + Ambient aperture lighting Humus demo have been updated to use GLM as math library. + + Updated demo + all sources (zip, 2.38 MB) + Original demo (zip, 1.40 MB) + Post a comment + + + + Groove + + As you can see the website get a little update to prepare GLM 0.8.0 final release. + + + GLM 0.8.0 final should be release during the week. + + + + + Groove + + This release fixes some bugs and add few features though extensions. The development is now based on CMake to make easier cross platform tests and project management. + + GLM 0.8.0 Beta 3 (zip, 819 KB) + GLM 0.8.0 Beta 3 (7z, 345 KB) + Full changelog + Post a comment + + + + Groove + + This release mainly improves half float vectors support. By default the low precission vectors are based on float numbers not on half numbers + + + It also provides new setup options. GLM_USE_ONLY_XYZW to disable multiple names to access to a single vector component. GLM_USE_ANONYMOUS_UNION to allow multiple component names on half vectors with Visual C++. + + + Various bugs and updates of extensions have been done too. Final release is coming... + + GLM 0.8.0 Beta 2 (zip, 798 KB) + GLM 0.8.0 Beta 2 (7z, 327 KB) + Full changelog + Post a comment + + + + Groove + + GLM have been updated to support GLSL 1.30. API documentation had significant improvements to make easier finding of GLSL functions and types. + + + GLM 0.8.x is NOT backward compatible with GLM 0.7.x. Upgrade to GLM 0.8.x could involve build errors for the following cases: A lot of improvements have been made to increase the conformance with GLSL specification. Lot of GLSL 1.30 features were already exposed in extensions that have been deleted. The extension syntaxe based on ARB convension is no long used. + + + Due to the number of changes GLM 0.8.0 is release as beta first. The final release is schedule for october. + + GLM 0.8.0 Beta 1 (zip, 786 KB) + GLM 0.8.0 Beta 1 (7z, 321 KB) + Full changelog + Post a comment + + + + Groove + + GLM 0.7.6 provides a better C++ conformance so that you can build GLM with –pedantic G++ parameter or without Visual Studio extensions. To make GLM more reliable, BOOST_STATIC_ASSERT are used according developer wishes. + + GLM 0.7.6 (zip, 907 KB) + GLM 0.7.6 (7z, 387 KB) + Full changelog + Manual + + + + Groove + + GLM 0.7.5 is available and introduces a new build messsage system to get information of GLM build configuration with Visual Studio. This mechanism is documented in section 6 of GLM manual. Also, GLM can be built with GCC pedantic options. + + GLM 0.7.5 (zip, 852 KB) + GLM 0.7.5 (7z, 366 KB) + Full changelog + Manual + + + + Groove + + GLM 0.7.4 introduces a new system to manage external dependencies. + + + It allows developing extension using external dependencies like GLEW, Boost, etc. without making required those dependencies for GLM programmer that doesn't need those external dependent extensions. + + + The mechanism is described into the updated manual. + + GLM 0.7.4 (zip, 859 KB) + GLM 0.7.4 (7z, 372 KB) + Full changelog + Manual + + + + Groove + + GLM 0.7.3 is released. This version fixes few bugs and add few extensions + + GLM 0.7.3 (zip, 1.8 MB) + GLM 0.7.3 (7z, 635 KB) + Full changelog + + + + Groove + + GLM 0.7.2 is released. The documentation have been completed again and several issues handle with precompiler options. + + + #define GLM_SWIZZLE GLM_SWIZZLE_FUNC allows to use swizzle operators with internal functions. For example, glm::vec3(1, 2, 3).zyx is replaced by glm::vec3(1, 2, 3)._zyx() with this option. + + + #define GLM_FORCE_NO_HALF allows to include all extensions (#include "glm/glmext.h") without any support of half-precision floating-point numbers. + + + #define GLM_AUTO_CAST GLM_DISABLE allows to disable automatic cast (eg: glLoadMatrixf(glm::mat4(1.0))) which could involve unfortunate issues in some cases. + + + More information on these topic are available in GLM manual section 5 "Known issues". + + GLM 0.7.2 (zip, 1.8 MB) + GLM 0.7.2 (7z, 635 KB) + Full changelog + + + + Groove + + GLM 0.7.1 is available under MIT license. It fixes bugs with GCC. + + GLM 0.7.1 (zip, 1.8 MB) + GLM 0.7.1 (7z, 635 KB) + Full changelog + + + + Groove + + GLM 0.7.0 is available under MIT license. LGPL lisence have been discard due to an issue of use for console development. This release contains a lot better documentation based on Doxygen. Lot of bugs have been fixed and the documentation completed. Thanks to all people that has contributed thought bug reports and ideas to make this version a lot better! + + GLM 0.7.0 (zip, 1.8 MB) + GLM 0.7.0 (7z, 635 KB) + Full changelog + + + + Groove + + GLM 0.6.4 is available and fixes some swizzle operator issues. + + GLM 0.6.4 (zip, 1.7 MB) + GLM 0.6.4 (7z, 612 KB) + Full changelog + + + + Groove + + GLM 0.6.3 fixes accesses of matrices and a 3DSMax SDK conflict. + + GLM 0.6.3 (zip, 1.8 MB) + GLM 0.6.3 (7z, 633 KB) + Full changelog + + + + Groove + + GLM 0.6.2 fixes an error on an extension. + + GLM 0.6.2 (zip, 1.8 MB) + GLM 0.6.2 (7z, 632 KB) + Full changelog + + + + Groove + + GLM 0.6.1 is a minor update that fix an issue on extension namespace and add two more extensions. + + GLM 0.6.1 (zip, 1.8 MB) + GLM 0.6.1 (7z, 632 KB) + Full changelog + + + + Groove + + GLM 0.6.0 is available. For this release, work focus on extensions. A new mecanisum allows to integrate GLM extensions as it is actually done for GLSL extension by vendors. Lot of new extensions have been added. + + GLM 0.6.0 (zip, 1.8 MB) + GLM 0.6.0 (7z, 666 KB) + Raytracer v1.0 (exe) + Raytracer v1.0 (zip) + Full changelog + + + + Groove + + This release fixes some issues with swizzle operators. + + GLM 0.5.1 (zip, 2.3 MB) + GLM 0.5.1 (7z, 789 KB) + + + + Groove + + A new sample is available. It's an update of Philip Rideout's Catmull Clark subdivision program that uses GLM. Released with pleasant permission of Philip Rideout. + + CatmullClark sample (zip, 605 KB) + + + + Groove + + This release include GLSL 1.2 new feature in the core implementation. Also, it includes swizzle read and write operators and a custom options system to setup GLM. + + + It includes some new extensions to extend GLSL features but they remain experimental. The next release should provide the first stable extensions. + + + The GLM 0.5.0 packages contain some basic samples and some documentation. The ray tracer sample has been updated to GLM 0.5.0. Except for specific cases, especially with extensions, GLM 0.5 is backward compatible. + + + Now, GLM development is taking advantages of SourceForge.net services: a bug tracker system and the development source code is publicly available on SF.net SVN server. + + GLM 0.5.0 (zip, 2.4 MB) + GLM 0.5.0 (7z, 843 KB) + Raytracer b3.0 (exe, 751 KB) + Raytracer b3.0 (zip, 1.1 MB) + + + + Groove + + A GLM update is available. It simply includes some examples for a sweet start with GLM. + + + The examples show how to use GLM with OpenGL intermediate mode and OpenGL vertex arrays. Also, they show how to use GLM extensions to replace GLU and OpenGL function witch could slightly increase performances by decreasing the number of OpenGL states changes. + + GLM 0.4.1 (zip, 1.6 MB) + GLM 0.4.1 (7z, 521 KB) + + + + Groove + + This release introduces first GLSL 1.2 features as planed. Also, various new extensions have been added and updated. Finally, it's not anymore required to include windows.h before glm.h when windows.h is required. + + + The number of features of GLM, including extensions, start to really increase the compilation time. That's why it's recommended to use precompiled headers. + + GLM 0.4.0 + + + + Groove + + Version 0.4 will complete matrices and vectors operators and will add GLSL 1.2 features. First, conversions simplifications will be integrated. Then, 4 per 3 matrices and outer product will be available from extensions. The transpose function is already available from extension. + + + Version 0.5 will integrate GLSL 1.2 features to GLM core. + + + Version 0.6 will add swizzle operators in reading and writing. (eg: vec3 v1(1.0, 2.0, 3.0); vec3 v2 = v1.xxx; v1.zyx = v;). + + + + + Groove + + This release corrects two main bugs. First, a bug of the imat4 and mat4 division operators and other correct the vectors components access from texture coordinate way. + + GLM 0.3.2 + + + + Groove + + This update adds GCC 4.0 support for MacOS X and Linux and GCC 4.1 under Linux. Also, its provides some optimisations. + + + Further release will prodive GLSL 1.2 compliances. + + GLM 0.3.1 + + + + Groove + + A new release of GLM is now available. It improves GLSL data type conversion and construction compliance. Also, It's adds extensions like some to manage double-precision and half-precision float numbers. Finally a Doxygen documentation has been added. + + + This new release have been tested under Visual C++ 7.1, Visual C++ 8.0, GCC 3.2.3 et GCC 3.4.2. + + GLM 0.3 + Raytrace + Online documentation + + + + Groove + + A new release of GLM is now available. A few bugs have been fixed, the portability of GLSL into C++ has been improved, and new experimental extensions have been implemented, enhancing GLSL features. + + + Project now supports quaternions, adds new features to handle colors, vectors and matrices. For example, GLM allows base colors changing, vector projected operations, and 2D/3D transforms. + + + To demo the features of this new version, a sample program is included. It is a simple Ray Tracer supporting reflected and refracted rays, three lights types (point, directionnal and spot), two objects types (sphere, plan), using all of the GLM possibilities. + + + + + Groove + + The english section of this site is now available. + + + + + Groove + + This is the first public availability of GLM. This library supports part of GLSL specifications : All vectors and matrices types, and all the operators and associated functions. + + + For now, there isn't detailed documentation, but you can freely have a look on GLSL specifications. Consider any incoherence with GLM as an error. Keep in mind the library is included in the namespace "glm". + + + This project is multi platform and was successfully tested under Visual C++ 7.1, MinGW 3.4 and GCC 3.4. + + GLM 0.1 User Release + GLM 0.1 Contributor Release + GLSL 1.10.59 specifications + + + + + + + + + + + + + + + + + + + + + + + + OpenGL's Official site. You would find OpenGL specifications, news and tons of related informations. + + + This page contains all OpenGL extensions specifications. + + + This page contains OpenGL 2.0 specifications. + + + This page contains OpenGL Shading Language Specification. + + + + This document lists all the conventions for writing GLSL extensions. These rules are the basics of the GLM extensions system. + + + + + GLSL is not the ultimate mathematics library, i.e. for matrices operations, specs are very restricted. There aren't any functions to get the determinant, inverse, or a matrix transpose. Moreover, there are a few vector types and no quaternions. + What about completing the missing features using the extensions ? It will be developed from GLSL conventions and may add for exemple the extension GLM_GTX_quaternion, defining __quatGT type and conjugateGT function. + Extensions may be available through a separate file called glmext.h instead of being directly into the library core file. + It would be interesting to suggest GLM extensions implementations directly in GLSL to increase portability. It may hopefully end by submitting extensions to ARB. + + + The use of a namespace allows to prevenf from any name collision problem with other libraries like STL. GLSL uses a reserved 'namespace' keyword but does not define it. OpenGL uses a C technic for the namespaces management with the 'gl' prefix. What name should we give to this namespace ? 'gl', 'glsl', 'glm' or 'sl' ? What is the best solution ? C-like or C++-like namespaces ? + Bug #3 says that 'not' is a C++ keyword. C-style namespaces use would resolves this bug but GLSL has been built from C upon a C++ logic. + + + The interaction with OpenGL is not the purpose of GLM. However, GLM should be easily usable with OpenGL and some features could be welcome. i.e., using vec3 type with Vertex3fv function should simplify and optimize the program. Eventually, semantically speaking, vec3 is more accurate and stronger than addressing on a potential 3 floats table. + If it is possible to make easy the interoperability between GLM and OpenGL, then this work is recommended if semantic stays correct. GLM must also remain independent towards OpenGL. + + + GLSL specifications include unimplemented reserved keywords list. Their use must return an error. Some of them already exist in C++. + GLM can only allow C++ reserved keywords. The others must be undefined so the compiler returns an error. + + + GLSL defines six variable qualifiers types : const, varying, uniform, attrib, in, out, inout. + 'const' variables are only usable in a local way into a shader. They are available for vertex and fragments shaders. GLSL's 'const' are similar to C++ 'static const', i.e. the variable only exists inside a compilation unit (.o files with GCC). + 'varying' variables offer a communication interface between vertex and fragment sahder. 'uniform' and 'attrib' variables are a way of communication between C/C++ program and shaders, so 'varying' are useless in the C++ program; so this qualifier is not allowed. + Some programmers are already using 'in', 'ou' and 'inout' qualifiers for semantic purpose. They define them as empty '#define'. + It seems difficult to keep the same syntax than GLSL for 'uniform' and 'attrib' variables although this notion seems interesting. Why not keeping it only for their semantic properties ? + + + All integrated variables matches with OpenGL state variables. So there are all accessible from the OpenGL API. + + + smapler* types come from GL_ARB_multitexure extension. Values matches with a texture unit. + A sampler type would offer an additionnal semantic value. + No, this is not the GLM objective. + + + GLSL allows several components to be accessed at the same time. Moreover, GLSL let the possibility to the user to order components as he wants. To implement such a possibility, 4² * 3 * 2 = 96 fuctions should be added for vec4 type, for example (components number : 4, access types : 3, readonly access and write access : 2). + A solution witch reach GLSL conformance have been found. However it need lot of functions. This feature is coming in a futur release. + + + GLSL allows an access to a component with many different names, that explains the component notion. i.e. the first vec3 component is accessible with .x, .r, .s. + A possibility would be creating three functions for each component. + Another would be using the keyword 'union'. + The first solution allows to keep components values in a private classes table, but in this case, the overloaded operator [] must be used to access values and/or functions per component that is not conform to GLSL specifications. The second respect GLSL rules but components are public. In this case, this is not a real problem so this second solution is kept. + + + GLSL specifications tell that 'fragment processing functions' are only available for fragment shaders and function ftransform is only available for vertex shaders. The C/C++ program must be considered as a third program type so this functions are not available. + + + + + 'union' keyword is here to allow access to vector components with several different variables names. Moreover, templates are also used to create two vector type categories : _vec* and _ivec*. Eventually, anonymous structures are not allowed in ISO C++ norm. + Problem might come from the lack of supporting both templates and unions from Visual C++ 7.1. + If -pedantic isn't used with G++, then code compiles correctly. As we are waiting for a better compromise, the code stays that way. As notified for the bug #4, the ultimate solution might be to avoid templates in vector definition. + + + GCC supports all C++ keywords that includes 'not', which is equivalent to '!' operator. So there is a problem with GLM because GLSL defines the 'not' function. + Overloading the '!' operator or the 'not' keyword we can partly resolve the problem but leaving as ignored the GLM namespace concept. If the source code contains 'glm:not' string, then GCC gives an error. + 'not' is a C++ keyword so GLM mustn't define a 'not' function. However, all the compilers don't support this keyword (VC7.1). Does this name has to be changed ? For now, it is recommended to avoid using 'not'. + + + The GLSL specifications grant access to multiple components for vector types. i.e. with GLSL the following lines are correct : vec3 MyVector = vec4(1.0, 1.0, 1.0, 0.0).xyz. + It seems difficult to create an equal feature in C++ because 'x', 'y', and 'z' according to the previous example can be sorted in any order and be repeated from zero to four to a max of four components. + + + + + + OpenGL Mathematics (GLM) is a C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification. + + + The goal of the project is to provide to 3D programmers math classes and functions that miss in C++ when we use to program with GLSL or any high level GPU language. With GLM, the idea is to have a library that works the same way that GLSL which imply a strict following of GLSL specification for the implementation. + + + However, this project isn't limited by GLSL features. An extension system allows to extend GLSL capabilities. It allows GLM to be a great subtitute for some OpenGL 3 deprecated functions, to work following a clean programmable approach. + + + GLM is release under MIT license and available for all version of GCC from version 3.4 and Visual Studio from version 8.0 as a platform independent library. + + + You can checkout SVN development sources from https://glf.svn.sourceforge.net/svnroot/glf/Trunk/glm/. + + + + + GLSL + Optional features = OpenGL Mathematics (GLM). + A C++ mathematics library for 3D graphics. + + + + + + + 2560x1600 + 1920x1200 + 1600x1000 + 1280x0800 + 1024x0640 + + + + + Font (.otf) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/doc/src/download.xsl b/doc/src/download.xsl new file mode 100644 index 00000000..51c4c98b --- /dev/null +++ b/doc/src/download.xsl @@ -0,0 +1,78 @@ + + + + + + + + + + OpenGL Mathematics : Downloads + + + + + + + + + + + +
+
+ OpenGL Mathematics +
+ +
+
+
Current release
+ +
+
+ : + + + + () +
+
_________________
+
+ + + +
_________________
+
+ +
+ + +
+ + +
+
+ +
+ +
+
_________________
+
+
+ + +
+ : + + () +
+
+ +
diff --git a/doc/src/dummy.cpp b/doc/src/dummy.cpp new file mode 100644 index 00000000..0395e23b --- /dev/null +++ b/doc/src/dummy.cpp @@ -0,0 +1,4 @@ +int main() +{ + +} diff --git a/doc/src/goodies.xsl b/doc/src/goodies.xsl new file mode 100644 index 00000000..6b27bd40 --- /dev/null +++ b/doc/src/goodies.xsl @@ -0,0 +1,79 @@ + + + + + + + + + + OpenGL Mathematics: Goodies + + + + + + + + + + + +
+
+ OpenGL Mathematics +
+ +
+ + + +
_________________
+
+ +
+ + +
+ + +
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + +  + +
+
+
_________________
+
+
+
+ +
diff --git a/doc/src/issue.xsl b/doc/src/issue.xsl new file mode 100644 index 00000000..23b8e1ed --- /dev/null +++ b/doc/src/issue.xsl @@ -0,0 +1,120 @@ + + + + + + + + + + OpenGL Mathematics : Issues + + + + + + +
+ OpenGL Mathematics +
+ + + + + +
+ +
+ + + +
+ + +
+
Problématiques
+
+ +
+
+ + +
+ )
+
+
+ +
+
+ STATUE : , +
+
+
+
+ + +
+ : +
+
+ +
diff --git a/doc/src/link.xsl b/doc/src/link.xsl new file mode 100644 index 00000000..7d1ac769 --- /dev/null +++ b/doc/src/link.xsl @@ -0,0 +1,115 @@ + + + + + + + + + + OpenGL Mathematics : Links + + + + + + +
+ OpenGL Mathematics +
+ + + + + +
+ +
+ + + +
+ + +
+
Liens
+
+ This page lists all the documents that helped to develop OpenGL Mathematics. +
+
+ +
+
+ + +
+ + + +
+
+ +
+
+
+ +
diff --git a/doc/src/news.xsl b/doc/src/news.xsl new file mode 100644 index 00000000..7f85a416 --- /dev/null +++ b/doc/src/news.xsl @@ -0,0 +1,81 @@ + + + + + + + + + + OpenGL Mathematics: News + + + + + + + + + + + +
+ +
+ OpenGL Mathematics +
+ +
+ + +
+ + +
+ + +
+
+ +
+
+ +
+
+ + + + + + + + + + +
+
_________________
+
+
+
+ +
diff --git a/doc/src/util.xsl b/doc/src/util.xsl new file mode 100644 index 00000000..cb8978f2 --- /dev/null +++ b/doc/src/util.xsl @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + menu-titre2 + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + {./@title} + + + + +
+ +
+
+ + +
+
+ + +

+
+ + +
+ +
+
+
+ + + :
+
+ + + +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + +
+
+ + + + + +
diff --git a/doc/usertype.dat b/doc/usertype.dat new file mode 100644 index 00000000..dbf4a90e --- /dev/null +++ b/doc/usertype.dat @@ -0,0 +1,646 @@ +attribute +const +uniform +varying +break +continue +do +for +while +if +else +in +out +inout +float +int +void +bool +true +false +discard +return +mat2 +mat3 +mat4 +mat2x2 +mat3x3 +mat4x4 +mat2x3 +mat3x2 +mat2x4 +mat4x2 +mat3x4 +mat4x3 +vec2 +vec3 +vec4 +ivec2 +ivec3 +ivec4 +uvec2 +uvec3 +uvec4 +bvec2 +bvec3 +bvec4 +sampler1D +sampler2D +sampler3D +samplerCube +sampler1DShadow +sampler2DShadow +struct + +asm +class +union +enum +typedef +template +this +packed +goto +switch +default +inline +noinline +volatile +public +static +extern +external +interface +long +short +double +half +fixed +unsigned +input +output +sampler2DRect +sampler3DRect +sampler2DRectShadow +sizeof +cast +namespace +using + +hvec2 +hvec3 +hvec4 +fvec2 +fvec3 +fvec4 +dvec2 +dvec3 +dvec4 + +__uvec2GTX +__uvec3GTX +__uvec4GTX +__ivec2GTX +__ivec3GTX +__ivec4GTX +__hvec2GTX +__hvec3GTX +__hvec4GTX +__fvec2GTX +__fvec3GTX +__fvec4GTX +__dvec2GTX +__dvec3GTX +__dvec4GTX + +on + +final +abstract +limited +access +self + +uchar +schar +uint +sint + +int8 +int16 +int32 +int64 + +sint8 +sint16 +sint32 +sint64 + +uint8 +uint16 +uint32 +uint64 + +float16 +float32 +float64 + +quat +hquat +fquat +dquat + +__quatGTX +__hquatGTX +__fquatGTX +__dquatGTX + +handle +handle8 +handle16 +handle32 +handle64 + +flag +flag8 +flag16 +flag32 +flag64 + +import +export + +hmat2 +hmat3 +hmat4 + +fmat2 +fmat3 +fmat4 + +dmat2 +dmat3 +dmat4 + +hmat2x3 +hmat3x2 +hmat2x4 +hmat4x2 +hmat3x4 +hmat4x3 + +fmat2x3 +fmat3x2 +fmat2x4 +fmat4x2 +fmat3x4 +fmat4x3 + +dmat2x3 +dmat3x2 +dmat2x4 +dmat4x2 +dmat3x4 +dmat4x3 + +__halfGTX + +__hvec2GTX +__hvec3GTX +__hvec4GTX + +__hmat2GTX +__hmat3GTX +__hmat4GTX + +__fmat2GTX +__fmat3GTX +__fmat4GTX + +__dmat2GTX +__dmat3GTX +__dmat4GTX + +__hmat2x3GTX +__hmat3x2GTX +__hmat2x4GTX +__hmat4x2GTX +__hmat3x4GTX +__hmat4x3GTX + +__fmat2x3GTX +__fmat3x2GTX +__fmat2x4GTX +__fmat4x2GTX +__fmat3x4GTX +__fmat4x3GTX + +__dmat2x3GTX +__dmat3x2GTX +__dmat2x4GTX +__dmat4x2GTX +__dmat3x4GTX +__dmat4x3GTX + +null +pi +epsilon +infinite +self + +byte +word +dword +qword + +new_object +new_array +delete_object +delete_array + +__int8GTX +__int16GTX +__int32GTX +__int64GTX + +__i8GTX +__i16GTX +__i32GTX +__i64GTX + +__i8vec2GTX +__i8vec3GTX +__i8vec4GTX + +__i16vec2GTX +__i16vec3GTX +__i16vec4GTX + +__i32vec2GTX +__i32vec3GTX +__i32vec4GTX + +__i64vec2GTX +__i64vec3GTX +__i64vec4GTX + +__uint8GTX +__uint16GTX +__uint32GTX +__uint64GTX + +__u8GTX +__u16GTX +__u32GTX +__u64GTX + +__u8vec2GTX +__u8vec3GTX +__u8vec4GTX + +__u16vec2GTX +__u16vec3GTX +__u16vec4GTX + +__u32vec2GTX +__u32vec3GTX +__u32vec4GTX + +__u64vec2GTX +__u64vec3GTX +__u64vec4GTX + +__float16GTX +__float32GTX +__float64GTX + +__f16GTX +__f32GTX +__f64GTX + +__f16vec2GTX +__f16vec3GTX +__f16vec4GTX + +__f32vec2GTX +__f32vec3GTX +__f32vec4GTX + +__f64vec2GTX +__f64vec3GTX +__f64vec4GTX + +__f16mat2GTX +__f16mat3GTX +__f16mat4GTX + +__f16mat2x3GTX +__f16mat2x4GTX +__f16mat3x2GTX +__f16mat3x4GTX +__f16mat4x2GTX +__f16mat4x3GTX + +__f32mat2GTX +__f32mat3GTX +__f32mat4GTX + +__f32mat2x3GTX +__f32mat2x4GTX +__f32mat3x2GTX +__f32mat3x4GTX +__f32mat4x2GTX +__f32mat4x3GTX + +__f64mat2GTX +__f64mat3GTX +__f64mat4GTX + +__f64mat2x3GTX +__f64mat2x4GTX +__f64mat3x2GTX +__f64mat3x4GTX +__f64mat4x2GTX +__f64mat4x3GTX + +__f16quatGTX +__f32quatGTX +__f64quatGTX + +int8 +int16 +int32 +int64 + +i8 +i16 +i32 +i64 + +i8vec2 +i8vec3 +i8vec4 + +i16vec2 +i16vec3 +i16vec4 + +i32vec2 +i32vec3 +i32vec4 + +i64vec2 +i64vec3 +i64vec4 + +uint8 +uint16 +uint32 +uint64 + +u8 +u16 +u32 +u64 + +u8vec2 +u8vec3 +u8vec4 + +u16vec2 +u16vec3 +u16vec4 + +u32vec2 +u32vec3 +u32vec4 + +u64vec2 +u64vec3 +u64vec4 + +float16 +float32 +float64 + +f16 +f32 +f64 + +f16vec2 +f16vec3 +f16vec4 + +f32vec2 +f32vec3 +f32vec4 + +f64vec2 +f64vec3 +f64vec4 + +f16mat2 +f16mat3 +f16mat4 + +f16mat2x3 +f16mat2x4 +f16mat3x2 +f16mat3x4 +f16mat4x2 +f16mat4x3 + +f32mat2 +f32mat3 +f32mat4 + +f32mat2x3 +f32mat2x4 +f32mat3x2 +f32mat3x4 +f32mat4x2 +f32mat4x3 + +f64mat2 +f64mat3 +f64mat4 + +f64mat2x3 +f64mat2x4 +f64mat3x2 +f64mat3x4 +f64mat4x2 +f64mat4x3 + +f16quat +f32quat +f64quat + +bool1 +bool2 +bool3 +bool4 + +bool1x1 +bool2x2 +bool3x3 +bool4x4 + +bool2x3 +bool2x4 +bool3x2 +bool3x4 +bool4x2 +bool4x3 + +int1 +int2 +int3 +int4 + +int1x1 +int2x2 +int3x3 +int4x4 + +int2x3 +int2x4 +int3x2 +int3x4 +int4x2 +int4x3 + +half1 +half2 +half3 +half4 + +half2x2 +half3x3 +half4x4 + +half2x3 +half2x4 +half3x2 +half3x4 +half4x2 +half4x3 + +float1 +float2 +float3 +float4 + +float1x1 +float2x2 +float3x3 +float4x4 + +float2x3 +float2x4 +float3x2 +float3x4 +float4x2 +float4x3 + +double1 +double2 +double3 +double4 + +double1x1 +double2x2 +double3x3 +double4x4 + +double2x3 +double2x4 +double3x2 +double3x4 +double4x2 +double4x3 + +bool1GTX +bool2GTX +bool3GTX +bool4GTX + +bool1x1GTX +bool2x2GTX +bool3x3GTX +bool4x4GTX + +bool2x3GTX +bool2x4GTX +bool3x2GTX +bool3x4GTX +bool4x2GTX +bool4x3GTX + +__int1GTX +__int2GTX +__int3GTX +__int4GTX + +__int1x1GTX +__int2x2GTX +__int3x3GTX +__int4x4GTX + +__int2x3GTX +__int2x4GTX +__int3x2GTX +__int3x4GTX +__int4x2GTX +__int4x3GTX + +__half1GTX +__half2GTX +__half3GTX +__half4GTX + +__half1x1GTX +__half2x2GTX +__half3x3GTX +__half4x4GTX + +__half2x3GTX +__half2x4GTX +__half3x2GTX +__half3x4GTX +__half4x2GTX +__half4x3GTX + +__float1GTX +__float2GTX +__float3GTX +__float4GTX + +__float1x1GTX +__float2x2GTX +__float3x3GTX +__float4x4GTX + +__float2x3GTX +__float2x4GTX +__float3x2GTX +__float3x4GTX +__float4x2GTX +__float4x3GTX + +__double1GTX +__double2GTX +__double3GTX +__double4GTX + +__double1x1GTX +__double2x2GTX +__double3x3GTX +__double4x4GTX + +__double2x3GTX +__double2x4GTX +__double3x2GTX +__double3x4GTX +__double4x2GTX +__double4x3GTX diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt new file mode 100644 index 00000000..8cf58cdc --- /dev/null +++ b/glm/CMakeLists.txt @@ -0,0 +1,51 @@ +set(NAME glm) + +file(GLOB ROOT_SOURCE *.cpp) +file(GLOB ROOT_INLINE *.inl) +file(GLOB ROOT_HEADER *.hpp) + +file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) +file(GLOB_RECURSE CORE_INLINE ./core/*.inl) +file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) + +file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) +file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) +file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) + +file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) +file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) +file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) + +file(GLOB_RECURSE IMG_SOURCE ./img/*.cpp) +file(GLOB_RECURSE IMG_INLINE ./img/*.inl) +file(GLOB_RECURSE IMG_HEADER ./img/*.hpp) + +file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp) +file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl) +file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp) + +source_group("Core Files" FILES ${CORE_SOURCE}) +source_group("Core Files" FILES ${CORE_INLINE}) +source_group("Core Files" FILES ${CORE_HEADER}) +source_group("GTC Files" FILES ${GTC_SOURCE}) +source_group("GTC Files" FILES ${GTC_INLINE}) +source_group("GTC Files" FILES ${GTC_HEADER}) +source_group("GTX Files" FILES ${GTX_SOURCE}) +source_group("GTX Files" FILES ${GTX_INLINE}) +source_group("GTX Files" FILES ${GTX_HEADER}) +source_group("IMG Files" FILES ${IMG_SOURCE}) +source_group("IMG Files" FILES ${IMG_INLINE}) +source_group("IMG Files" FILES ${IMG_HEADER}) +source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE}) +source_group("VIRTREV Files" FILES ${VIRTREV_INLINE}) +source_group("VIRTREV Files" FILES ${VIRTREV_HEADER}) + +include_directories(..) + +add_executable(${NAME} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${IMG_SOURCE} ${IMG_INLINE} ${IMG_HEADER} + ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER}) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp new file mode 100644 index 00000000..94b7432f --- /dev/null +++ b/glm/core/_detail.hpp @@ -0,0 +1,327 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-07-24 +// Updated : 2008-08-31 +// Licence : This source is under MIT License +// File : glm/core/_detail.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_detail +#define glm_core_detail + +#include "../setup.hpp" +#include + +//#define valType typename genType::value_type +//#define valType_cref typename genType::value_type const & +//#define genType_cref typename genType const & + +namespace glm{ +namespace detail{ + + class thalf; + +#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC)) + typedef signed __int64 sint64; + typedef unsigned __int64 uint64; +#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) + __extension__ typedef signed long long sint64; + __extension__ typedef unsigned long long uint64; +#else//unknown compiler + typedef signed long sint64; + typedef unsigned long uint64; +#endif//GLM_COMPILER + + template + struct If + { + template + static inline T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static inline T apply(F, const T& val) + { + return val; + } + }; + + //template + //struct traits + //{ + // static const bool is_signed = false; + // static const bool is_float = false; + // static const bool is_vector = false; + // static const bool is_matrix = false; + // static const bool is_genType = false; + // static const bool is_genIType = false; + // static const bool is_genUType = false; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template + //struct desc + //{ + // typedef genType type; + // typedef genType * pointer; + // typedef genType const* const_pointer; + // typedef genType const *const const_pointer_const; + // typedef genType *const pointer_const; + // typedef genType & reference; + // typedef genType const& const_reference; + // typedef genType const& param_type; + + // typedef typename genType::value_type value_type; + // typedef typename genType::size_type size_type; + // static const typename size_type value_size; + //}; + + //template + //const typename desc::size_type desc::value_size = genType::value_size(); + + union uif32 + { + uif32() : + i(0) + {} + + uif32(float f) : + f(f) + {} + + uif32(unsigned int i) : + i(i) + {} + + float f; + unsigned int i; + }; + + union uif64 + { + uif64() : + i(0) + {} + + uif64(double f) : + f(f) + {} + + uif64(uint64 i) : + i(i) + {} + + double f; + uint64 i; + }; + + typedef uif32 uif; + + ////////////////// + // int + + template + struct is_int + { + enum is_int_enum + { + YES = 0, + NO = 1 + }; + }; + +#define GLM_DETAIL_IS_INT(T) \ + template <> \ + struct is_int \ + { \ + enum is_int_enum \ + { \ + YES = 1, \ + NO = 0 \ + }; \ + } + + ////////////////// + // uint + + template + struct is_uint + { + enum is_uint_enum + { + YES = 0, + NO = 1 + }; + }; + +#define GLM_DETAIL_IS_UINT(T) \ + template <> \ + struct is_uint \ + { \ + enum is_uint_enum \ + { \ + YES = 1, \ + NO = 0 \ + }; \ + } + + //GLM_DETAIL_IS_UINT(unsigned long long) + + ////////////////// + // float + + template + struct is_float + { + enum is_float_enum + { + YES = 0, + NO = 1 + }; + }; + +#define GLM_DETAIL_IS_FLOAT(T) \ + template <> \ + struct is_float \ + { \ + enum is_float_enum \ + { \ + YES = 1, \ + NO = 0 \ + }; \ + } + + ////////////////// + // bool + + template + struct is_bool + { + enum is_bool_enum + { + YES = 0, + NO = 1 + }; + }; + + template <> + struct is_bool + { + enum is_bool_enum + { + YES = 1, + NO = 0 + }; + }; + + ////////////////// + // vector + + template + struct is_vector + { + enum is_vector_enum + { + YES = 0, + NO = 1 + }; + }; + +#define GLM_DETAIL_IS_VECTOR(T) \ + template <> \ + struct is_vector \ + { \ + enum is_vector_enum \ + { \ + YES = 1, \ + NO = 0 \ + }; \ + } + + ////////////////// + // matrix + + template + struct is_matrix + { + enum is_matrix_enum + { + YES = 0, + NO = 1 + }; + }; + +#define GLM_DETAIL_IS_MATRIX(T) \ + template <> \ + struct is_matrix \ + { \ + enum is_matrix_enum \ + { \ + YES = 1, \ + NO = 0 \ + }; \ + } + + ////////////////// + // type + + template + struct type + { + enum type_enum + { + is_float = is_float::YES, + is_int = is_int::YES, + is_uint = is_uint::YES, + is_bool = is_bool::YES + }; + }; + + ////////////////// + // type + + typedef signed char int8; + typedef signed short int16; + typedef signed int int32; + typedef detail::sint64 int64; + + typedef unsigned char uint8; + typedef unsigned short uint16; + typedef unsigned int uint32; + typedef detail::uint64 uint64; + + typedef detail::thalf float16; + typedef float float32; + typedef double float64; + +}//namespace detail +}//namespace glm + +#endif//glm_core_detail diff --git a/glm/core/_swizzle.hpp b/glm/core/_swizzle.hpp new file mode 100644 index 00000000..8274117b --- /dev/null +++ b/glm/core/_swizzle.hpp @@ -0,0 +1,1085 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-20 +// Updated : 2008-08-22 +// Licence : This source is under MIT License +// File : glm/core/_swizzle.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle +#define glm_core_swizzle + +namespace glm +{ + enum comp + { + X = 0, + R = 0, + S = 0, + Y = 1, + G = 1, + T = 1, + Z = 2, + B = 2, + P = 2, + W = 3, + A = 3, + Q = 3 + }; +}//namespace glm + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#define xx swizzle(glm::X, glm::X) +#define yx swizzle(glm::Y, glm::X) +#define zx swizzle(glm::Z, glm::X) +#define wx swizzle(glm::W, glm::X) +#define xy swizzle(glm::X, glm::Y) +#define yy swizzle(glm::Y, glm::Y) +#define zy swizzle(glm::Z, glm::Y) +#define wy swizzle(glm::W, glm::Y) +#define xz swizzle(glm::X, glm::Z) +#define yz swizzle(glm::Y, glm::Z) +#define zz swizzle(glm::Z, glm::Z) +#define wz swizzle(glm::W, glm::Z) +#define xw swizzle(glm::X, glm::W) +#define yw swizzle(glm::Y, glm::W) +#define zw swizzle(glm::Z, glm::W) +#define ww swizzle(glm::W, glm::W) + +#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#define rr swizzle(glm::X, glm::X) +#define gr swizzle(glm::Y, glm::X) +#define br swizzle(glm::Z, glm::X) +#define ar swizzle(glm::W, glm::X) +#define rg swizzle(glm::X, glm::Y) +#define gg swizzle(glm::Y, glm::Y) +#define bg swizzle(glm::Z, glm::Y) +#define ag swizzle(glm::W, glm::Y) +#define rb swizzle(glm::X, glm::Z) +#define gb swizzle(glm::Y, glm::Z) +#define bb swizzle(glm::Z, glm::Z) +#define ab swizzle(glm::W, glm::Z) +#define ra swizzle(glm::X, glm::W) +#define ga swizzle(glm::Y, glm::W) +#define ba swizzle(glm::Z, glm::W) +#define aa swizzle(glm::W, glm::W) + +#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#define ss swizzle(glm::X, glm::X) +#define ts swizzle(glm::Y, glm::X) +#define ps swizzle(glm::Z, glm::X) +#define qs swizzle(glm::W, glm::X) +#define st swizzle(glm::X, glm::Y) +#define tt swizzle(glm::Y, glm::Y) +#define pt swizzle(glm::Z, glm::Y) +#define qt swizzle(glm::W, glm::Y) +#define sp swizzle(glm::X, glm::Z) +#define tp swizzle(glm::Y, glm::Z) +#define pp swizzle(glm::Z, glm::Z) +#define qp swizzle(glm::W, glm::Z) +#define sq swizzle(glm::X, glm::W) +#define tq swizzle(glm::Y, glm::W) +#define pq swizzle(glm::Z, glm::W) +#define qq swizzle(glm::W, glm::W) + +#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#define xxx swizzle(glm::X, glm::X, glm::X) +#define yxx swizzle(glm::Y, glm::X, glm::X) +#define zxx swizzle(glm::Z, glm::X, glm::X) +#define wxx swizzle(glm::W, glm::X, glm::X) +#define xyx swizzle(glm::X, glm::Y, glm::X) +#define yyx swizzle(glm::Y, glm::Y, glm::X) +#define zyx swizzle(glm::Z, glm::Y, glm::X) +#define wyx swizzle(glm::W, glm::Y, glm::X) +#define xzx swizzle(glm::X, glm::Z, glm::X) +#define yzx swizzle(glm::Y, glm::Z, glm::X) +#define zzx swizzle(glm::Z, glm::Z, glm::X) +#define wzx swizzle(glm::W, glm::Z, glm::X) +#define xwx swizzle(glm::X, glm::W, glm::X) +#define ywx swizzle(glm::Y, glm::W, glm::X) +#define zwx swizzle(glm::Z, glm::W, glm::X) +#define wwx swizzle(glm::W, glm::W, glm::X) +#define xxy swizzle(glm::X, glm::X, glm::Y) +#define yxy swizzle(glm::Y, glm::X, glm::Y) +#define zxy swizzle(glm::Z, glm::X, glm::Y) +#define wxy swizzle(glm::W, glm::X, glm::Y) +#define xyy swizzle(glm::X, glm::Y, glm::Y) +#define yyy swizzle(glm::Y, glm::Y, glm::Y) +#define zyy swizzle(glm::Z, glm::Y, glm::Y) +#define wyy swizzle(glm::W, glm::Y, glm::Y) +#define xzy swizzle(glm::X, glm::Z, glm::Y) +#define yzy swizzle(glm::Y, glm::Z, glm::Y) +#define zzy swizzle(glm::Z, glm::Z, glm::Y) +#define wzy swizzle(glm::W, glm::Z, glm::Y) +#define xwy swizzle(glm::X, glm::W, glm::Y) +#define ywy swizzle(glm::Y, glm::W, glm::Y) +#define zwy swizzle(glm::Z, glm::W, glm::Y) +#define wwy swizzle(glm::W, glm::W, glm::Y) +#define xxz swizzle(glm::X, glm::X, glm::Z) +#define yxz swizzle(glm::Y, glm::X, glm::Z) +#define zxz swizzle(glm::Z, glm::X, glm::Z) +#define wxz swizzle(glm::W, glm::X, glm::Z) +#define xyz swizzle(glm::X, glm::Y, glm::Z) +#define yyz swizzle(glm::Y, glm::Y, glm::Z) +#define zyz swizzle(glm::Z, glm::Y, glm::Z) +#define wyz swizzle(glm::W, glm::Y, glm::Z) +#define xzz swizzle(glm::X, glm::Z, glm::Z) +#define yzz swizzle(glm::Y, glm::Z, glm::Z) +#define zzz swizzle(glm::Z, glm::Z, glm::Z) +#define wzz swizzle(glm::W, glm::Z, glm::Z) +#define xwz swizzle(glm::X, glm::W, glm::Z) +#define ywz swizzle(glm::Y, glm::W, glm::Z) +#define zwz swizzle(glm::Z, glm::W, glm::Z) +#define wwz swizzle(glm::W, glm::W, glm::Z) +#define xxw swizzle(glm::X, glm::X, glm::W) +#define yxw swizzle(glm::Y, glm::X, glm::W) +#define zxw swizzle(glm::Z, glm::X, glm::W) +#define wxw swizzle(glm::W, glm::X, glm::W) +#define xyw swizzle(glm::X, glm::Y, glm::W) +#define yyw swizzle(glm::Y, glm::Y, glm::W) +#define zyw swizzle(glm::Z, glm::Y, glm::W) +#define wyw swizzle(glm::W, glm::Y, glm::W) +#define xzw swizzle(glm::X, glm::Z, glm::W) +#define yzw swizzle(glm::Y, glm::Z, glm::W) +#define zzw swizzle(glm::Z, glm::Z, glm::W) +#define wzw swizzle(glm::W, glm::Z, glm::W) +#define xww swizzle(glm::X, glm::W, glm::W) +#define yww swizzle(glm::Y, glm::W, glm::W) +#define zww swizzle(glm::Z, glm::W, glm::W) +#define www swizzle(glm::W, glm::W, glm::W) + +#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#define rrr swizzle(glm::X, glm::X, glm::X) +#define grr swizzle(glm::Y, glm::X, glm::X) +#define brr swizzle(glm::Z, glm::X, glm::X) +#define arr swizzle(glm::W, glm::X, glm::X) +#define rgr swizzle(glm::X, glm::Y, glm::X) +#define ggr swizzle(glm::Y, glm::Y, glm::X) +#define bgr swizzle(glm::Z, glm::Y, glm::X) +#define agr swizzle(glm::W, glm::Y, glm::X) +#define rbr swizzle(glm::X, glm::Z, glm::X) +#define gbr swizzle(glm::Y, glm::Z, glm::X) +#define bbr swizzle(glm::Z, glm::Z, glm::X) +#define abr swizzle(glm::W, glm::Z, glm::X) +#define rar swizzle(glm::X, glm::W, glm::X) +#define gar swizzle(glm::Y, glm::W, glm::X) +#define bar swizzle(glm::Z, glm::W, glm::X) +#define aar swizzle(glm::W, glm::W, glm::X) +#define rrg swizzle(glm::X, glm::X, glm::Y) +#define grg swizzle(glm::Y, glm::X, glm::Y) +#define brg swizzle(glm::Z, glm::X, glm::Y) +#define arg swizzle(glm::W, glm::X, glm::Y) +#define rgg swizzle(glm::X, glm::Y, glm::Y) +#define ggg swizzle(glm::Y, glm::Y, glm::Y) +#define bgg swizzle(glm::Z, glm::Y, glm::Y) +#define agg swizzle(glm::W, glm::Y, glm::Y) +#define rbg swizzle(glm::X, glm::Z, glm::Y) +#define gbg swizzle(glm::Y, glm::Z, glm::Y) +#define bbg swizzle(glm::Z, glm::Z, glm::Y) +#define abg swizzle(glm::W, glm::Z, glm::Y) +#define rag swizzle(glm::X, glm::W, glm::Y) +#define gag swizzle(glm::Y, glm::W, glm::Y) +#define bag swizzle(glm::Z, glm::W, glm::Y) +#define aag swizzle(glm::W, glm::W, glm::Y) +#define rrb swizzle(glm::X, glm::X, glm::Z) +#define grb swizzle(glm::Y, glm::X, glm::Z) +#define brb swizzle(glm::Z, glm::X, glm::Z) +#define arb swizzle(glm::W, glm::X, glm::Z) +#define rgb swizzle(glm::X, glm::Y, glm::Z) +#define ggb swizzle(glm::Y, glm::Y, glm::Z) +#define bgb swizzle(glm::Z, glm::Y, glm::Z) +#define agb swizzle(glm::W, glm::Y, glm::Z) +#define rbb swizzle(glm::X, glm::Z, glm::Z) +#define gbb swizzle(glm::Y, glm::Z, glm::Z) +#define bbb swizzle(glm::Z, glm::Z, glm::Z) +#define abb swizzle(glm::W, glm::Z, glm::Z) +#define rab swizzle(glm::X, glm::W, glm::Z) +#define gab swizzle(glm::Y, glm::W, glm::Z) +#define bab swizzle(glm::Z, glm::W, glm::Z) +#define aab swizzle(glm::W, glm::W, glm::Z) +#define rra swizzle(glm::X, glm::X, glm::W) +#define gra swizzle(glm::Y, glm::X, glm::W) +#define bra swizzle(glm::Z, glm::X, glm::W) +#define ara swizzle(glm::W, glm::X, glm::W) +#define rga swizzle(glm::X, glm::Y, glm::W) +#define gga swizzle(glm::Y, glm::Y, glm::W) +#define bga swizzle(glm::Z, glm::Y, glm::W) +#define aga swizzle(glm::W, glm::Y, glm::W) +#define rba swizzle(glm::X, glm::Z, glm::W) +#define gba swizzle(glm::Y, glm::Z, glm::W) +#define bba swizzle(glm::Z, glm::Z, glm::W) +#define aba swizzle(glm::W, glm::Z, glm::W) +#define raa swizzle(glm::X, glm::W, glm::W) +#define gaa swizzle(glm::Y, glm::W, glm::W) +#define baa swizzle(glm::Z, glm::W, glm::W) +#define aaa swizzle(glm::W, glm::W, glm::W) + +#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#define sss swizzle(glm::X, glm::X, glm::X) +#define tss swizzle(glm::Y, glm::X, glm::X) +#define pss swizzle(glm::Z, glm::X, glm::X) +#define qss swizzle(glm::W, glm::X, glm::X) +#define sts swizzle(glm::X, glm::Y, glm::X) +#define tts swizzle(glm::Y, glm::Y, glm::X) +#define pts swizzle(glm::Z, glm::Y, glm::X) +#define qts swizzle(glm::W, glm::Y, glm::X) +#define sps swizzle(glm::X, glm::Z, glm::X) +#define tps swizzle(glm::Y, glm::Z, glm::X) +#define pps swizzle(glm::Z, glm::Z, glm::X) +#define qps swizzle(glm::W, glm::Z, glm::X) +#define sqs swizzle(glm::X, glm::W, glm::X) +#define tqs swizzle(glm::Y, glm::W, glm::X) +#define pqs swizzle(glm::Z, glm::W, glm::X) +#define qqs swizzle(glm::W, glm::W, glm::X) +#define sst swizzle(glm::X, glm::X, glm::Y) +#define tst swizzle(glm::Y, glm::X, glm::Y) +#define pst swizzle(glm::Z, glm::X, glm::Y) +#define qst swizzle(glm::W, glm::X, glm::Y) +#define stt swizzle(glm::X, glm::Y, glm::Y) +#define ttt swizzle(glm::Y, glm::Y, glm::Y) +#define ptt swizzle(glm::Z, glm::Y, glm::Y) +#define qtt swizzle(glm::W, glm::Y, glm::Y) +#define spt swizzle(glm::X, glm::Z, glm::Y) +#define tpt swizzle(glm::Y, glm::Z, glm::Y) +#define ppt swizzle(glm::Z, glm::Z, glm::Y) +#define qpt swizzle(glm::W, glm::Z, glm::Y) +#define sqt swizzle(glm::X, glm::W, glm::Y) +#define tqt swizzle(glm::Y, glm::W, glm::Y) +#define pqt swizzle(glm::Z, glm::W, glm::Y) +#define qqt swizzle(glm::W, glm::W, glm::Y) +#define ssp swizzle(glm::X, glm::X, glm::Z) +#define tsp swizzle(glm::Y, glm::X, glm::Z) +#define psp swizzle(glm::Z, glm::X, glm::Z) +#define qsp swizzle(glm::W, glm::X, glm::Z) +#define stp swizzle(glm::X, glm::Y, glm::Z) +#define ttp swizzle(glm::Y, glm::Y, glm::Z) +#define ptp swizzle(glm::Z, glm::Y, glm::Z) +#define qtp swizzle(glm::W, glm::Y, glm::Z) +#define spp swizzle(glm::X, glm::Z, glm::Z) +#define tpp swizzle(glm::Y, glm::Z, glm::Z) +#define ppp swizzle(glm::Z, glm::Z, glm::Z) +#define qpp swizzle(glm::W, glm::Z, glm::Z) +#define sqp swizzle(glm::X, glm::W, glm::Z) +#define tqp swizzle(glm::Y, glm::W, glm::Z) +#define pqp swizzle(glm::Z, glm::W, glm::Z) +#define qqp swizzle(glm::W, glm::W, glm::Z) +#define ssq swizzle(glm::X, glm::X, glm::W) +#define tsq swizzle(glm::Y, glm::X, glm::W) +#define psq swizzle(glm::Z, glm::X, glm::W) +#define qsq swizzle(glm::W, glm::X, glm::W) +#define stq swizzle(glm::X, glm::Y, glm::W) +#define ttq swizzle(glm::Y, glm::Y, glm::W) +#define ptq swizzle(glm::Z, glm::Y, glm::W) +#define qtq swizzle(glm::W, glm::Y, glm::W) +#define spq swizzle(glm::X, glm::Z, glm::W) +#define tpq swizzle(glm::Y, glm::Z, glm::W) +#define ppq swizzle(glm::Z, glm::Z, glm::W) +#define qpq swizzle(glm::W, glm::Z, glm::W) +#define sqq swizzle(glm::X, glm::W, glm::W) +#define tqq swizzle(glm::Y, glm::W, glm::W) +#define pqq swizzle(glm::Z, glm::W, glm::W) +#define qqq swizzle(glm::W, glm::W, glm::W) + +#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#define xxxx swizzle(glm::X, glm::X, glm::X, glm::X) +#define yxxx swizzle(glm::Y, glm::X, glm::X, glm::X) +#define zxxx swizzle(glm::Z, glm::X, glm::X, glm::X) +#define wxxx swizzle(glm::W, glm::X, glm::X, glm::X) +#define xyxx swizzle(glm::X, glm::Y, glm::X, glm::X) +#define yyxx swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define zyxx swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define wyxx swizzle(glm::W, glm::Y, glm::X, glm::X) +#define xzxx swizzle(glm::X, glm::Z, glm::X, glm::X) +#define yzxx swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define zzxx swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define wzxx swizzle(glm::W, glm::Z, glm::X, glm::X) +#define xwxx swizzle(glm::X, glm::W, glm::X, glm::X) +#define ywxx swizzle(glm::Y, glm::W, glm::X, glm::X) +#define zwxx swizzle(glm::Z, glm::W, glm::X, glm::X) +#define wwxx swizzle(glm::W, glm::W, glm::X, glm::X) +#define xxyx swizzle(glm::X, glm::X, glm::Y, glm::X) +#define yxyx swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define zxyx swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define wxyx swizzle(glm::W, glm::X, glm::Y, glm::X) +#define xyyx swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define yyyx swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define zyyx swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define wyyx swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define xzyx swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define yzyx swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define zzyx swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define wzyx swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define xwyx swizzle(glm::X, glm::W, glm::Y, glm::X) +#define ywyx swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define zwyx swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define wwyx swizzle(glm::W, glm::W, glm::Y, glm::X) +#define xxzx swizzle(glm::X, glm::X, glm::Z, glm::X) +#define yxzx swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define zxzx swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define wxzx swizzle(glm::W, glm::X, glm::Z, glm::X) +#define xyzx swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define yyzx swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define zyzx swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define wyzx swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define xzzx swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define yzzx swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define zzzx swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define wzzx swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define xwzx swizzle(glm::X, glm::W, glm::Z, glm::X) +#define ywzx swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define zwzx swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define wwzx swizzle(glm::W, glm::W, glm::Z, glm::X) +#define xxwx swizzle(glm::X, glm::X, glm::W, glm::X) +#define yxwx swizzle(glm::Y, glm::X, glm::W, glm::X) +#define zxwx swizzle(glm::Z, glm::X, glm::W, glm::X) +#define wxwx swizzle(glm::W, glm::X, glm::W, glm::X) +#define xywx swizzle(glm::X, glm::Y, glm::W, glm::X) +#define yywx swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define zywx swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define wywx swizzle(glm::W, glm::Y, glm::W, glm::X) +#define xzwx swizzle(glm::X, glm::Z, glm::W, glm::X) +#define yzwx swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define zzwx swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define wzwx swizzle(glm::W, glm::Z, glm::W, glm::X) +#define xwwx swizzle(glm::X, glm::W, glm::W, glm::X) +#define ywwx swizzle(glm::Y, glm::W, glm::W, glm::X) +#define zwwx swizzle(glm::Z, glm::W, glm::W, glm::X) +#define wwwx swizzle(glm::W, glm::W, glm::W, glm::X) +#define xxxy swizzle(glm::X, glm::X, glm::X, glm::Y) +#define yxxy swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define zxxy swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define wxxy swizzle(glm::W, glm::X, glm::X, glm::Y) +#define xyxy swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define yyxy swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define zyxy swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define wyxy swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define xzxy swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define yzxy swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define zzxy swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define wzxy swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define xwxy swizzle(glm::X, glm::W, glm::X, glm::Y) +#define ywxy swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define zwxy swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define wwxy swizzle(glm::W, glm::W, glm::X, glm::Y) +#define xxyy swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define yxyy swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define zxyy swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define wxyy swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define xyyy swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define yyyy swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define zyyy swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define wyyy swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define xzyy swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define yzyy swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define zzyy swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define wzyy swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define xwyy swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define ywyy swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define zwyy swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define wwyy swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define xxzy swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define yxzy swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define zxzy swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define wxzy swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define xyzy swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define yyzy swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define zyzy swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define wyzy swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define xzzy swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define yzzy swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define zzzy swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define wzzy swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define xwzy swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define ywzy swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define zwzy swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define wwzy swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define xxwy swizzle(glm::X, glm::X, glm::W, glm::Y) +#define yxwy swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define zxwy swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define wxwy swizzle(glm::W, glm::X, glm::W, glm::Y) +#define xywy swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define yywy swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define zywy swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define wywy swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define xzwy swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define yzwy swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define zzwy swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define wzwy swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define xwwy swizzle(glm::X, glm::W, glm::W, glm::Y) +#define ywwy swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define zwwy swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define wwwy swizzle(glm::W, glm::W, glm::W, glm::Y) +#define xxxz swizzle(glm::X, glm::X, glm::X, glm::Z) +#define yxxz swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define zxxz swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define wxxz swizzle(glm::W, glm::X, glm::X, glm::Z) +#define xyxz swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define yyxz swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define zyxz swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define wyxz swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define xzxz swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define yzxz swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define zzxz swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define wzxz swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define xwxz swizzle(glm::X, glm::W, glm::X, glm::Z) +#define ywxz swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define zwxz swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define wwxz swizzle(glm::W, glm::W, glm::X, glm::Z) +#define xxyz swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define yxyz swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define zxyz swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define wxyz swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define xyyz swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define yyyz swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define zyyz swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define wyyz swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define xzyz swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define yzyz swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define zzyz swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define wzyz swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define xwyz swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define ywyz swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define zwyz swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define wwyz swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define xxzz swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define yxzz swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define zxzz swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define wxzz swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define xyzz swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define yyzz swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define zyzz swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define wyzz swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define xzzz swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define yzzz swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define zzzz swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define wzzz swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define xwzz swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define ywzz swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define zwzz swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define wwzz swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define xxwz swizzle(glm::X, glm::X, glm::W, glm::Z) +#define yxwz swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define zxwz swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define wxwz swizzle(glm::W, glm::X, glm::W, glm::Z) +#define xywz swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define yywz swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define zywz swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define wywz swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define xzwz swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define yzwz swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define zzwz swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define wzwz swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define xwwz swizzle(glm::X, glm::W, glm::W, glm::Z) +#define ywwz swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define zwwz swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define wwwz swizzle(glm::W, glm::W, glm::W, glm::Z) +#define xxxw swizzle(glm::X, glm::X, glm::X, glm::W) +#define yxxw swizzle(glm::Y, glm::X, glm::X, glm::W) +#define zxxw swizzle(glm::Z, glm::X, glm::X, glm::W) +#define wxxw swizzle(glm::W, glm::X, glm::X, glm::W) +#define xyxw swizzle(glm::X, glm::Y, glm::X, glm::W) +#define yyxw swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define zyxw swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define wyxw swizzle(glm::W, glm::Y, glm::X, glm::W) +#define xzxw swizzle(glm::X, glm::Z, glm::X, glm::W) +#define yzxw swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define zzxw swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define wzxw swizzle(glm::W, glm::Z, glm::X, glm::W) +#define xwxw swizzle(glm::X, glm::W, glm::X, glm::W) +#define ywxw swizzle(glm::Y, glm::W, glm::X, glm::W) +#define zwxw swizzle(glm::Z, glm::W, glm::X, glm::W) +#define wwxw swizzle(glm::W, glm::W, glm::X, glm::W) +#define xxyw swizzle(glm::X, glm::X, glm::Y, glm::W) +#define yxyw swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define zxyw swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define wxyw swizzle(glm::W, glm::X, glm::Y, glm::W) +#define xyyw swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define yyyw swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define zyyw swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define wyyw swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define xzyw swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define yzyw swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define zzyw swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define wzyw swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define xwyw swizzle(glm::X, glm::W, glm::Y, glm::W) +#define ywyw swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define zwyw swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define wwyw swizzle(glm::W, glm::W, glm::Y, glm::W) +#define xxzw swizzle(glm::X, glm::X, glm::Z, glm::W) +#define yxzw swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define zxzw swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define wxzw swizzle(glm::W, glm::X, glm::Z, glm::W) +#define xyzw swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define yyzw swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define zyzw swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define wyzw swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define xzzw swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define yzzw swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define zzzw swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define wzzw swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define xwzw swizzle(glm::X, glm::W, glm::Z, glm::W) +#define ywzw swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define zwzw swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define wwzw swizzle(glm::W, glm::W, glm::Z, glm::W) +#define xxww swizzle(glm::X, glm::X, glm::W, glm::W) +#define yxww swizzle(glm::Y, glm::X, glm::W, glm::W) +#define zxww swizzle(glm::Z, glm::X, glm::W, glm::W) +#define wxww swizzle(glm::W, glm::X, glm::W, glm::W) +#define xyww swizzle(glm::X, glm::Y, glm::W, glm::W) +#define yyww swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define zyww swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define wyww swizzle(glm::W, glm::Y, glm::W, glm::W) +#define xzww swizzle(glm::X, glm::Z, glm::W, glm::W) +#define yzww swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define zzww swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define wzww swizzle(glm::W, glm::Z, glm::W, glm::W) +#define xwww swizzle(glm::X, glm::W, glm::W, glm::W) +#define ywww swizzle(glm::Y, glm::W, glm::W, glm::W) +#define zwww swizzle(glm::Z, glm::W, glm::W, glm::W) +#define wwww swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#define rrrr swizzle(glm::X, glm::X, glm::X, glm::X) +#define grrr swizzle(glm::Y, glm::X, glm::X, glm::X) +#define brrr swizzle(glm::Z, glm::X, glm::X, glm::X) +#define arrr swizzle(glm::W, glm::X, glm::X, glm::X) +#define rgrr swizzle(glm::X, glm::Y, glm::X, glm::X) +#define ggrr swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define bgrr swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define agrr swizzle(glm::W, glm::Y, glm::X, glm::X) +#define rbrr swizzle(glm::X, glm::Z, glm::X, glm::X) +#define gbrr swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define bbrr swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define abrr swizzle(glm::W, glm::Z, glm::X, glm::X) +#define rarr swizzle(glm::X, glm::W, glm::X, glm::X) +#define garr swizzle(glm::Y, glm::W, glm::X, glm::X) +#define barr swizzle(glm::Z, glm::W, glm::X, glm::X) +#define aarr swizzle(glm::W, glm::W, glm::X, glm::X) +#define rrgr swizzle(glm::X, glm::X, glm::Y, glm::X) +#define grgr swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define brgr swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define argr swizzle(glm::W, glm::X, glm::Y, glm::X) +#define rggr swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define gggr swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define bggr swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define aggr swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define rbgr swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define gbgr swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define bbgr swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define abgr swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define ragr swizzle(glm::X, glm::W, glm::Y, glm::X) +#define gagr swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define bagr swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define aagr swizzle(glm::W, glm::W, glm::Y, glm::X) +#define rrbr swizzle(glm::X, glm::X, glm::Z, glm::X) +#define grbr swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define brbr swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define arbr swizzle(glm::W, glm::X, glm::Z, glm::X) +#define rgbr swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define ggbr swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define bgbr swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define agbr swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define rbbr swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define gbbr swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define bbbr swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define abbr swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define rabr swizzle(glm::X, glm::W, glm::Z, glm::X) +#define gabr swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define babr swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define aabr swizzle(glm::W, glm::W, glm::Z, glm::X) +#define rrar swizzle(glm::X, glm::X, glm::W, glm::X) +#define grar swizzle(glm::Y, glm::X, glm::W, glm::X) +#define brar swizzle(glm::Z, glm::X, glm::W, glm::X) +#define arar swizzle(glm::W, glm::X, glm::W, glm::X) +#define rgar swizzle(glm::X, glm::Y, glm::W, glm::X) +#define ggar swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define bgar swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define agar swizzle(glm::W, glm::Y, glm::W, glm::X) +#define rbar swizzle(glm::X, glm::Z, glm::W, glm::X) +#define gbar swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define bbar swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define abar swizzle(glm::W, glm::Z, glm::W, glm::X) +#define raar swizzle(glm::X, glm::W, glm::W, glm::X) +#define gaar swizzle(glm::Y, glm::W, glm::W, glm::X) +#define baar swizzle(glm::Z, glm::W, glm::W, glm::X) +#define aaar swizzle(glm::W, glm::W, glm::W, glm::X) +#define rrrg swizzle(glm::X, glm::X, glm::X, glm::Y) +#define grrg swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define brrg swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define arrg swizzle(glm::W, glm::X, glm::X, glm::Y) +#define rgrg swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define ggrg swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define bgrg swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define agrg swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define rbrg swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define gbrg swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define bbrg swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define abrg swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define rarg swizzle(glm::X, glm::W, glm::X, glm::Y) +#define garg swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define barg swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define aarg swizzle(glm::W, glm::W, glm::X, glm::Y) +#define rrgg swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define grgg swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define brgg swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define argg swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define rggg swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define gggg swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define bggg swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define aggg swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define rbgg swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define gbgg swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define bbgg swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define abgg swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define ragg swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define gagg swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define bagg swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define aagg swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define rrbg swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define grbg swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define brbg swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define arbg swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define rgbg swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define ggbg swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define bgbg swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define agbg swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define rbbg swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define gbbg swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define bbbg swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define abbg swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define rabg swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define gabg swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define babg swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define aabg swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define rrag swizzle(glm::X, glm::X, glm::W, glm::Y) +#define grag swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define brag swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define arag swizzle(glm::W, glm::X, glm::W, glm::Y) +#define rgag swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define ggag swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define bgag swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define agag swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define rbag swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define gbag swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define bbag swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define abag swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define raag swizzle(glm::X, glm::W, glm::W, glm::Y) +#define gaag swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define baag swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define aaag swizzle(glm::W, glm::W, glm::W, glm::Y) +#define rrrb swizzle(glm::X, glm::X, glm::X, glm::Z) +#define grrb swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define brrb swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define arrb swizzle(glm::W, glm::X, glm::X, glm::Z) +#define rgrb swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define ggrb swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define bgrb swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define agrb swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define rbrb swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define gbrb swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define bbrb swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define abrb swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define rarb swizzle(glm::X, glm::W, glm::X, glm::Z) +#define garb swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define barb swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define aarb swizzle(glm::W, glm::W, glm::X, glm::Z) +#define rrgb swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define grgb swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define brgb swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define argb swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define rggb swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define gggb swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define bggb swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define aggb swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define rbgb swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define gbgb swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define bbgb swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define abgb swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define ragb swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define gagb swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define bagb swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define aagb swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define rrbb swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define grbb swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define brbb swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define arbb swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define rgbb swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define ggbb swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define bgbb swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define agbb swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define rbbb swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define gbbb swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define bbbb swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define abbb swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define rabb swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define gabb swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define babb swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define aabb swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define rrab swizzle(glm::X, glm::X, glm::W, glm::Z) +#define grab swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define brab swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define arab swizzle(glm::W, glm::X, glm::W, glm::Z) +#define rgab swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define ggab swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define bgab swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define agab swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define rbab swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define gbab swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define bbab swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define abab swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define raab swizzle(glm::X, glm::W, glm::W, glm::Z) +#define gaab swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define baab swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define aaab swizzle(glm::W, glm::W, glm::W, glm::Z) +#define rrra swizzle(glm::X, glm::X, glm::X, glm::W) +#define grra swizzle(glm::Y, glm::X, glm::X, glm::W) +#define brra swizzle(glm::Z, glm::X, glm::X, glm::W) +#define arra swizzle(glm::W, glm::X, glm::X, glm::W) +#define rgra swizzle(glm::X, glm::Y, glm::X, glm::W) +#define ggra swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define bgra swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define agra swizzle(glm::W, glm::Y, glm::X, glm::W) +#define rbra swizzle(glm::X, glm::Z, glm::X, glm::W) +#define gbra swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define bbra swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define abra swizzle(glm::W, glm::Z, glm::X, glm::W) +#define rara swizzle(glm::X, glm::W, glm::X, glm::W) +#define gara swizzle(glm::Y, glm::W, glm::X, glm::W) +#define bara swizzle(glm::Z, glm::W, glm::X, glm::W) +#define aara swizzle(glm::W, glm::W, glm::X, glm::W) +#define rrga swizzle(glm::X, glm::X, glm::Y, glm::W) +#define grga swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define brga swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define arga swizzle(glm::W, glm::X, glm::Y, glm::W) +#define rgga swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define ggga swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define bgga swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define agga swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define rbga swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define gbga swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define bbga swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define abga swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define raga swizzle(glm::X, glm::W, glm::Y, glm::W) +#define gaga swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define baga swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define aaga swizzle(glm::W, glm::W, glm::Y, glm::W) +#define rrba swizzle(glm::X, glm::X, glm::Z, glm::W) +#define grba swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define brba swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define arba swizzle(glm::W, glm::X, glm::Z, glm::W) +#define rgba swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define ggba swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define bgba swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define agba swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define rbba swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define gbba swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define bbba swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define abba swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define raba swizzle(glm::X, glm::W, glm::Z, glm::W) +#define gaba swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define baba swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define aaba swizzle(glm::W, glm::W, glm::Z, glm::W) +#define rraa swizzle(glm::X, glm::X, glm::W, glm::W) +#define graa swizzle(glm::Y, glm::X, glm::W, glm::W) +#define braa swizzle(glm::Z, glm::X, glm::W, glm::W) +#define araa swizzle(glm::W, glm::X, glm::W, glm::W) +#define rgaa swizzle(glm::X, glm::Y, glm::W, glm::W) +#define ggaa swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define bgaa swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define agaa swizzle(glm::W, glm::Y, glm::W, glm::W) +#define rbaa swizzle(glm::X, glm::Z, glm::W, glm::W) +#define gbaa swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define bbaa swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define abaa swizzle(glm::W, glm::Z, glm::W, glm::W) +#define raaa swizzle(glm::X, glm::W, glm::W, glm::W) +#define gaaa swizzle(glm::Y, glm::W, glm::W, glm::W) +#define baaa swizzle(glm::Z, glm::W, glm::W, glm::W) +#define aaaa swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) + +#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#define ssss swizzle(glm::X, glm::X, glm::X, glm::X) +#define tsss swizzle(glm::Y, glm::X, glm::X, glm::X) +#define psss swizzle(glm::Z, glm::X, glm::X, glm::X) +#define qsss swizzle(glm::W, glm::X, glm::X, glm::X) +#define stss swizzle(glm::X, glm::Y, glm::X, glm::X) +#define ttss swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define ptss swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define qtss swizzle(glm::W, glm::Y, glm::X, glm::X) +#define spss swizzle(glm::X, glm::Z, glm::X, glm::X) +#define tpss swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define ppss swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define qpss swizzle(glm::W, glm::Z, glm::X, glm::X) +#define sqss swizzle(glm::X, glm::W, glm::X, glm::X) +#define tqss swizzle(glm::Y, glm::W, glm::X, glm::X) +#define pqss swizzle(glm::Z, glm::W, glm::X, glm::X) +#define qqss swizzle(glm::W, glm::W, glm::X, glm::X) +#define ssts swizzle(glm::X, glm::X, glm::Y, glm::X) +#define tsts swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define psts swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define qsts swizzle(glm::W, glm::X, glm::Y, glm::X) +#define stts swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define ttts swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define ptts swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define qtts swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define spts swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define tpts swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define ppts swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define qpts swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define sqts swizzle(glm::X, glm::W, glm::Y, glm::X) +#define tqts swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define pqts swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define qqts swizzle(glm::W, glm::W, glm::Y, glm::X) +#define ssps swizzle(glm::X, glm::X, glm::Z, glm::X) +#define tsps swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define psps swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define qsps swizzle(glm::W, glm::X, glm::Z, glm::X) +#define stps swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define ttps swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define ptps swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define qtps swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define spps swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define tpps swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define ppps swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define qpps swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define sqps swizzle(glm::X, glm::W, glm::Z, glm::X) +#define tqps swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define pqps swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define qqps swizzle(glm::W, glm::W, glm::Z, glm::X) +#define ssqs swizzle(glm::X, glm::X, glm::W, glm::X) +#define tsqs swizzle(glm::Y, glm::X, glm::W, glm::X) +#define psqs swizzle(glm::Z, glm::X, glm::W, glm::X) +#define qsqs swizzle(glm::W, glm::X, glm::W, glm::X) +#define stqs swizzle(glm::X, glm::Y, glm::W, glm::X) +#define ttqs swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define ptqs swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define qtqs swizzle(glm::W, glm::Y, glm::W, glm::X) +#define spqs swizzle(glm::X, glm::Z, glm::W, glm::X) +#define tpqs swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define ppqs swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define qpqs swizzle(glm::W, glm::Z, glm::W, glm::X) +#define sqqs swizzle(glm::X, glm::W, glm::W, glm::X) +#define tqqs swizzle(glm::Y, glm::W, glm::W, glm::X) +#define pqqs swizzle(glm::Z, glm::W, glm::W, glm::X) +#define qqqs swizzle(glm::W, glm::W, glm::W, glm::X) +#define ssst swizzle(glm::X, glm::X, glm::X, glm::Y) +#define tsst swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define psst swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define qsst swizzle(glm::W, glm::X, glm::X, glm::Y) +#define stst swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define ttst swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define ptst swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define qtst swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define spst swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define tpst swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define ppst swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define qpst swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define sqst swizzle(glm::X, glm::W, glm::X, glm::Y) +#define tqst swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define pqst swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define qqst swizzle(glm::W, glm::W, glm::X, glm::Y) +#define sstt swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define tstt swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define pstt swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define qstt swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define sttt swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define tttt swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define pttt swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define qttt swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define sptt swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define tptt swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define pptt swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define qptt swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define sqtt swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define tqtt swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define pqtt swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define qqtt swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define sspt swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define tspt swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define pspt swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define qspt swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define stpt swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define ttpt swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define ptpt swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define qtpt swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define sppt swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define tppt swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define pppt swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define qppt swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define sqpt swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define tqpt swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define pqpt swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define qqpt swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define ssqt swizzle(glm::X, glm::X, glm::W, glm::Y) +#define tsqt swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define psqt swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define qsqt swizzle(glm::W, glm::X, glm::W, glm::Y) +#define stqt swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define ttqt swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define ptqt swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define qtqt swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define spqt swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define tpqt swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define ppqt swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define qpqt swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define sqqt swizzle(glm::X, glm::W, glm::W, glm::Y) +#define tqqt swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define pqqt swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define qqqt swizzle(glm::W, glm::W, glm::W, glm::Y) +#define sssp swizzle(glm::X, glm::X, glm::X, glm::Z) +#define tssp swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define pssp swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define qssp swizzle(glm::W, glm::X, glm::X, glm::Z) +#define stsp swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define ttsp swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define ptsp swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define qtsp swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define spsp swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define tpsp swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define ppsp swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define qpsp swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define sqsp swizzle(glm::X, glm::W, glm::X, glm::Z) +#define tqsp swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define pqsp swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define qqsp swizzle(glm::W, glm::W, glm::X, glm::Z) +#define sstp swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define tstp swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define pstp swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define qstp swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define sttp swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define tttp swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define pttp swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define qttp swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define sptp swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define tptp swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define pptp swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define qptp swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define sqtp swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define tqtp swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define pqtp swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define qqtp swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define sspp swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define tspp swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define pspp swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define qspp swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define stpp swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define ttpp swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define ptpp swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define qtpp swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define sppp swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define tppp swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define pppp swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define qppp swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define sqpp swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define tqpp swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define pqpp swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define qqpp swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define ssqp swizzle(glm::X, glm::X, glm::W, glm::Z) +#define tsqp swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define psqp swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define qsqp swizzle(glm::W, glm::X, glm::W, glm::Z) +#define stqp swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define ttqp swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define ptqp swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define qtqp swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define spqp swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define tpqp swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define ppqp swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define qpqp swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define sqqp swizzle(glm::X, glm::W, glm::W, glm::Z) +#define tqqp swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define pqqp swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define qqqp swizzle(glm::W, glm::W, glm::W, glm::Z) +#define sssq swizzle(glm::X, glm::X, glm::X, glm::W) +#define tssq swizzle(glm::Y, glm::X, glm::X, glm::W) +#define pssq swizzle(glm::Z, glm::X, glm::X, glm::W) +#define qssq swizzle(glm::W, glm::X, glm::X, glm::W) +#define stsq swizzle(glm::X, glm::Y, glm::X, glm::W) +#define ttsq swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define ptsq swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define qtsq swizzle(glm::W, glm::Y, glm::X, glm::W) +#define spsq swizzle(glm::X, glm::Z, glm::X, glm::W) +#define tpsq swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define ppsq swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define qpsq swizzle(glm::W, glm::Z, glm::X, glm::W) +#define sqsq swizzle(glm::X, glm::W, glm::X, glm::W) +#define tqsq swizzle(glm::Y, glm::W, glm::X, glm::W) +#define pqsq swizzle(glm::Z, glm::W, glm::X, glm::W) +#define qqsq swizzle(glm::W, glm::W, glm::X, glm::W) +#define sstq swizzle(glm::X, glm::X, glm::Y, glm::W) +#define tstq swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define pstq swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define qstq swizzle(glm::W, glm::X, glm::Y, glm::W) +#define sttq swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define tttq swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define pttq swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define qttq swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define sptq swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define tptq swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define pptq swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define qptq swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define sqtq swizzle(glm::X, glm::W, glm::Y, glm::W) +#define tqtq swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define pqtq swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define qqtq swizzle(glm::W, glm::W, glm::Y, glm::W) +#define sspq swizzle(glm::X, glm::X, glm::Z, glm::W) +#define tspq swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define pspq swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define qspq swizzle(glm::W, glm::X, glm::Z, glm::W) +#define stpq swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define ttpq swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define ptpq swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define qtpq swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define sppq swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define tppq swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define pppq swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define qppq swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define sqpq swizzle(glm::X, glm::W, glm::Z, glm::W) +#define tqpq swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define pqpq swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define qqpq swizzle(glm::W, glm::W, glm::Z, glm::W) +#define ssqq swizzle(glm::X, glm::X, glm::W, glm::W) +#define tsqq swizzle(glm::Y, glm::X, glm::W, glm::W) +#define psqq swizzle(glm::Z, glm::X, glm::W, glm::W) +#define qsqq swizzle(glm::W, glm::X, glm::W, glm::W) +#define stqq swizzle(glm::X, glm::Y, glm::W, glm::W) +#define ttqq swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define ptqq swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define qtqq swizzle(glm::W, glm::Y, glm::W, glm::W) +#define spqq swizzle(glm::X, glm::Z, glm::W, glm::W) +#define tpqq swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define ppqq swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define qpqq swizzle(glm::W, glm::Z, glm::W, glm::W) +#define sqqq swizzle(glm::X, glm::W, glm::W, glm::W) +#define tqqq swizzle(glm::Y, glm::W, glm::W, glm::W) +#define pqqq swizzle(glm::Z, glm::W, glm::W, glm::W) +#define qqqq swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) + +#endif//glm_core_swizzle diff --git a/glm/core/_swizzle.inl b/glm/core/_swizzle.inl new file mode 100644 index 00000000..7be28ff0 --- /dev/null +++ b/glm/core/_swizzle.inl @@ -0,0 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-27 +// Updated : 2006-04-27 +// Licence : This source is under MIT License +// File : _swizzle.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef __swizzle_inl__ +#define __swizzle_inl__ + +#include "./_swizzle.h" + +namespace glm +{ + +} + +#endif//__swizzle_inl__ diff --git a/glm/core/dummy.cpp b/glm/core/dummy.cpp new file mode 100644 index 00000000..0395e23b --- /dev/null +++ b/glm/core/dummy.cpp @@ -0,0 +1,4 @@ +int main() +{ + +} diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp new file mode 100644 index 00000000..d270eae3 --- /dev/null +++ b/glm/core/func_common.hpp @@ -0,0 +1,274 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-08 +// Updated : 2010-01-26 +// Licence : This source is under MIT License +// File : glm/core/func_common.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_common +#define glm_core_func_common + +namespace glm +{ + namespace test{ + void main_core_func_common(); + }//namespace test + + namespace core{ + namespace function{ + //! Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace. + namespace common{ + + //! Returns x if x >= 0; otherwise, it returns -x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genFIType abs(genFIType const & x); + + //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genFIType sign(genFIType const & x); + + //! Returns a value equal to the nearest integer that is less then or equal to x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType floor(genType const & x); + + //! Returns a value equal to the nearest integer to x + //! whose absolute value is not larger than the absolute value of x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType trunc(genType const & x); + + //! Returns a value equal to the nearest integer to x. + //! The fraction 0.5 will round in a direction chosen by the + //! implementation, presumably the direction that is fastest. + //! This includes the possibility that round(x) returns the + //! same value as roundEven(x) for all values of x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType round(genType const & x); + + //! Returns a value equal to the nearest integer to x. + //! A fractional part of 0.5 will round toward the nearest even + //! integer. (Both 3.5 and 4.5 for x will return 4.0.) + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType roundEven(genType const & x); + + //! Returns a value equal to the nearest integer + //! that is greater than or equal to x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType ceil(genType const & x); + + //! Return x - floor(x). + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType fract(genType const & x); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType mod( + genType const & x, + genType const & y); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType mod( + genType const & x, + typename genType::value_type const & y); + + //! Returns the fractional part of x and sets i to the integer + //! part (as a whole number floating point value). Both the + //! return value and the output parameter will have the same + //! sign as x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType modf( + genType const & x, + genType & i); + + //! Returns y if y < x; otherwise, it returns x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType min( + genType const & x, + genType const & y); + + template + genType min( + genType const & x, + typename genType::value_type const & y); + + //! Returns y if x < y; otherwise, it returns x. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType max( + genType const & x, + genType const & y); + + template + genType max( + genType const & x, + typename genType::value_type const & y); + + //! Returns min(max(x, minVal), maxVal) for each component in x + //! using the floating-point values minVal and maxVal. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType clamp( + genType const & x, + genType const & minVal, + genType const & maxVal); + + template + genType clamp( + genType const & x, + typename genType::value_type const & minVal, + typename genType::value_type const & maxVal); + + //! \return If genTypeU is a floating scalar or vector: + //! 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]. + //! + //! \return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + //! + //! From GLSL 1.30.08 specification, section 8.3 + //! + //! \param[in] x Floating point scalar or vector. + //! \param[in] y Floating point scalar or vector. + //! \param[in] a Floating point or boolean scalar or vector. + //! + // \todo Test when 'a' is a boolean. + template + genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType step( + genType const & edge, + genType const & x); + + template + genType step( + typename genType::value_type const & edge, + genType const & x); + + //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + //! performs smooth Hermite interpolation between 0 and 1 + //! when edge0 < x < edge1. This is useful in cases where + //! you would want a threshold function with a smooth + //! transition. This is equivalent to: + //! genType t; + //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + //! return t * t * (3 – 2 * t); + //! Results are undefined if edge0 >= edge1. + //! (From GLSL 1.30.08 specification, section 8.3) + template + genType smoothstep( + genType const & edge0, + genType const & edge1, + genType const & x); + + template + genType smoothstep( + typename genType::value_type const & edge0, + typename genType::value_type const & edge1, + genType const & x); + + //! Returns true if x holds a NaN (not a number) + //! representation in the underlying implementation's set of + //! floating point representations. Returns false otherwise, + //! including for implementations with no NaN + //! representations. + //! (From GLSL 1.30.08 specification, section 8.3) + template + typename genType::bool_type isnan(genType const & x); + + //! Returns true if x holds a positive infinity or negative + //! infinity representation in the underlying implementation's + //! set of floating point representations. Returns false + //! otherwise, including for implementations with no infinity + //! representations. + //! (From GLSL 1.30.08 specification, section 8.3) + template + typename genType::bool_type isinf(genType const & x); + + //! Returns a signed or unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genIType floatBitsToInt(genType const & value); + + //! Returns a signed or unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genUType floatBitsToInt(genType const & value); + + //! Returns a floating-point value corresponding to a signed + //! or unsigned integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genType intBitsToFloat(genIUType const & value); + + //! Computes and returns a * b + c. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genType fma(genType const & a, genType const & b, genType const & c); + + //! Splits x into a floating-point significand in the range + //! [0.5, 1.0) and an integral exponent of two, such that: + //! x = significand * exp(2, exponent) + //! The significand is returned by the function and the + //! exponent is returned in the parameter exp. For a + //! floating-point value of zero, the significant and exponent + //! are both zero. For a floating-point value that is an + //! infinity or is not a number, the results are undefined. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genType frexp(genType const & x, genIType & exp); + + //! Builds a floating-point number from x and the + //! corresponding integral exponent of two in exp, returning: + //! significand * exp(2, exponent) + //! If this product is too large to be represented in the + //! floating-point type, the result is undefined. + //! (From GLSL 4.00.08 specification, section 8.3) + template + genType ldexp(genType const & x, genIType const & exp); + + }//namespace common + }//namespace function + }//namespace core + + using namespace core::function::common; +}//namespace glm + +#include "func_common.inl" + +#endif//glm_core_func_common diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl new file mode 100644 index 00000000..de792803 --- /dev/null +++ b/glm/core/func_common.inl @@ -0,0 +1,1542 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-01-26 +// Licence : This source is under MIT License +// File : glm/core/func_common.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + template + struct Abs_ + { + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int); + return x >= genFIType(0) ? x : -x; + } + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_uint); + + return x; + } + }; + }//namespace detail + + namespace core{ + namespace function{ + namespace common{ + + // abs + template + inline genFIType abs( + genFIType const & x) + { + return detail::Abs_::is_signed>::get(x); + } + + //template + //inline detail::tvec1 abs( + // detail::tvec1 const & v) + //{ + // return detail::tvec1( + // abs(v.x)); + //} + + template + inline detail::tvec2 abs( + detail::tvec2 const & v) + { + return detail::tvec2( + abs(v.x), + abs(v.y)); + } + + template + inline detail::tvec3 abs( + detail::tvec3 const & v) + { + return detail::tvec3( + abs(v.x), + abs(v.y), + abs(v.z)); + } + + template + inline detail::tvec4 abs( + detail::tvec4 const & v) + { + return detail::tvec4( + abs(v.x), + abs(v.y), + abs(v.z), + abs(v.w)); + } + + // sign + + //Try something like based on x >> 31 to get the sign bit + template + inline genFIType sign( + genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int); + + genFIType result; + if(x > genFIType(0)) + result = genFIType(1); + else if(x < genFIType(0)) + result = genFIType(-1); + else + result = genFIType(0); + return result; + } + + template + inline detail::tvec2 sign( + detail::tvec2 const & x) + { + return detail::tvec2( + sign(x.x), + sign(x.y)); + } + + template + inline detail::tvec3 sign( + detail::tvec3 const & x) + { + return detail::tvec3( + sign(x.x), + sign(x.y), + sign(x.z)); + } + + template + inline detail::tvec4 sign( + detail::tvec4 const & x) + { + return detail::tvec4( + sign(x.x), + sign(x.y), + sign(x.z), + sign(x.w)); + } + + // floor + template <> + inline detail::thalf floor(detail::thalf const& x) + { + return detail::thalf(::std::floor(float(x))); + } + + template + inline genType floor(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::floor(x); + } + + template + inline detail::tvec2 floor(detail::tvec2 const& x) + { + return detail::tvec2( + floor(x.x), + floor(x.y)); + } + + template + inline detail::tvec3 floor(detail::tvec3 const& x) + { + return detail::tvec3( + floor(x.x), + floor(x.y), + floor(x.z)); + } + + template + inline detail::tvec4 floor(detail::tvec4 const& x) + { + return detail::tvec4( + floor(x.x), + floor(x.y), + floor(x.z), + floor(x.w)); + } + + // trunc + template + inline genType trunc(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float); + return floor(abs(x)); + } + + template + inline detail::tvec2 trunc(detail::tvec2 const & x) + { + return detail::tvec2( + trunc(x.x), + trunc(x.y)); + } + + template + inline detail::tvec3 trunc(detail::tvec3 const & x) + { + return detail::tvec3( + trunc(x.x), + trunc(x.y), + trunc(x.z)); + } + + template + inline detail::tvec4 trunc(detail::tvec4 const & x) + { + return detail::tvec4( + trunc(x.x), + trunc(x.y), + trunc(x.z), + trunc(x.w)); + } + + // round + template + inline genType round(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return genType(int(x + genType(0.5))); + } + + template + inline detail::tvec2 round(detail::tvec2 const& x) + { + return detail::tvec2( + round(x.x), + round(x.y)); + } + + template + inline detail::tvec3 round(detail::tvec3 const& x) + { + return detail::tvec3( + round(x.x), + round(x.y), + round(x.z)); + } + + template + inline detail::tvec4 round(detail::tvec4 const& x) + { + return detail::tvec4( + round(x.x), + round(x.y), + round(x.z), + round(x.w)); + } + + // roundEven + template + inline genType roundEven(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return genType(int(x + genType(int(x) % 2))); + } + + template + inline detail::tvec2 roundEven(detail::tvec2 const& x) + { + return detail::tvec2( + roundEven(x.x), + roundEven(x.y)); + } + + template + inline detail::tvec3 roundEven(detail::tvec3 const& x) + { + return detail::tvec3( + roundEven(x.x), + roundEven(x.y), + roundEven(x.z)); + } + + template + inline detail::tvec4 roundEven(detail::tvec4 const& x) + { + return detail::tvec4( + roundEven(x.x), + roundEven(x.y), + roundEven(x.z), + roundEven(x.w)); + } + + // ceil + template + inline genType ceil(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::ceil(x); + } + + template + inline detail::tvec2 ceil(detail::tvec2 const & x) + { + return detail::tvec2( + ceil(x.x), + ceil(x.y)); + } + + template + inline detail::tvec3 ceil(detail::tvec3 const & x) + { + return detail::tvec3( + ceil(x.x), + ceil(x.y), + ceil(x.z)); + } + + template + inline detail::tvec4 ceil(detail::tvec4 const & x) + { + return detail::tvec4( + ceil(x.x), + ceil(x.y), + ceil(x.z), + ceil(x.w)); + } + + // fract + template + inline genType fract + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x - ::std::floor(x); + } + + template + inline detail::tvec2 fract + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + fract(x.x), + fract(x.y)); + } + + template + inline detail::tvec3 fract + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + fract(x.x), + fract(x.y), + fract(x.z)); + } + + template + inline detail::tvec4 fract + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + fract(x.x), + fract(x.y), + fract(x.z), + fract(x.w)); + } + + // mod + template + inline genType mod + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x - y * floor(x / y); + } + + template + inline detail::tvec2 mod + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & y + ) + { + return detail::tvec2( + mod(x.x, y), + mod(x.y, y)); + } + + template + inline detail::tvec3 mod + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & y + ) + { + return detail::tvec3( + mod(x.x, y), + mod(x.y, y), + mod(x.z, y)); + } + + template + inline detail::tvec4 mod + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & y + ) + { + return detail::tvec4( + mod(x.x, y), + mod(x.y, y), + mod(x.z, y), + mod(x.w, y)); + } + + template + inline detail::tvec2 mod + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + mod(x.x, y.x), + mod(x.y, y.y)); + } + + template + inline detail::tvec3 mod + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + mod(x.x, y.x), + mod(x.y, y.y), + mod(x.z, y.z)); + } + + template + inline detail::tvec4 mod + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + mod(x.x, y.x), + mod(x.y, y.y), + mod(x.z, y.z), + mod(x.w, y.w)); + } + + // modf + template + inline genType modf + ( + genType const & x, + genType & i + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + i = glm::floor(x); + + return x - i; + } + + template + inline detail::tvec2 modf + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + modf(x.x, y.x), + modf(x.y, y.y)); + } + + template + inline detail::tvec3 modf + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + modf(x.x, y.x), + modf(x.y, y.y), + modf(x.z, y.z)); + } + + template + inline detail::tvec4 modf + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + modf(x.x, y.x), + modf(x.y, y.y), + modf(x.z, y.z), + modf(x.w, y.w)); + } + + //// Only valid if (INT_MIN <= x-y <= INT_MAX) + //// min(x,y) + //r = y + ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT – 1))); + //// max(x,y) + //r = x - ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT - 1))); + + // min + template + inline genType min + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + return x < y ? x : y; + } + + template + inline detail::tvec2 min + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & y + ) + { + return detail::tvec2( + min(x.x, y), + min(x.y, y)); + } + + template + inline detail::tvec3 min + ( + detail::tvec3 const & x, + typename detail::tvec2::value_type const & y + ) + { + return detail::tvec3( + min(x.x, y), + min(x.y, y), + min(x.z, y)); + } + + template + inline detail::tvec4 min + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & y + ) + { + return detail::tvec4( + min(x.x, y), + min(x.y, y), + min(x.z, y), + min(x.w, y)); + } + + template + inline detail::tvec2 min + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + min(x.x, y.x), + min(x.y, y.y)); + } + + template + inline detail::tvec3 min + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + min(x.x, y.x), + min(x.y, y.y), + min(x.z, y.z)); + } + + template + inline detail::tvec4 min + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + min(x.x, y.x), + min(x.y, y.y), + min(x.z, y.z), + min(x.w, y.w)); + } + + // max + template + inline genType max + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + return x > y ? x : y; + } + + template + inline detail::tvec2 max + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type y + ) + { + return detail::tvec2( + max(x.x, y), + max(x.y, y)); + } + + template + inline detail::tvec3 max + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type y + ) + { + return detail::tvec3( + max(x.x, y), + max(x.y, y), + max(x.z, y)); + } + + template + inline detail::tvec4 max + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type y + ) + { + return detail::tvec4( + max(x.x, y), + max(x.y, y), + max(x.z, y), + max(x.w, y)); + } + + template + inline detail::tvec2 max + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + max(x.x, y.x), + max(x.y, y.y)); + } + + template + inline detail::tvec3 max + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + max(x.x, y.x), + max(x.y, y.y), + max(x.z, y.z)); + } + + template + inline detail::tvec4 max + ( + detail::tvec4 const & x, + detail::tvec4 const & y) + { + return detail::tvec4( + max(x.x, y.x), + max(x.y, y.y), + max(x.z, y.z), + max(x.w, y.w)); + } + + // clamp + template + inline valType clamp + ( + valType const & x, + valType const & minVal, + valType const & maxVal + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + if(x >= maxVal) return maxVal; + if(x <= minVal) return minVal; + return x; + } + + template + inline detail::tvec2 clamp + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & minVal, + typename detail::tvec2::value_type const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal)); + } + + template + inline detail::tvec3 clamp + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & minVal, + typename detail::tvec3::value_type const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal)); + } + + template + inline detail::tvec4 clamp + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & minVal, + typename detail::tvec4::value_type const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal), + clamp(x.w, minVal, maxVal)); + } + + template + inline detail::tvec2 clamp + ( + detail::tvec2 const & x, + detail::tvec2 const & minVal, + detail::tvec2 const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y)); + } + + template + inline detail::tvec3 clamp + ( + detail::tvec3 const & x, + detail::tvec3 const & minVal, + detail::tvec3 const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z)); + } + + template + inline detail::tvec4 clamp + ( + detail::tvec4 const & x, + detail::tvec4 const & minVal, + detail::tvec4 const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z), + clamp(x.w, minVal.w, maxVal.w)); + } + + // mix + template + inline genTypeT mix + ( + genTypeT const & x, + genTypeT const & y, + genTypeU const & a + ) + { + // It could be a vector too + //GLM_STATIC_ASSERT( + // detail::type::is_float && + // detail::type::is_float); + + //return x + a * (y - x); + return genTypeU(x) + a * genTypeU(y - x); + } + + template + inline detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valTypeB const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + inline detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valTypeB const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + inline detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valTypeB const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + template + inline detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + inline detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + inline detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + //template + //inline genTypeT mix + //( + // genTypeT const & x, + // genTypeT const & y, + // float const & a + //) + //{ + // // It could be a vector too + // //GLM_STATIC_ASSERT( + // // detail::type::is_float && + // // detail::type::is_float); + + // return x + a * (y - x); + //} + + template + inline genType mix + ( + genType const & x, + genType const & y, + bool a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return a ? x : y; + } + + template + inline detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + typename detail::tvec2::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tvec2 result; + for + ( + typename detail::tvec2::size_type i = 0; + i < detail::tvec2::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + template + inline detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + typename detail::tvec3::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tvec3 result; + for + ( + typename detail::tvec3::size_type i = 0; + i < detail::tvec3::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + template + inline detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + typename detail::tvec4::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tvec4 result; + for + ( + typename detail::tvec4::size_type i = 0; + i < detail::tvec4::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + // step + template + inline genType step + ( + genType const & edge, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x <= edge ? genType(0) : genType(1); + } + + template + inline detail::tvec2 step + ( + typename detail::tvec2::value_type const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1)); + } + + template + inline detail::tvec3 step + ( + typename detail::tvec3::value_type const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1), + x.z <= edge ? T(0) : T(1)); + } + + template + inline detail::tvec4 step + ( + typename detail::tvec4::value_type const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1), + x.z <= edge ? T(0) : T(1), + x.w <= edge ? T(0) : T(1)); + } + + template + inline detail::tvec2 step + ( + detail::tvec2 const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1)); + } + + template + inline detail::tvec3 step + ( + detail::tvec3 const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1), + x.z <= edge.z ? T(0) : T(1)); + } + + template + inline detail::tvec4 step + ( + detail::tvec4 const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1), + x.z <= edge.z ? T(0) : T(1), + x.w <= edge.w ? T(0) : T(1)); + } + + // smoothstep + template + inline genType smoothstep + ( + genType const & edge0, + genType const & edge1, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); + return tmp * tmp * (genType(3) - genType(2) * tmp); + } + + template + inline detail::tvec2 smoothstep + ( + typename detail::tvec2::value_type const & edge0, + typename detail::tvec2::value_type const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y)); + } + + template + inline detail::tvec3 smoothstep + ( + typename detail::tvec3::value_type const & edge0, + typename detail::tvec3::value_type const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z)); + } + + template + inline detail::tvec4 smoothstep + ( + typename detail::tvec4::value_type const & edge0, + typename detail::tvec4::value_type const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z), + smoothstep(edge0, edge1, x.w)); + } + + template + inline detail::tvec2 smoothstep + ( + detail::tvec2 const & edge0, + detail::tvec2 const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y)); + } + + template + inline detail::tvec3 smoothstep + ( + detail::tvec3 const & edge0, + detail::tvec3 const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z)); + } + + template + inline detail::tvec4 smoothstep + ( + detail::tvec4 const & edge0, + detail::tvec4 const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z), + smoothstep(edge0.w, edge1.w, x.w)); + } + + template + inline typename genType::bool_type isnan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + +#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC) + return typename genType::bool_type(_isnan(x)); +#else + return typename genType::bool_type(std::isnan(x)); +#endif + } + + template + inline typename detail::tvec2::bool_type isnan + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + inline typename detail::tvec3::bool_type isnan + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + inline typename detail::tvec4::bool_type isnan + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + template + inline typename genType::bool_type isinf + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + +#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC) + return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF); +#else + return typename genType::bool_type(std::isinf(x)); +#endif + } + + template + inline typename detail::tvec2::bool_type isinf + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + inline typename detail::tvec3::bool_type isinf + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + inline typename detail::tvec4::bool_type isinf + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + inline int floatBitsToInt(float const & value) + { + union + { + float f; + int i; + } fi; + + fi.f = value; + return fi.i; + } + + template + inline detail::tvec2 floatBitsToInt + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + template + inline detail::tvec3 floatBitsToInt + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + template + inline detail::tvec4 floatBitsToInt + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + inline uint floatBitsToUint(float const & value) + { + union + { + float f; + uint u; + } fu; + + fu.f = value; + return fu.u; + } + + template + inline detail::tvec2 floatBitsToUint + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + template + inline detail::tvec3 floatBitsToUint + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + template + inline detail::tvec4 floatBitsToUint + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + inline float intBitsToFloat(int const & value) + { + union + { + float f; + int i; + } fi; + + fi.i = value; + return fi.f; + } + + inline float intBitsToFloat(uint const & value) + { + union + { + float f; + uint u; + } fu; + + fu.u = value; + return fu.f; + } + + template + inline detail::tvec2 intBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + template + inline detail::tvec3 intBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + template + inline detail::tvec4 intBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + template + inline genType fma + ( + genType const & a, + genType const & b, + genType const & c + ) + { + return a * b + c; + } + + template + genType frexp + ( + genType const & x, + int & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec2 frexp + ( + detail::tvec2 const & x, + detail::tvec2 & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec3 frexp + ( + detail::tvec3 const & x, + detail::tvec3 & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec4 frexp + ( + detail::tvec4 const & x, + detail::tvec4 & exp + ) + { + return std::frexp(x, exp); + } + + template + genType ldexp + ( + genType const & x, + int const & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec2 ldexp + ( + detail::tvec2 const & x, + detail::tvec2 const & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec3 ldexp + ( + detail::tvec3 const & x, + detail::tvec3 const & exp + ) + { + return std::frexp(x, exp); + } + + template + detail::tvec4 ldexp + ( + detail::tvec4 const & x, + detail::tvec4 const & exp + ) + { + return std::frexp(x, exp); + } + + }//namespace common + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_exponential.hpp b/glm/core/func_exponential.hpp new file mode 100644 index 00000000..09b11325 --- /dev/null +++ b/glm/core/func_exponential.hpp @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-08 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_exponential.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_exponential +#define glm_core_func_exponential + +namespace glm +{ + namespace test{ + void main_core_func_exponential(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace. + namespace exponential{ + + //! Returns x raised to the y power. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType pow(genType const & x, genType const & y); + + //! Returns the natural exponentiation of x, i.e., e^x. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType exp(genType const & x); + + //! Returns the natural logarithm of x, i.e., + //! returns the value y which satisfies the equation x = e^y. + //! Results are undefined if x <= 0. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType log(genType const & x); + + //! Returns 2 raised to the x power. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType exp2(genType const & x); + + //! Returns the base 2 log of x, i.e., returns the value y, + //! which satisfies the equation x = 2 ^ y. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType log2(genType const & x); + + //! Returns the positive square root of x. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType sqrt(genType const & x); + + //! Returns the reciprocal of the positive square root of x. + //! (From GLSL 1.30.08 specification, section 8.2) + template + genType inversesqrt(genType const & x); + + }//namespace exponential + }//namespace function + }//namespace core + + using namespace core::function::exponential; +}//namespace glm + +#include "func_exponential.inl" + +#endif//glm_core_func_exponential diff --git a/glm/core/func_exponential.inl b/glm/core/func_exponential.inl new file mode 100644 index 00000000..0d0dc512 --- /dev/null +++ b/glm/core/func_exponential.inl @@ -0,0 +1,358 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_exponential.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace exponential{ + + // pow + template + inline genType pow + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::pow(x, y); + } + + template + inline detail::tvec2 pow + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + pow(x.x, y.x), + pow(x.y, y.y)); + } + + template + inline detail::tvec3 pow + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + pow(x.x, y.x), + pow(x.y, y.y), + pow(x.z, y.z)); + } + + template + inline detail::tvec4 pow + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + pow(x.x, y.x), + pow(x.y, y.y), + pow(x.z, y.z), + pow(x.w, y.w)); + } + + // exp + template + inline genType exp + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::exp(x); + } + + template + inline detail::tvec2 exp + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + exp(x.x), + exp(x.y)); + } + + template + inline detail::tvec3 exp + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + exp(x.x), + exp(x.y), + exp(x.z)); + } + + template + inline detail::tvec4 exp + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + exp(x.x), + exp(x.y), + exp(x.z), + exp(x.w)); + } + + // log + template + inline genType log + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::log(x); + } + + template + inline detail::tvec2 log + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + log(x.x), + log(x.y)); + } + + template + inline detail::tvec3 log + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + log(x.x), + log(x.y), + log(x.z)); + } + + template + inline detail::tvec4 log + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + log(x.x), + log(x.y), + log(x.z), + log(x.w)); + } + + //exp2, ln2 = 0.69314718055994530941723212145818f + template + inline genType exp2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::exp(genType(0.69314718055994530941723212145818) * x); + } + + template + inline detail::tvec2 exp2 + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + exp2(x.x), + exp2(x.y)); + } + + template + inline detail::tvec3 exp2 + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + exp2(x.x), + exp2(x.y), + exp2(x.z)); + } + + template + inline detail::tvec4 exp2 + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + exp2(x.x), + exp2(x.y), + exp2(x.z), + exp2(x.w)); + } + + // log2, ln2 = 0.69314718055994530941723212145818f + template + inline genType log2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::log(x) / genType(0.69314718055994530941723212145818); + } + + template + inline detail::tvec2 log2 + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + log2(x.x), + log2(x.y)); + } + + template + inline detail::tvec3 log2 + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + log2(x.x), + log2(x.y), + log2(x.z)); + } + + template + inline detail::tvec4 log2 + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + log2(x.x), + log2(x.y), + log2(x.z), + log2(x.w)); + } + + // sqrt + template + inline genType sqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return genType(::std::sqrt(double(x))); + } + + template + inline detail::tvec2 sqrt + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + sqrt(x.x), + sqrt(x.y)); + } + + template + inline detail::tvec3 sqrt + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + sqrt(x.x), + sqrt(x.y), + sqrt(x.z)); + } + + template + inline detail::tvec4 sqrt + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + sqrt(x.x), + sqrt(x.y), + sqrt(x.z), + sqrt(x.w)); + } + + template + inline genType inversesqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return genType(1) / ::std::sqrt(x); + } + + template + inline detail::tvec2 inversesqrt + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + inversesqrt(x.x), + inversesqrt(x.y)); + } + + template + inline detail::tvec3 inversesqrt + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + inversesqrt(x.x), + inversesqrt(x.y), + inversesqrt(x.z)); + } + + template + inline detail::tvec4 inversesqrt + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + inversesqrt(x.x), + inversesqrt(x.y), + inversesqrt(x.z), + inversesqrt(x.w)); + } + + }//namespace exponential + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_geometric.hpp b/glm/core/func_geometric.hpp new file mode 100644 index 00000000..82bf2776 --- /dev/null +++ b/glm/core/func_geometric.hpp @@ -0,0 +1,92 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_geometric.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_geometric +#define glm_core_func_geometric + +namespace glm +{ + namespace test{ + void main_core_func_geometric(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace. + namespace geometric{ + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLSL 1.30.08 specification, section 8.4) + template + typename genType::value_type length( + genType const & x); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLSL 1.30.08 specification, section 8.4) + template + typename genType::value_type distance( + genType const & p0, + genType const & p1); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLSL 1.30.08 specification, section 8.4) + template + typename genType::value_type dot( + genType const & x, + genType const & y); + + //! Returns the cross product of x and y. + //! (From GLSL 1.30.08 specification, section 8.4) + template + detail::tvec3 cross( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns a vector in the same direction as x but with length of 1. + //! (From GLSL 1.30.08 specification, section 8.4) + template + genType normalize( + genType const & x); + + //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. + //! (From GLSL 1.30.08 specification, section 8.4) + template + genType faceforward( + genType const & N, + genType const & I, + genType const & Nref); + + //! For the incident vector I and surface orientation N, + //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + //! (From GLSL 1.30.08 specification, section 8.4) + template + genType reflect( + genType const & I, + genType const & N); + + //! For the incident vector I and surface normal N, + //! and the ratio of indices of refraction eta, + //! return the refraction vector. + //! (From GLSL 1.30.08 specification, section 8.4) + template + genType refract( + genType const & I, + genType const & N, + typename genType::value_type const & eta); + + }//namespace geometric + }//namespace function + }//namespace core + + using namespace core::function::geometric; +}//namespace glm + +#include "func_geometric.inl" + +#endif//glm_core_func_geometric diff --git a/glm/core/func_geometric.inl b/glm/core/func_geometric.inl new file mode 100644 index 00000000..83bb9561 --- /dev/null +++ b/glm/core/func_geometric.inl @@ -0,0 +1,290 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_geometric.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace geometric{ + + // length + template + inline genType length + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + genType sqr = x * x; + return sqrt(sqr); + } + + template + inline typename detail::tvec2::value_type length + ( + detail::tvec2 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; + return sqrt(sqr); + } + + template + inline typename detail::tvec3::value_type length + ( + detail::tvec3 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; + return sqrt(sqr); + } + + template + inline typename detail::tvec4::value_type length + ( + detail::tvec4 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; + return sqrt(sqr); + } + + // distance + template + inline genType distance + ( + genType const & p0, + genType const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return length(p1 - p0); + } + + template + inline typename detail::tvec2::value_type distance + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return length(p1 - p0); + } + + template + inline typename detail::tvec3::value_type distance + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return length(p1 - p0); + } + + template + inline typename detail::tvec4::value_type distance + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return length(p1 - p0); + } + + // dot + template + inline genType dot + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x * y; + } + + template + inline typename detail::tvec2::value_type dot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x.x * y.x + x.y * y.y; + } + + template + inline T dot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x.x * y.x + x.y * y.y + x.z * y.z; + } +/* // SSE3 + inline float dot(const tvec4& x, const tvec4& y) + { + float Result; + __asm + { + mov esi, x + mov edi, y + movaps xmm0, [esi] + mulps xmm0, [edi] + haddps( _xmm0, _xmm0 ) + haddps( _xmm0, _xmm0 ) + movss Result, xmm0 + } + return Result; + } +*/ + template + inline T dot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; + } + + // cross + template + inline detail::tvec3 cross + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return detail::tvec3( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + + // normalize + template + inline genType normalize + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return x < genType(0) ? genType(-1) : genType(1); + } + + // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error + template + inline detail::tvec2 normalize + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; + return x * inversesqrt(sqr); + } + + template + inline detail::tvec3 normalize + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * inversesqrt(sqr); + } + + template + inline detail::tvec4 normalize + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * inversesqrt(sqr); + } + + // faceforward + template + inline genType faceforward + ( + genType const & N, + genType const & I, + genType const & Nref + ) + { + return dot(Nref, I) < 0 ? N : -N; + } + + // reflect + template + genType reflect + ( + genType const & I, + genType const & N + ) + { + return I - N * dot(N, I) * float(2); + } + + // refract + template + inline genType refract + ( + genType const & I, + genType const & N, + typename genType::value_type const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + typename genType::value_type dotValue = dot(N, I); + typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); + if(k < typename genType::value_type(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + + }//namespace geometric + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_integer.hpp b/glm/core/func_integer.hpp new file mode 100644 index 00000000..4ee932cc --- /dev/null +++ b/glm/core/func_integer.hpp @@ -0,0 +1,142 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-31 +// Licence : This source is under MIT License +// File : glm/core/func_integer.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_integer +#define glm_core_func_integer + +namespace glm +{ + namespace test{ + void main_core_func_integer(); + }//namespace test + + namespace core{ + namespace function{ + //! Define integer functions from Section 8.8 of GLSL 4.00.8 specification. + namespace integer{ + + //! 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. + //! + //! (From GLSL 4.00.08 specification, section 8.8) + template + genUType uaddCarry( + genUType const & x, + genUType const & y, + genUType & carry); + + //! Subtracts the 32-bit unsigned integer y from x, returning + //! the difference if non-negative, or pow(2, 32) plus the difference + //! otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. + //! + //! (From GLSL 4.00.08 specification, section 8.8) + template + genUType usubBorrow( + genUType const & x, + genUType const & y, + genUType & borrow); + + //! Multiplies 32-bit integers x and y, producing a 64-bit + //! result. The 32 least-significant bits are returned in lsb. + //! The 32 most-significant bits are returned in msb. + //! (From GLSL 4.00.08 specification, section 8.8) + template + void umulExtended( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb); + + //! Multiplies 32-bit integers x and y, producing a 64-bit + //! result. The 32 least-significant bits are returned in lsb. + //! The 32 most-significant bits are returned in msb. + //! (From GLSL 4.00.08 specification, section 8.8) + template + void imulExtended( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb); + + + //! Extracts bits [offset, offset + bits - 1] from value, + //! returning them in the least significant bits of the result. + //! For unsigned data types, the most significant bits of the + //! result will be set to zero. For signed data types, the + //! most significant bits will be set to the value of bit offset + base – 1. + //! + //! If bits is zero, the result will be zero. The result will be + //! undefined if offset or bits is negative, or if the sum of + //! offset and bits is greater than the number of bits used + //! to store the operand. + //! + //! (From GLSL 4.00.08 specification, section 8.8) + template + genIUType bitfieldExtract( + genIUType const & Value, + int const & Offset, + int const & Bits); + + //! Returns the insertion the bits least-significant bits of insert into base. + //! + //! The result will have bits [offset, offset + bits - 1] taken + //! from bits [0, bits – 1] of insert, and all other bits taken + //! directly from the corresponding bits of base. If bits is + //! zero, the result will simply be base. The result will be + //! undefined if offset or bits is negative, or if the sum of + //! offset and bits is greater than the number of bits used to + //! store the operand. + //! + //! (From GLSL 4.00.08 specification, section 8.8) + template + genIUType bitfieldInsert( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits); + + //! Returns the reversal of the bits of value. + //! The bit numbered n of the result will be taken from bit (bits - 1) - n of value, + //! where bits is the total number of bits used to represent value. + //! (From GLSL 4.00.08 specification, section 8.8) + template + genIUType bitfieldReverse(genIUType const & value); + + //! Returns the number of bits set to 1 in the binary representation of value. + //! (From GLSL 4.00.08 specification, section 8.8) + template class C> + typename C::signed_type bitCount(C const & Value); + + //! Returns the bit number of the least significant bit set to + //! 1 in the binary representation of value. + //! If value is zero, -1 will be returned. + //! (From GLSL 4.00.08 specification, section 8.8) + template class C> + typename C::signed_type findLSB(C const & Value); + + //! Returns the bit number of the most significant bit in the binary representation of value. + //! For positive integers, the result will be the bit number of the most significant bit set to 1. + //! For negative integers, the result will be the bit number of the most significant + //! bit set to 0. For a value of zero or negative one, -1 will be returned. + //! (From GLSL 4.00.08 specification, section 8.8) + template class C> + typename C::signed_type findMSB(C const & Value); + + }//namespace integer + }//namespace function + }//namespace core + + using namespace core::function::integer; +}//namespace glm + +#include "func_integer.inl" + +#endif//glm_core_func_integer + diff --git a/glm/core/func_integer.inl b/glm/core/func_integer.inl new file mode 100644 index 00000000..7ae7e1a8 --- /dev/null +++ b/glm/core/func_integer.inl @@ -0,0 +1,600 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-31 +// Licence : This source is under MIT License +// File : glm/core/func_integer.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + + }//namespace detail + + namespace core{ + namespace function{ + namespace integer + { + // uaddCarry + template + inline genUType uaddCarry + ( + genUType const & x, + genUType const & y, + genUType & Carry + ) + { + detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); + genUType Result = genUType(Value64 % (1 << 32)); + Carry = (Value64 % (1 << 32)) > 1 : 1 : 0; + return Result; + } + + template + inline detail::tvec2 uaddCarry + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Carry + ) + { + return detail::tvec2( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1])); + } + + template + inline detail::tvec3 uaddCarry + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Carry + ) + { + return detail::tvec3( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2])); + } + + template + inline detail::tvec4 uaddCarry + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Carry + ) + { + return detail::tvec4( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2]), + uaddCarry(x[3], y[3], Carry[3])); + } + + // usubBorrow + template + inline genUType usubBorrow + ( + genUType const & x, + genUType const & y, + genUType & Borrow + ) + { + Borrow = x >= y ? 0 : 1; + if(x > y) + return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); + else + return genUType(detail::highp_int_t(1 << 32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + } + + template + inline detail::tvec2 usubBorrow + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Borrow + ) + { + return detail::tvec2( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1])); + } + + template + inline detail::tvec3 usubBorrow + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Borrow + ) + { + return detail::tvec3( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2])); + } + + template + inline detail::tvec4 usubBorrow + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Borrow + ) + { + return detail::tvec4( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2]), + usubBorrow(x[3], y[3], Borrow[3])); + } + + // umulExtended + template + inline void umulExtended + ( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb + ) + { + detail::highp_uint_t ValueX64 = x; + detail::highp_uint_t ValueY64 = y; + detail::highp_uint_t Value64 = ValueX64 * ValueY64; + msb = *(genUType*)&(Value64 & ((1 << 32) - 1)); + lsb = *(genUType*)&(Value64 >> 32); + } + + template + inline detail::tvec2 umulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb)); + } + + template + inline detail::tvec3 umulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb)); + } + + template + inline detail::tvec4 umulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb), + umulExtended(x[3], y[3], msb, lsb)); + } + + // imulExtended + template + void imulExtended + ( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb + ) + { + detail::highp_int_t ValueX64 = x; + detail::highp_int_t ValueY64 = y; + detail::highp_int_t Value64 = ValueX64 * ValueY64; + msb = *(genIType*)&(Value64 & ((1 << 32) - 1)); + lsb = *(genIType*)&(Value64 >> 32); + } + + template + inline detail::tvec2 imulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb)); + } + + template + inline detail::tvec3 imulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb)); + } + + template + inline detail::tvec4 imulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb), + imulExtended(x[3], y[3], msb, lsb)); + } + + // bitfieldExtract + template + genIUType bitfieldExtract + ( + genIUType const & Value, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + GLM_STATIC_ASSERT(Offset + Bits <= sizeof(genIUType)); + + genIUType Result = 0; + if(std::numeric_limits::is_signed) + Result |= (1 << (sizeof(genIUType) * 8 - 1)) & (1 << (Offset + Bits - 1)); + + genIUType Mask = 0; + for(std::size_t Bit = Offset; Bit < Bits; ++Bit) + Mask |= (1 << Bit); + + return Result | ((Mask & Value) >> Offset); + } + + template + inline detail::tvec2 bitfieldExtract + ( + detail::tvec2 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldExtract(value[0]), + bitfieldExtract(value[1])); + } + + template + inline detail::tvec3 bitfieldExtract + ( + detail::tvec3 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldExtract(value[0]), + bitfieldExtract(value[1]), + bitfieldExtract(value[2])); + } + + template + inline detail::tvec4 bitfieldExtract + ( + detail::tvec4 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldExtract(value[0]), + bitfieldExtract(value[1]), + bitfieldExtract(value[2]), + bitfieldExtract(value[3])); + } + + // bitfieldInsert + template + inline genIUType bitfieldInsert + ( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + GLM_STATIC_ASSERT(Offset + Bits <= sizeof(genIUType)); + + if(Bits == 0) + return Base; + + genIUType Mask = 0; + for(std::size_t Bit = Offset; Bit < Offset + Bits; ++Bit) + Mask |= (1 << Bit); + + return (Base & ~Mask) | (Insert & Mask); + } + + template + inline detail::tvec2 bitfieldInsert + ( + detail::tvec2 const & Base, + detail::tvec2 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldInsert(value[0]), + bitfieldInsert(value[1])); + } + + template + inline detail::tvec3 bitfieldInsert + ( + detail::tvec3 const & Base, + detail::tvec3 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldInsert(value[0]), + bitfieldInsert(value[1]), + bitfieldInsert(value[2])); + } + + template + inline detail::tvec4 bitfieldInsert + ( + detail::tvec4 const & Base, + detail::tvec4 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldInsert(value[0]), + bitfieldInsert(value[1]), + bitfieldInsert(value[2]), + bitfieldInsert(value[3])); + } + + // bitfieldReverse + template + inline genIUType bitfieldReverse(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + + genIUType Result = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + if(Value & (1 << i)) + Result |= (1 << (sizeof(genIUType) * std::size_t(8)) - 1 - i); + return Result; + } + + template + inline detail::tvec2 bitfieldReverse + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitfieldReverse(value[0]), + bitfieldReverse(value[1])); + } + + template + inline detail::tvec3 bitfieldReverse + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitfieldReverse(value[0]), + bitfieldReverse(value[1]), + bitfieldReverse(value[2])); + } + + template + inline detail::tvec4 bitfieldReverse + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitfieldReverse(value[0]), + bitfieldReverse(value[1]), + bitfieldReverse(value[2]), + bitfieldReverse(value[3])); + } + + // bitCount + template + int bitCount(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + + int Count = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + { + if(Value & (1 << i)) + ++Count; + } + return Count; + } + + template + inline detail::tvec2 bitCount + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitCount(value[0]), + bitCount(value[1])); + } + + template + inline detail::tvec3 bitCount + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2])); + } + + template + inline detail::tvec4 bitCount + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2]), + bitCount(value[3])); + } + + // findLSB + template + inline int findLSB + ( + genType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + if(Value == 0) + return -1; + + genType Bit; + for(Bit = genType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + inline detail::tvec2 findLSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findLSB(value[0]), + findLSB(value[1])); + } + + template + inline detail::tvec3 findLSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2])); + } + + template + inline detail::tvec4 findLSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2]), + findLSB(value[3])); + } + + // findMSB + template + inline int findMSB + ( + genType const & value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer); + if(Value == 0) + return -1; + + genType bit = genType(-1); + for(genType tmp = value; tmp; tmp >>= 1, ++bit){} + return bit; + } + + template + inline detail::tvec2 findMSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findMSB(value[0]), + findMSB(value[1])); + } + + template + inline detail::tvec3 findMSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2])); + } + + template + inline detail::tvec4 findMSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2]), + findMSB(value[3])); + } + + }//namespace integer + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_matrix.hpp b/glm/core/func_matrix.hpp new file mode 100644 index 00000000..a7cc5327 --- /dev/null +++ b/glm/core/func_matrix.hpp @@ -0,0 +1,92 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_matrix.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_matrix +#define glm_core_func_matrix + +namespace glm +{ + namespace test{ + void main_core_func_matrix(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace. + namespace matrix{ + + //! 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) + template + matType matrixCompMult( + matType const & x, + matType const & y); + + //! Treats the first parameter c as a column vector + //! and the second parameter r as a row vector + //! and does a linear algebraic matrix multiply c * r. + //! (From GLSL 1.30.08 specification, section 8.5) + template + matType outerProduct( + vecType const & c, + vecType const & r); + + //! Returns the transposed matrix of x + //! (From GLSL 1.30.08 specification, section 8.5) + template + typename matType::transpose_type transpose( + matType const & x); + + //! Return the determinant of a mat2 matrix. + //! (From GLSL 1.50.09 specification, section 8.5).. + template + typename detail::tmat2x2::value_type determinant( + detail::tmat2x2 const & m); + + //! Return the determinant of a mat3 matrix. + //! (From GLSL 1.50.09 specification, section 8.5). + template + typename detail::tmat3x3::value_type determinant( + detail::tmat3x3 const & m); + + //! Return the determinant of a mat4 matrix. + //! (From GLSL 1.50.09 specification, section 8.5). + template + typename detail::tmat4x4::value_type determinant( + detail::tmat4x4 const & m); + + //! Return the inverse of a mat2 matrix. + //! (From GLSL 1.40.07 specification, section 8.5). + template + detail::tmat2x2 inverse( + detail::tmat2x2 const & m); + + //! Return the inverse of a mat3 matrix. + //! (From GLSL 1.40.07 specification, section 8.5). + template + detail::tmat3x3 inverse( + detail::tmat3x3 const & m); + + //! Return the inverse of a mat4 matrix. + //! (From GLSL 1.40.07 specification, section 8.5). + template + detail::tmat4x4 inverse( + detail::tmat4x4 const & m); + + }//namespace matrix + }//namespace function + }//namespace core + + using namespace core::function::matrix; +}//namespace glm + +#include "func_matrix.inl" + +#endif//glm_core_func_matrix diff --git a/glm/core/func_matrix.inl b/glm/core/func_matrix.inl new file mode 100644 index 00000000..5ec3efac --- /dev/null +++ b/glm/core/func_matrix.inl @@ -0,0 +1,559 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-08 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_matrix.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace matrix{ + + // matrixCompMult + template + inline matType matrixCompMult + ( + matType const & x, + matType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + matType result(matType::null); + for(typename matType::size_type i = 0; i < matType::col_size(); ++i) + result[i] = x[i] * y[i]; + return result; + } + + // outerProduct + template + inline detail::tmat2x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x2 m(detail::tmat2x2::null); + m[0][0] = c[0] * r[0]; + m[0][1] = c[1] * r[0]; + m[1][0] = c[0] * r[1]; + m[1][1] = c[1] * r[1]; + return m; + } + + template + inline detail::tmat3x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x3 m(detail::tmat3x3::null); + for(typename detail::tmat3x3::size_type i = 0; i < detail::tmat3x3::col_size(); ++i) + m[i] = c * r[i]; + return m; + } + + template + inline detail::tmat4x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x4 m(detail::tmat4x4::null); + for(typename detail::tmat4x4::size_type i = 0; i < detail::tmat4x4::col_size(); ++i) + m[i] = c * r[i]; + return m; + } + + template + inline detail::tmat2x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x3 m(detail::tmat2x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + return m; + } + + template + inline detail::tmat3x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x2 m(detail::tmat3x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + return m; + } + + template + inline detail::tmat2x4 outerProduct + ( + detail::tvec2 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x4 m(detail::tmat2x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + return m; + } + + template + inline detail::tmat4x2 outerProduct + ( + detail::tvec4 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x2 m(detail::tmat4x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + return m; + } + + template + inline detail::tmat3x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x4 m(detail::tmat3x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[2][3] = c.w * r.z; + return m; + } + + template + inline detail::tmat4x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x3 m(detail::tmat4x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + m[3][2] = c.z * r.w; + return m; + } + + template + inline detail::tmat2x2 transpose + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x2 result(detail::tmat2x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + return result; + } + + template + inline detail::tmat3x3 transpose + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x3 result(detail::tmat3x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + return result; + } + + template + inline detail::tmat4x4 transpose + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x4 result(detail::tmat4x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + result[3][3] = m[3][3]; + return result; + } + + template + inline detail::tmat2x3 transpose + ( + detail::tmat3x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x3 result(detail::tmat2x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + return result; + } + + template + inline detail::tmat3x2 transpose + ( + detail::tmat2x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x2 result(detail::tmat3x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + return result; + } + + template + inline detail::tmat2x4 transpose + ( + detail::tmat4x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat2x4 result(detail::tmat2x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + return result; + } + + template + inline detail::tmat4x2 transpose + ( + detail::tmat2x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x2 result(detail::tmat4x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + return result; + } + + template + inline detail::tmat3x4 transpose + ( + detail::tmat4x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat3x4 result(detail::tmat3x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + return result; + } + + template + inline detail::tmat4x3 transpose + ( + detail::tmat3x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + detail::tmat4x3 result(detail::tmat4x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + return result; + } + + template + inline typename detail::tmat2x2::value_type determinant + ( + detail::tmat2x2 const & m + ) + { + return m[0][0] * m[1][1] - m[1][0] * m[0][1]; + } + + template + inline typename detail::tmat3x3::value_type determinant + ( + detail::tmat3x3 const & m + ) + { + return + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + } + + template + inline typename detail::tmat4x4::value_type determinant + ( + detail::tmat4x4 const & m + ) + { + T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + + detail::tvec4 DetCof( + + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), + - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), + - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); + + return m[0][0] * DetCof[0] + + m[0][1] * DetCof[1] + + m[0][2] * DetCof[2] + + m[0][3] * DetCof[3]; + } + + template + inline detail::tmat2x2 inverse + ( + detail::tmat2x2 const & m + ) + { + //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + T Determinant = determinant(m); + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[1][0] / Determinant, + - m[0][1] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + inline detail::tmat3x3 inverse + ( + detail::tmat3x3 const & m + ) + { + //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + + T Determinant = determinant(m); + + detail::tmat3x3 Inverse(detail::tmat3x3::null); + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + inline detail::tmat4x4 inverse + ( + detail::tmat4x4 const & m + ) + { + T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + + T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + + T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + + T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + + T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + + T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tvec4 const SignA(+1, -1, +1, -1); + detail::tvec4 const SignB(-1, +1, -1, +1); + + detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); + detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); + detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); + detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); + detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); + detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + + detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); + + detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + T Determinant = glm::dot(m[0], Row0); + + Inverse /= Determinant; + + return Inverse; + } + + }//namespace matrix + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_noise.hpp b/glm/core/func_noise.hpp new file mode 100644 index 00000000..1b1a7034 --- /dev/null +++ b/glm/core/func_noise.hpp @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2008-09-10 +// Licence : This source is under MIT License +// File : glm/core/func_noise.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_noise +#define glm_core_func_noise + +namespace glm +{ + namespace test{ + void main_core_func_noise(); + }//namespace test + + namespace core{ + namespace function{ + // Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace. + namespace noise{ + + // Returns a 1D noise value based on the input value x. + // From GLSL 1.30.08 specification, section 8.9. + template + typename genType::value_type noise1(genType const & x); + + // Returns a 2D noise value based on the input value x. + // From GLSL 1.30.08 specification, section 8.9. + template + detail::tvec2 noise2(genType const & x); + + // Returns a 3D noise value based on the input value x. + // From GLSL 1.30.08 specification, section 8.9. + template + detail::tvec3 noise3(genType const & x); + + // Returns a 4D noise value based on the input value x. + // From GLSL 1.30.08 specification, section 8.9. + template + detail::tvec4 noise4(genType const & x); + + }//namespace noise + }//namespace function + }//namespace core + + using namespace core::function::noise; +}//namespace glm + +#include "func_noise.inl" + +#endif//glm_core_func_noise diff --git a/glm/core/func_noise.inl b/glm/core/func_noise.inl new file mode 100644 index 00000000..f2787c07 --- /dev/null +++ b/glm/core/func_noise.inl @@ -0,0 +1,305 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2008-09-23 +// Licence : This source is under MIT License +// File : glm/core/func_noise.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace noise{ + + // noise1 + template + inline genType noise1 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + int iNbr = int(x + genType(3) / genType(2)) * 1103515245 + 12345; + return genType(int(iNbr / genType(65536)) % 32768) / genType(32767); + } + + template + inline typename detail::tvec2::value_type noise1 + ( + detail::tvec2 const & x + ) + { + T tmp(0); + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + tmp += x[i]; + return noise1(tmp); + } + + template + inline typename detail::tvec3::value_type noise1 + ( + detail::tvec3 const & x + ) + { + T tmp(0); + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + tmp += x[i]; + return noise1(tmp); + } + + template + inline typename detail::tvec4::value_type noise1 + ( + detail::tvec4 const & x + ) + { + T tmp(0); + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + tmp += x[i]; + return noise1(tmp); + } + + // noise2 + template + inline detail::tvec2 noise2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + genType f1 = x * genType(1103515245) + genType(12345); + genType f2 = f1 * genType(1103515245) + genType(12345); + return detail::tvec2( + noise1(f1), + noise1(f2)); + } + + template + inline detail::tvec2 noise2 + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + f0 += x[i]; + + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + return detail::tvec2( + noise1(f1), + noise1(f2)); + } + + template + inline detail::tvec2 noise2 + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + f0 += x[i]; + + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + return detail::tvec2( + noise1(f1), + noise1(f2)); + } + + template + inline detail::tvec2 noise2 + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + f0 += x[i]; + + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + return detail::tvec2( + noise1(f1), + noise1(f2)); + } + + // noise3 + template + inline detail::tvec3 noise3 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + genType f1 = x * genType(1103515245) + genType(12345); + genType f2 = f1 * genType(1103515245) + genType(12345); + genType f3 = f2 * genType(1103515245) + genType(12345); + return detail::tvec3( + noise1(f1), + noise1(f2), + noise1(f3)); + } + + template + inline detail::tvec3 noise3 + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + return detail::tvec3( + noise1(f1), + noise1(f2), + noise1(f3)); + } + + template + inline detail::tvec3 noise3 + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + return detail::tvec3( + noise1(f1), + noise1(f2), + noise1(f3)); + } + + template + inline detail::tvec3 noise3 + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + return detail::tvec3( + noise1(f1), + noise1(f2), + noise1(f3)); + } + + // noise4 + template + inline detail::tvec4 noise4 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + genType f1 = x * genType(1103515245) + genType(12345); + genType f2 = f1 * genType(1103515245) + genType(12345); + genType f3 = f2 * genType(1103515245) + genType(12345); + genType f4 = f3 * genType(1103515245) + genType(12345); + return detail::tvec4( + noise1(f1), + noise1(f2), + noise1(f3), + noise1(f4)); + } + + template + inline detail::tvec4 noise4 + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + T f4 = f3 * T(1103515245) + T(12345); + return detail::tvec4( + noise1(f1), + noise1(f2), + noise1(f3), + noise1(f4)); + } + + template + inline detail::tvec4 noise4 + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size()(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + T f4 = f3 * T(1103515245) + T(12345); + return detail::tvec4( + noise1(f1), + noise1(f2), + noise1(f3), + noise1(f4)); + } + + template + inline detail::tvec4 noise4 + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + T f0(0); + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size()(); ++i) + f0 += x[i]; + T f1 = f0 * T(1103515245) + T(12345); + T f2 = f1 * T(1103515245) + T(12345); + T f3 = f2 * T(1103515245) + T(12345); + T f4 = f3 * T(1103515245) + T(12345); + return detail::tvec4( + noise1(f1), + noise1(f2), + noise1(f3), + noise1(f4)); + } + + }//namespace noise + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_packing.hpp b/glm/core/func_packing.hpp new file mode 100644 index 00000000..3dea30ad --- /dev/null +++ b/glm/core/func_packing.hpp @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-17 +// Licence : This source is under MIT License +// File : glm/core/func_packing.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_packing +#define glm_core_func_packing + +namespace glm +{ + namespace test{ + void main_core_func_packing(); + }//namespace test + + namespace core{ + namespace function{ + //! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification + namespace packing + { + uint packUnorm2x16(vec2 const & v); + uint packUnorm4x8(vec4 const & v); + uint packSnorm4x8(vec4 const & v); + + vec2 unpackUnorm2x16(uint const & p); + vec4 unpackUnorm4x8(uint const & p); + vec4 unpackSnorm4x8(uint const & p); + + double packDouble2x32(uvec2 const & v); + uvec2 unpackDouble2x32(double const & v); + + }//namespace packing + }//namespace function + }//namespace core + + using namespace core::function::packing; +}//namespace glm + +#include "func_packing.inl" + +#endif//glm_core_func_packing + diff --git a/glm/core/func_packing.inl b/glm/core/func_packing.inl new file mode 100644 index 00000000..83e174d3 --- /dev/null +++ b/glm/core/func_packing.inl @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-17 +// Licence : This source is under MIT License +// File : glm/core/func_packing.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + + }//namespace detail + + namespace core{ + namespace function{ + namespace packing{ + + + }//namespace packing + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_trigonometric.hpp b/glm/core/func_trigonometric.hpp new file mode 100644 index 00000000..032ff74e --- /dev/null +++ b/glm/core/func_trigonometric.hpp @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2008-09-10 +// Licence : This source is under MIT License +// File : glm/core/func_trigonometric.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_trigonometric +#define glm_core_func_trigonometric + +namespace glm +{ + namespace test{ + void main_core_func_trigonometric(); + }//namespace test + + namespace core{ + namespace function{ + //! Define Angle and trigonometry functions + //! from Section 8.1 of GLSL 1.30.8 specification. + //! Included in glm namespace. + namespace trigonometric{ + + //! Converts degrees to radians and returns the result. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType radians(genType const & degrees); + + //! Converts radians to degrees and returns the result. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType degrees(genType const & radians); + + //! The standard trigonometric sine function. + //! The values returned by this function will range from [-1, 1]. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType sin(genType const & angle); + + //! The standard trigonometric cosine function. + //! The values returned by this function will range from [-1, 1]. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType cos(genType const & angle); + + //! The standard trigonometric tangent function. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType tan(genType const & angle); + + //! Arc sine. Returns an angle whose sine is x. + //! The range of values returned by this function is [-PI/2, PI/2]. + //! Results are undefined if |x| > 1. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType asin(genType const & x); + + //! Arc cosine. Returns an angle whose sine is x. + //! The range of values returned by this function is [0, PI]. + //! Results are undefined if |x| > 1. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType acos(genType const & x); + + //! Arc tangent. Returns an angle whose tangent is y/x. + //! The signs of x and y are used to determine what + //! quadrant the angle is in. The range of values returned + //! by this function is [-PI, PI]. Results are undefined + //! if x and y are both 0. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType atan(genType const & y, genType const & x); + + //! Arc tangent. Returns an angle whose tangent is y_over_x. + //! The range of values returned by this function is [-PI/2, PI/2]. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType atan(genType const & y_over_x); + + //! Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType sinh(genType const & angle); + + //! Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType cosh(genType const & angle); + + //! Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType tanh(genType const & angle); + + //! Arc hyperbolic sine; returns the inverse of sinh. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType asinh(genType const & x); + + //! Arc hyperbolic cosine; returns the non-negative inverse + //! of cosh. Results are undefined if x < 1. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType acosh(genType const & x); + + //! Arc hyperbolic tangent; returns the inverse of tanh. + //! Results are undefined if abs(x) >= 1. + //! (From GLSL 1.30.08 specification, section 8.1) + template + genType atanh(genType const & x); + + }//namespace trigonometric + }//namespace function + }//namespace core + + using namespace core::function::trigonometric; +}//namespace glm + +#include "func_trigonometric.inl" + +#endif//glm_core_func_trigonometric + + diff --git a/glm/core/func_trigonometric.inl b/glm/core/func_trigonometric.inl new file mode 100644 index 00000000..b4993bed --- /dev/null +++ b/glm/core/func_trigonometric.inl @@ -0,0 +1,745 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2008-09-14 +// Licence : This source is under MIT License +// File : glm/core/func_trigonometric.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace trigonometric{ + + // radians + template + inline genType radians + ( + genType const & degrees + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + const genType pi = genType(3.1415926535897932384626433832795); + return degrees * (pi / genType(180)); + } + + template + inline detail::tvec2 radians + ( + detail::tvec2 const & degrees + ) + { + return detail::tvec2( + radians(degrees.x), + radians(degrees.y)); + } + + template + inline detail::tvec3 radians + ( + detail::tvec3 const & degrees + ) + { + return detail::tvec3( + radians(degrees.x), + radians(degrees.y), + radians(degrees.z)); + } + + template + inline detail::tvec4 radians + ( + detail::tvec4 const & degrees + ) + { + return detail::tvec4( + radians(degrees.x), + radians(degrees.y), + radians(degrees.z), + radians(degrees.w)); + } + + // degrees + template + inline genType degrees + ( + genType const & radians + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + const genType pi = genType(3.1415926535897932384626433832795); + return radians * (genType(180) / pi); + } + + template + inline detail::tvec2 degrees + ( + detail::tvec2 const & radians + ) + { + return detail::tvec2( + degrees(radians.x), + degrees(radians.y)); + } + + template + inline detail::tvec3 degrees + ( + detail::tvec3 const & radians + ) + { + return detail::tvec3( + degrees(radians.x), + degrees(radians.y), + degrees(radians.z)); + } + + template + inline detail::tvec4 degrees + ( + detail::tvec4 const & radians + ) + { + return detail::tvec4( + degrees(radians.x), + degrees(radians.y), + degrees(radians.z), + degrees(radians.w)); + } + + // sin + template + inline genType sin + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::sin(angle); + } + + template + inline detail::tvec2 sin + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + sin(angle.x), + sin(angle.y)); + } + + template + inline detail::tvec3 sin + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + sin(angle.x), + sin(angle.y), + sin(angle.z)); + } + + template + inline detail::tvec4 sin + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + sin(angle.x), + sin(angle.y), + sin(angle.z), + sin(angle.w)); + } + + // cos + template + inline genType cos(genType const & angle) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::cos(angle); + } + + template + inline detail::tvec2 cos + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + cos(angle.x), + cos(angle.y)); + } + + template + inline detail::tvec3 cos + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + cos(angle.x), + cos(angle.y), + cos(angle.z)); + } + + template + inline detail::tvec4 cos + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + cos(angle.x), + cos(angle.y), + cos(angle.z), + cos(angle.w)); + } + + // tan + template + inline genType tan + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::tan(angle); + } + + template + inline detail::tvec2 tan + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + tan(angle.x), + tan(angle.y)); + } + + template + inline detail::tvec3 tan + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + tan(angle.x), + tan(angle.y), + tan(angle.z)); + } + + template + inline detail::tvec4 tan + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + tan(angle.x), + tan(angle.y), + tan(angle.z), + tan(angle.w)); + } + + // asin + template + inline genType asin + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::asin(x); + } + + template + inline detail::tvec2 asin + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + asin(x.x), + asin(x.y)); + } + + template + inline detail::tvec3 asin + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + asin(x.x), + asin(x.y), + asin(x.z)); + } + + template + inline detail::tvec4 asin + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + asin(x.x), + asin(x.y), + asin(x.z), + asin(x.w)); + } + + // acos + template + inline genType acos + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::acos(x); + } + + template + inline detail::tvec2 acos + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + acos(x.x), + acos(x.y)); + } + + template + inline detail::tvec3 acos + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + acos(x.x), + acos(x.y), + acos(x.z)); + } + + template + inline detail::tvec4 acos + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + acos(x.x), + acos(x.y), + acos(x.z), + acos(x.w)); + } + + // atan + template + inline genType atan + ( + genType const & y, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::atan2(y, x); + } + + template + inline detail::tvec2 atan + ( + detail::tvec2 const & y, + detail::tvec2 const & x + ) + { + return detail::tvec2( + atan(y.x, x.x), + atan(y.y, x.y)); + } + + template + inline detail::tvec3 atan + ( + detail::tvec3 const & y, + detail::tvec3 const & x + ) + { + return detail::tvec3( + atan(y.x, x.x), + atan(y.y, x.y), + atan(y.z, x.z)); + } + + template + inline detail::tvec4 atan + ( + detail::tvec4 const & y, + detail::tvec4 const & x + ) + { + return detail::tvec4( + atan(y.x, x.x), + atan(y.y, x.y), + atan(y.z, x.z), + atan(y.w, x.w)); + } + + template + inline genType atan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return ::std::atan(x); + } + + template + inline detail::tvec2 atan + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + atan(x.x), + atan(x.y)); + } + + template + inline detail::tvec3 atan + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + atan(x.x), + atan(x.y), + atan(x.z)); + } + + template + inline detail::tvec4 atan + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + atan(x.x), + atan(x.y), + atan(x.z), + atan(x.w)); + } + + // sinh + template + inline genType sinh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return std::sinh(angle); + } + + template + inline detail::tvec2 sinh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + sinh(angle.x), + sinh(angle.y)); + } + + template + inline detail::tvec3 sinh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + sinh(angle.x), + sinh(angle.y), + sinh(angle.z)); + } + + template + inline detail::tvec4 sinh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + sinh(angle.x), + sinh(angle.y), + sinh(angle.z), + sinh(angle.w)); + } + + // cosh + template + inline genType cosh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return std::cosh(angle); + } + + template + inline detail::tvec2 cosh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + cosh(angle.x), + cosh(angle.y)); + } + + template + inline detail::tvec3 cosh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + cosh(angle.x), + cosh(angle.y), + cosh(angle.z)); + } + + template + inline detail::tvec4 cosh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + cosh(angle.x), + cosh(angle.y), + cosh(angle.z), + cosh(angle.w)); + } + + // tanh + template + inline genType tanh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return std::tanh(angle); + } + + template + inline detail::tvec2 tanh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + tanh(angle.x), + tanh(angle.y)); + } + + template + inline detail::tvec3 tanh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + tanh(angle.x), + tanh(angle.y), + tanh(angle.z)); + } + + template + inline detail::tvec4 tanh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + tanh(angle.x), + tanh(angle.y), + tanh(angle.z), + tanh(angle.w)); + } + + // asinh + template + inline genType asinh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); + } + + template + inline detail::tvec2 asinh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + asinh(x.x), + asinh(x.y)); + } + + template + inline detail::tvec3 asinh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + asinh(x.x), + asinh(x.y), + asinh(x.z)); + } + + template + inline detail::tvec4 asinh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + asinh(x.x), + asinh(x.y), + asinh(x.z), + asinh(x.w)); + } + + // acosh + template + inline genType acosh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + if(x < genType(1)) + return genType(0); + return log(x + sqrt(x * x - genType(1))); + } + + template + inline detail::tvec2 acosh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + acosh(x.x), + acosh(x.y)); + } + + template + inline detail::tvec3 acosh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + acosh(x.x), + acosh(x.y), + acosh(x.z)); + } + + template + inline detail::tvec4 acosh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + acosh(x.x), + acosh(x.y), + acosh(x.z), + acosh(x.w)); + } + + // atanh + template + inline genType atanh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float); + + if(abs(x) >= genType(1)) + return 0; + return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); + } + + template + inline detail::tvec2 atanh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + atanh(x.x), + atanh(x.y)); + } + + template + inline detail::tvec3 atanh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + atanh(x.x), + atanh(x.y), + atanh(x.z)); + } + + template + inline detail::tvec4 atanh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + atanh(x.x), + atanh(x.y), + atanh(x.z), + atanh(x.w)); + } + + }//namespace trigonometric + }//namespace function + }//namespace core +}//namespace glm diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp new file mode 100644 index 00000000..3916d7e5 --- /dev/null +++ b/glm/core/func_vector_relational.hpp @@ -0,0 +1,189 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2008-09-09 +// Licence : This source is under MIT License +// File : glm/core/func_vector_relational.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_vector_relational +#define glm_core_func_vector_relational + +namespace glm +{ + namespace test{ + void main_core_func_vector_relational(); + }//namespace test + + namespace core{ + namespace function{ + //! Define vector relational functions from Section 8.3 of GLSL 1.30.8 specification. + //! Included in glm namespace. + namespace vector_relational + { + //! Returns the component-wise comparison result of x < y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type lessThan + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] < y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x <= y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type lessThanEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] <= y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x > y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type greaterThan + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] > y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x >= y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type greaterThanEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] >= y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x == y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type equal + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint || + detail::type::is_bool); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] == y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x != y. + //! (From GLSL 1.30.08 specification, section 8.6) + template class vecType> + inline typename vecType::bool_type notEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint || + detail::type::is_bool); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] != y[i]; + return Result; + } + + //! Returns true if any component of x is true. + //! (From GLSL 1.30.08 specification, section 8.6) + template