Merge branch '0.9.2' of ssh://g-truc.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.2
This commit is contained in:
commit
69e4bb9b8e
@ -11,8 +11,8 @@
|
|||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">
|
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">
|
||||||
Download GLM 0.9.2.1</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title-date"> </div><div class="title4"> </div><div><p>
|
Download GLM 0.9.2.3</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title-date"> </div><div class="title4"> </div><div><p>
|
||||||
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
|
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
|
||||||
based on the <a href="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
|
based on the <a href="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
|
||||||
</p><p>
|
</p><p>
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">
|
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">
|
||||||
Download GLM 0.9.2.1</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Compute a triangle normal:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string"><glm/glm.hpp></span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="keyword">void </span> computeNormal(triangle & Triangle)
|
Download GLM 0.9.2.3</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><span xmlns="http://www.w3.org/1999/xhtml" class="code-title">Compute a triangle normal:</span><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string"><glm/glm.hpp></span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="keyword">void </span> computeNormal(triangle & Triangle)
|
||||||
</span></li><li class="code-line"><span class="code-line-content">
|
</span></li><li class="code-line"><span class="code-line-content">
|
||||||
{
|
{
|
||||||
</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
|
</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
|
||||||
|
@ -11,20 +11,22 @@
|
|||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">
|
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">
|
||||||
Download GLM 0.9.2.1</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title4">Current release</div></div><div class="issue-content">24/05/2010:
|
Download GLM 0.9.2.3</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title4">Current release</div></div><div class="issue-content">08/06/2011:
|
||||||
<a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">GLM 0.9.2.1</a>
|
<a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">GLM 0.9.2.3</a>
|
||||||
(3.4 MB)
|
(3.4 MB)
|
||||||
</div><div class="news-separator">_________________</div><br /><div><div class="title4">GLM - zip files</div><div class="issue-content">24/05/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">GLM 0.9.2.1</a> (3.4 MB)
|
</div><div class="news-separator">_________________</div><br /><div><div class="title4">GLM - zip files</div><div class="issue-content">08/06/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">GLM 0.9.2.3</a> (3.4 MB)
|
||||||
</div><div class="issue-content">08/05/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download">GLM 0.9.2.0</a> (3.4 MB)
|
</div><div class="issue-content">02/06/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download">GLM 0.9.2.2</a> (3.4 MB)
|
||||||
</div><div class="issue-content">07/05/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download">GLM 0.9.1.3</a> (3.4 MB)
|
</div><div class="issue-content">24/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">GLM 0.9.2.1</a> (3.4 MB)
|
||||||
</div><div class="issue-content">12/04/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download">GLM 0.9.1.2</a> (3.4 MB)
|
</div><div class="issue-content">08/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download">GLM 0.9.2.0</a> (3.4 MB)
|
||||||
</div><div class="issue-content">17/03/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download">GLM 0.9.1.1</a> (3.4 MB)
|
</div><div class="issue-content">07/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download">GLM 0.9.1.3</a> (3.4 MB)
|
||||||
</div><div class="issue-content">03/03/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download">GLM 0.9.1.0</a> (3.4 MB)
|
</div><div class="issue-content">12/04/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download">GLM 0.9.1.2</a> (3.4 MB)
|
||||||
</div><div class="issue-content">13/02/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download">GLM 0.9.1.B</a> (3.4 MB)
|
</div><div class="issue-content">17/03/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download">GLM 0.9.1.1</a> (3.4 MB)
|
||||||
</div><div class="issue-content">13/02/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download">GLM 0.9.0.8</a> (3.3 MB)
|
</div><div class="issue-content">03/03/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download">GLM 0.9.1.0</a> (3.4 MB)
|
||||||
</div><div class="issue-content">31/01/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download">GLM 0.9.1.A</a> (3.0 MB)
|
</div><div class="issue-content">13/02/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download">GLM 0.9.1.B</a> (3.4 MB)
|
||||||
</div><div class="issue-content">30/01/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download">GLM 0.9.0.7</a> (1.4 MB)
|
</div><div class="issue-content">13/02/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download">GLM 0.9.0.8</a> (3.3 MB)
|
||||||
|
</div><div class="issue-content">31/01/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download">GLM 0.9.1.A</a> (3.0 MB)
|
||||||
|
</div><div class="issue-content">30/01/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download">GLM 0.9.0.7</a> (1.4 MB)
|
||||||
</div><div class="issue-content">21/12/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.6/glm-0.9.0.6.zip/download">GLM 0.9.0.6</a> (2.2 MB)
|
</div><div class="issue-content">21/12/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.6/glm-0.9.0.6.zip/download">GLM 0.9.0.6</a> (2.2 MB)
|
||||||
</div><div class="issue-content">01/11/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.5/glm-0.9.0.5.zip/download">GLM 0.9.0.5</a> (2.2 MB)
|
</div><div class="issue-content">01/11/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.5/glm-0.9.0.5.zip/download">GLM 0.9.0.5</a> (2.2 MB)
|
||||||
</div><div class="issue-content">04/10/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.4/glm-0.9.0.4.zip/download">GLM 0.9.0.4</a> (1.5 MB)
|
</div><div class="issue-content">04/10/2010: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.4/glm-0.9.0.4.zip/download">GLM 0.9.0.4</a> (1.5 MB)
|
||||||
@ -74,7 +76,9 @@
|
|||||||
</div><div class="issue-content">02/19/2006: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.zip?download">GLM 0.3.0.0</a> (945 KB)
|
</div><div class="issue-content">02/19/2006: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.zip?download">GLM 0.3.0.0</a> (945 KB)
|
||||||
</div><div class="issue-content">05/05/2005: <a href="http://prdownloads.sourceforge.net/glf/glm-0.2.zip?download">GLM 0.2.0.0</a> (194 KB)
|
</div><div class="issue-content">05/05/2005: <a href="http://prdownloads.sourceforge.net/glf/glm-0.2.zip?download">GLM 0.2.0.0</a> (194 KB)
|
||||||
</div><div class="issue-content">02/21/2005: <a href="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download">GLM 0.1.0.0</a> (29.2 KB)
|
</div><div class="issue-content">02/21/2005: <a href="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download">GLM 0.1.0.0</a> (29.2 KB)
|
||||||
</div></div><div class="news-separator">_________________</div><br /><div><div class="title4">GLM - 7z files</div><div class="issue-content">24/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.7z/download">GLM 0.9.2.1</a> (2.1 MB)
|
</div></div><div class="news-separator">_________________</div><br /><div><div class="title4">GLM - 7z files</div><div class="issue-content">08/06/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.7z/download">GLM 0.9.2.3</a> (2.1 MB)
|
||||||
|
</div><div class="issue-content">02/06/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download">GLM 0.9.2.2</a> (2.1 MB)
|
||||||
|
</div><div class="issue-content">24/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.7z/download">GLM 0.9.2.1</a> (2.1 MB)
|
||||||
</div><div class="issue-content">08/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.7z/download">GLM 0.9.2.0</a> (2.1 MB)
|
</div><div class="issue-content">08/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.7z/download">GLM 0.9.2.0</a> (2.1 MB)
|
||||||
</div><div class="issue-content">07/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download">GLM 0.9.1.3</a> (2.1 MB)
|
</div><div class="issue-content">07/05/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download">GLM 0.9.1.3</a> (2.1 MB)
|
||||||
</div><div class="issue-content">12/04/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.7z/download">GLM 0.9.1.2</a> (2.1 MB)
|
</div><div class="issue-content">12/04/2011: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.7z/download">GLM 0.9.1.2</a> (2.1 MB)
|
||||||
|
Binary file not shown.
@ -11,5 +11,5 @@
|
|||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">
|
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">
|
||||||
Download GLM 0.9.2.1</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title-date">16/10/2008</div><div class="title4">GLM Logo</div><div><table style="width:100%;"><tr style="width:100%;"><td><p />Download: <a href="./goodies/logo2560x1600.png">2560x1600</a><br />Download: <a href="./goodies/logo1920x1200.png">1920x1200</a><br />Download: <a href="./goodies/logo1600x1000.png">1600x1000</a><br />Download: <a href="./goodies/logo1280x0800.png">1280x0800</a><br />Download: <a href="./goodies/logo1024x0640.png">1024x0640</a><br /></td><td style="text-align:right;"><a ref="goodies/logo.png"><img src="image/logo-mini.png" alt=" " /></a></td></tr></table></div><div class="news-separator">_________________</div><br /></div><div><div class="title-date">16/10/2008</div><div class="title4">GLM Font</div><div><table style="width:100%;"><tr style="width:100%;"><td><p />Download: <a href="./goodies/tenby-five.otf">Font (.otf)</a><br /></td><td style="text-align:right;"><a ref="goodies/font.png"><img src="image/font-mini.png" alt=" " /></a></td></tr></table></div><div class="news-separator">_________________</div><br /></div><div class="email"><img src="./common/email.png" alt="email not available as text" /></div><div class="news-separator">_________________</div><br /><div class="title3">Copyright Š 2005 - 2011<a href="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
|
Download GLM 0.9.2.3</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><div><div class="title-date">16/10/2008</div><div class="title4">GLM Logo</div><div><table style="width:100%;"><tr style="width:100%;"><td><p />Download: <a href="./goodies/logo2560x1600.png">2560x1600</a><br />Download: <a href="./goodies/logo1920x1200.png">1920x1200</a><br />Download: <a href="./goodies/logo1600x1000.png">1600x1000</a><br />Download: <a href="./goodies/logo1280x0800.png">1280x0800</a><br />Download: <a href="./goodies/logo1024x0640.png">1024x0640</a><br /></td><td style="text-align:right;"><a ref="goodies/logo.png"><img src="image/logo-mini.png" alt=" " /></a></td></tr></table></div><div class="news-separator">_________________</div><br /></div><div><div class="title-date">16/10/2008</div><div class="title4">GLM Font</div><div><table style="width:100%;"><tr style="width:100%;"><td><p />Download: <a href="./goodies/tenby-five.otf">Font (.otf)</a><br /></td><td style="text-align:right;"><a ref="goodies/font.png"><img src="image/font-mini.png" alt=" " /></a></td></tr></table></div><div class="news-separator">_________________</div><br /></div><div class="email"><img src="./common/email.png" alt="email not available as text" /></div><div class="news-separator">_________________</div><br /><div class="title3">Copyright Š 2005 - 2011<a href="http://www.g-truc.net">G-Truc Creation</a></div></td></tr></table></body></html>
|
118
doc/index.html
118
doc/index.html
@ -11,8 +11,8 @@
|
|||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
})();
|
})();
|
||||||
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download">
|
</script></head><body><table><tr><td class="menu"><div class="menu1"><br /><div><a href="./goodies/logo1920x1200.png"><img class="menu-img" src="./common/logo.png" alt="GLM Logo" /></a></div><br /><div><a class="menu" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">
|
||||||
Download GLM 0.9.2.1</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><p>
|
Download GLM 0.9.2.3</a></div></div><br /><div class="menu2"><a href="./index.html">Front page</a></div><div class="menu2"><a href="./download.html">Downloads</a></div><div class="menu2"><a href="http://www.opengl.org/sdk/libs/GLM/">OpenGL SDK page</a></div><br /><div class="menu2"><a href="./glm-0.9.2.pdf">GLM Manual</a></div><div class="menu2"><a href="./api-0.9.2/index.html">GLM API</a></div><div class="menu2"><a href="./code.html">Code samples</a></div><div class="menu2"><a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.10.6.clean.pdf">GLSL Specification</a></div><div class="menu2"><a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a></div><br /><div class="menu2"><a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Report a bug</a></div><div class="menu2"><a href="https://sourceforge.net/projects/ogl-math/">SourceForge page</a></div><div class="menu2"><a href="http://www.g-truc.net/project-0016.html#menu">G-Truc Creation page</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=summary">Browse Git repository</a></div><div class="menu2"><a href="http://ogl-math.git.sourceforge.net/git/gitweb.cgi?p=ogl-math/ogl-math;a=snapshot;h=HEAD;sf=tgz">Source snapshot</a></div><br /><br /><div class="menu2"><a href="http://www.g-truc.net"><img class="menu-img" src="./common/g-truc.png" alt="G-Truc" /></a></div><br /></td><td class="page"><div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div><div class="title3">GLSL + Optional features = OpenGL Mathematics (GLM)<br />A C++ mathematics library for graphics programming<br /></div><br /><br /><p>
|
||||||
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
|
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software
|
||||||
based on the <a href="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
|
based on the <a href="http://www.opengl.org/documentation/glsl/">OpenGL Shading Language (GLSL)</a> specification.
|
||||||
</p><p>
|
</p><p>
|
||||||
@ -33,7 +33,23 @@
|
|||||||
</p><p>
|
</p><p>
|
||||||
Thanks for contributing to the project by <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets</a> for bug reports and feature requests. (SF.net account required).
|
Thanks for contributing to the project by <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets</a> for bug reports and feature requests. (SF.net account required).
|
||||||
Any feedback is welcome at glm@g-truc.net.
|
Any feedback is welcome at glm@g-truc.net.
|
||||||
</p><br /><div><h3>24/05/2011 - GLM 0.9.2.1 released</h3><div><p>
|
</p><br /><div><h3>08/06/2011 - GLM 0.9.2.3 released</h3><div><p>
|
||||||
|
This version only fixes a couple a major bugs introduced in GLM 0.9.2.2.
|
||||||
|
</p>Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">GLM 0.9.2.3 (zip)</a><br />Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.7z/download">GLM 0.9.2.3 (7z)</a><br />Link: <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</a><br /></div><br /></div><div><h3>02/06/2011 - GLM 0.9.2.2 released</h3><div><p>
|
||||||
|
The main improvement of this version comes from the extended number of matrix constructors so that a programmer can used different scalar types for each parameter.
|
||||||
|
</p><ul xmlns="http://www.w3.org/1999/xhtml" class="code-list"><li class="code-line"><span class="code-line-content"><span class="keyword">#include </span><span class="string"><glm/glm.hpp></span></span></li><li class="code-line"><span class="code-line-content" /></li><li class="code-line"><span class="code-line-content"><span class="comment">// Create an identity matrix</span></span></li><li class="code-line"><span class="code-line-content">
|
||||||
|
glm::mat3 m(
|
||||||
|
</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
|
||||||
|
1, 0.0, 0,
|
||||||
|
</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
|
||||||
|
0.0, 1.0, 0.0f,
|
||||||
|
</span></li><li class="code-line"><span class="code-line-content" style="padding-left:32px">
|
||||||
|
0, 0.0, 1.0f);
|
||||||
|
</span></li></ul><p>
|
||||||
|
The quaternion implementation has been updated as well, fixing the various slerp implementation flavours (mix, shortMix and fastMix) and providing more completeness: Added interaction with GLM_GTX_epsilon and missing lowp_quat, mediump_quat and highp_quat but also none square matrix equivalents.
|
||||||
|
</p><p>
|
||||||
|
Finally, some efforts have been put to remove warnings across all supported compilers.
|
||||||
|
</p>Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download">GLM 0.9.2.2 (zip)</a><br />Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download">GLM 0.9.2.2 (7z)</a><br />Link: <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</a><br /></div><br /></div><div><h3>24/05/2011 - GLM 0.9.2.1 released</h3><div><p>
|
||||||
GLM 0.9.2.1 significantly improves compiler detection which allows CUDA to be automatically recognized when GLM is used inside a CUDA kernel.
|
GLM 0.9.2.1 significantly improves compiler detection which allows CUDA to be automatically recognized when GLM is used inside a CUDA kernel.
|
||||||
By conscequence, <span xmlns="http://www.w3.org/1999/xhtml" class="codeword">GLM_FORCE_CUDA</span> is no longer required to be declared.
|
By conscequence, <span xmlns="http://www.w3.org/1999/xhtml" class="codeword">GLM_FORCE_CUDA</span> is no longer required to be declared.
|
||||||
</p><p>
|
</p><p>
|
||||||
@ -106,7 +122,7 @@
|
|||||||
This implementation can probably be improve in many ways so don't hesitate to send me some feedbacks.
|
This implementation can probably be improve in many ways so don't hesitate to send me some feedbacks.
|
||||||
</p><p>
|
</p><p>
|
||||||
GLM 0.9.1 is not 100% backward compatible with GLM 0.9.0 but mostly advanced usages should be concerned by this compatibility issues.
|
GLM 0.9.1 is not 100% backward compatible with GLM 0.9.0 but mostly advanced usages should be concerned by this compatibility issues.
|
||||||
</p></div><br /></div><div><h3>30/01/2011 - GLM 0.9.0.7 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download">GLM 0.9.1.A (zip, 2.7 MB)</a><br />Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.7z/download">GLM 0.9.1.A (7z, 1.7 MB)</a><br />Link: <a href="http://glm.g-truc.net/glm-0.9.1.pdf" /><br />Link: <a href="https://sourceforge.net/apps/trac/ogl-math/newticket" /><br /></div><br /></div><div><h3>30/01/2011 - GLM 0.9.0.7 released</h3><div><p>
|
||||||
GLM 0.9.0.7 provides 2 main changes: GLSL 4.10 packing functions but also == and != operators for every types.
|
GLM 0.9.0.7 provides 2 main changes: GLSL 4.10 packing functions but also == and != operators for every types.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download">GLM 0.9.0.7 (zip, 1.4 MB)</a><br />Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.7z/download">GLM 0.9.0.7 (7z, 832 KB)</a><br />Link: <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</a><br /></div><br /></div><div><h3>21/12/2010 - GLM 0.9.0.6 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download">GLM 0.9.0.7 (zip, 1.4 MB)</a><br />Download: <a href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.7z/download">GLM 0.9.0.7 (7z, 832 KB)</a><br />Link: <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</a><br /></div><br /></div><div><h3>21/12/2010 - GLM 0.9.0.6 released</h3><div><p>
|
||||||
GLM 0.9.0.6 is a new update of GLM built over GLM's user bug reports.
|
GLM 0.9.0.6 is a new update of GLM built over GLM's user bug reports.
|
||||||
@ -148,9 +164,9 @@
|
|||||||
</p><p>
|
</p><p>
|
||||||
Reaching the beta status, this new features close the feature list of GLM 0.9.
|
Reaching the beta status, this new features close the feature list of GLM 0.9.
|
||||||
Further development releases may happen before the final release.
|
Further development releases may happen before the final release.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.zip/download">GLM 0.9.B.1 (zip, 964 KB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.7z/download">GLM 0.9.B.1 (7z, 414 KB)</a><br /></div><br /></div><div><h3>20/02/2010 - GLM 0.9 Alpha 2 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.zip/download">GLM 0.9.B.1 (zip, 964 KB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.7z/download">GLM 0.9.B.1 (7z, 414 KB)</a><br /></div><br /></div><div><h3>20/02/2010 - GLM 0.9 Alpha 2 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.zip/download">GLM 0.9.A.2 (zip, 1.3 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.7z/download">GLM 0.9.A.2 (7z, 726 KB)</a><br /></div><br /></div><div><h3>09/02/2010 - GLM 0.9 Alpha 1 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.zip/download">GLM 0.9.A.2 (zip, 1.3 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.7z/download">GLM 0.9.A.2 (7z, 726 KB)</a><br /></div><br /></div><div><h3>09/02/2010 - GLM 0.9 Alpha 1 released</h3><div>Groove<p>
|
||||||
First step until a major release for GLM with this first alpha of GLM 0.9.
|
First step until a major release for GLM with this first alpha of GLM 0.9.
|
||||||
</p><p>
|
</p><p>
|
||||||
This version brings a large internal redesign to improve the library reliability and optimized some parts.
|
This version brings a large internal redesign to improve the library reliability and optimized some parts.
|
||||||
@ -159,32 +175,32 @@
|
|||||||
For most users the build issues when upgrading to GLM 0.9 should be reduced especially if they follow the deprecation policy.
|
For most users the build issues when upgrading to GLM 0.9 should be reduced especially if they follow the deprecation policy.
|
||||||
</p><p>
|
</p><p>
|
||||||
This release is still UNSTABLE and not recommanded for commertial products.
|
This release is still UNSTABLE and not recommanded for commertial products.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.1/glm-0.9.A.1.zip/download">GLM 0.9.A.1 (zip, 950 KB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.1/glm-0.9.A.1.7z/download">GLM 0.9.A.1 (7z, 391 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>25/01/2010 - GLM 0.8.4.4 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.1/glm-0.9.A.1.zip/download">GLM 0.9.A.1 (zip, 950 KB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.1/glm-0.9.A.1.7z/download">GLM 0.9.A.1 (7z, 391 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>25/01/2010 - GLM 0.8.4.4 released</h3><div>Groove<p>
|
||||||
This update just removes some warnings
|
This update just removes some warnings
|
||||||
</p><p>
|
</p><p>
|
||||||
By the way, if you have questions about GLM, a good place for those is the <a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a>.
|
By the way, if you have questions about GLM, a good place for those is the <a href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=10&page=1">OpenGL.org Toolkits forum</a>.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.4/glm-0.8.4.4.zip/download">GLM 0.8.4.4 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.4/glm-0.8.4.4.7z/download">GLM 0.8.4.4 (7z, 479 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/11/2009 - GLM 0.8.4.3 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.4/glm-0.8.4.4.zip/download">GLM 0.8.4.4 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.4/glm-0.8.4.4.7z/download">GLM 0.8.4.4 (7z, 479 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/11/2009 - GLM 0.8.4.3 released</h3><div>Groove<p>
|
||||||
This version fixed half scalars and half vectors arithmetics.
|
This version fixed half scalars and half vectors arithmetics.
|
||||||
This is a really slow practice that should be avoid.
|
This is a really slow practice that should be avoid.
|
||||||
Half floating point value should be use only to store GPU data.
|
Half floating point value should be use only to store GPU data.
|
||||||
GPUs have native support for half values, not x86 CPUs.
|
GPUs have native support for half values, not x86 CPUs.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.3/glm-0.8.4.3.zip/download">GLM 0.8.4.3 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.3/glm-0.8.4.3.7z/download">GLM 0.8.4.3 (7z, 463 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/10/2009 - GLM 0.8.4.2 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.3/glm-0.8.4.3.zip/download">GLM 0.8.4.3 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.3/glm-0.8.4.3.7z/download">GLM 0.8.4.3 (7z, 463 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/10/2009 - GLM 0.8.4.2 released</h3><div>Groove<p>
|
||||||
This version is a really minor updates, fixing single issue with half float types.
|
This version is a really minor updates, fixing single issue with half float types.
|
||||||
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.2/glm-0.8.4.2.zip/download">GLM 0.8.4.2 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.2/glm-0.8.4.2.7z/download">GLM 0.8.4.2 (7z, 443 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>05/10/2009 - GLM 0.8.4.1 released</h3><div><p>
|
</p>Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.2/glm-0.8.4.2.zip/download">GLM 0.8.4.2 (zip, 1.1 MB)</a><br />Download: <a href="https://sourceforge.net/projects/glf/files/glm/glm-0.8.4.2/glm-0.8.4.2.7z/download">GLM 0.8.4.2 (7z, 443 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>05/10/2009 - GLM 0.8.4.1 released</h3><div>Groove<p>
|
||||||
This version fixes few bugs and provides an major update of the manual thanks to Damian Trebilco.
|
This version fixes few bugs and provides an major update of the manual thanks to Damian Trebilco.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.1.zip?download">GLM 0.8.4.1 (zip, 1.1 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.1.7z?download">GLM 0.8.4.1 (7z, 443 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/09/2009 - GLM 0.8.4.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.1.zip?download">GLM 0.8.4.1 (zip, 1.1 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.1.7z?download">GLM 0.8.4.1 (7z, 443 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/09/2009 - GLM 0.8.4.0 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.0.zip?download">GLM 0.8.4.0 (zip, 1.1 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.0.7z?download">GLM 0.8.4.0 (7z, 439 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>11/08/2009 - GLM 0.8.3.5 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.0.zip?download">GLM 0.8.4.0 (zip, 1.1 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.4.0.7z?download">GLM 0.8.4.0 (7z, 439 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>11/08/2009 - GLM 0.8.3.5 released</h3><div>Groove<p>
|
||||||
Fixed extension bugs introduced by core update.
|
Fixed extension bugs introduced by core update.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.5.zip?download">GLM 0.8.3.5 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.5.7z?download">GLM 0.8.3.5 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>10/08/2009 - GLM 0.8.3.4 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.5.zip?download">GLM 0.8.3.5 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.5.7z?download">GLM 0.8.3.5 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>10/08/2009 - GLM 0.8.3.4 released</h3><div>Groove<p>
|
||||||
Fixed varius bugs. Move determinant fonction to core following GLSL 1.5 specification.
|
Fixed varius bugs. Move determinant fonction to core following GLSL 1.5 specification.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.4.zip?download">GLM 0.8.3.4 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.4.7z?download">GLM 0.8.3.4 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>25/06/2009 - GLM 0.8.3.3 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.4.zip?download">GLM 0.8.3.4 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.4.7z?download">GLM 0.8.3.4 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>25/06/2009 - GLM 0.8.3.3 released</h3><div>Groove<p>
|
||||||
Fixed varius bugs.
|
Fixed varius bugs.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.3.zip?download">GLM 0.8.3.3 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.3.7z?download">GLM 0.8.3.3 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>04/06/2009 - GLM 0.8.3.2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.3.zip?download">GLM 0.8.3.3 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.3.7z?download">GLM 0.8.3.3 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>04/06/2009 - GLM 0.8.3.2 released</h3><div>Groove<p>
|
||||||
Add GLM_GTC_quaternion and GLM_GTC_type_precision extensions both subset of GLM_GTX_quaternion and GLM_GTX_number_precision
|
Add GLM_GTC_quaternion and GLM_GTC_type_precision extensions both subset of GLM_GTX_quaternion and GLM_GTX_number_precision
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.2.zip?download">GLM 0.8.3.2 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.2.7z?download">GLM 0.8.3.2 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>21/05/2009 - GLM 0.8.3.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.2.zip?download">GLM 0.8.3.2 (zip, 971 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.2.7z?download">GLM 0.8.3.2 (7z, 405 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>21/05/2009 - GLM 0.8.3.1 released</h3><div>Groove<p>
|
||||||
The old way to use extensions have been fixed and GLM_GTX_bit extension gets updated with more functions to manipulate bit fields.
|
The old way to use extensions have been fixed and GLM_GTX_bit extension gets updated with more functions to manipulate bit fields.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.1.zip?download">GLM 0.8.3.1 (zip, 954 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.1.7z?download">GLM 0.8.3.1 (7z, 402 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>06/05/2009 - GLM 0.8.3.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.1.zip?download">GLM 0.8.3.1 (zip, 954 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.1.7z?download">GLM 0.8.3.1 (7z, 402 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>06/05/2009 - GLM 0.8.3.0 released</h3><div>Groove<p>
|
||||||
This version brings to main changed: Stable extensions and a new extension system.
|
This version brings to main changed: Stable extensions and a new extension system.
|
||||||
</p><p>
|
</p><p>
|
||||||
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!
|
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!
|
||||||
@ -192,11 +208,11 @@
|
|||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.0.zip?download">GLM 0.8.3.0 (zip, 896 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.0.7z?download">GLM 0.8.3.0 (7z, 359 KB)</a><br />Link: <a href="./code.html">Code samples page</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>01/04/2009 - GLM 0.8.2.3 released</h3><div>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.3.zip?download">GLM 0.8.2.3 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.3.7z?download">GLM 0.8.2.3 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>13/02/2009 - GLM 0.8.2.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.0.zip?download">GLM 0.8.3.0 (zip, 896 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.3.0.7z?download">GLM 0.8.3.0 (7z, 359 KB)</a><br />Link: <a href="./code.html">Code samples page</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>01/04/2009 - GLM 0.8.2.3 released</h3><div>GrooveDownload: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.3.zip?download">GLM 0.8.2.3 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.3.7z?download">GLM 0.8.2.3 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>13/02/2009 - GLM 0.8.2.1 released</h3><div>Groove<p>
|
||||||
A new release is available and inogurate a patch number. The goal of this patch number is to release faster fixes from bug reports.
|
A new release is available and inogurate a patch number. The goal of this patch number is to release faster fixes from bug reports.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.1.zip?download">GLM 0.8.2.1 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.1.7z?download">GLM 0.8.2.1 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>21/01/2009 - GLM 0.8.2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.1.zip?download">GLM 0.8.2.1 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.1.7z?download">GLM 0.8.2.1 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>21/01/2009 - GLM 0.8.2 released</h3><div>Groove<p>
|
||||||
This release only fixes bugs. Left sided swizzle operators, quaternion operators, vectors access operators for the main onces.
|
This release only fixes bugs. Left sided swizzle operators, quaternion operators, vectors access operators for the main onces.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.zip?download">GLM 0.8.2 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.7z?download">GLM 0.8.2 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/11/2008 - GLM current developments</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.zip?download">GLM 0.8.2 (zip, 963 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.2.7z?download">GLM 0.8.2 (7z, 381 KB)</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/11/2008 - GLM current developments</h3><div>Groove<p>
|
||||||
Some artifacts have been added to the tracker to give a picture of what you could expect for the next releases.
|
Some artifacts have been added to the tracker to give a picture of what you could expect for the next releases.
|
||||||
</p><p>
|
</p><p>
|
||||||
If you need something else you can add some artifacts to the tracker. Any comment on added entries is welcome.
|
If you need something else you can add some artifacts to the tracker. Any comment on added entries is welcome.
|
||||||
@ -204,9 +220,9 @@
|
|||||||
Furthermore, no more release of GLM 0.7.x will be done. Please upgrade to GLM 0.8.1.
|
Furthermore, no more release of GLM 0.7.x will be done. Please upgrade to GLM 0.8.1.
|
||||||
</p><p>
|
</p><p>
|
||||||
Finally, a pack of programmable oriented OpenGL samples using GLM is under development and planed to be release in December.
|
Finally, a pack of programmable oriented OpenGL samples using GLM is under development and planed to be release in December.
|
||||||
</p>Link: <a href="https://sourceforge.net/tracker2/?group_id=129808&atid=1126032">Tracker</a><br /></div><br /></div><div><h3>30/10/2008 - GLM 0.8.1 released</h3><div><p>
|
</p>Link: <a href="https://sourceforge.net/tracker2/?group_id=129808&atid=1126032">Tracker</a><br /></div><br /></div><div><h3>30/10/2008 - GLM 0.8.1 released</h3><div>Groove<p>
|
||||||
GLM 0.8.1 is released. This new version mainly fixes 64 bit integers with GCC and various bugs.
|
GLM 0.8.1 is released. This new version mainly fixes 64 bit integers with GCC and various bugs.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.1.zip?download">GLM 0.8.1 (zip, 938 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.1.7z?download">GLM 0.8.1 (7z, 372 KB)</a><br />Link: <a href="./glm-manual.pdf">GLM 0.8.1 Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>23/10/2008 - GLM 0.8.0 final released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.1.zip?download">GLM 0.8.1 (zip, 938 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.1.7z?download">GLM 0.8.1 (7z, 372 KB)</a><br />Link: <a href="./glm-manual.pdf">GLM 0.8.1 Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>23/10/2008 - GLM 0.8.0 final released</h3><div>Groove<p>
|
||||||
GLM 0.8.0 is released. This new version is now based on GLSL 1.30 specification which provided new functions and precision qualifiers.
|
GLM 0.8.0 is released. This new version is now based on GLSL 1.30 specification which provided new functions and precision qualifiers.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
@ -218,39 +234,39 @@
|
|||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
Have a look on the manual and the changelog for more information. Don't forget to send your <a href="./about.html">feedback</a> and enjoy!
|
Have a look on the manual and the changelog for more information. Don't forget to send your <a href="./about.html">feedback</a> and enjoy!
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0.zip?download">GLM 0.8.0 (zip, 936 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0.7z?download">GLM 0.8.0 (7z, 370 KB)</a><br />Link: <a href="./glm-manual.pdf">GLM 0.8.0 Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1682.0.html">Post a comment</a><br /></div><br /></div><div><h3>22/10/2008 - A Humus demo to feature GLM 0.8.0</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0.zip?download">GLM 0.8.0 (zip, 936 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0.7z?download">GLM 0.8.0 (7z, 370 KB)</a><br />Link: <a href="./glm-manual.pdf">GLM 0.8.0 Manual</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1682.0.html">Post a comment</a><br /></div><br /></div><div><h3>22/10/2008 - A Humus demo to feature GLM 0.8.0</h3><div>Groove<p>
|
||||||
Ambient aperture lighting <a href="http://www.humus.name">Humus</a> demo have been updated to use GLM as math library.
|
Ambient aperture lighting <a href="http://www.humus.name">Humus</a> demo have been updated to use GLM as math library.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/AmbientApertureLighting.zip?download">Updated demo + all sources (zip, 2.38 MB)</a><br />Download: <a href="http://www.humus.name/3D/AmbientApertureLighting.zip">Original demo (zip, 1.40 MB)</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1681.0.html">Post a comment</a><br /></div><br /></div><div><h3>18/10/2008 - Webside updated</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/AmbientApertureLighting.zip?download">Updated demo + all sources (zip, 2.38 MB)</a><br />Download: <a href="http://www.humus.name/3D/AmbientApertureLighting.zip">Original demo (zip, 1.40 MB)</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1681.0.html">Post a comment</a><br /></div><br /></div><div><h3>18/10/2008 - Webside updated</h3><div>Groove<p>
|
||||||
As you can see the website get a little update to prepare GLM 0.8.0 final release.
|
As you can see the website get a little update to prepare GLM 0.8.0 final release.
|
||||||
</p><p>
|
</p><p>
|
||||||
GLM 0.8.0 final should be release during the week.
|
GLM 0.8.0 final should be release during the week.
|
||||||
</p></div><br /></div><div><h3>10/10/2008 - GLM 0.8.0 beta 3 released</h3><div><p>
|
</p></div><br /></div><div><h3>10/10/2008 - GLM 0.8.0 beta 3 released</h3><div>Groove<p>
|
||||||
This release fixes some bugs and add few features though extensions. The development is now based on <a href="http://www.cmake.org">CMake</a> to make easier cross platform tests and project management.
|
This release fixes some bugs and add few features though extensions. The development is now based on <a href="http://www.cmake.org">CMake</a> to make easier cross platform tests and project management.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta3.zip?download">GLM 0.8.0 Beta 3 (zip, 819 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta3.7z?download">GLM 0.8.0 Beta 3 (7z, 345 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>04/10/2008 - GLM 0.8.0 beta 2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta3.zip?download">GLM 0.8.0 Beta 3 (zip, 819 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta3.7z?download">GLM 0.8.0 Beta 3 (7z, 345 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>04/10/2008 - GLM 0.8.0 beta 2 released</h3><div>Groove<p>
|
||||||
This release mainly improves half float vectors support. By default the low precission vectors are based on float numbers not on half numbers
|
This release mainly improves half float vectors support. By default the low precission vectors are based on float numbers not on half numbers
|
||||||
</p><p>
|
</p><p>
|
||||||
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++.
|
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++.
|
||||||
</p><p>
|
</p><p>
|
||||||
Various bugs and updates of extensions have been done too. Final release is coming...
|
Various bugs and updates of extensions have been done too. Final release is coming...
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta2.zip?download">GLM 0.8.0 Beta 2 (zip, 798 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta2.7z?download">GLM 0.8.0 Beta 2 (7z, 327 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>26/09/2008 - GLM 0.8.0 beta 1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta2.zip?download">GLM 0.8.0 Beta 2 (zip, 798 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta2.7z?download">GLM 0.8.0 Beta 2 (7z, 327 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>26/09/2008 - GLM 0.8.0 beta 1 released</h3><div>Groove<p>
|
||||||
GLM have been updated to support GLSL 1.30. API documentation had significant improvements to make easier finding of GLSL functions and types.
|
GLM have been updated to support GLSL 1.30. API documentation had significant improvements to make easier finding of GLSL functions and types.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
Due to the number of changes GLM 0.8.0 is release as beta first. The final release is schedule for october.
|
Due to the number of changes GLM 0.8.0 is release as beta first. The final release is schedule for october.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta1.zip?download">GLM 0.8.0 Beta 1 (zip, 786 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta1.7z?download">GLM 0.8.0 Beta 1 (7z, 321 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>08/08/2008 - GLM 0.7.6 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta1.zip?download">GLM 0.8.0 Beta 1 (zip, 786 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.8.0-beta1.7z?download">GLM 0.8.0 Beta 1 (7z, 321 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="http://www.ozone3d.net/smf/index.php/topic,1639.0.html">Post a comment</a><br /></div><br /></div><div><h3>08/08/2008 - GLM 0.7.6 released</h3><div>Groove<p>
|
||||||
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 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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.6.zip?download">GLM 0.7.6 (zip, 907 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.6.7z?download">GLM 0.7.6 (7z, 387 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>05/07/2008 - GLM 0.7.5 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.6.zip?download">GLM 0.7.6 (zip, 907 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.6.7z?download">GLM 0.7.6 (7z, 387 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>05/07/2008 - GLM 0.7.5 released</h3><div>Groove<p>
|
||||||
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 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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.5.zip?download">GLM 0.7.5 (zip, 852 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.5.7z?download">GLM 0.7.5 (7z, 366 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>01/06/2008 - GLM 0.7.4 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.5.zip?download">GLM 0.7.5 (zip, 852 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.5.7z?download">GLM 0.7.5 (7z, 366 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>01/06/2008 - GLM 0.7.4 released</h3><div>Groove<p>
|
||||||
GLM 0.7.4 introduces a new system to manage external dependencies.
|
GLM 0.7.4 introduces a new system to manage external dependencies.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
The mechanism is described into the updated manual.
|
The mechanism is described into the updated manual.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.4.zip?download">GLM 0.7.4 (zip, 859 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.4.7z?download">GLM 0.7.4 (7z, 372 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>24/05/2008 - GLM 0.7.3 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.4.zip?download">GLM 0.7.4 (zip, 859 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.4.7z?download">GLM 0.7.4 (7z, 372 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br />Link: <a href="./glm-manual.pdf">Manual</a><br /></div><br /></div><div><h3>24/05/2008 - GLM 0.7.3 released</h3><div>Groove<p>
|
||||||
GLM 0.7.3 is released. This version fixes few bugs and add few extensions
|
GLM 0.7.3 is released. This version fixes few bugs and add few extensions
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.3.zip?download">GLM 0.7.3 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.3.7z?download">GLM 0.7.3 (7z, 635 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>27/04/2008 - GLM 0.7.2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.3.zip?download">GLM 0.7.3 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.3.7z?download">GLM 0.7.3 (7z, 635 KB)</a><br />Link: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>27/04/2008 - GLM 0.7.2 released</h3><div>Groove<p>
|
||||||
GLM 0.7.2 is released. The documentation have been completed again and several issues handle with precompiler options.
|
GLM 0.7.2 is released. The documentation have been completed again and several issues handle with precompiler options.
|
||||||
</p><p>
|
</p><p>
|
||||||
#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_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.
|
||||||
@ -260,25 +276,25 @@
|
|||||||
#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.
|
#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.
|
||||||
</p><p>
|
</p><p>
|
||||||
More information on these topic are available in GLM manual section 5 "Known issues".
|
More information on these topic are available in GLM manual section 5 "Known issues".
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.2.zip?download">GLM 0.7.2 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.2.7z?download">GLM 0.7.2 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>24/03/2008 - GLM 0.7.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.2.zip?download">GLM 0.7.2 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.2.7z?download">GLM 0.7.2 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>24/03/2008 - GLM 0.7.1 released</h3><div>Groove<p>
|
||||||
GLM 0.7.1 is available under MIT license. It fixes bugs with GCC.
|
GLM 0.7.1 is available under MIT license. It fixes bugs with GCC.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.1.zip?download">GLM 0.7.1 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.1.7z?download">GLM 0.7.1 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>22/03/2008 - GLM 0.7.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.1.zip?download">GLM 0.7.1 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.1.7z?download">GLM 0.7.1 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>22/03/2008 - GLM 0.7.0 released</h3><div>Groove<p>
|
||||||
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 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!
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.0.zip?download">GLM 0.7.0 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.0.7z?download">GLM 0.7.0 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>10/12/2007 - GLM 0.6.4 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.0.zip?download">GLM 0.7.0 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.7.0.7z?download">GLM 0.7.0 (7z, 635 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>10/12/2007 - GLM 0.6.4 released</h3><div>Groove<p>
|
||||||
GLM 0.6.4 is available and fixes some swizzle operator issues.
|
GLM 0.6.4 is available and fixes some swizzle operator issues.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.4.zip?download">GLM 0.6.4 (zip, 1.7 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.4.7z?download">GLM 0.6.4 (7z, 612 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>05/11/2007 - GLM 0.6.3 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.4.zip?download">GLM 0.6.4 (zip, 1.7 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.4.7z?download">GLM 0.6.4 (7z, 612 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>05/11/2007 - GLM 0.6.3 released</h3><div>Groove<p>
|
||||||
GLM 0.6.3 fixes accesses of matrices and a 3DSMax SDK conflict.
|
GLM 0.6.3 fixes accesses of matrices and a 3DSMax SDK conflict.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.3.zip?download">GLM 0.6.3 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.3.7z?download">GLM 0.6.3 (7z, 633 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>08/10/2007 - GLM 0.6.2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.3.zip?download">GLM 0.6.3 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.3.7z?download">GLM 0.6.3 (7z, 633 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>08/10/2007 - GLM 0.6.2 released</h3><div>Groove<p>
|
||||||
GLM 0.6.2 fixes an error on an extension.
|
GLM 0.6.2 fixes an error on an extension.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.2.zip?download">GLM 0.6.2 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.2.7z?download">GLM 0.6.2 (7z, 632 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>07/10/2007 - GLM 0.6.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.2.zip?download">GLM 0.6.2 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.2.7z?download">GLM 0.6.2 (7z, 632 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>07/10/2007 - GLM 0.6.1 released</h3><div>Groove<p>
|
||||||
GLM 0.6.1 is a minor update that fix an issue on extension namespace and add two more extensions.
|
GLM 0.6.1 is a minor update that fix an issue on extension namespace and add two more extensions.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.1.zip?download">GLM 0.6.1 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.1.7z?download">GLM 0.6.1 (7z, 632 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/09/2007 - GLM 0.6.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.1.zip?download">GLM 0.6.1 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.1.7z?download">GLM 0.6.1 (7z, 632 KB)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>16/09/2007 - GLM 0.6.0 released</h3><div>Groove<p>
|
||||||
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 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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.0.zip?download">GLM 0.6.0 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.0.7z?download">GLM 0.6.0 (7z, 666 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-v1.0.exe?download">Raytracer v1.0 (exe)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-v1.0.zip?download">Raytracer v1.0 (zip)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/02/2007 - GLM 0.5.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.0.zip?download">GLM 0.6.0 (zip, 1.8 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.6.0.7z?download">GLM 0.6.0 (7z, 666 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-v1.0.exe?download">Raytracer v1.0 (exe)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-v1.0.zip?download">Raytracer v1.0 (zip)</a><br />Download: <a href="./changelog.html">Full changelog</a><br /></div><br /></div><div><h3>19/02/2007 - GLM 0.5.1 released</h3><div>Groove<p>
|
||||||
This release fixes some issues with swizzle operators.
|
This release fixes some issues with swizzle operators.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.1.zip?download">GLM 0.5.1 (zip, 2.3 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.1.7z?download">GLM 0.5.1 (7z, 789 KB)</a><br /></div><br /></div><div><h3>26/01/2007 - Cattmull Clark subdivision sample</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.1.zip?download">GLM 0.5.1 (zip, 2.3 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.1.7z?download">GLM 0.5.1 (7z, 789 KB)</a><br /></div><br /></div><div><h3>26/01/2007 - Cattmull Clark subdivision sample</h3><div>Groove<p>
|
||||||
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 <a href="http://prideout.net">Philip Rideout</a>.
|
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 <a href="http://prideout.net">Philip Rideout</a>.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/CatmullClark.zip?download">CatmullClark sample (zip, 605 KB)</a><br /></div><br /></div><div><h3>06/01/2007 - GLM 0.5.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/CatmullClark.zip?download">CatmullClark sample (zip, 605 KB)</a><br /></div><br /></div><div><h3>06/01/2007 - GLM 0.5.0 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
It includes some new extensions to extend GLSL features but they remain experimental. The next release should provide the first stable extensions.
|
It includes some new extensions to extend GLSL features but they remain experimental. The next release should provide the first stable extensions.
|
||||||
@ -286,39 +302,39 @@
|
|||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
Now, GLM development is taking advantages of <a href="http://www.sf.net">SourceForge.net</a> services: a <a href="https://sourceforge.net/tracker/?group_id=129808&atid=901445">bug tracker system</a> and the development source code is publicly available on <a href="https://svn.sourceforge.net/svnroot/glf">SF.net SVN server</a>.
|
Now, GLM development is taking advantages of <a href="http://www.sf.net">SourceForge.net</a> services: a <a href="https://sourceforge.net/tracker/?group_id=129808&atid=901445">bug tracker system</a> and the development source code is publicly available on <a href="https://svn.sourceforge.net/svnroot/glf">SF.net SVN server</a>.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.0.zip?download">GLM 0.5.0 (zip, 2.4 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.0.7z?download">GLM 0.5.0 (7z, 843 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b3.0.exe?download">Raytracer b3.0 (exe, 751 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b3.0.zip?download">Raytracer b3.0 (zip, 1.1 MB)</a><br /></div><br /></div><div><h3>22/05/2006 - GLM 0.4.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.0.zip?download">GLM 0.5.0 (zip, 2.4 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.5.0.7z?download">GLM 0.5.0 (7z, 843 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b3.0.exe?download">Raytracer b3.0 (exe, 751 KB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b3.0.zip?download">Raytracer b3.0 (zip, 1.1 MB)</a><br /></div><br /></div><div><h3>22/05/2006 - GLM 0.4.1 released</h3><div>Groove<p>
|
||||||
A GLM update is available. It simply includes some examples for a sweet start with GLM.
|
A GLM update is available. It simply includes some examples for a sweet start with GLM.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.1.zip?download">GLM 0.4.1 (zip, 1.6 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.1.7z?download">GLM 0.4.1 (7z, 521 KB)</a><br /></div><br /></div><div><h3>17/05/2006 - GLM 0.4.0 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.1.zip?download">GLM 0.4.1 (zip, 1.6 MB)</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.1.7z?download">GLM 0.4.1 (7z, 521 KB)</a><br /></div><br /></div><div><h3>17/05/2006 - GLM 0.4.0 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.0.zip?download">GLM 0.4.0</a><br /></div><br /></div><div><h3>23/04/2006 - Roadmap for the years</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.4.0.zip?download">GLM 0.4.0</a><br /></div><br /></div><div><h3>23/04/2006 - Roadmap for the years</h3><div>Groove<p>
|
||||||
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.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.
|
||||||
</p><p>
|
</p><p>
|
||||||
Version 0.5 will integrate GLSL 1.2 features to GLM core.
|
Version 0.5 will integrate GLSL 1.2 features to GLM core.
|
||||||
</p><p>
|
</p><p>
|
||||||
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;).
|
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;).
|
||||||
</p></div><br /></div><div><h3>22/04/2006 - GLM 0.3.2 released</h3><div><p>
|
</p></div><br /></div><div><h3>22/04/2006 - GLM 0.3.2 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.2.zip?download">GLM 0.3.2</a><br /></div><br /></div><div><h3>28/03/2006 - GLM 0.3.1 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.2.zip?download">GLM 0.3.2</a><br /></div><br /></div><div><h3>28/03/2006 - GLM 0.3.1 released</h3><div>Groove<p>
|
||||||
This update adds GCC 4.0 support for MacOS X and Linux and GCC 4.1 under Linux. Also, its provides some optimisations.
|
This update adds GCC 4.0 support for MacOS X and Linux and GCC 4.1 under Linux. Also, its provides some optimisations.
|
||||||
</p><p>
|
</p><p>
|
||||||
Further release will prodive GLSL 1.2 compliances.
|
Further release will prodive GLSL 1.2 compliances.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.1.zip?download">GLM 0.3.1</a><br /></div><br /></div><div><h3>19/02/2006 - GLM 0.3 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.1.zip?download">GLM 0.3.1</a><br /></div><br /></div><div><h3>19/02/2006 - GLM 0.3 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
This new release have been tested under Visual C++ 7.1, Visual C++ 8.0, GCC 3.2.3 et GCC 3.4.2.
|
This new release have been tested under Visual C++ 7.1, Visual C++ 8.0, GCC 3.2.3 et GCC 3.4.2.
|
||||||
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.zip?download">GLM 0.3</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b2.0.zip?download">Raytrace</a><br />Documentation: <a href="../html/index.html">Online documentation</a><br /></div><br /></div><div><h3>06/05/2005 - GLM 0.2 released</h3><div><p>
|
</p>Download: <a href="http://prdownloads.sourceforge.net/glf/glm-0.3.zip?download">GLM 0.3</a><br />Download: <a href="http://prdownloads.sourceforge.net/glf/raytrace-b2.0.zip?download">Raytrace</a><br />Documentation: <a href="../html/index.html">Online documentation</a><br /></div><br /></div><div><h3>06/05/2005 - GLM 0.2 released</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
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.
|
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.
|
||||||
</p></div><br /></div><div><h3>04/05/2005 - English pages</h3><div><p>
|
</p></div><br /></div><div><h3>04/05/2005 - English pages</h3><div>Groove<p>
|
||||||
The english section of this site is now available.
|
The english section of this site is now available.
|
||||||
</p></div><br /></div><div><h3>21/02/2005 - GLM 0.1 is available</h3><div><p>
|
</p></div><br /></div><div><h3>21/02/2005 - GLM 0.1 is available</h3><div>Groove<p>
|
||||||
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.
|
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.
|
||||||
</p><p>
|
</p><p>
|
||||||
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".
|
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".
|
||||||
|
@ -3,16 +3,18 @@
|
|||||||
<glm copyright="Copyright © 2005 - 2011">
|
<glm copyright="Copyright © 2005 - 2011">
|
||||||
<downloads>
|
<downloads>
|
||||||
<section name="GLM - zip files">
|
<section name="GLM - zip files">
|
||||||
<download name="GLM 0.9.2.1" date="24/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download"/>
|
<download name="GLM 0.9.2.3" date="08/06/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download"/>
|
||||||
<download name="GLM 0.9.2.0" date="08/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download"/>
|
<download name="GLM 0.9.2.2" date="02/06/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download"/>
|
||||||
<download name="GLM 0.9.1.3" date="07/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
|
<download name="GLM 0.9.2.1" date="24/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.zip/download"/>
|
||||||
<download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
|
<download name="GLM 0.9.2.0" date="08/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.zip/download"/>
|
||||||
<download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
|
<download name="GLM 0.9.1.3" date="07/05/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
|
||||||
<download name="GLM 0.9.1.0" date="03/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
|
<download name="GLM 0.9.1.2" date="12/04/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
|
||||||
<download name="GLM 0.9.1.B" date="13/02/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
|
<download name="GLM 0.9.1.1" date="17/03/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
|
||||||
<download name="GLM 0.9.0.8" date="13/02/2010" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
|
<download name="GLM 0.9.1.0" date="03/03/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
|
||||||
<download name="GLM 0.9.1.A" date="31/01/2010" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/>
|
<download name="GLM 0.9.1.B" date="13/02/2011" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
|
||||||
<download name="GLM 0.9.0.7" date="30/01/2010" size="1.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download"/>
|
<download name="GLM 0.9.0.8" date="13/02/2011" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
|
||||||
|
<download name="GLM 0.9.1.A" date="31/01/2011" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/>
|
||||||
|
<download name="GLM 0.9.0.7" date="30/01/2011" size="1.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.7/glm-0.9.0.7.zip/download"/>
|
||||||
<download name="GLM 0.9.0.6" date="21/12/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.6/glm-0.9.0.6.zip/download"/>
|
<download name="GLM 0.9.0.6" date="21/12/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.6/glm-0.9.0.6.zip/download"/>
|
||||||
<download name="GLM 0.9.0.5" date="01/11/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.5/glm-0.9.0.5.zip/download"/>
|
<download name="GLM 0.9.0.5" date="01/11/2010" size="2.2 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.5/glm-0.9.0.5.zip/download"/>
|
||||||
<download name="GLM 0.9.0.4" date="04/10/2010" size="1.5 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.4/glm-0.9.0.4.zip/download"/>
|
<download name="GLM 0.9.0.4" date="04/10/2010" size="1.5 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.4/glm-0.9.0.4.zip/download"/>
|
||||||
@ -64,6 +66,8 @@
|
|||||||
<download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
|
<download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
|
||||||
</section>
|
</section>
|
||||||
<section name="GLM - 7z files">
|
<section name="GLM - 7z files">
|
||||||
|
<download name="GLM 0.9.2.3" date="08/06/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.7z/download"/>
|
||||||
|
<download name="GLM 0.9.2.2" date="02/06/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download"/>
|
||||||
<download name="GLM 0.9.2.1" date="24/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.7z/download"/>
|
<download name="GLM 0.9.2.1" date="24/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.1/glm-0.9.2.1.7z/download"/>
|
||||||
<download name="GLM 0.9.2.0" date="08/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.7z/download"/>
|
<download name="GLM 0.9.2.0" date="08/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.0/glm-0.9.2.0.7z/download"/>
|
||||||
<download name="GLM 0.9.1.3" date="07/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download"/>
|
<download name="GLM 0.9.1.3" date="07/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download"/>
|
||||||
@ -152,6 +156,56 @@
|
|||||||
</todo>
|
</todo>
|
||||||
|
|
||||||
<page_news>
|
<page_news>
|
||||||
|
<news index="0068" date="08/06/2011" title="GLM 0.9.2.3 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||||
|
<paragraph>
|
||||||
|
This version only fixes a couple a major bugs introduced in GLM 0.9.2.2.
|
||||||
|
</paragraph>
|
||||||
|
|
||||||
|
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.zip/download">GLM 0.9.2.3 (zip)</source>
|
||||||
|
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.3/glm-0.9.2.3.7z/download">GLM 0.9.2.3 (7z)</source>
|
||||||
|
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
|
||||||
|
</news>
|
||||||
|
|
||||||
|
<news index="0067" date="02/06/2011" title="GLM 0.9.2.2 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||||
|
<paragraph>
|
||||||
|
The main improvement of this version comes from the extended number of matrix constructors so that a programmer can used different scalar types for each parameter.
|
||||||
|
</paragraph>
|
||||||
|
<code>
|
||||||
|
<line>
|
||||||
|
<keyword>#include </keyword>
|
||||||
|
<string><glm/glm.hpp></string>
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
<comment>// Create an identity matrix</comment>
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
glm::mat3 m(
|
||||||
|
</line>
|
||||||
|
<line align="32px">
|
||||||
|
1, 0.0, 0,
|
||||||
|
</line>
|
||||||
|
<line align="32px">
|
||||||
|
0.0, 1.0, 0.0f,
|
||||||
|
</line>
|
||||||
|
<line align="32px">
|
||||||
|
0, 0.0, 1.0f);
|
||||||
|
</line>
|
||||||
|
</code>
|
||||||
|
<paragraph>
|
||||||
|
The quaternion implementation has been updated as well, fixing the various slerp implementation flavours (mix, shortMix and fastMix) and providing more completeness: Added interaction with GLM_GTX_epsilon and missing lowp_quat, mediump_quat and highp_quat but also none square matrix equivalents.
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
Finally, some efforts have been put to remove warnings across all supported compilers.
|
||||||
|
</paragraph>
|
||||||
|
|
||||||
|
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.zip/download">GLM 0.9.2.2 (zip)</source>
|
||||||
|
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.2.2/glm-0.9.2.2.7z/download">GLM 0.9.2.2 (7z)</source>
|
||||||
|
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
|
||||||
|
</news>
|
||||||
|
|
||||||
<news index="0066" date="24/05/2011" title="GLM 0.9.2.1 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
<news index="0066" date="24/05/2011" title="GLM 0.9.2.1 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||||
<paragraph>
|
<paragraph>
|
||||||
GLM 0.9.2.1 significantly improves compiler detection which allows CUDA to be automatically recognized when GLM is used inside a CUDA kernel.
|
GLM 0.9.2.1 significantly improves compiler detection which allows CUDA to be automatically recognized when GLM is used inside a CUDA kernel.
|
||||||
|
@ -60,10 +60,7 @@
|
|||||||
<xsl:value-of select="./@title" />
|
<xsl:value-of select="./@title" />
|
||||||
</h3>
|
</h3>
|
||||||
<div>
|
<div>
|
||||||
<xsl:apply-templates select="./paragraph" />
|
<xsl:apply-templates />
|
||||||
<xsl:apply-templates select="./list" />
|
|
||||||
<xsl:apply-templates select="./code" />
|
|
||||||
<xsl:apply-templates select="./source" />
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
@ -171,20 +171,22 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="code">
|
<xsl:template match="code">
|
||||||
<xsl:choose>
|
<xsl:if test="./@title">
|
||||||
<xsl:when test="./@href">
|
<xsl:choose>
|
||||||
<span xmlns="http://www.w3.org/1999/xhtml" class="code-title">
|
<xsl:when test="./@href">
|
||||||
<a href="{./@href}">
|
<span xmlns="http://www.w3.org/1999/xhtml" class="code-title">
|
||||||
<xsl:value-of select="./@author" />
|
<a href="{./@href}">
|
||||||
</a>
|
<xsl:value-of select="./@title" />
|
||||||
</span>
|
</a>
|
||||||
</xsl:when>
|
</span>
|
||||||
<xsl:otherwise>
|
</xsl:when>
|
||||||
<span xmlns="http://www.w3.org/1999/xhtml" class="code-title">
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="./@title" />
|
<span xmlns="http://www.w3.org/1999/xhtml" class="code-title">
|
||||||
</span>
|
<xsl:value-of select="./@title" />
|
||||||
</xsl:otherwise>
|
</span>
|
||||||
</xsl:choose>
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
<ul xmlns="http://www.w3.org/1999/xhtml" class="code-list">
|
<ul xmlns="http://www.w3.org/1999/xhtml" class="code-list">
|
||||||
<xsl:apply-templates select="./line" />
|
<xsl:apply-templates select="./line" />
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 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__
|
|
@ -14,14 +14,9 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_common();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace.
|
namespace common{ //!< Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||||
namespace common{
|
|
||||||
|
|
||||||
/// \addtogroup core_funcs
|
/// \addtogroup core_funcs
|
||||||
///@{
|
///@{
|
||||||
@ -330,7 +325,6 @@ namespace glm
|
|||||||
genType ldexp(genType const & x, genIType const & exp);
|
genType ldexp(genType const & x, genIType const & exp);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
}//namespace common
|
}//namespace common
|
||||||
}//namespace function
|
}//namespace function
|
||||||
}//namespace core
|
}//namespace core
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_exponential();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace.
|
//! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||||
|
@ -12,14 +12,9 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_geometric();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace.
|
namespace geometric{ //!< Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||||
namespace geometric{
|
|
||||||
|
|
||||||
/// \addtogroup core_funcs
|
/// \addtogroup core_funcs
|
||||||
///@{
|
///@{
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_integer();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define integer functions from Section 8.8 of GLSL 4.00.8 specification.
|
//! Define integer functions from Section 8.8 of GLSL 4.00.8 specification.
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_matrix();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace.
|
//! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_noise();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
// Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace.
|
// Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace.
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_packing();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification
|
//! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_trigonometric();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define Angle and trigonometry functions
|
//! Define Angle and trigonometry functions
|
||||||
|
@ -14,10 +14,6 @@
|
|||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test{
|
|
||||||
void main_core_func_vector_relational();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace function{
|
namespace function{
|
||||||
//! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification.
|
//! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification.
|
||||||
|
@ -21,107 +21,107 @@ namespace detail{
|
|||||||
ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
|
ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const __m128 zero = _mm_setzero_ps();
|
static const __m128 GLM_VAR_USED zero = _mm_setzero_ps();
|
||||||
static const __m128 one = _mm_set_ps1(1.0f);
|
static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);
|
||||||
static const __m128 minus_one = _mm_set_ps1(-1.0f);
|
static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);
|
||||||
static const __m128 two = _mm_set_ps1(2.0f);
|
static const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f);
|
||||||
static const __m128 three = _mm_set_ps1(3.0f);
|
static const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f);
|
||||||
static const __m128 pi = _mm_set_ps1(3.1415926535897932384626433832795f);
|
static const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f);
|
||||||
static const __m128 hundred_eighty = _mm_set_ps1(180.f);
|
static const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f);
|
||||||
static const __m128 pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);
|
static const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);
|
||||||
static const __m128 hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);
|
static const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);
|
||||||
|
|
||||||
static const ieee754_QNAN absMask;
|
static const ieee754_QNAN absMask;
|
||||||
static const __m128 abs4Mask = _mm_set_ps1(absMask.f);
|
static const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f);
|
||||||
|
|
||||||
static const __m128 _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
|
static const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000));
|
||||||
//static const __m128 _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));
|
//static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));
|
||||||
//static const __m128 _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
|
//static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
|
||||||
//static const __m128 _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
|
//static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
|
||||||
//static const __m128 _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));
|
//static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));
|
||||||
static const __m128 _epi32_0 = _mm_set_ps1(0);
|
static const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0);
|
||||||
static const __m128 _epi32_1 = _mm_set_ps1(1);
|
static const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1);
|
||||||
static const __m128 _epi32_2 = _mm_set_ps1(2);
|
static const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2);
|
||||||
static const __m128 _epi32_3 = _mm_set_ps1(3);
|
static const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3);
|
||||||
static const __m128 _epi32_4 = _mm_set_ps1(4);
|
static const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4);
|
||||||
static const __m128 _epi32_5 = _mm_set_ps1(5);
|
static const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5);
|
||||||
static const __m128 _epi32_6 = _mm_set_ps1(6);
|
static const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6);
|
||||||
static const __m128 _epi32_7 = _mm_set_ps1(7);
|
static const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7);
|
||||||
static const __m128 _epi32_8 = _mm_set_ps1(8);
|
static const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8);
|
||||||
static const __m128 _epi32_9 = _mm_set_ps1(9);
|
static const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9);
|
||||||
static const __m128 _epi32_127 = _mm_set_ps1(127);
|
static const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127);
|
||||||
//static const __m128 _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));
|
//static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));
|
||||||
//static const __m128 _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
|
//static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
|
||||||
|
|
||||||
static const __m128 _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);
|
static const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);
|
||||||
static const __m128 _ps_0p5 = _mm_set_ps1(0.5f);
|
static const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f);
|
||||||
static const __m128 _ps_1 = _mm_set_ps1(1.0f);
|
static const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f);
|
||||||
static const __m128 _ps_m1 = _mm_set_ps1(-1.0f);
|
static const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f);
|
||||||
static const __m128 _ps_2 = _mm_set_ps1(2.0f);
|
static const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f);
|
||||||
static const __m128 _ps_3 = _mm_set_ps1(3.0f);
|
static const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f);
|
||||||
static const __m128 _ps_127 = _mm_set_ps1(127.0f);
|
static const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f);
|
||||||
static const __m128 _ps_255 = _mm_set_ps1(255.0f);
|
static const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f);
|
||||||
static const __m128 _ps_2pow23 = _mm_set_ps1(8388608.0f);
|
static const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f);
|
||||||
|
|
||||||
static const __m128 _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
|
static const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
|
||||||
static const __m128 _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);
|
static const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);
|
||||||
static const __m128 _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);
|
static const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);
|
||||||
static const __m128 _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);
|
static const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
|
||||||
static const __m128 _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);
|
static const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);
|
||||||
static const __m128 _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);
|
static const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);
|
||||||
static const __m128 _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);
|
static const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);
|
||||||
static const __m128 _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);
|
static const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);
|
||||||
static const __m128 _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);
|
static const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);
|
||||||
static const __m128 _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);
|
static const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);
|
||||||
|
|
||||||
static const __m128 _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);
|
static const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);
|
||||||
static const __m128 _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);
|
static const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);
|
||||||
static const __m128 _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);
|
static const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);
|
||||||
static const __m128 _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);
|
static const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);
|
||||||
static const __m128 _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);
|
static const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);
|
||||||
static const __m128 _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);
|
static const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);
|
||||||
static const __m128 _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);
|
static const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);
|
||||||
static const __m128 _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);
|
static const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);
|
||||||
static const __m128 _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);
|
static const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);
|
||||||
static const __m128 _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);
|
static const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);
|
||||||
static const __m128 _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);
|
static const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);
|
||||||
static const __m128 _ps_tan_poleval = _mm_set_ps1(3.68935e19f);
|
static const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f);
|
||||||
static const __m128 _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);
|
static const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);
|
||||||
static const __m128 _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);
|
static const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);
|
||||||
static const __m128 _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);
|
static const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);
|
||||||
static const __m128 _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);
|
static const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);
|
||||||
static const __m128 _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);
|
static const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);
|
||||||
static const __m128 _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);
|
static const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);
|
||||||
static const __m128 _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);
|
static const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);
|
||||||
static const __m128 _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);
|
static const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);
|
||||||
|
|
||||||
static const __m128 _ps_exp_hi = _mm_set_ps1(88.3762626647949f);
|
static const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f);
|
||||||
static const __m128 _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);
|
static const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);
|
||||||
static const __m128 _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);
|
static const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);
|
||||||
static const __m128 _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);
|
static const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);
|
||||||
static const __m128 _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);
|
static const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);
|
||||||
static const __m128 _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);
|
static const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);
|
||||||
static const __m128 _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);
|
static const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);
|
||||||
static const __m128 _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);
|
static const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);
|
||||||
static const __m128 _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);
|
static const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);
|
||||||
static const __m128 _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);
|
static const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);
|
||||||
static const __m128 _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);
|
static const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);
|
||||||
static const __m128 _ps_exp2_hi = _mm_set_ps1(127.4999961853f);
|
static const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f);
|
||||||
static const __m128 _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);
|
static const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);
|
||||||
static const __m128 _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);
|
static const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);
|
||||||
static const __m128 _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);
|
static const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);
|
||||||
static const __m128 _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);
|
static const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);
|
||||||
static const __m128 _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);
|
static const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);
|
||||||
static const __m128 _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);
|
static const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);
|
||||||
static const __m128 _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);
|
static const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);
|
||||||
static const __m128 _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);
|
static const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);
|
||||||
static const __m128 _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);
|
static const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);
|
||||||
static const __m128 _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);
|
static const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);
|
||||||
static const __m128 _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);
|
static const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);
|
||||||
static const __m128 _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);
|
static const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);
|
||||||
static const __m128 _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
|
static const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
|
||||||
static const __m128 _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
|
static const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)
|
GLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)
|
||||||
{
|
{
|
||||||
@ -207,7 +207,8 @@ GLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)
|
|||||||
/// TODO
|
/// TODO
|
||||||
GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
|
GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
|
||||||
{
|
{
|
||||||
return __m128();
|
__m128 empty;
|
||||||
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
|
//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
|
||||||
@ -252,14 +253,18 @@ GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
|
|||||||
return mul2;
|
return mul2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \todo
|
||||||
GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
|
GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
|
||||||
{
|
{
|
||||||
|
__m128 empty;
|
||||||
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \todo
|
||||||
GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
|
GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
|
||||||
{
|
{
|
||||||
|
__m128 empty;
|
||||||
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
|
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail{
|
namespace detail{
|
||||||
|
|
||||||
static const __m128 _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);
|
static const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);
|
||||||
static const __m128 _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
|
static const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
|
||||||
|
|
||||||
template <typename matType>
|
template <typename matType>
|
||||||
GLM_FUNC_QUALIFIER matType sse_comp_mul_ps
|
GLM_FUNC_QUALIFIER matType sse_comp_mul_ps
|
||||||
@ -968,7 +968,7 @@ GLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
|
|||||||
out[2] = _mm_mul_ps(Inv2, Rcp0);
|
out[2] = _mm_mul_ps(Inv2, Rcp0);
|
||||||
out[3] = _mm_mul_ps(Inv3, Rcp0);
|
out[3] = _mm_mul_ps(Inv3, Rcp0);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
|
GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
|
||||||
{
|
{
|
||||||
float a = glm::radians(Angle);
|
float a = glm::radians(Angle);
|
||||||
@ -1038,7 +1038,7 @@ GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float con
|
|||||||
//return Result;
|
//return Result;
|
||||||
sse_mul_ps(in, Result, out);
|
sse_mul_ps(in, Result, out);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
GLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
|
GLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
|
||||||
{
|
{
|
||||||
out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));
|
out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
#define GLM_VERSION_MAJOR 0
|
#define GLM_VERSION_MAJOR 0
|
||||||
#define GLM_VERSION_MINOR 9
|
#define GLM_VERSION_MINOR 9
|
||||||
#define GLM_VERSION_PATCH 2
|
#define GLM_VERSION_PATCH 2
|
||||||
#define GLM_VERSION_REVISION 2
|
#define GLM_VERSION_REVISION 3
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Compiler
|
// Compiler
|
||||||
@ -43,8 +42,8 @@
|
|||||||
|
|
||||||
// GCC defines
|
// GCC defines
|
||||||
#define GLM_COMPILER_GCC 0x02000000
|
#define GLM_COMPILER_GCC 0x02000000
|
||||||
#define GLM_COMPILER_GCC_LLVM 0x02000000
|
#define GLM_COMPILER_GCC_LLVM 0x02000001
|
||||||
#define GLM_COMPILER_GCC_CLANG 0x02000000
|
#define GLM_COMPILER_GCC_CLANG 0x02000002
|
||||||
#define GLM_COMPILER_GCC30 0x02000010
|
#define GLM_COMPILER_GCC30 0x02000010
|
||||||
#define GLM_COMPILER_GCC31 0x02000020
|
#define GLM_COMPILER_GCC31 0x02000020
|
||||||
#define GLM_COMPILER_GCC32 0x02000030
|
#define GLM_COMPILER_GCC32 0x02000030
|
||||||
@ -214,9 +213,9 @@
|
|||||||
# elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
|
# elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
|
||||||
# pragma message("GLM: LLVM GCC compiler detected")
|
# pragma message("GLM: LLVM GCC compiler detected")
|
||||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||||
# if(GLM_COMPILER & GLM_COMPILER_GCC_LLVM)
|
# if(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)
|
||||||
# pragma message("GLM: LLVM GCC compiler detected")
|
# pragma message("GLM: LLVM GCC compiler detected")
|
||||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC_CLANG)
|
# elif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)
|
||||||
# pragma message("GLM: CLANG compiler detected")
|
# pragma message("GLM: CLANG compiler detected")
|
||||||
# else
|
# else
|
||||||
# pragma message("GLM: GCC compiler detected")
|
# pragma message("GLM: GCC compiler detected")
|
||||||
@ -441,6 +440,12 @@
|
|||||||
# define GLM_CUDA_FUNC_DECL
|
# define GLM_CUDA_FUNC_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
|
#define GLM_VAR_USED __attribute__ ((unused))
|
||||||
|
#else
|
||||||
|
#define GLM_VAR_USED
|
||||||
|
#endif
|
||||||
|
|
||||||
#if(defined(GLM_FORCE_INLINE))
|
#if(defined(GLM_FORCE_INLINE))
|
||||||
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
||||||
# define GLM_INLINE __forceinline
|
# define GLM_INLINE __forceinline
|
||||||
|
@ -12,74 +12,65 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
typedef short hdata;
|
||||||
|
|
||||||
|
float toFloat32(hdata value);
|
||||||
|
hdata toFloat16(float const & value);
|
||||||
|
|
||||||
|
///16-bit floating point type.
|
||||||
|
/// \ingroup gtc_half_float
|
||||||
|
class thalf
|
||||||
{
|
{
|
||||||
bool main_type_half();
|
public:
|
||||||
|
// Constructors
|
||||||
|
GLM_FUNC_DECL thalf();
|
||||||
|
GLM_FUNC_DECL thalf(thalf const & s);
|
||||||
|
|
||||||
}//namespace test
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit thalf(U const & s);
|
||||||
|
|
||||||
namespace detail
|
// Cast
|
||||||
{
|
//operator float();
|
||||||
typedef short hdata;
|
GLM_FUNC_DECL operator float() const;
|
||||||
|
//operator double();
|
||||||
|
//operator double() const;
|
||||||
|
|
||||||
float toFloat32(hdata value);
|
// Unary updatable operators
|
||||||
hdata toFloat16(float const & value);
|
GLM_FUNC_DECL thalf& operator= (thalf const & s);
|
||||||
|
GLM_FUNC_DECL thalf& operator+=(thalf const & s);
|
||||||
|
GLM_FUNC_DECL thalf& operator-=(thalf const & s);
|
||||||
|
GLM_FUNC_DECL thalf& operator*=(thalf const & s);
|
||||||
|
GLM_FUNC_DECL thalf& operator/=(thalf const & s);
|
||||||
|
GLM_FUNC_DECL thalf& operator++();
|
||||||
|
GLM_FUNC_DECL thalf& operator--();
|
||||||
|
|
||||||
///16-bit floating point type.
|
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
|
||||||
/// \ingroup gtc_half_float
|
|
||||||
class thalf
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// Constructors
|
|
||||||
GLM_FUNC_DECL thalf();
|
|
||||||
GLM_FUNC_DECL thalf(thalf const & s);
|
|
||||||
|
|
||||||
template <typename U>
|
GLM_FUNC_DECL hdata _data() const{return data;}
|
||||||
GLM_FUNC_DECL explicit thalf(U const & s);
|
|
||||||
|
|
||||||
// Cast
|
private:
|
||||||
//operator float();
|
hdata data;
|
||||||
GLM_FUNC_DECL operator float() const;
|
};
|
||||||
//operator double();
|
|
||||||
//operator double() const;
|
|
||||||
|
|
||||||
// Unary updatable operators
|
thalf operator+ (thalf const & s1, thalf const & s2);
|
||||||
GLM_FUNC_DECL thalf& operator= (thalf const & s);
|
|
||||||
GLM_FUNC_DECL thalf& operator+=(thalf const & s);
|
|
||||||
GLM_FUNC_DECL thalf& operator-=(thalf const & s);
|
|
||||||
GLM_FUNC_DECL thalf& operator*=(thalf const & s);
|
|
||||||
GLM_FUNC_DECL thalf& operator/=(thalf const & s);
|
|
||||||
GLM_FUNC_DECL thalf& operator++();
|
|
||||||
GLM_FUNC_DECL thalf& operator--();
|
|
||||||
|
|
||||||
GLM_FUNC_DECL float toFloat() const{return toFloat32(data);}
|
thalf operator- (thalf const & s1, thalf const & s2);
|
||||||
|
|
||||||
GLM_FUNC_DECL hdata _data() const{return data;}
|
thalf operator* (thalf const & s1, thalf const & s2);
|
||||||
|
|
||||||
private:
|
thalf operator/ (thalf const & s1, thalf const & s2);
|
||||||
hdata data;
|
|
||||||
};
|
|
||||||
|
|
||||||
thalf operator+ (thalf const & s1, thalf const & s2);
|
// Unary constant operators
|
||||||
|
thalf operator- (thalf const & s);
|
||||||
|
|
||||||
thalf operator- (thalf const & s1, thalf const & s2);
|
thalf operator-- (thalf const & s, int);
|
||||||
|
|
||||||
thalf operator* (thalf const & s1, thalf const & s2);
|
|
||||||
|
|
||||||
thalf operator/ (thalf const & s1, thalf const & s2);
|
|
||||||
|
|
||||||
// Unary constant operators
|
|
||||||
thalf operator- (thalf const & s);
|
|
||||||
|
|
||||||
thalf operator-- (thalf const & s, int);
|
|
||||||
|
|
||||||
thalf operator++ (thalf const & s, int);
|
|
||||||
|
|
||||||
}//namespace detail
|
|
||||||
|
|
||||||
|
thalf operator++ (thalf const & s, int);
|
||||||
|
|
||||||
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#include "type_half.inl"
|
#include "type_half.inl"
|
||||||
|
@ -13,71 +13,66 @@
|
|||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
#include "_detail.hpp"
|
#include "_detail.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace detail
|
typedef signed short lowp_int_t;
|
||||||
{
|
typedef signed int mediump_int_t;
|
||||||
typedef signed short lowp_int_t;
|
typedef sint64 highp_int_t;
|
||||||
typedef signed int mediump_int_t;
|
|
||||||
typedef sint64 highp_int_t;
|
|
||||||
|
|
||||||
typedef unsigned short lowp_uint_t;
|
typedef unsigned short lowp_uint_t;
|
||||||
typedef unsigned int mediump_uint_t;
|
typedef unsigned int mediump_uint_t;
|
||||||
typedef uint64 highp_uint_t;
|
typedef uint64 highp_uint_t;
|
||||||
|
|
||||||
GLM_DETAIL_IS_INT(signed char);
|
GLM_DETAIL_IS_INT(signed char);
|
||||||
GLM_DETAIL_IS_INT(signed short);
|
GLM_DETAIL_IS_INT(signed short);
|
||||||
GLM_DETAIL_IS_INT(signed int);
|
GLM_DETAIL_IS_INT(signed int);
|
||||||
GLM_DETAIL_IS_INT(signed long);
|
GLM_DETAIL_IS_INT(signed long);
|
||||||
GLM_DETAIL_IS_INT(highp_int_t);
|
GLM_DETAIL_IS_INT(highp_int_t);
|
||||||
|
|
||||||
GLM_DETAIL_IS_UINT(unsigned char);
|
GLM_DETAIL_IS_UINT(unsigned char);
|
||||||
GLM_DETAIL_IS_UINT(unsigned short);
|
GLM_DETAIL_IS_UINT(unsigned short);
|
||||||
GLM_DETAIL_IS_UINT(unsigned int);
|
GLM_DETAIL_IS_UINT(unsigned int);
|
||||||
GLM_DETAIL_IS_UINT(unsigned long);
|
GLM_DETAIL_IS_UINT(unsigned long);
|
||||||
GLM_DETAIL_IS_UINT(highp_uint_t);
|
GLM_DETAIL_IS_UINT(highp_uint_t);
|
||||||
}
|
}//namespace detail
|
||||||
//namespace detail
|
|
||||||
|
|
||||||
namespace core{
|
namespace core{
|
||||||
namespace type{
|
namespace type{
|
||||||
|
namespace precision //!< Namespace for precision stuff.
|
||||||
|
{
|
||||||
|
//! Low precision signed integer.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::lowp_int_t lowp_int;
|
||||||
|
//! Medium precision signed integer.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::mediump_int_t mediump_int;
|
||||||
|
//! High precision signed integer.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::highp_int_t highp_int;
|
||||||
|
|
||||||
///namespace for precision stuff.
|
//! Low precision unsigned integer.
|
||||||
namespace precision
|
//! There is no guarantee on the actual precision.
|
||||||
{
|
//! From GLSL 1.30.8 specification.
|
||||||
//! Low precision signed integer.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::lowp_uint_t lowp_uint;
|
||||||
//! From GLSL 1.30.8 specification.
|
//! Medium precision unsigned integer.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::lowp_int_t lowp_int;
|
//! From GLSL 1.30.8 specification.
|
||||||
//! Medium precision signed integer.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::mediump_uint_t mediump_uint;
|
||||||
//! From GLSL 1.30.8 specification.
|
//! High precision unsigned integer.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::mediump_int_t mediump_int;
|
//! From GLSL 1.30.8 specification.
|
||||||
//! High precision signed integer.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::highp_uint_t highp_uint;
|
||||||
//! From GLSL 1.30.8 specification.
|
}//namespace precision
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::highp_int_t highp_int;
|
|
||||||
|
|
||||||
//! Low precision unsigned integer.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::lowp_uint_t lowp_uint;
|
|
||||||
//! Medium precision unsigned integer.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::mediump_uint_t mediump_uint;
|
|
||||||
//! High precision unsigned integer.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::highp_uint_t highp_uint;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
|
#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef precision::mediump_int int_t;
|
typedef precision::mediump_int int_t;
|
||||||
@ -107,8 +102,8 @@ namespace glm
|
|||||||
//! From GLSL 1.30.8 specification section 4.1.3 Integers.
|
//! From GLSL 1.30.8 specification section 4.1.3 Integers.
|
||||||
typedef uint_t uint;
|
typedef uint_t uint;
|
||||||
|
|
||||||
}//namespace type
|
}//namespace type
|
||||||
}//namespace core
|
}//namespace core
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#endif//glm_core_type_int
|
#endif//glm_core_type_int
|
||||||
|
@ -12,276 +12,267 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 2 * 2 matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat2x2
|
||||||
{
|
{
|
||||||
void main_mat2x2();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec2<T> col_type;
|
||||||
|
typedef tvec2<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat2x2<T> type;
|
||||||
{
|
typedef tmat2x2<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 2 * 2 matrix of floating-point numbers.
|
public:
|
||||||
//! \ingroup core_template
|
// Implementation detail
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat2x2<T> _inverse() const;
|
||||||
struct tmat2x2
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec2<T> col_type;
|
|
||||||
typedef tvec2<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat2x2<T> type;
|
private:
|
||||||
typedef tmat2x2<T> transpose_type;
|
//////////////////////////////////////
|
||||||
|
// Data
|
||||||
|
col_type value[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation detail
|
//////////////////////////////////////
|
||||||
GLM_FUNC_DECL tmat2x2<T> _inverse() const;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat2x2();
|
||||||
|
GLM_FUNC_DECL tmat2x2(
|
||||||
|
tmat2x2 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
//////////////////////////////////////
|
ctor Null);
|
||||||
// Data
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
col_type value[2];
|
value_type const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
|
value_type const & x1, value_type const & y1,
|
||||||
|
value_type const & x2, value_type const & y2);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
//////////////////////////////////////
|
// Conversions
|
||||||
// Constructors
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x2();
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
GLM_FUNC_DECL tmat2x2(
|
U const & x);
|
||||||
tmat2x2 const & m);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
template <typename U, typename V, typename M, typename N>
|
||||||
ctor Null);
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
U const & x1, V const & y1,
|
||||||
value_type const & x);
|
M const & x2, N const & y2);
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
|
||||||
value_type const & x1, value_type const & y1,
|
|
||||||
value_type const & x2, value_type const & y2);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
template <typename U, typename V>
|
||||||
// Convertion constructors
|
GLM_FUNC_DECL explicit tmat2x2(
|
||||||
template <typename U>
|
tvec2<U> const & v1,
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
tvec2<V> const & v2);
|
||||||
U const & x);
|
|
||||||
|
|
||||||
template <typename U, typename V, typename M, typename N>
|
//////////////////////////////////////
|
||||||
GLM_FUNC_DECL explicit tmat2x2(
|
// Matrix conversions
|
||||||
U const & x1, V const & y1,
|
template <typename U>
|
||||||
M const & x2, N const & y2);
|
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);
|
||||||
|
|
||||||
//template <typename U, typename V, typename M, typename N>
|
GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T> const & x);
|
||||||
//GLM_FUNC_DECL explicit tmat2x2(
|
GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T> const & x);
|
||||||
// tvec2<U, V> const & v1,
|
GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T> const & x);
|
||||||
// tvec2<M, N> const & v2);
|
GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T> const & x);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Conversions
|
// Accesses
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U> const & m);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T> const & x);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T> const & x);
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
// Unary updatable operators
|
||||||
// Accesses
|
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<T> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m);
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator++();
|
||||||
|
GLM_FUNC_DECL tmat2x2<T> & operator--();
|
||||||
|
};
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
// Binary operators
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
template <typename T>
|
||||||
|
tmat2x2<T> operator+ (
|
||||||
|
tmat2x2<T> const & m,
|
||||||
|
typename tmat2x2<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary updatable operators
|
template <typename T>
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<T> const & m);
|
tmat2x2<T> operator+ (
|
||||||
template <typename U>
|
typename tmat2x2<T>::value_type const & s,
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m);
|
tmat2x2<T> const & m);
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m);
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator++();
|
|
||||||
GLM_FUNC_DECL tmat2x2<T> & operator--();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Binary operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat2x2<T> operator+ (
|
||||||
tmat2x2<T> operator+ (
|
tmat2x2<T> const & m1,
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m2);
|
||||||
typename tmat2x2<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator+ (
|
tmat2x2<T> operator- (
|
||||||
typename tmat2x2<T>::value_type const & s,
|
tmat2x2<T> const & m,
|
||||||
tmat2x2<T> const & m);
|
typename tmat2x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator+ (
|
tmat2x2<T> operator- (
|
||||||
tmat2x2<T> const & m1,
|
typename tmat2x2<T>::value_type const & s,
|
||||||
tmat2x2<T> const & m2);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator- (
|
tmat2x2<T> operator- (
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m1,
|
||||||
typename tmat2x2<T>::value_type const & s);
|
tmat2x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator- (
|
tmat2x2<T> operator* (
|
||||||
typename tmat2x2<T>::value_type const & s,
|
tmat2x2<T> const & m,
|
||||||
tmat2x2<T> const & m);
|
typename tmat2x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator- (
|
tmat2x2<T> operator* (
|
||||||
tmat2x2<T> const & m1,
|
typename tmat2x2<T>::value_type const & s,
|
||||||
tmat2x2<T> const & m2);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator* (
|
typename tmat2x2<T>::col_type operator* (
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m,
|
||||||
typename tmat2x2<T>::value_type const & s);
|
typename tmat2x2<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator* (
|
typename tmat2x2<T>::row_type operator* (
|
||||||
typename tmat2x2<T>::value_type const & s,
|
typename tmat2x2<T>::col_type const & v,
|
||||||
tmat2x2<T> const & m);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x2<T>::col_type operator* (
|
tmat2x2<T> operator* (
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m1,
|
||||||
typename tmat2x2<T>::row_type const & v);
|
tmat2x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x2<T>::row_type operator* (
|
tmat2x2<T> operator/ (
|
||||||
typename tmat2x2<T>::col_type const & v,
|
tmat2x2<T> const & m,
|
||||||
tmat2x2<T> const & m);
|
typename tmat2x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator* (
|
tmat2x2<T> operator/ (
|
||||||
tmat2x2<T> const & m1,
|
typename tmat2x2<T>::value_type const & s,
|
||||||
tmat2x2<T> const & m2);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator/ (
|
typename tmat2x2<T>::col_type operator/ (
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m,
|
||||||
typename tmat2x2<T>::value_type const & s);
|
typename tmat2x2<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator/ (
|
typename tmat2x2<T>::row_type operator/ (
|
||||||
typename tmat2x2<T>::value_type const & s,
|
typename tmat2x2<T>::col_type const & v,
|
||||||
tmat2x2<T> const & m);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x2<T>::col_type operator/ (
|
tmat2x2<T> operator/ (
|
||||||
tmat2x2<T> const & m,
|
tmat2x2<T> const & m1,
|
||||||
typename tmat2x2<T>::row_type const & v);
|
tmat2x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
typename tmat2x2<T>::row_type operator/ (
|
template <typename T>
|
||||||
typename tmat2x2<T>::col_type const & v,
|
tmat2x2<T> const operator- (
|
||||||
tmat2x2<T> const & m);
|
tmat2x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator/ (
|
tmat2x2<T> const operator-- (
|
||||||
tmat2x2<T> const & m1,
|
tmat2x2<T> const & m,
|
||||||
tmat2x2<T> const & m2);
|
int);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat2x2<T> const operator++ (
|
||||||
tmat2x2<T> const operator- (
|
tmat2x2<T> const & m,
|
||||||
tmat2x2<T> const & m);
|
int);
|
||||||
|
} //namespace detail
|
||||||
|
|
||||||
template <typename T>
|
namespace core{
|
||||||
tmat2x2<T> const operator-- (
|
namespace type{
|
||||||
tmat2x2<T> const & m,
|
namespace precision
|
||||||
int);
|
{
|
||||||
|
//! 2 columns of 2 components matrix of low precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x2<lowp_float> lowp_mat2;
|
||||||
|
|
||||||
template <typename T>
|
//! 2 columns of 2 components matrix of medium precision floating-point numbers.
|
||||||
tmat2x2<T> const operator++ (
|
//! There is no guarantee on the actual precision.
|
||||||
tmat2x2<T> const & m,
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
int);
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x2<mediump_float> mediump_mat2;
|
||||||
|
|
||||||
} //namespace detail
|
//! 2 columns of 2 components matrix of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x2<highp_float> highp_mat2;
|
||||||
|
|
||||||
namespace core{
|
//! 2 columns of 2 components matrix of low precision floating-point numbers.
|
||||||
namespace type{
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x2<lowp_float> lowp_mat2x2;
|
||||||
|
|
||||||
namespace precision
|
//! 2 columns of 2 components matrix of medium precision floating-point numbers.
|
||||||
{
|
//! There is no guarantee on the actual precision.
|
||||||
//! 2 columns of 2 components matrix of low precision floating-point numbers.
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! There is no guarantee on the actual precision.
|
//! \ingroup core_precision
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
typedef detail::tmat2x2<mediump_float> mediump_mat2x2;
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x2<lowp_float> lowp_mat2;
|
|
||||||
|
|
||||||
//! 2 columns of 2 components matrix of medium precision floating-point numbers.
|
//! 2 columns of 2 components matrix of high precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat2x2<mediump_float> mediump_mat2;
|
typedef detail::tmat2x2<highp_float> highp_mat2x2;
|
||||||
|
|
||||||
//! 2 columns of 2 components matrix of high precision floating-point numbers.
|
}//namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
}//namespace type
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
}//namespace core
|
||||||
//! \ingroup core_precision
|
}//namespace glm
|
||||||
typedef detail::tmat2x2<highp_float> highp_mat2;
|
|
||||||
|
|
||||||
//! 2 columns of 2 components matrix of low precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x2<lowp_float> lowp_mat2x2;
|
|
||||||
|
|
||||||
//! 2 columns of 2 components matrix of medium precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x2<mediump_float> mediump_mat2x2;
|
|
||||||
|
|
||||||
//! 2 columns of 2 components matrix of high precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x2<highp_float> highp_mat2x2;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
|
||||||
}//namespace core
|
|
||||||
} //namespace glm
|
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat2x2.inl"
|
#include "type_mat2x2.inl"
|
||||||
|
@ -122,31 +122,31 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U, typename V, typename M, typename N>
|
template <typename X1, typename Y1, typename X2, typename Y2>
|
||||||
GLM_FUNC_DECL tmat2x2<T>::tmat2x2
|
GLM_FUNC_DECL tmat2x2<T>::tmat2x2
|
||||||
(
|
(
|
||||||
U const & x1, V const & y1,
|
X1 const & x1, Y1 const & y1,
|
||||||
M const & x2, N const & y2
|
X2 const & x2, Y2 const & y2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(value_type(x1), value_type(y1));
|
this->value[0] = col_type(value_type(x1), value_type(y1));
|
||||||
this->value[1] = col_type(value_type(x2), value_type(y2));
|
this->value[1] = col_type(value_type(x2), value_type(y2));
|
||||||
}
|
}
|
||||||
|
|
||||||
//template <typename T>
|
template <typename T>
|
||||||
//template <typename U, typename V, typename M, typename N>
|
template <typename V1, typename V2>
|
||||||
//GLM_FUNC_DECL tmat2x2<T>::tmat2x2
|
GLM_FUNC_DECL tmat2x2<T>::tmat2x2
|
||||||
//(
|
(
|
||||||
// tvec2<U, V> const & v1,
|
tvec2<V1> const & v1,
|
||||||
// tvec2<M, N> const & v2
|
tvec2<V2> const & v2
|
||||||
//)
|
)
|
||||||
//{
|
{
|
||||||
// this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
// this->value[1] = col_type(v2);
|
this->value[1] = col_type(v2);
|
||||||
//}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// mat2x2 conversions
|
// mat2x2 matrix conversions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -12,204 +12,213 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat2x3
|
||||||
{
|
{
|
||||||
void main_mat2x3();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec3<T> col_type;
|
||||||
|
typedef tvec2<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat2x3<T> type;
|
||||||
{
|
typedef tmat3x2<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[2];
|
||||||
struct tmat2x3
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec3<T> col_type;
|
|
||||||
typedef tvec2<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat2x3<T> type;
|
public:
|
||||||
typedef tmat3x2<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat2x3();
|
||||||
|
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
// Data
|
ctor);
|
||||||
col_type value[2];
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1);
|
||||||
|
|
||||||
public:
|
|
||||||
// Constructors
|
|
||||||
GLM_FUNC_DECL tmat2x3();
|
|
||||||
GLM_FUNC_DECL tmat2x3(tmat2x3 const & m);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(
|
//////////////////////////////////////
|
||||||
ctor);
|
// Conversions
|
||||||
GLM_FUNC_DECL explicit tmat2x3(
|
template <typename U>
|
||||||
value_type const & s);
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
GLM_FUNC_DECL explicit tmat2x3(
|
U const & x);
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0,
|
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(
|
|
||||||
col_type const & v0,
|
|
||||||
col_type const & v1);
|
|
||||||
|
|
||||||
// Conversion
|
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
|
template <typename U, typename V>
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
|
GLM_FUNC_DECL explicit tmat2x3(
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
|
tvec3<U> const & v1,
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
|
tvec3<V> const & v2);
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
//////////////////////////////////////
|
||||||
col_type & operator[](size_type i);
|
// Matrix conversion
|
||||||
col_type const & operator[](size_type i) const;
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U> const & m);
|
||||||
|
|
||||||
// Unary updatable operators
|
GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
|
GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T> const & x);
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T> const & x);
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
|
GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T> const & x);
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T> const & x);
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
|
GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T> const & x);
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T> const & x);
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
|
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator++ ();
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat2x3<T> & operator-- ();
|
col_type & operator[](size_type i);
|
||||||
};
|
col_type const & operator[](size_type i) const;
|
||||||
|
|
||||||
// Binary operators
|
// Unary updatable operators
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
|
||||||
tmat2x3<T> operator+ (
|
template <typename U>
|
||||||
tmat2x3<T> const & m,
|
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
|
||||||
typename tmat2x3<T>::value_type const & s);
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s);
|
||||||
|
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat2x3<T> & operator++ ();
|
||||||
tmat2x3<T> operator+ (
|
GLM_FUNC_DECL tmat2x3<T> & operator-- ();
|
||||||
tmat2x3<T> const & m1,
|
};
|
||||||
tmat2x3<T> const & m2);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat2x3<T> operator- (
|
template <typename T>
|
||||||
tmat2x3<T> const & m,
|
tmat2x3<T> operator+ (
|
||||||
typename tmat2x3<T>::value_type const & s);
|
tmat2x3<T> const & m,
|
||||||
|
typename tmat2x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> operator- (
|
tmat2x3<T> operator+ (
|
||||||
tmat2x3<T> const & m1,
|
tmat2x3<T> const & m1,
|
||||||
tmat2x3<T> const & m2);
|
tmat2x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> operator* (
|
tmat2x3<T> operator- (
|
||||||
tmat2x3<T> const & m,
|
tmat2x3<T> const & m,
|
||||||
typename tmat2x3<T>::value_type const & s);
|
typename tmat2x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> operator* (
|
tmat2x3<T> operator- (
|
||||||
typename tmat2x3<T>::value_type const & s,
|
tmat2x3<T> const & m1,
|
||||||
tmat2x3<T> const & m);
|
tmat2x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x3<T>::col_type operator* (
|
tmat2x3<T> operator* (
|
||||||
tmat2x3<T> const & m,
|
tmat2x3<T> const & m,
|
||||||
typename tmat2x3<T>::row_type const & v);
|
typename tmat2x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x3<T>::row_type operator* (
|
tmat2x3<T> operator* (
|
||||||
typename tmat2x3<T>::col_type const & v,
|
typename tmat2x3<T>::value_type const & s,
|
||||||
tmat2x3<T> const & m);
|
tmat2x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator* (
|
typename tmat2x3<T>::col_type operator* (
|
||||||
tmat2x3<T> const & m1,
|
tmat2x3<T> const & m,
|
||||||
tmat3x2<T> const & m2);
|
typename tmat2x3<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> operator/ (
|
typename tmat2x3<T>::row_type operator* (
|
||||||
tmat2x3<T> const & m,
|
typename tmat2x3<T>::col_type const & v,
|
||||||
typename tmat2x3<T>::value_type const & s);
|
tmat2x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> operator/ (
|
tmat3x3<T> operator* (
|
||||||
typename tmat2x3<T>::value_type const & s,
|
tmat2x3<T> const & m1,
|
||||||
tmat2x3<T> const & m);
|
tmat3x2<T> const & m2);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat2x3<T> operator/ (
|
||||||
tmat2x3<T> const operator- (
|
tmat2x3<T> const & m,
|
||||||
tmat2x3<T> const & m);
|
typename tmat2x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x3<T> const operator-- (
|
tmat2x3<T> operator/ (
|
||||||
tmat2x3<T> const & m,
|
typename tmat2x3<T>::value_type const & s,
|
||||||
int);
|
tmat2x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat2x3<T> const operator++ (
|
template <typename T>
|
||||||
tmat2x3<T> const & m,
|
tmat2x3<T> const operator- (
|
||||||
int);
|
tmat2x3<T> const & m);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat2x3<T> const operator-- (
|
||||||
|
tmat2x3<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
template <typename T>
|
||||||
namespace type{
|
tmat2x3<T> const operator++ (
|
||||||
|
tmat2x3<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace precision
|
} //namespace detail
|
||||||
{
|
|
||||||
//! 2 columns of 3 components matrix of low precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x3<lowp_float> lowp_mat2x3;
|
|
||||||
//! 2 columns of 3 components matrix of medium precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x3<mediump_float> mediump_mat2x3;
|
|
||||||
//! 2 columns of 3 components matrix of high precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat2x3<highp_float> highp_mat2x3;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
namespace core{
|
||||||
}//namespace core
|
namespace type{
|
||||||
} //namespace glm
|
namespace precision
|
||||||
|
{
|
||||||
|
//! 2 columns of 3 components matrix of low precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x3<lowp_float> lowp_mat2x3;
|
||||||
|
//! 2 columns of 3 components matrix of medium precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x3<mediump_float> mediump_mat2x3;
|
||||||
|
//! 2 columns of 3 components matrix of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat2x3<highp_float> highp_mat2x3;
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat2x3.inl"
|
#include "type_mat2x3.inl"
|
||||||
|
@ -106,7 +106,49 @@ namespace detail
|
|||||||
this->value[1] = v1;
|
this->value[1] = v1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conversion
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T>::tmat2x3
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
|
||||||
|
this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1,
|
||||||
|
typename X2, typename Y2, typename Z2>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T>::tmat2x3
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2>
|
||||||
|
GLM_FUNC_DECL tmat2x3<T>::tmat2x3
|
||||||
|
(
|
||||||
|
tvec3<V1> const & v1,
|
||||||
|
tvec3<V2> const & v2
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Matrix conversions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
|
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
|
||||||
|
@ -12,201 +12,211 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! Template for 2 columns and 4 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat2x4
|
||||||
{
|
{
|
||||||
void main_mat2x4();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec4<T> col_type;
|
||||||
|
typedef tvec2<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat2x4<T> type;
|
||||||
{
|
typedef tmat4x2<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! Template for 2 columns and 4 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[2];
|
||||||
struct tmat2x4
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec4<T> col_type;
|
|
||||||
typedef tvec2<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat2x4<T> type;
|
public:
|
||||||
typedef tmat4x2<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat2x4();
|
||||||
|
GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
// Data
|
ctor);
|
||||||
col_type value[2];
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat2x4();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4(tmat2x4 const & m);
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(
|
template <
|
||||||
ctor);
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
GLM_FUNC_DECL explicit tmat2x4(
|
typename X2, typename Y2, typename Z2, typename W2>
|
||||||
value_type const & s);
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
GLM_FUNC_DECL explicit tmat2x4(
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(
|
|
||||||
col_type const & v0,
|
|
||||||
col_type const & v1);
|
|
||||||
|
|
||||||
// Conversion
|
template <typename U, typename V>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat2x4(
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
|
tvec4<U> const & v1,
|
||||||
|
tvec4<V> const & v2);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
|
//////////////////////////////////////
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
|
GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T> const & x);
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
template <typename U>
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator++ ();
|
// Unary updatable operators
|
||||||
GLM_FUNC_DECL tmat2x4<T>& operator-- ();
|
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<T> const & m);
|
||||||
};
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s);
|
||||||
|
|
||||||
// Binary operators
|
GLM_FUNC_DECL tmat2x4<T>& operator++ ();
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat2x4<T>& operator-- ();
|
||||||
tmat2x4<T> operator+ (
|
};
|
||||||
tmat2x4<T> const & m,
|
|
||||||
typename tmat2x4<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat2x4<T> operator+ (
|
template <typename T>
|
||||||
tmat2x4<T> const & m1,
|
tmat2x4<T> operator+ (
|
||||||
tmat2x4<T> const & m2);
|
tmat2x4<T> const & m,
|
||||||
|
typename tmat2x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator- (
|
tmat2x4<T> operator+ (
|
||||||
tmat2x4<T> const & m,
|
tmat2x4<T> const & m1,
|
||||||
typename tmat2x4<T>::value_type const & s);
|
tmat2x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator- (
|
tmat2x4<T> operator- (
|
||||||
tmat2x4<T> const & m1,
|
tmat2x4<T> const & m,
|
||||||
tmat2x4<T> const & m2);
|
typename tmat2x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator* (
|
tmat2x4<T> operator- (
|
||||||
tmat2x4<T> const & m,
|
tmat2x4<T> const & m1,
|
||||||
typename tmat2x4<T>::value_type const & s);
|
tmat2x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator* (
|
tmat2x4<T> operator* (
|
||||||
typename tmat2x4<T>::value_type const & s,
|
tmat2x4<T> const & m,
|
||||||
tmat2x4<T> const & m);
|
typename tmat2x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x4<T>::col_type operator* (
|
tmat2x4<T> operator* (
|
||||||
tmat2x4<T> const & m,
|
typename tmat2x4<T>::value_type const & s,
|
||||||
typename tmat2x4<T>::row_type const & v);
|
tmat2x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat2x4<T>::row_type operator* (
|
typename tmat2x4<T>::col_type operator* (
|
||||||
typename tmat2x4<T>::col_type const & v,
|
tmat2x4<T> const & m,
|
||||||
tmat2x4<T> const & m);
|
typename tmat2x4<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator* (
|
typename tmat2x4<T>::row_type operator* (
|
||||||
tmat2x4<T> const & m1,
|
typename tmat2x4<T>::col_type const & v,
|
||||||
tmat2x4<T> const & m2);
|
tmat2x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator/ (
|
tmat2x4<T> operator* (
|
||||||
tmat2x4<T> const & m,
|
tmat2x4<T> const & m1,
|
||||||
typename tmat2x4<T>::value_type const & s);
|
tmat2x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> operator/ (
|
tmat2x4<T> operator/ (
|
||||||
typename tmat2x4<T>::value_type const & s,
|
tmat2x4<T> const & m,
|
||||||
tmat2x4<T> const & m);
|
typename tmat2x4<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat2x4<T> operator/ (
|
||||||
tmat2x4<T> const operator- (
|
typename tmat2x4<T>::value_type const & s,
|
||||||
tmat2x4<T> const & m);
|
tmat2x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat2x4<T> const operator-- (
|
template <typename T>
|
||||||
tmat2x4<T> const & m,
|
tmat2x4<T> const operator- (
|
||||||
int);
|
tmat2x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x4<T> const operator++ (
|
tmat2x4<T> const operator-- (
|
||||||
tmat2x4<T> const & m,
|
tmat2x4<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat2x4<T> const operator++ (
|
||||||
|
tmat2x4<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
} //namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 2 columns of 4 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 2 columns of 4 components matrix of low precision floating-point numbers.
|
||||||
typedef detail::tmat2x4<lowp_float> lowp_mat2x4;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 2 columns of 4 components matrix of medium precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat2x4<lowp_float> lowp_mat2x4;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 2 columns of 4 components matrix of medium precision floating-point numbers.
|
||||||
typedef detail::tmat2x4<mediump_float> mediump_mat2x4;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 2 columns of 4 components matrix of high precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat2x4<mediump_float> mediump_mat2x4;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 2 columns of 4 components matrix of high precision floating-point numbers.
|
||||||
typedef detail::tmat2x4<highp_float> highp_mat2x4;
|
//! There is no guarantee on the actual precision.
|
||||||
}
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//namespace precision
|
typedef detail::tmat2x4<highp_float> highp_mat2x4;
|
||||||
|
}//namespace precision
|
||||||
}//namespace type
|
}//namespace type
|
||||||
}//namespace core
|
}//namespace core
|
||||||
} //namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat2x4.inl"
|
#include "type_mat2x4.inl"
|
||||||
|
@ -109,7 +109,49 @@ namespace detail
|
|||||||
this->value[1] = v1;
|
this->value[1] = v1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conversion
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>::tmat2x4
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
|
||||||
|
this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
|
typename X2, typename Y2, typename Z2, typename W2>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>::tmat2x4
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T>::tmat2x4
|
||||||
|
(
|
||||||
|
tvec4<V1> const & v1,
|
||||||
|
tvec4<V2> const & v2
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Matrix conversions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
|
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
|
||||||
|
@ -12,203 +12,217 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 3 columns and 2 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat3x2
|
||||||
{
|
{
|
||||||
void main_mat3x2();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec2<T> col_type;
|
||||||
|
typedef tvec3<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat3x2<T> type;
|
||||||
{
|
typedef tmat2x3<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 3 columns and 2 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[3];
|
||||||
struct tmat3x2
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec2<T> col_type;
|
|
||||||
typedef tvec3<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat3x2<T> type;
|
public:
|
||||||
typedef tmat2x3<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat3x2();
|
||||||
|
GLM_FUNC_DECL tmat3x2(tmat3x2 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
// Data
|
ctor);
|
||||||
col_type value[3];
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
|
value_type const & x0, value_type const & y0,
|
||||||
|
value_type const & x1, value_type const & y1,
|
||||||
|
value_type const & x2, value_type const & y2);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat3x2();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2(tmat3x2 const & m);
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(
|
template
|
||||||
ctor);
|
<
|
||||||
GLM_FUNC_DECL explicit tmat3x2(
|
typename X1, typename Y1,
|
||||||
value_type const & s);
|
typename X2, typename Y2,
|
||||||
GLM_FUNC_DECL explicit tmat3x2(
|
typename X3, typename Y3
|
||||||
value_type const & x0, value_type const & y0,
|
>
|
||||||
value_type const & x1, value_type const & y1,
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
value_type const & x2, value_type const & y2);
|
X1 const & x1, Y1 const & y1,
|
||||||
GLM_FUNC_DECL explicit tmat3x2(
|
X2 const & x2, Y2 const & y2,
|
||||||
col_type const & v0,
|
X3 const & x3, Y3 const & y3);
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2);
|
|
||||||
|
|
||||||
// Conversion
|
template <typename V1, typename V2, typename V3>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat3x2(
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);
|
tvec2<V1> const & v1,
|
||||||
|
tvec2<V2> const & v2,
|
||||||
|
tvec2<V3> const & v3);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T> const & x);
|
GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T> const & x);
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<T> const & m);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
template <typename U>
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator++ ();
|
// Unary updatable operators
|
||||||
GLM_FUNC_DECL tmat3x2<T> & operator-- ();
|
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<T> const & m);
|
||||||
};
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s);
|
||||||
|
|
||||||
// Binary operators
|
GLM_FUNC_DECL tmat3x2<T> & operator++ ();
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat3x2<T> & operator-- ();
|
||||||
tmat3x2<T> operator+ (
|
};
|
||||||
tmat3x2<T> const & m,
|
|
||||||
typename tmat3x2<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat3x2<T> operator+ (
|
template <typename T>
|
||||||
tmat3x2<T> const & m1,
|
tmat3x2<T> operator+ (
|
||||||
tmat3x2<T> const & m2);
|
tmat3x2<T> const & m,
|
||||||
|
typename tmat3x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator- (
|
tmat3x2<T> operator+ (
|
||||||
tmat3x2<T> const & m,
|
tmat3x2<T> const & m1,
|
||||||
typename tmat3x2<T>::value_type const & s);
|
tmat3x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator- (
|
tmat3x2<T> operator- (
|
||||||
tmat3x2<T> const & m1,
|
tmat3x2<T> const & m,
|
||||||
tmat3x2<T> const & m2);
|
typename tmat3x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator* (
|
tmat3x2<T> operator- (
|
||||||
tmat3x2<T> const & m,
|
tmat3x2<T> const & m1,
|
||||||
typename tmat3x2<T>::value_type const & s);
|
tmat3x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator* (
|
tmat3x2<T> operator* (
|
||||||
typename tmat3x2<T>::value_type const & s,
|
tmat3x2<T> const & m,
|
||||||
tmat3x2<T> const & m);
|
typename tmat3x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x2<T>::col_type operator* (
|
tmat3x2<T> operator* (
|
||||||
tmat3x2<T> const & m,
|
typename tmat3x2<T>::value_type const & s,
|
||||||
typename tmat3x2<T>::row_type const & v);
|
tmat3x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x2<T>::row_type operator* (
|
typename tmat3x2<T>::col_type operator* (
|
||||||
typename tmat3x2<T>::col_type const & v,
|
tmat3x2<T> const & m,
|
||||||
tmat3x2<T> const & m);
|
typename tmat3x2<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator* (
|
typename tmat3x2<T>::row_type operator* (
|
||||||
tmat3x2<T> const & m1,
|
typename tmat3x2<T>::col_type const & v,
|
||||||
tmat2x3<T> const & m2);
|
tmat3x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator/ (
|
tmat2x2<T> operator* (
|
||||||
tmat3x2<T> const & m,
|
tmat3x2<T> const & m1,
|
||||||
typename tmat3x2<T>::value_type const & s);
|
tmat2x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> operator/ (
|
tmat3x2<T> operator/ (
|
||||||
typename tmat3x2<T>::value_type const & s,
|
tmat3x2<T> const & m,
|
||||||
tmat3x2<T> const & m);
|
typename tmat3x2<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat3x2<T> operator/ (
|
||||||
tmat3x2<T> const operator- (
|
typename tmat3x2<T>::value_type const & s,
|
||||||
tmat3x2<T> const & m);
|
tmat3x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat3x2<T> const operator-- (
|
template <typename T>
|
||||||
tmat3x2<T> const & m,
|
tmat3x2<T> const operator- (
|
||||||
int);
|
tmat3x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x2<T> const operator++ (
|
tmat3x2<T> const operator-- (
|
||||||
tmat3x2<T> const & m,
|
tmat3x2<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat3x2<T> const operator++ (
|
||||||
|
tmat3x2<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
} //namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 3 columns of 2 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 2 components matrix of low precision floating-point numbers.
|
||||||
typedef detail::tmat3x2<lowp_float> lowp_mat3x2;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 3 columns of 2 components matrix of medium precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x2<lowp_float> lowp_mat3x2;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 2 components matrix of medium precision floating-point numbers.
|
||||||
typedef detail::tmat3x2<mediump_float> mediump_mat3x2;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 3 columns of 2 components matrix of high precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x2<mediump_float> mediump_mat3x2;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 2 components matrix of high precision floating-point numbers.
|
||||||
typedef detail::tmat3x2<highp_float> highp_mat3x2;
|
//! There is no guarantee on the actual precision.
|
||||||
}
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//namespace precision
|
typedef detail::tmat3x2<highp_float> highp_mat3x2;
|
||||||
|
}//namespace precision
|
||||||
}//namespace type
|
}//namespace type
|
||||||
}//namespace core
|
}//namespace core
|
||||||
} //namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat3x2.inl"
|
#include "type_mat3x2.inl"
|
||||||
|
@ -113,7 +113,55 @@ namespace detail
|
|||||||
this->value[2] = v2;
|
this->value[2] = v2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conversion
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T>::tmat3x2
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec2<T>(value_type(s), Zero);
|
||||||
|
this->value[1] = tvec2<T>(Zero, value_type(s));
|
||||||
|
this->value[2] = tvec2<T>(Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1,
|
||||||
|
typename X2, typename Y2,
|
||||||
|
typename X3, typename Y3>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T>::tmat3x2
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1,
|
||||||
|
X2 const & x2, Y2 const & y2,
|
||||||
|
X3 const & x3, Y3 const & y3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3>
|
||||||
|
GLM_FUNC_DECL tmat3x2<T>::tmat3x2
|
||||||
|
(
|
||||||
|
tvec2<V1> const & v1,
|
||||||
|
tvec2<V2> const & v2,
|
||||||
|
tvec2<V3> const & v3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
// mat3x2 matrix conversions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
|
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
|
||||||
|
@ -12,254 +12,269 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 3 * 3 matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat3x3
|
||||||
{
|
{
|
||||||
void main_mat3x3();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec3<T> col_type;
|
||||||
|
typedef tvec3<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat3x3<T> type;
|
||||||
{
|
typedef tmat3x3<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 3 * 3 matrix of floating-point numbers.
|
public:
|
||||||
//! \ingroup core_template
|
// Implementation detail
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat3x3<T> _inverse() const;
|
||||||
struct tmat3x3
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec3<T> col_type;
|
|
||||||
typedef tvec3<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat3x3<T> type;
|
private:
|
||||||
typedef tmat3x3<T> transpose_type;
|
// Data
|
||||||
|
col_type value[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation detail
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat3x3<T> _inverse() const;
|
GLM_FUNC_DECL tmat3x3();
|
||||||
|
GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
// Data
|
ctor Null);
|
||||||
col_type value[3];
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1,
|
||||||
|
value_type const & x2, value_type const & y2, value_type const & z2);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat3x3();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3(tmat3x3 const & m);
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(
|
template
|
||||||
ctor Null);
|
<
|
||||||
GLM_FUNC_DECL explicit tmat3x3(
|
typename X1, typename Y1, typename Z1,
|
||||||
value_type const & s);
|
typename X2, typename Y2, typename Z2,
|
||||||
GLM_FUNC_DECL explicit tmat3x3(
|
typename X3, typename Y3, typename Z3
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0,
|
>
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1,
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
value_type const & x2, value_type const & y2, value_type const & z2);
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
GLM_FUNC_DECL explicit tmat3x3(
|
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||||
col_type const & v0,
|
X3 const & x3, Y3 const & y3, Z3 const & z3);
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2);
|
|
||||||
|
|
||||||
// Conversions
|
template <typename V1, typename V2, typename V3>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat3x3(
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
|
tvec3<V1> const & v1,
|
||||||
|
tvec3<V2> const & v2,
|
||||||
|
tvec3<V3> const & v3);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
|
GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T> const & x);
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
template <typename U>
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator++ ();
|
|
||||||
GLM_FUNC_DECL tmat3x3<T>& operator-- ();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Binary operators
|
// Unary updatable operators
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<T> const & m);
|
||||||
tmat3x3<T> operator+ (
|
template <typename U>
|
||||||
tmat3x3<T> const & m,
|
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
|
||||||
typename tmat3x3<T>::value_type const & s);
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator++ ();
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>& operator-- ();
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat3x3<T> operator+ (
|
template <typename T>
|
||||||
typename tmat3x3<T>::value_type const & s,
|
tmat3x3<T> operator+ (
|
||||||
tmat3x3<T> const & m);
|
tmat3x3<T> const & m,
|
||||||
|
typename tmat3x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator+ (
|
tmat3x3<T> operator+ (
|
||||||
tmat3x3<T> const & m1,
|
typename tmat3x3<T>::value_type const & s,
|
||||||
tmat3x3<T> const & m2);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator- (
|
tmat3x3<T> operator+ (
|
||||||
tmat3x3<T> const & m,
|
tmat3x3<T> const & m1,
|
||||||
typename tmat3x3<T>::value_type const & s);
|
tmat3x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator- (
|
tmat3x3<T> operator- (
|
||||||
typename tmat3x3<T>::value_type const & s,
|
tmat3x3<T> const & m,
|
||||||
tmat3x3<T> const & m);
|
typename tmat3x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator- (
|
tmat3x3<T> operator- (
|
||||||
tmat3x3<T> const & m1,
|
typename tmat3x3<T>::value_type const & s,
|
||||||
tmat3x3<T> const & m2);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator* (
|
tmat3x3<T> operator- (
|
||||||
tmat3x3<T> const & m,
|
tmat3x3<T> const & m1,
|
||||||
typename tmat3x3<T>::value_type const & s);
|
tmat3x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator* (
|
tmat3x3<T> operator* (
|
||||||
typename tmat3x3<T>::value_type const & s,
|
tmat3x3<T> const & m,
|
||||||
tmat3x3<T> const & m);
|
typename tmat3x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x3<T>::col_type operator* (
|
tmat3x3<T> operator* (
|
||||||
tmat3x3<T> const & m,
|
typename tmat3x3<T>::value_type const & s,
|
||||||
typename tmat3x3<T>::row_type const & v);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x3<T>::row_type operator* (
|
typename tmat3x3<T>::col_type operator* (
|
||||||
typename tmat3x3<T>::col_type const & v,
|
tmat3x3<T> const & m,
|
||||||
tmat3x3<T> const & m);
|
typename tmat3x3<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator* (
|
typename tmat3x3<T>::row_type operator* (
|
||||||
tmat3x3<T> const & m1,
|
typename tmat3x3<T>::col_type const & v,
|
||||||
tmat3x3<T> const & m2);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator/ (
|
tmat3x3<T> operator* (
|
||||||
tmat3x3<T> const & m,
|
tmat3x3<T> const & m1,
|
||||||
typename tmat3x3<T>::value_type const & s);
|
tmat3x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator/ (
|
tmat3x3<T> operator/ (
|
||||||
typename tmat3x3<T>::value_type const & s,
|
tmat3x3<T> const & m,
|
||||||
tmat3x3<T> const & m);
|
typename tmat3x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x3<T>::col_type operator/ (
|
tmat3x3<T> operator/ (
|
||||||
tmat3x3<T> const & m,
|
typename tmat3x3<T>::value_type const & s,
|
||||||
typename tmat3x3<T>::row_type const & v);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x3<T>::row_type operator/ (
|
typename tmat3x3<T>::col_type operator/ (
|
||||||
typename tmat3x3<T>::col_type const & v,
|
tmat3x3<T> const & m,
|
||||||
tmat3x3<T> const & m);
|
typename tmat3x3<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator/ (
|
typename tmat3x3<T>::row_type operator/ (
|
||||||
tmat3x3<T> const & m1,
|
typename tmat3x3<T>::col_type const & v,
|
||||||
tmat3x3<T> const & m2);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat3x3<T> operator/ (
|
||||||
tmat3x3<T> const operator- (
|
tmat3x3<T> const & m1,
|
||||||
tmat3x3<T> const & m);
|
tmat3x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat3x3<T> const operator-- (
|
template <typename T>
|
||||||
tmat3x3<T> const & m,
|
tmat3x3<T> const operator- (
|
||||||
int);
|
tmat3x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> const operator++ (
|
tmat3x3<T> const operator-- (
|
||||||
tmat3x3<T> const & m,
|
tmat3x3<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat3x3<T> const operator++ (
|
||||||
|
tmat3x3<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
} //namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 3 columns of 3 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! 3 columns of 3 components matrix of low precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat3x3<lowp_float> lowp_mat3;
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x3<lowp_float> lowp_mat3;
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat3x3<mediump_float> mediump_mat3;
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! 3 columns of 3 components matrix of high precision floating-point numbers.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x3<mediump_float> mediump_mat3;
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! 3 columns of 3 components matrix of high precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat3x3<highp_float> highp_mat3;
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat3x3<highp_float> highp_mat3;
|
||||||
|
|
||||||
//! 3 columns of 3 components matrix of low precision floating-point numbers.
|
//! 3 columns of 3 components matrix of low precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat3x3<lowp_float> lowp_mat3x3;
|
typedef detail::tmat3x3<lowp_float> lowp_mat3x3;
|
||||||
|
|
||||||
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
|
//! 3 columns of 3 components matrix of medium precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat3x3<mediump_float> mediump_mat3x3;
|
typedef detail::tmat3x3<mediump_float> mediump_mat3x3;
|
||||||
|
|
||||||
//! 3 columns of 3 components matrix of high precision floating-point numbers.
|
//! 3 columns of 3 components matrix of high precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat3x3<highp_float> highp_mat3x3;
|
typedef detail::tmat3x3<highp_float> highp_mat3x3;
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
}//namespace precision
|
||||||
}//namespace core
|
}//namespace type
|
||||||
} //namespace glm
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat3x3.inl"
|
#include "type_mat3x3.inl"
|
||||||
|
@ -116,6 +116,52 @@ namespace detail
|
|||||||
this->value[2] = v2;
|
this->value[2] = v2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>::tmat3x3
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
|
||||||
|
this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
|
||||||
|
this->value[2] = tvec3<T>(Zero, Zero, value_type(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1,
|
||||||
|
typename X2, typename Y2, typename Z2,
|
||||||
|
typename X3, typename Y3, typename Z3>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>::tmat3x3
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||||
|
X3 const & x3, Y3 const & y3, Z3 const & z3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3>
|
||||||
|
GLM_FUNC_DECL tmat3x3<T>::tmat3x3
|
||||||
|
(
|
||||||
|
tvec3<V1> const & v1,
|
||||||
|
tvec3<V2> const & v2,
|
||||||
|
tvec3<V3> const & v3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Conversions
|
// Conversions
|
||||||
|
|
||||||
|
@ -12,203 +12,218 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 3 columns and 4 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat3x4
|
||||||
{
|
{
|
||||||
void main_mat3x4();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec4<T> col_type;
|
||||||
|
typedef tvec3<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat3x4<T> type;
|
||||||
{
|
typedef tmat4x3<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 3 columns and 4 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[3];
|
||||||
struct tmat3x4
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec4<T> col_type;
|
|
||||||
typedef tvec3<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat3x4<T> type;
|
public:
|
||||||
typedef tmat4x3<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat3x4();
|
||||||
|
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
// Data
|
ctor Null);
|
||||||
col_type value[3];
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
|
||||||
|
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat3x4();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x4(tmat3x4 const & m);
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(
|
template
|
||||||
ctor Null);
|
<
|
||||||
GLM_FUNC_DECL explicit tmat3x4(
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
value_type const & s);
|
typename X2, typename Y2, typename Z2, typename W2,
|
||||||
GLM_FUNC_DECL explicit tmat3x4(
|
typename X3, typename Y3, typename Z3, typename W3
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
>
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
GLM_FUNC_DECL explicit tmat3x4(
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||||
col_type const & v0,
|
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2);
|
|
||||||
|
|
||||||
// Conversion
|
template <typename V1, typename V2, typename V3>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat3x4(
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
|
tvec4<V1> const & v1,
|
||||||
|
tvec4<V2> const & v2,
|
||||||
|
tvec4<V3> const & v3);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x);
|
// Matrix conversion
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x);
|
GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T> const & x);
|
||||||
col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T> const & x);
|
||||||
col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
|
col_type & operator[](size_type i);
|
||||||
template <typename U>
|
col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator++ ();
|
// Unary updatable operators
|
||||||
GLM_FUNC_DECL tmat3x4<T> & operator-- ();
|
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
|
||||||
};
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s);
|
||||||
|
|
||||||
// Binary operators
|
GLM_FUNC_DECL tmat3x4<T> & operator++ ();
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat3x4<T> & operator-- ();
|
||||||
tmat3x4<T> operator+ (
|
};
|
||||||
tmat3x4<T> const & m,
|
|
||||||
typename tmat3x4<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat3x4<T> operator+ (
|
template <typename T>
|
||||||
tmat3x4<T> const & m1,
|
tmat3x4<T> operator+ (
|
||||||
tmat3x4<T> const & m2);
|
tmat3x4<T> const & m,
|
||||||
|
typename tmat3x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator- (
|
tmat3x4<T> operator+ (
|
||||||
tmat3x4<T> const & m,
|
tmat3x4<T> const & m1,
|
||||||
typename tmat3x4<T>::value_type const & s);
|
tmat3x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator- (
|
tmat3x4<T> operator- (
|
||||||
tmat3x4<T> const & m1,
|
tmat3x4<T> const & m,
|
||||||
tmat3x4<T> const & m2);
|
typename tmat3x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator* (
|
tmat3x4<T> operator- (
|
||||||
tmat3x4<T> const & m,
|
tmat3x4<T> const & m1,
|
||||||
typename tmat3x4<T>::value_type const & s);
|
tmat3x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator* (
|
tmat3x4<T> operator* (
|
||||||
typename tmat3x4<T>::value_type const & s,
|
tmat3x4<T> const & m,
|
||||||
tmat3x4<T> const & m);
|
typename tmat3x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x4<T>::col_type operator* (
|
tmat3x4<T> operator* (
|
||||||
tmat3x4<T> const & m,
|
typename tmat3x4<T>::value_type const & s,
|
||||||
typename tmat3x4<T>::row_type const & v);
|
tmat3x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat3x4<T>::row_type operator* (
|
typename tmat3x4<T>::col_type operator* (
|
||||||
typename tmat3x4<T>::col_type const & v,
|
tmat3x4<T> const & m,
|
||||||
tmat3x4<T> const & m);
|
typename tmat3x4<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator* (
|
typename tmat3x4<T>::row_type operator* (
|
||||||
tmat3x4<T> const & m1,
|
typename tmat3x4<T>::col_type const & v,
|
||||||
tmat4x3<T> const & m2);
|
tmat3x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator/ (
|
tmat4x4<T> operator* (
|
||||||
tmat3x4<T> const & m,
|
tmat3x4<T> const & m1,
|
||||||
typename tmat3x4<T>::value_type const & s);
|
tmat4x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> operator/ (
|
tmat3x4<T> operator/ (
|
||||||
typename tmat3x4<T>::value_type const & s,
|
tmat3x4<T> const & m,
|
||||||
tmat3x4<T> const & m);
|
typename tmat3x4<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat3x4<T> operator/ (
|
||||||
tmat3x4<T> const operator- (
|
typename tmat3x4<T>::value_type const & s,
|
||||||
tmat3x4<T> const & m);
|
tmat3x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat3x4<T> const operator-- (
|
template <typename T>
|
||||||
tmat3x4<T> const & m,
|
tmat3x4<T> const operator- (
|
||||||
int);
|
tmat3x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x4<T> const operator++ (
|
tmat3x4<T> const operator-- (
|
||||||
tmat3x4<T> const & m,
|
tmat3x4<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat3x4<T> const operator++ (
|
||||||
|
tmat3x4<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
}//namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 3 columns of 4 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 4 components matrix of low precision floating-point numbers.
|
||||||
typedef detail::tmat3x4<lowp_float> lowp_mat3x4;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 3 columns of 4 components matrix of medium precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x4<lowp_float> lowp_mat3x4;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 4 components matrix of medium precision floating-point numbers.
|
||||||
typedef detail::tmat3x4<mediump_float> mediump_mat3x4;
|
//! There is no guarantee on the actual precision.
|
||||||
//! 3 columns of 4 components matrix of high precision floating-point numbers.
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat3x4<mediump_float> mediump_mat3x4;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 3 columns of 4 components matrix of high precision floating-point numbers.
|
||||||
typedef detail::tmat3x4<highp_float> highp_mat3x4;
|
//! There is no guarantee on the actual precision.
|
||||||
}
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//namespace precision
|
typedef detail::tmat3x4<highp_float> highp_mat3x4;
|
||||||
|
|
||||||
}//namespace type
|
}//namespace precision
|
||||||
}//namespace core
|
}//namespace type
|
||||||
} //namespace glm
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat3x4.inl"
|
#include "type_mat3x4.inl"
|
||||||
|
@ -114,6 +114,52 @@ namespace detail
|
|||||||
this->value[2] = v2;
|
this->value[2] = v2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T>::tmat3x4
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
|
||||||
|
this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
|
||||||
|
this->value[2] = tvec4<T>(Zero, Zero, value_type(s), Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
|
typename X2, typename Y2, typename Z2, typename W2,
|
||||||
|
typename X3, typename Y3, typename Z3, typename W3>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T>::tmat3x4
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||||
|
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3>
|
||||||
|
GLM_FUNC_DECL tmat3x4<T>::tmat3x4
|
||||||
|
(
|
||||||
|
tvec4<V1> const & v1,
|
||||||
|
tvec4<V2> const & v2,
|
||||||
|
tvec4<V3> const & v3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
}
|
||||||
|
|
||||||
// Conversion
|
// Conversion
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -12,208 +12,228 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 4 columns and 2 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat4x2
|
||||||
{
|
{
|
||||||
void main_mat4x2();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec2<T> col_type;
|
||||||
|
typedef tvec4<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat4x2<T> type;
|
||||||
{
|
typedef tmat2x4<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 4 columns and 2 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[4];
|
||||||
struct tmat4x2
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec2<T> col_type;
|
|
||||||
typedef tvec4<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat4x2<T> type;
|
public:
|
||||||
typedef tmat2x4<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat4x2();
|
||||||
|
GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
// Data
|
ctor Null);
|
||||||
col_type value[4];
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
|
value_type const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
|
value_type const & x0, value_type const & y0,
|
||||||
|
value_type const & x1, value_type const & y1,
|
||||||
|
value_type const & x2, value_type const & y2,
|
||||||
|
value_type const & x3, value_type const & y3);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2,
|
||||||
|
col_type const & v3);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat4x2();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2(tmat4x2 const & m);
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(
|
template
|
||||||
ctor Null);
|
<
|
||||||
GLM_FUNC_DECL explicit tmat4x2(
|
typename X1, typename Y1,
|
||||||
value_type const & x);
|
typename X2, typename Y2,
|
||||||
GLM_FUNC_DECL explicit tmat4x2(
|
typename X3, typename Y3,
|
||||||
value_type const & x0, value_type const & y0,
|
typename X4, typename Y4
|
||||||
value_type const & x1, value_type const & y1,
|
>
|
||||||
value_type const & x2, value_type const & y2,
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
value_type const & x3, value_type const & y3);
|
X1 const & x1, Y1 const & y1,
|
||||||
GLM_FUNC_DECL explicit tmat4x2(
|
X2 const & x2, Y2 const & y2,
|
||||||
col_type const & v0,
|
X3 const & x3, Y3 const & y3,
|
||||||
col_type const & v1,
|
X4 const & x4, Y4 const & y4);
|
||||||
col_type const & v2,
|
|
||||||
col_type const & v3);
|
|
||||||
|
|
||||||
// Conversions
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat4x2(
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
|
tvec2<V1> const & v1,
|
||||||
|
tvec2<V2> const & v2,
|
||||||
|
tvec2<V3> const & v3,
|
||||||
|
tvec2<V4> const & v4);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x);
|
GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T> const & x);
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
template <typename U>
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator++ ();
|
// Unary updatable operators
|
||||||
GLM_FUNC_DECL tmat4x2<T>& operator-- ();
|
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<T> const & m);
|
||||||
};
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s);
|
||||||
|
|
||||||
// Binary operators
|
GLM_FUNC_DECL tmat4x2<T>& operator++ ();
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat4x2<T>& operator-- ();
|
||||||
tmat4x2<T> operator+ (
|
};
|
||||||
tmat4x2<T> const & m,
|
|
||||||
typename tmat4x2<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat4x2<T> operator+ (
|
template <typename T>
|
||||||
tmat4x2<T> const & m1,
|
tmat4x2<T> operator+ (
|
||||||
tmat4x2<T> const & m2);
|
tmat4x2<T> const & m,
|
||||||
|
typename tmat4x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator- (
|
tmat4x2<T> operator+ (
|
||||||
tmat4x2<T> const & m,
|
tmat4x2<T> const & m1,
|
||||||
typename tmat4x2<T>::value_type const & s);
|
tmat4x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator- (
|
tmat4x2<T> operator- (
|
||||||
tmat4x2<T> const & m1,
|
tmat4x2<T> const & m,
|
||||||
tmat4x2<T> const & m2);
|
typename tmat4x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator* (
|
tmat4x2<T> operator- (
|
||||||
tmat4x2<T> const & m,
|
tmat4x2<T> const & m1,
|
||||||
typename tmat4x2<T>::value_type const & s);
|
tmat4x2<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator* (
|
tmat4x2<T> operator* (
|
||||||
typename tmat4x2<T>::value_type const & s,
|
tmat4x2<T> const & m,
|
||||||
tmat4x2<T> const & m);
|
typename tmat4x2<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x2<T>::col_type operator* (
|
tmat4x2<T> operator* (
|
||||||
tmat4x2<T> const & m,
|
typename tmat4x2<T>::value_type const & s,
|
||||||
typename tmat4x2<T>::row_type const & v);
|
tmat4x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x2<T>::row_type operator* (
|
typename tmat4x2<T>::col_type operator* (
|
||||||
typename tmat4x2<T>::col_type const & v,
|
tmat4x2<T> const & m,
|
||||||
tmat4x2<T> const & m);
|
typename tmat4x2<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat2x2<T> operator* (
|
typename tmat4x2<T>::row_type operator* (
|
||||||
tmat4x2<T> const & m1,
|
typename tmat4x2<T>::col_type const & v,
|
||||||
tmat2x4<T> const & m2);
|
tmat4x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator/ (
|
tmat2x2<T> operator* (
|
||||||
tmat4x2<T> const & m,
|
tmat4x2<T> const & m1,
|
||||||
typename tmat4x2<T>::value_type const & s);
|
tmat2x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> operator/ (
|
tmat4x2<T> operator/ (
|
||||||
typename tmat4x2<T>::value_type const & s,
|
tmat4x2<T> const & m,
|
||||||
tmat4x2<T> const & m);
|
typename tmat4x2<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat4x2<T> operator/ (
|
||||||
tmat4x2<T> const operator- (
|
typename tmat4x2<T>::value_type const & s,
|
||||||
tmat4x2<T> const & m);
|
tmat4x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat4x2<T> const operator-- (
|
template <typename T>
|
||||||
tmat4x2<T> const & m,
|
tmat4x2<T> const operator- (
|
||||||
int);
|
tmat4x2<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x2<T> const operator++ (
|
tmat4x2<T> const operator-- (
|
||||||
tmat4x2<T> const & m,
|
tmat4x2<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat4x2<T> const operator++ (
|
||||||
|
tmat4x2<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
} //namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 4 columns of 2 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 4 columns of 2 components matrix of low precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! 4 columns of 2 components matrix of medium precision floating-point numbers.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat4x2<lowp_float> lowp_mat4x2;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
|
|
||||||
//! 4 columns of 2 components matrix of high precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat4x2<highp_float> highp_mat4x2;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
//! 4 columns of 2 components matrix of medium precision floating-point numbers.
|
||||||
}//namespace core
|
//! There is no guarantee on the actual precision.
|
||||||
} //namespace glm
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat4x2<mediump_float> mediump_mat4x2;
|
||||||
|
|
||||||
|
//! 4 columns of 2 components matrix of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat4x2<highp_float> highp_mat4x2;
|
||||||
|
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat4x2.inl"
|
#include "type_mat4x2.inl"
|
||||||
|
@ -123,6 +123,58 @@ namespace detail
|
|||||||
this->value[3] = v3;
|
this->value[3] = v3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>::tmat4x2
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec2<T>(value_type(s), Zero);
|
||||||
|
this->value[1] = tvec2<T>(Zero, value_type(s));
|
||||||
|
this->value[2] = tvec2<T>(Zero, Zero);
|
||||||
|
this->value[3] = tvec2<T>(Zero, Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1,
|
||||||
|
typename X2, typename Y2,
|
||||||
|
typename X3, typename Y3,
|
||||||
|
typename X4, typename Y4>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>::tmat4x2
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1,
|
||||||
|
X2 const & x2, Y2 const & y2,
|
||||||
|
X3 const & x3, Y3 const & y3,
|
||||||
|
X4 const & x4, Y4 const & y4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3));
|
||||||
|
this->value[3] = col_type(value_type(x4), value_type(y4));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
|
GLM_FUNC_DECL tmat4x2<T>::tmat4x2
|
||||||
|
(
|
||||||
|
tvec2<V1> const & v1,
|
||||||
|
tvec2<V2> const & v2,
|
||||||
|
tvec2<V3> const & v3,
|
||||||
|
tvec2<V4> const & v4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
this->value[3] = col_type(v4);
|
||||||
|
}
|
||||||
|
|
||||||
// Conversion
|
// Conversion
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -12,211 +12,229 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 4 columns and 3 rows matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat4x3
|
||||||
{
|
{
|
||||||
void main_mat4x3();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec3<T> col_type;
|
||||||
|
typedef tvec4<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat4x3<T> type;
|
||||||
{
|
typedef tmat3x4<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 4 columns and 3 rows matrix of floating-point numbers.
|
private:
|
||||||
//! \ingroup core_template
|
// Data
|
||||||
template <typename T>
|
col_type value[4];
|
||||||
struct tmat4x3
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec3<T> col_type;
|
|
||||||
typedef tvec4<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat4x3<T> type;
|
public:
|
||||||
typedef tmat3x4<T> transpose_type;
|
// Constructors
|
||||||
|
GLM_FUNC_DECL tmat4x3();
|
||||||
|
GLM_FUNC_DECL tmat4x3(tmat4x3 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
// Data
|
ctor Null);
|
||||||
col_type value[4];
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
|
value_type const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1,
|
||||||
|
value_type const & x2, value_type const & y2, value_type const & z2,
|
||||||
|
value_type const & x3, value_type const & y3, value_type const & z3);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2,
|
||||||
|
col_type const & v3);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat4x3();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x3(tmat4x3 const & m);
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(
|
template <
|
||||||
ctor Null);
|
typename X1, typename Y1, typename Z1,
|
||||||
GLM_FUNC_DECL explicit tmat4x3(
|
typename X2, typename Y2, typename Z2,
|
||||||
value_type const & x);
|
typename X3, typename Y3, typename Z3,
|
||||||
GLM_FUNC_DECL explicit tmat4x3(
|
typename X4, typename Y4, typename Z4>
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0,
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1,
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
value_type const & x2, value_type const & y2, value_type const & z2,
|
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||||
value_type const & x3, value_type const & y3, value_type const & z3);
|
X3 const & x3, Y3 const & y3, Z3 const & z3,
|
||||||
GLM_FUNC_DECL explicit tmat4x3(
|
X4 const & x4, Y4 const & y4, Z4 const & z4);
|
||||||
col_type const & v0,
|
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2,
|
|
||||||
col_type const & v3);
|
|
||||||
|
|
||||||
// Conversion
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat4x3(
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
|
tvec3<V1> const & v1,
|
||||||
|
tvec3<V2> const & v2,
|
||||||
|
tvec3<V3> const & v3,
|
||||||
|
tvec3<V4> const & v4);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T> const & x);
|
GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T> const & x);
|
||||||
col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T> const & x);
|
||||||
col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m);
|
col_type & operator[](size_type i);
|
||||||
template <typename U>
|
col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator++ ();
|
// Unary updatable operators
|
||||||
GLM_FUNC_DECL tmat4x3<T> & operator-- ();
|
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m);
|
||||||
};
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s);
|
||||||
|
|
||||||
// Binary operators
|
GLM_FUNC_DECL tmat4x3<T> & operator++ ();
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat4x3<T> & operator-- ();
|
||||||
tmat4x3<T> operator+ (
|
};
|
||||||
tmat4x3<T> const & m,
|
|
||||||
typename tmat4x3<T>::value_type const & s);
|
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat4x3<T> operator+ (
|
template <typename T>
|
||||||
tmat4x3<T> const & m1,
|
tmat4x3<T> operator+ (
|
||||||
tmat4x3<T> const & m2);
|
tmat4x3<T> const & m,
|
||||||
|
typename tmat4x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator- (
|
tmat4x3<T> operator+ (
|
||||||
tmat4x3<T> const & m,
|
tmat4x3<T> const & m1,
|
||||||
typename tmat4x3<T>::value_type const & s);
|
tmat4x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator- (
|
tmat4x3<T> operator- (
|
||||||
tmat4x3<T> const & m1,
|
tmat4x3<T> const & m,
|
||||||
tmat4x3<T> const & m2);
|
typename tmat4x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator* (
|
tmat4x3<T> operator- (
|
||||||
tmat4x3<T> const & m,
|
tmat4x3<T> const & m1,
|
||||||
typename tmat4x3<T>::value_type const & s);
|
tmat4x3<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator* (
|
tmat4x3<T> operator* (
|
||||||
typename tmat4x3<T>::value_type const & s,
|
tmat4x3<T> const & m,
|
||||||
tmat4x3<T> const & m);
|
typename tmat4x3<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x3<T>::col_type operator* (
|
tmat4x3<T> operator* (
|
||||||
tmat4x3<T> const & m,
|
typename tmat4x3<T>::value_type const & s,
|
||||||
typename tmat4x3<T>::row_type const & v);
|
tmat4x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x3<T>::row_type operator* (
|
typename tmat4x3<T>::col_type operator* (
|
||||||
typename tmat4x3<T>::col_type const & v,
|
tmat4x3<T> const & m,
|
||||||
tmat4x3<T> const & m);
|
typename tmat4x3<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat3x3<T> operator* (
|
typename tmat4x3<T>::row_type operator* (
|
||||||
tmat4x3<T> const & m1,
|
typename tmat4x3<T>::col_type const & v,
|
||||||
tmat3x4<T> const & m2);
|
tmat4x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator/ (
|
tmat3x3<T> operator* (
|
||||||
tmat4x3<T> const & m,
|
tmat4x3<T> const & m1,
|
||||||
typename tmat4x3<T>::value_type const & s);
|
tmat3x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> operator/ (
|
tmat4x3<T> operator/ (
|
||||||
typename tmat4x3<T>::value_type const & s,
|
tmat4x3<T> const & m,
|
||||||
tmat4x3<T> const & m);
|
typename tmat4x3<T>::value_type const & s);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat4x3<T> operator/ (
|
||||||
tmat4x3<T> const operator- (
|
typename tmat4x3<T>::value_type const & s,
|
||||||
tmat4x3<T> const & m);
|
tmat4x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat4x3<T> const operator-- (
|
template <typename T>
|
||||||
tmat4x3<T> const & m,
|
tmat4x3<T> const operator- (
|
||||||
int);
|
tmat4x3<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x3<T> const operator++ (
|
tmat4x3<T> const operator-- (
|
||||||
tmat4x3<T> const & m,
|
tmat4x3<T> const & m,
|
||||||
int);
|
int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat4x3<T> const operator++ (
|
||||||
|
tmat4x3<T> const & m,
|
||||||
|
int);
|
||||||
|
|
||||||
namespace core{
|
}//namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 4 columns of 3 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
//! 4 columns of 3 components matrix of low precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat4x3<lowp_float> lowp_mat4x3;
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
//! 4 columns of 3 components matrix of medium precision floating-point numbers.
|
//! \ingroup core_precision
|
||||||
//! There is no guarantee on the actual precision.
|
typedef detail::tmat4x3<lowp_float> lowp_mat4x3;
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat4x3<mediump_float> mediump_mat4x3;
|
|
||||||
//! 4 columns of 3 components matrix of high precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tmat4x3<highp_float> highp_mat4x3;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
//! 4 columns of 3 components matrix of medium precision floating-point numbers.
|
||||||
}//namespace core
|
//! There is no guarantee on the actual precision.
|
||||||
} //namespace glm
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat4x3<mediump_float> mediump_mat4x3;
|
||||||
|
|
||||||
|
//! 4 columns of 3 components matrix of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! (From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers)
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat4x3<highp_float> highp_mat4x3;
|
||||||
|
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat4x3.inl"
|
#include "type_mat4x3.inl"
|
||||||
#endif
|
#endif //GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif//glm_core_type_mat4x3
|
#endif//glm_core_type_mat4x3
|
||||||
|
@ -123,8 +123,60 @@ namespace detail
|
|||||||
this->value[3] = v3;
|
this->value[3] = v3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T>::tmat4x3
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
|
||||||
|
this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
|
||||||
|
this->value[2] = tvec3<T>(Zero, Zero, value_type(s));
|
||||||
|
this->value[3] = tvec3<T>(Zero, Zero, Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1,
|
||||||
|
typename X2, typename Y2, typename Z2,
|
||||||
|
typename X3, typename Y3, typename Z3,
|
||||||
|
typename X4, typename Y4, typename Z4>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T>::tmat4x3
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||||
|
X3 const & x3, Y3 const & y3, Z3 const & z3,
|
||||||
|
X4 const & x4, Y4 const & y4, Z4 const & z4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
|
||||||
|
this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
|
GLM_FUNC_DECL tmat4x3<T>::tmat4x3
|
||||||
|
(
|
||||||
|
tvec3<V1> const & v1,
|
||||||
|
tvec3<V2> const & v2,
|
||||||
|
tvec3<V3> const & v3,
|
||||||
|
tvec3<V4> const & v4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
this->value[3] = col_type(v4);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Conversions
|
// Matrix conversions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Created : 2005-01-27
|
// Created : 2005-01-27
|
||||||
// Updated : 2008-08-30
|
// Updated : 2011-06-02
|
||||||
// Licence : This source is under MIT License
|
// Licence : This source is under MIT License
|
||||||
// File : glm/core/type_mat4x4.hpp
|
// File : glm/core/type_mat4x4.hpp
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -12,259 +12,275 @@
|
|||||||
|
|
||||||
#include "type_mat.hpp"
|
#include "type_mat.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
template <typename T> struct tmat2x2;
|
||||||
|
template <typename T> struct tmat2x3;
|
||||||
|
template <typename T> struct tmat2x4;
|
||||||
|
template <typename T> struct tmat3x2;
|
||||||
|
template <typename T> struct tmat3x3;
|
||||||
|
template <typename T> struct tmat3x4;
|
||||||
|
template <typename T> struct tmat4x2;
|
||||||
|
template <typename T> struct tmat4x3;
|
||||||
|
template <typename T> struct tmat4x4;
|
||||||
|
|
||||||
|
//! \brief Template for 4 * 4 matrix of floating-point numbers.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tmat4x4
|
||||||
{
|
{
|
||||||
void main_mat4x4();
|
enum ctor{null};
|
||||||
}//namespace test
|
typedef T value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
typedef tvec4<T> col_type;
|
||||||
|
typedef tvec4<T> row_type;
|
||||||
|
static GLM_FUNC_DECL size_type col_size();
|
||||||
|
static GLM_FUNC_DECL size_type row_size();
|
||||||
|
|
||||||
namespace detail
|
typedef tmat4x4<T> type;
|
||||||
{
|
typedef tmat4x4<T> transpose_type;
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
template <typename T> struct tmat2x2;
|
|
||||||
template <typename T> struct tmat2x3;
|
|
||||||
template <typename T> struct tmat2x4;
|
|
||||||
template <typename T> struct tmat3x2;
|
|
||||||
template <typename T> struct tmat3x3;
|
|
||||||
template <typename T> struct tmat3x4;
|
|
||||||
template <typename T> struct tmat4x2;
|
|
||||||
template <typename T> struct tmat4x3;
|
|
||||||
template <typename T> struct tmat4x4;
|
|
||||||
|
|
||||||
//! \brief Template for 4 * 4 matrix of floating-point numbers.
|
public:
|
||||||
//! \ingroup core_template
|
// Implementation detail
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat4x4<T> _inverse() const;
|
||||||
struct tmat4x4
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
typedef T value_type;
|
|
||||||
typedef std::size_t size_type;
|
|
||||||
typedef tvec4<T> col_type;
|
|
||||||
typedef tvec4<T> row_type;
|
|
||||||
static GLM_FUNC_DECL size_type col_size();
|
|
||||||
static GLM_FUNC_DECL size_type row_size();
|
|
||||||
|
|
||||||
typedef tmat4x4<T> type;
|
private:
|
||||||
typedef tmat4x4<T> transpose_type;
|
// Data
|
||||||
|
col_type value[4];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation detail
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat4x4<T> _inverse() const;
|
GLM_FUNC_DECL tmat4x4();
|
||||||
|
GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
|
||||||
|
|
||||||
private:
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
// Data
|
ctor Null);
|
||||||
col_type value[4];
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
|
value_type const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
|
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
||||||
|
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
|
||||||
|
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
|
||||||
|
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
|
col_type const & v0,
|
||||||
|
col_type const & v1,
|
||||||
|
col_type const & v2,
|
||||||
|
col_type const & v3);
|
||||||
|
|
||||||
public:
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Conversions
|
||||||
GLM_FUNC_DECL tmat4x4();
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x4(tmat4x4 const & m);
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
|
U const & x);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(
|
template <
|
||||||
ctor Null);
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
GLM_FUNC_DECL explicit tmat4x4(
|
typename X2, typename Y2, typename Z2, typename W2,
|
||||||
value_type const & x);
|
typename X3, typename Y3, typename Z3, typename W3,
|
||||||
GLM_FUNC_DECL explicit tmat4x4(
|
typename X4, typename Y4, typename Z4, typename W4>
|
||||||
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||||
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
|
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
|
||||||
GLM_FUNC_DECL explicit tmat4x4(
|
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
|
||||||
col_type const & v0,
|
|
||||||
col_type const & v1,
|
|
||||||
col_type const & v2,
|
|
||||||
col_type const & v3);
|
|
||||||
|
|
||||||
// Conversions
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
template <typename U>
|
GLM_FUNC_DECL explicit tmat4x4(
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
|
tvec4<V1> const & v1,
|
||||||
|
tvec4<V2> const & v2,
|
||||||
|
tvec4<V3> const & v3,
|
||||||
|
tvec4<V4> const & v4);
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
|
// Matrix conversions
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
|
GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U> const & m);
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
|
|
||||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
|
|
||||||
|
|
||||||
// Accesses
|
GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T> const & x);
|
||||||
GLM_FUNC_DECL col_type & operator[](size_type i);
|
GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T> const & x);
|
||||||
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T> const & x);
|
||||||
|
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T> const & x);
|
||||||
|
|
||||||
// Unary updatable operators
|
// Accesses
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
|
GLM_FUNC_DECL col_type & operator[](size_type i);
|
||||||
template <typename U>
|
GLM_FUNC_DECL col_type const & operator[](size_type i) const;
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator++ ();
|
|
||||||
GLM_FUNC_DECL tmat4x4<T> & operator-- ();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Binary operators
|
// Unary updatable operators
|
||||||
template <typename T>
|
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<T> const & m);
|
||||||
tmat4x4<T> operator+ (
|
template <typename U>
|
||||||
tmat4x4<T> const & m,
|
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
|
||||||
typename tmat4x4<T>::value_type const & s);
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator++ ();
|
||||||
|
GLM_FUNC_DECL tmat4x4<T> & operator-- ();
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
// Binary operators
|
||||||
tmat4x4<T> operator+ (
|
template <typename T>
|
||||||
typename tmat4x4<T>::value_type const & s,
|
tmat4x4<T> operator+ (
|
||||||
tmat4x4<T> const & m);
|
tmat4x4<T> const & m,
|
||||||
|
typename tmat4x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator+ (
|
tmat4x4<T> operator+ (
|
||||||
tmat4x4<T> const & m1,
|
typename tmat4x4<T>::value_type const & s,
|
||||||
tmat4x4<T> const & m2);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator- (
|
tmat4x4<T> operator+ (
|
||||||
tmat4x4<T> const & m,
|
tmat4x4<T> const & m1,
|
||||||
typename tmat4x4<T>::value_type const & s);
|
tmat4x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator- (
|
tmat4x4<T> operator- (
|
||||||
typename tmat4x4<T>::value_type const & s,
|
tmat4x4<T> const & m,
|
||||||
tmat4x4<T> const & m);
|
typename tmat4x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator- (
|
tmat4x4<T> operator- (
|
||||||
tmat4x4<T> const & m1,
|
typename tmat4x4<T>::value_type const & s,
|
||||||
tmat4x4<T> const & m2);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator* (
|
tmat4x4<T> operator- (
|
||||||
tmat4x4<T> const & m,
|
tmat4x4<T> const & m1,
|
||||||
typename tmat4x4<T>::value_type const & s);
|
tmat4x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator* (
|
tmat4x4<T> operator* (
|
||||||
typename tmat4x4<T>::value_type const & s,
|
tmat4x4<T> const & m,
|
||||||
tmat4x4<T> const & m);
|
typename tmat4x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x4<T>::col_type operator* (
|
tmat4x4<T> operator* (
|
||||||
tmat4x4<T> const & m,
|
typename tmat4x4<T>::value_type const & s,
|
||||||
typename tmat4x4<T>::row_type const & v);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x4<T>::row_type operator* (
|
typename tmat4x4<T>::col_type operator* (
|
||||||
typename tmat4x4<T>::col_type const & v,
|
tmat4x4<T> const & m,
|
||||||
tmat4x4<T> const & m);
|
typename tmat4x4<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator* (
|
typename tmat4x4<T>::row_type operator* (
|
||||||
tmat4x4<T> const & m1,
|
typename tmat4x4<T>::col_type const & v,
|
||||||
tmat4x4<T> const & m2);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator/ (
|
tmat4x4<T> operator* (
|
||||||
tmat4x4<T> const & m,
|
tmat4x4<T> const & m1,
|
||||||
typename tmat4x4<T>::value_type const & s);
|
tmat4x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator/ (
|
tmat4x4<T> operator/ (
|
||||||
typename tmat4x4<T>::value_type const & s,
|
tmat4x4<T> const & m,
|
||||||
tmat4x4<T> const & m);
|
typename tmat4x4<T>::value_type const & s);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x4<T>::col_type operator/ (
|
tmat4x4<T> operator/ (
|
||||||
tmat4x4<T> const & m,
|
typename tmat4x4<T>::value_type const & s,
|
||||||
typename tmat4x4<T>::row_type const & v);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename tmat4x4<T>::row_type operator/ (
|
typename tmat4x4<T>::col_type operator/ (
|
||||||
typename tmat4x4<T>::col_type & v,
|
tmat4x4<T> const & m,
|
||||||
tmat4x4<T> const & m);
|
typename tmat4x4<T>::row_type const & v);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> operator/ (
|
typename tmat4x4<T>::row_type operator/ (
|
||||||
tmat4x4<T> const & m1,
|
typename tmat4x4<T>::col_type & v,
|
||||||
tmat4x4<T> const & m2);
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
// Unary constant operators
|
template <typename T>
|
||||||
template <typename T>
|
tmat4x4<T> operator/ (
|
||||||
tmat4x4<T> const operator- (
|
tmat4x4<T> const & m1,
|
||||||
tmat4x4<T> const & m);
|
tmat4x4<T> const & m2);
|
||||||
|
|
||||||
template <typename T>
|
// Unary constant operators
|
||||||
tmat4x4<T> const operator-- (
|
template <typename T>
|
||||||
tmat4x4<T> const & m, int);
|
tmat4x4<T> const operator- (
|
||||||
|
tmat4x4<T> const & m);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
tmat4x4<T> const operator++ (
|
tmat4x4<T> const operator-- (
|
||||||
tmat4x4<T> const & m, int);
|
tmat4x4<T> const & m, int);
|
||||||
|
|
||||||
} //namespace detail
|
template <typename T>
|
||||||
|
tmat4x4<T> const operator++ (
|
||||||
|
tmat4x4<T> const & m, int);
|
||||||
|
|
||||||
namespace core{
|
} //namespace detail
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
namespace core{
|
||||||
{
|
namespace type{
|
||||||
//! 4 columns of 4 components matrix of low precision floating-point numbers.
|
namespace precision
|
||||||
//! There is no guarantee on the actual precision.
|
{
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! 4 columns of 4 components matrix of low precision floating-point numbers.
|
||||||
//! \ingroup core_precision
|
//! There is no guarantee on the actual precision.
|
||||||
typedef detail::tmat4x4<lowp_float> lowp_mat4;
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tmat4x4<lowp_float> lowp_mat4;
|
||||||
|
|
||||||
//! 4 columns of 4 components matrix of medium precision floating-point numbers.
|
//! 4 columns of 4 components matrix of medium precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat4x4<mediump_float> mediump_mat4;
|
typedef detail::tmat4x4<mediump_float> mediump_mat4;
|
||||||
|
|
||||||
//! 4 columns of 4 components matrix of high precision floating-point numbers.
|
//! 4 columns of 4 components matrix of high precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat4x4<highp_float> highp_mat4;
|
typedef detail::tmat4x4<highp_float> highp_mat4;
|
||||||
|
|
||||||
//! 4 columns of 4 components matrix of low precision floating-point numbers.
|
//! 4 columns of 4 components matrix of low precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat4x4<lowp_float> lowp_mat4x4;
|
typedef detail::tmat4x4<lowp_float> lowp_mat4x4;
|
||||||
|
|
||||||
//! 4 columns of 4 components matrix of medium precision floating-point numbers.
|
//! 4 columns of 4 components matrix of medium precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat4x4<mediump_float> mediump_mat4x4;
|
typedef detail::tmat4x4<mediump_float> mediump_mat4x4;
|
||||||
|
|
||||||
//! 4 columns of 4 components matrix of high precision floating-point numbers.
|
//! 4 columns of 4 components matrix of high precision floating-point numbers.
|
||||||
//! There is no guarantee on the actual precision.
|
//! There is no guarantee on the actual precision.
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
//! From GLSL 1.30.8 specification, section 4.1.6 Matrices and section 4.5 Precision and Precision Qualifiers
|
||||||
//! \ingroup core_precision
|
//! \ingroup core_precision
|
||||||
typedef detail::tmat4x4<highp_float> highp_mat4x4;
|
typedef detail::tmat4x4<highp_float> highp_mat4x4;
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
}//namespace precision
|
||||||
}//namespace core
|
}//namespace type
|
||||||
} //namespace glm
|
}//namespace core
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_mat4x4.inl"
|
#include "type_mat4x4.inl"
|
||||||
#endif
|
#endif//GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif //glm_core_type_mat4x4
|
#endif//glm_core_type_mat4x4
|
||||||
|
@ -136,6 +136,87 @@ namespace detail
|
|||||||
this->value[3] = col_type(m[3]);
|
this->value[3] = col_type(m[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion constructors
|
||||||
|
template <typename T>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T>::tmat4x4
|
||||||
|
(
|
||||||
|
U const & s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
GLM_STATIC_ASSERT(detail::type<U>::is_float || std::numeric_limits<U>::is_integer, "*mat4x4 constructor only takes float and integer types");
|
||||||
|
|
||||||
|
value_type const Zero(0);
|
||||||
|
this->value[0] = tvec4<T>(value_type(s), Zero, Zero, Zero);
|
||||||
|
this->value[1] = tvec4<T>(Zero, value_type(s), Zero, Zero);
|
||||||
|
this->value[2] = tvec4<T>(Zero, Zero, value_type(s), Zero);
|
||||||
|
this->value[3] = tvec4<T>(Zero, Zero, Zero, value_type(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <
|
||||||
|
typename X1, typename Y1, typename Z1, typename W1,
|
||||||
|
typename X2, typename Y2, typename Z2, typename W2,
|
||||||
|
typename X3, typename Y3, typename Z3, typename W3,
|
||||||
|
typename X4, typename Y4, typename Z4, typename W4>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T>::tmat4x4
|
||||||
|
(
|
||||||
|
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||||
|
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||||
|
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
|
||||||
|
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
GLM_STATIC_ASSERT(detail::type<X1>::is_float || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Y1>::is_float || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Z1>::is_float || std::numeric_limits<Z1>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<W1>::is_float || std::numeric_limits<W1>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
|
||||||
|
|
||||||
|
GLM_STATIC_ASSERT(detail::type<X2>::is_float || std::numeric_limits<X2>::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Y2>::is_float || std::numeric_limits<Y2>::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Z2>::is_float || std::numeric_limits<Z2>::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<W2>::is_float || std::numeric_limits<W2>::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.");
|
||||||
|
|
||||||
|
GLM_STATIC_ASSERT(detail::type<X3>::is_float || std::numeric_limits<X3>::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Y3>::is_float || std::numeric_limits<Y3>::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Z3>::is_float || std::numeric_limits<Z3>::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<W3>::is_float || std::numeric_limits<W3>::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.");
|
||||||
|
|
||||||
|
GLM_STATIC_ASSERT(detail::type<X4>::is_float || std::numeric_limits<X4>::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Y4>::is_float || std::numeric_limits<Y4>::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<Z4>::is_float || std::numeric_limits<Z4>::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<W4>::is_float || std::numeric_limits<W4>::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.");
|
||||||
|
|
||||||
|
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
|
||||||
|
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
|
||||||
|
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
|
||||||
|
this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
|
GLM_FUNC_DECL tmat4x4<T>::tmat4x4
|
||||||
|
(
|
||||||
|
tvec4<V1> const & v1,
|
||||||
|
tvec4<V2> const & v2,
|
||||||
|
tvec4<V3> const & v3,
|
||||||
|
tvec4<V4> const & v4
|
||||||
|
)
|
||||||
|
{
|
||||||
|
GLM_STATIC_ASSERT(detail::type<V1>::is_float || std::numeric_limits<V1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<V2>::is_float || std::numeric_limits<V2>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<V3>::is_float || std::numeric_limits<V3>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
|
||||||
|
GLM_STATIC_ASSERT(detail::type<V4>::is_float || std::numeric_limits<V4>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
|
||||||
|
|
||||||
|
this->value[0] = col_type(v1);
|
||||||
|
this->value[1] = col_type(v2);
|
||||||
|
this->value[2] = col_type(v3);
|
||||||
|
this->value[3] = col_type(v4);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Matrix convertion constructors
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
|
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
|
||||||
(
|
(
|
||||||
|
@ -16,39 +16,33 @@
|
|||||||
#include "type_size.hpp"
|
#include "type_size.hpp"
|
||||||
#include "_swizzle.hpp"
|
#include "_swizzle.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tref1;
|
||||||
|
template <typename T> struct tref2;
|
||||||
|
template <typename T> struct tref3;
|
||||||
|
template <typename T> struct tref4;
|
||||||
|
template <typename T> struct tvec1;
|
||||||
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct tvec1
|
||||||
{
|
{
|
||||||
void main_vec1();
|
enum ctor{null};
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
namespace detail
|
typedef T value_type;
|
||||||
{
|
typedef std::size_t size_type;
|
||||||
template <typename T> struct tref1;
|
GLM_FUNC_DECL size_type length() const;
|
||||||
template <typename T> struct tref2;
|
static GLM_FUNC_DECL size_type value_size();
|
||||||
template <typename T> struct tref3;
|
|
||||||
template <typename T> struct tref4;
|
|
||||||
template <typename T> struct tvec1;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
|
|
||||||
template <typename T>
|
typedef tvec1<T> type;
|
||||||
struct tvec1
|
typedef tvec1<bool> bool_type;
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
|
|
||||||
typedef T value_type;
|
//////////////////////////////////////
|
||||||
typedef std::size_t size_type;
|
// Data
|
||||||
GLM_FUNC_DECL size_type length() const;
|
|
||||||
static GLM_FUNC_DECL size_type value_size();
|
|
||||||
|
|
||||||
typedef tvec1<T> type;
|
|
||||||
typedef tvec1<bool> bool_type;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Data
|
|
||||||
|
|
||||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||||
value_type x;
|
value_type x;
|
||||||
@ -56,123 +50,123 @@ namespace glm
|
|||||||
union {value_type x, r, s;};
|
union {value_type x, r, s;};
|
||||||
# endif//GLM_COMPONENT
|
# endif//GLM_COMPONENT
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Accesses
|
// Accesses
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1();
|
GLM_FUNC_DECL tvec1();
|
||||||
GLM_FUNC_DECL tvec1(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1(tvec1<T> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Explicit basic constructors
|
// Explicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tvec1(
|
GLM_FUNC_DECL explicit tvec1(
|
||||||
ctor);
|
ctor);
|
||||||
GLM_FUNC_DECL explicit tvec1(
|
GLM_FUNC_DECL explicit tvec1(
|
||||||
value_type const & s);
|
value_type const & s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1(tref1<T> const & r);
|
GLM_FUNC_DECL tvec1(tref1<T> const & r);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Convertion scalar constructors
|
// Convertion scalar constructors
|
||||||
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec1(U const & s);
|
GLM_FUNC_DECL explicit tvec1(U const & s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Convertion vector constructors
|
// Convertion vector constructors
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec2<U> const & v);
|
GLM_FUNC_DECL explicit tvec1(tvec2<U> const & v);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec3<U> const & v);
|
GLM_FUNC_DECL explicit tvec1(tvec3<U> const & v);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec4<U> const & v);
|
GLM_FUNC_DECL explicit tvec1(tvec4<U> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T> const & v);
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1<T> & operator+=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator+=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator+=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator+=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator-=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator-=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator-=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator-=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator*=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator*=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator*=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator*=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator/=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator/=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator/=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator/=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator++();
|
GLM_FUNC_DECL tvec1<T> & operator++();
|
||||||
GLM_FUNC_DECL tvec1<T> & operator--();
|
GLM_FUNC_DECL tvec1<T> & operator--();
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary bit operators
|
// Unary bit operators
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1<T> & operator%=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator%=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator%=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator%=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator&=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator&=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator&=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator&=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator|=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator|=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator|=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator|=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator^=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator^=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator^=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator^=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator<<=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator<<=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator<<=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator<<=(tvec1<T> const & v);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator>>=(value_type const & s);
|
GLM_FUNC_DECL tvec1<T> & operator>>=(value_type const & s);
|
||||||
GLM_FUNC_DECL tvec1<T> & operator>>=(tvec1<T> const & v);
|
GLM_FUNC_DECL tvec1<T> & operator>>=(tvec1<T> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle operators
|
// Swizzle operators
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
||||||
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
||||||
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||||
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||||
GLM_FUNC_DECL tref1<T> swizzle(comp X);
|
GLM_FUNC_DECL tref1<T> swizzle(comp X);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct tref1
|
struct tref1
|
||||||
{
|
{
|
||||||
GLM_FUNC_DECL tref1(T & x);
|
GLM_FUNC_DECL tref1(T & x);
|
||||||
GLM_FUNC_DECL tref1(tref1<T> const & r);
|
GLM_FUNC_DECL tref1(tref1<T> const & r);
|
||||||
GLM_FUNC_DECL tref1(tvec1<T> const & v);
|
GLM_FUNC_DECL tref1(tvec1<T> const & v);
|
||||||
|
|
||||||
GLM_FUNC_DECL tref1<T> & operator= (tref1<T> const & r);
|
GLM_FUNC_DECL tref1<T> & operator= (tref1<T> const & r);
|
||||||
GLM_FUNC_DECL tref1<T> & operator= (tvec1<T> const & v);
|
GLM_FUNC_DECL tref1<T> & operator= (tvec1<T> const & v);
|
||||||
|
|
||||||
T& x;
|
T& x;
|
||||||
};
|
};
|
||||||
|
|
||||||
GLM_DETAIL_IS_VECTOR(tvec1);
|
GLM_DETAIL_IS_VECTOR(tvec1);
|
||||||
|
|
||||||
typedef detail::tvec1<core::type::precision::highp_float> highp_vec1_t;
|
typedef detail::tvec1<core::type::precision::highp_float> highp_vec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::mediump_float> mediump_vec1_t;
|
typedef detail::tvec1<core::type::precision::mediump_float> mediump_vec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::lowp_float> lowp_vec1_t;
|
typedef detail::tvec1<core::type::precision::lowp_float> lowp_vec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::highp_int> highp_ivec1_t;
|
typedef detail::tvec1<core::type::precision::highp_int> highp_ivec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::mediump_int> mediump_ivec1_t;
|
typedef detail::tvec1<core::type::precision::mediump_int> mediump_ivec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::lowp_int> lowp_ivec1_t;
|
typedef detail::tvec1<core::type::precision::lowp_int> lowp_ivec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::highp_uint> highp_uvec1_t;
|
typedef detail::tvec1<core::type::precision::highp_uint> highp_uvec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::mediump_uint> mediump_uvec1_t;
|
typedef detail::tvec1<core::type::precision::mediump_uint> mediump_uvec1_t;
|
||||||
typedef detail::tvec1<core::type::precision::lowp_uint> lowp_uvec1_t;
|
typedef detail::tvec1<core::type::precision::lowp_uint> lowp_uvec1_t;
|
||||||
|
|
||||||
} //namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_vec1.inl"
|
#include "type_vec1.inl"
|
||||||
#endif
|
#endif//GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif//glm_core_type_gentype1
|
#endif//glm_core_type_gentype1
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,251 +16,248 @@
|
|||||||
#include "type_size.hpp"
|
#include "type_size.hpp"
|
||||||
#include "_swizzle.hpp"
|
#include "_swizzle.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tref2;
|
||||||
|
template <typename T> struct tref3;
|
||||||
|
template <typename T> struct tref4;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
|
||||||
|
//! The basic 2D vector type.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tvec2
|
||||||
{
|
{
|
||||||
void main_vec2();
|
enum ctor{null};
|
||||||
}
|
|
||||||
//namespace test
|
|
||||||
|
|
||||||
namespace detail
|
typedef T value_type;
|
||||||
{
|
typedef std::size_t size_type;
|
||||||
template <typename T> struct tref2;
|
GLM_FUNC_DECL size_type length() const;
|
||||||
template <typename T> struct tref3;
|
static GLM_FUNC_DECL size_type value_size();
|
||||||
template <typename T> struct tref4;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
|
|
||||||
//! The basic 2D vector type.
|
typedef tvec2<T> type;
|
||||||
//! \ingroup core_template
|
typedef tvec2<bool> bool_type;
|
||||||
template <typename T>
|
|
||||||
struct tvec2
|
|
||||||
{
|
|
||||||
enum ctor{null};
|
|
||||||
|
|
||||||
typedef T value_type;
|
//////////////////////////////////////
|
||||||
typedef std::size_t size_type;
|
// Data
|
||||||
GLM_FUNC_DECL size_type length() const;
|
|
||||||
static GLM_FUNC_DECL size_type value_size();
|
|
||||||
|
|
||||||
typedef tvec2<T> type;
|
|
||||||
typedef tvec2<bool> bool_type;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Data
|
|
||||||
|
|
||||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||||
value_type x, y;
|
value_type x, y;
|
||||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct{value_type x, y;};
|
struct{value_type x, y;};
|
||||||
struct{value_type r, g;};
|
struct{value_type r, g;};
|
||||||
struct{value_type s, t;};
|
struct{value_type s, t;};
|
||||||
};
|
};
|
||||||
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
||||||
union {value_type x, r, s;};
|
union {value_type x, r, s;};
|
||||||
union {value_type y, g, t;};
|
union {value_type y, g, t;};
|
||||||
# endif//GLM_COMPONENT
|
# endif//GLM_COMPONENT
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Accesses
|
// Accesses
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec2();
|
GLM_FUNC_DECL tvec2();
|
||||||
GLM_FUNC_DECL tvec2(tvec2<T> const & v);
|
GLM_FUNC_DECL tvec2(tvec2<T> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Explicit basic constructors
|
// Explicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tvec2(
|
GLM_FUNC_DECL explicit tvec2(
|
||||||
ctor);
|
ctor);
|
||||||
GLM_FUNC_DECL explicit tvec2(
|
GLM_FUNC_DECL explicit tvec2(
|
||||||
value_type const & s);
|
value_type const & s);
|
||||||
GLM_FUNC_DECL explicit tvec2(
|
GLM_FUNC_DECL explicit tvec2(
|
||||||
value_type const & s1,
|
value_type const & s1,
|
||||||
value_type const & s2);
|
value_type const & s2);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
tvec2(tref2<T> const & r);
|
tvec2(tref2<T> const & r);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Convertion constructors
|
// Convertion constructors
|
||||||
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec2(
|
GLM_FUNC_DECL explicit tvec2(
|
||||||
U const & x);
|
U const & x);
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U, typename V>
|
template <typename U, typename V>
|
||||||
GLM_FUNC_DECL explicit tvec2(
|
GLM_FUNC_DECL explicit tvec2(
|
||||||
U const & x,
|
U const & x,
|
||||||
V const & y);
|
V const & y);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Convertion vector constructors
|
// Convertion vector constructors
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec2<U> const & v);
|
GLM_FUNC_DECL explicit tvec2(tvec2<U> const & v);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec3<U> const & v);
|
GLM_FUNC_DECL explicit tvec2(tvec3<U> const & v);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec4<U> const & v);
|
GLM_FUNC_DECL explicit tvec2(tvec4<U> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<T> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<T> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator+=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator+=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator-=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator-=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator*=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator*=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator/=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator/=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v);
|
||||||
GLM_FUNC_DECL tvec2<T> & operator++();
|
GLM_FUNC_DECL tvec2<T> & operator++();
|
||||||
GLM_FUNC_DECL tvec2<T> & operator--();
|
GLM_FUNC_DECL tvec2<T> & operator--();
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary bit operators
|
// Unary bit operators
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator%= (U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator%= (U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator&= (U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator&= (U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator|= (U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator|= (U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator^= (U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator^= (U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s);
|
GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v);
|
GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle operators
|
// Swizzle operators
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
||||||
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
||||||
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||||
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||||
GLM_FUNC_DECL tref2<T> swizzle(comp X, comp Y);
|
GLM_FUNC_DECL tref2<T> swizzle(comp X, comp Y);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct tref2
|
struct tref2
|
||||||
{
|
|
||||||
GLM_FUNC_DECL tref2(T & x, T & y);
|
|
||||||
GLM_FUNC_DECL tref2(tref2<T> const & r);
|
|
||||||
GLM_FUNC_DECL tref2(tvec2<T> const & v);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
|
|
||||||
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
|
|
||||||
|
|
||||||
T& x;
|
|
||||||
T& y;
|
|
||||||
};
|
|
||||||
|
|
||||||
GLM_DETAIL_IS_VECTOR(tvec2);
|
|
||||||
|
|
||||||
} //namespace detail
|
|
||||||
|
|
||||||
namespace core{
|
|
||||||
namespace type{
|
|
||||||
|
|
||||||
namespace precision
|
|
||||||
{
|
{
|
||||||
//! 2 components vector of high precision floating-point numbers.
|
GLM_FUNC_DECL tref2(T & x, T & y);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref2(tref2<T> const & r);
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
GLM_FUNC_DECL tref2(tvec2<T> const & v);
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<highp_float> highp_vec2;
|
|
||||||
//! 2 components vector of medium precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<mediump_float> mediump_vec2;
|
|
||||||
//! 2 components vector of low precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<lowp_float> lowp_vec2;
|
|
||||||
|
|
||||||
//! 2 components vector of high precision signed integer numbers.
|
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<highp_int> highp_ivec2;
|
|
||||||
//! 2 components vector of medium precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<mediump_int> mediump_ivec2;
|
|
||||||
//! 2 components vector of low precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<lowp_int> lowp_ivec2;
|
|
||||||
|
|
||||||
//! 2 components vector of high precision unsigned integer numbers.
|
T& x;
|
||||||
//! There is no guarantee on the actual precision.
|
T& y;
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
};
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<highp_uint> highp_uvec2;
|
|
||||||
//! 2 components vector of medium precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<mediump_uint> mediump_uvec2;
|
|
||||||
//! 2 components vector of low precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec2<lowp_uint> lowp_uvec2;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
GLM_DETAIL_IS_VECTOR(tvec2);
|
||||||
}//namespace core
|
|
||||||
|
} //namespace detail
|
||||||
|
|
||||||
|
namespace core{
|
||||||
|
namespace type{
|
||||||
|
namespace precision
|
||||||
|
{
|
||||||
|
//! 2 components vector of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<highp_float> highp_vec2;
|
||||||
|
|
||||||
|
//! 2 components vector of medium precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<mediump_float> mediump_vec2;
|
||||||
|
|
||||||
|
//! 2 components vector of low precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<lowp_float> lowp_vec2;
|
||||||
|
|
||||||
|
//! 2 components vector of high precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<highp_int> highp_ivec2;
|
||||||
|
|
||||||
|
//! 2 components vector of medium precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<mediump_int> mediump_ivec2;
|
||||||
|
|
||||||
|
//! 2 components vector of low precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<lowp_int> lowp_ivec2;
|
||||||
|
|
||||||
|
//! 2 components vector of high precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<highp_uint> highp_uvec2;
|
||||||
|
|
||||||
|
//! 2 components vector of medium precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<mediump_uint> mediump_uvec2;
|
||||||
|
|
||||||
|
//! 2 components vector of low precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec2<lowp_uint> lowp_uvec2;
|
||||||
|
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_vec2.inl"
|
#include "type_vec2.inl"
|
||||||
#endif
|
#endif//GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif//glm_core_type_gentype2
|
#endif//glm_core_type_gentype2
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,256 +16,254 @@
|
|||||||
#include "type_size.hpp"
|
#include "type_size.hpp"
|
||||||
#include "_swizzle.hpp"
|
#include "_swizzle.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tref2;
|
||||||
{
|
template <typename T> struct tref3;
|
||||||
void main_vec3();
|
template <typename T> struct tref4;
|
||||||
}//namespace test
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec4;
|
||||||
|
|
||||||
namespace detail
|
//! Basic 3D vector type.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tvec3
|
||||||
{
|
{
|
||||||
template <typename T> struct tref2;
|
enum ctor{null};
|
||||||
template <typename T> struct tref3;
|
|
||||||
template <typename T> struct tref4;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec4;
|
|
||||||
|
|
||||||
//! Basic 3D vector type.
|
typedef T value_type;
|
||||||
//! \ingroup core_template
|
typedef std::size_t size_type;
|
||||||
template <typename T>
|
GLM_FUNC_DECL size_type length() const;
|
||||||
struct tvec3
|
static GLM_FUNC_DECL size_type value_size();
|
||||||
|
|
||||||
|
typedef tvec3<T> type;
|
||||||
|
typedef tvec3<bool> bool_type;
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Data
|
||||||
|
|
||||||
|
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||||
|
value_type x, y, z;
|
||||||
|
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
||||||
|
union
|
||||||
{
|
{
|
||||||
enum ctor{null};
|
struct{value_type x, y, z;};
|
||||||
|
struct{value_type r, g, b;};
|
||||||
typedef T value_type;
|
struct{value_type s, t, p;};
|
||||||
typedef std::size_t size_type;
|
|
||||||
GLM_FUNC_DECL size_type length() const;
|
|
||||||
static GLM_FUNC_DECL size_type value_size();
|
|
||||||
|
|
||||||
typedef tvec3<T> type;
|
|
||||||
typedef tvec3<bool> bool_type;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Data
|
|
||||||
|
|
||||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
|
||||||
value_type x, y, z;
|
|
||||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct{value_type x, y, z;};
|
|
||||||
struct{value_type r, g, b;};
|
|
||||||
struct{value_type s, t, p;};
|
|
||||||
};
|
|
||||||
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
|
||||||
union {value_type x, r, s;};
|
|
||||||
union {value_type y, g, t;};
|
|
||||||
union {value_type z, b, p;};
|
|
||||||
# endif//GLM_COMPONENT
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Accesses
|
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
|
||||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Implicit basic constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec3();
|
|
||||||
GLM_FUNC_DECL tvec3(tvec3<T> const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Explicit basic constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tvec3(
|
|
||||||
ctor);
|
|
||||||
GLM_FUNC_DECL explicit tvec3(
|
|
||||||
value_type const & s);
|
|
||||||
GLM_FUNC_DECL explicit tvec3(
|
|
||||||
value_type const & s1,
|
|
||||||
value_type const & s2,
|
|
||||||
value_type const & s3);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Swizzle constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec3(tref3<T> const & r);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Convertion scalar constructors
|
|
||||||
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(
|
|
||||||
U const & x);
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U, typename V, typename W>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(
|
|
||||||
U const & x,
|
|
||||||
V const & y,
|
|
||||||
W const & z);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Convertion vector constructors
|
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(tvec2<A> const & v, B const & s);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(tvec3<U> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(tvec4<U> const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Unary arithmetic operators
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
|
|
||||||
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v);
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator++();
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator--();
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Unary bit operators
|
|
||||||
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Swizzle operators
|
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
|
||||||
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
|
||||||
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
|
||||||
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
|
||||||
GLM_FUNC_DECL tref3<T> swizzle(comp X, comp Y, comp Z);
|
|
||||||
};
|
};
|
||||||
|
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
||||||
|
union {value_type x, r, s;};
|
||||||
|
union {value_type y, g, t;};
|
||||||
|
union {value_type z, b, p;};
|
||||||
|
# endif//GLM_COMPONENT
|
||||||
|
|
||||||
template <typename T>
|
//////////////////////////////////////
|
||||||
struct tref3
|
// Accesses
|
||||||
{
|
|
||||||
GLM_FUNC_DECL tref3(T & x, T & y, T & z);
|
|
||||||
GLM_FUNC_DECL tref3(tref3<T> const & r);
|
|
||||||
GLM_FUNC_DECL tref3(tvec3<T> const & v);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||||
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||||
|
|
||||||
T & x;
|
//////////////////////////////////////
|
||||||
T & y;
|
// Implicit basic constructors
|
||||||
T & z;
|
|
||||||
};
|
|
||||||
|
|
||||||
GLM_DETAIL_IS_VECTOR(tvec3);
|
GLM_FUNC_DECL tvec3();
|
||||||
} //namespace detail
|
GLM_FUNC_DECL tvec3(tvec3<T> const & v);
|
||||||
|
|
||||||
namespace core{
|
//////////////////////////////////////
|
||||||
namespace type{
|
// Explicit basic constructors
|
||||||
|
|
||||||
namespace precision
|
GLM_FUNC_DECL explicit tvec3(
|
||||||
|
ctor);
|
||||||
|
GLM_FUNC_DECL explicit tvec3(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tvec3(
|
||||||
|
value_type const & s1,
|
||||||
|
value_type const & s2,
|
||||||
|
value_type const & s3);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Swizzle constructors
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec3(tref3<T> const & r);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion scalar constructors
|
||||||
|
|
||||||
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(
|
||||||
|
U const & x);
|
||||||
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, typename V, typename W>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(
|
||||||
|
U const & x,
|
||||||
|
V const & y,
|
||||||
|
W const & z);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion vector constructors
|
||||||
|
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(tvec2<A> const & v, B const & s);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B> const & v);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(tvec3<U> const & v);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(tvec4<U> const & v);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
|
||||||
|
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v);
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator++();
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator--();
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Unary bit operators
|
||||||
|
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Swizzle operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
||||||
|
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
||||||
|
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||||
|
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||||
|
GLM_FUNC_DECL tref3<T> swizzle(comp X, comp Y, comp Z);
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct tref3
|
||||||
{
|
{
|
||||||
//! 3 components vector of high precision floating-point numbers.
|
GLM_FUNC_DECL tref3(T & x, T & y, T & z);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref3(tref3<T> const & r);
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
GLM_FUNC_DECL tref3(tvec3<T> const & v);
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<highp_float> highp_vec3;
|
|
||||||
//! 3 components vector of medium precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<mediump_float> mediump_vec3;
|
|
||||||
//! 3 components vector of low precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<lowp_float> lowp_vec3;
|
|
||||||
|
|
||||||
//! 3 components vector of high precision signed integer numbers.
|
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<highp_int> highp_ivec3;
|
|
||||||
//! 3 components vector of medium precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<mediump_int> mediump_ivec3;
|
|
||||||
//! 3 components vector of low precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<lowp_int> lowp_ivec3;
|
|
||||||
|
|
||||||
//! 3 components vector of high precision unsigned integer numbers.
|
T & x;
|
||||||
//! There is no guarantee on the actual precision.
|
T & y;
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
T & z;
|
||||||
//! \ingroup core_precision
|
};
|
||||||
typedef detail::tvec3<highp_uint> highp_uvec3;
|
|
||||||
//! 3 components vector of medium precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<mediump_uint> mediump_uvec3;
|
|
||||||
//! 3 components vector of low precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec3<lowp_uint> lowp_uvec3;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
GLM_DETAIL_IS_VECTOR(tvec3);
|
||||||
}//namespace core
|
} //namespace detail
|
||||||
|
|
||||||
|
namespace core{
|
||||||
|
namespace type{
|
||||||
|
namespace precision
|
||||||
|
{
|
||||||
|
//! 3 components vector of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<highp_float> highp_vec3;
|
||||||
|
|
||||||
|
//! 3 components vector of medium precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<mediump_float> mediump_vec3;
|
||||||
|
|
||||||
|
//! 3 components vector of low precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<lowp_float> lowp_vec3;
|
||||||
|
|
||||||
|
//! 3 components vector of high precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<highp_int> highp_ivec3;
|
||||||
|
|
||||||
|
//! 3 components vector of medium precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<mediump_int> mediump_ivec3;
|
||||||
|
|
||||||
|
//! 3 components vector of low precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<lowp_int> lowp_ivec3;
|
||||||
|
|
||||||
|
//! 3 components vector of high precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<highp_uint> highp_uvec3;
|
||||||
|
|
||||||
|
//! 3 components vector of medium precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<mediump_uint> mediump_uvec3;
|
||||||
|
|
||||||
|
//! 3 components vector of low precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec3<lowp_uint> lowp_uvec3;
|
||||||
|
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_vec3.inl"
|
#include "type_vec3.inl"
|
||||||
#endif
|
#endif//GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif//glm_core_type_gentype3
|
#endif//glm_core_type_gentype3
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,275 +16,267 @@
|
|||||||
#include "type_size.hpp"
|
#include "type_size.hpp"
|
||||||
#include "_swizzle.hpp"
|
#include "_swizzle.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
{
|
{
|
||||||
namespace test
|
template <typename T> struct tref2;
|
||||||
{
|
template <typename T> struct tref3;
|
||||||
void main_vec4();
|
template <typename T> struct tref4;
|
||||||
}//namespace test
|
template <typename T> struct tvec2;
|
||||||
|
template <typename T> struct tvec3;
|
||||||
|
|
||||||
namespace detail
|
///Basic 4D vector type.
|
||||||
|
//! \ingroup core_template
|
||||||
|
template <typename T>
|
||||||
|
struct tvec4
|
||||||
{
|
{
|
||||||
template <typename T> struct tref2;
|
enum ctor{null};
|
||||||
template <typename T> struct tref3;
|
|
||||||
template <typename T> struct tref4;
|
|
||||||
template <typename T> struct tvec2;
|
|
||||||
template <typename T> struct tvec3;
|
|
||||||
|
|
||||||
///Basic 4D vector type.
|
typedef T value_type;
|
||||||
//! \ingroup core_template
|
typedef std::size_t size_type;
|
||||||
template <typename T>
|
GLM_FUNC_DECL size_type length() const;
|
||||||
struct tvec4
|
static GLM_FUNC_DECL size_type value_size();
|
||||||
|
|
||||||
|
typedef tvec4<T> type;
|
||||||
|
typedef tvec4<bool> bool_type;
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Data
|
||||||
|
|
||||||
|
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||||
|
value_type x, y, z, w;
|
||||||
|
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
||||||
|
union
|
||||||
{
|
{
|
||||||
enum ctor{null};
|
struct{value_type x, y, z, w;};
|
||||||
|
struct{value_type r, g, b, a;};
|
||||||
typedef T value_type;
|
struct{value_type s, t, p, q;};
|
||||||
typedef std::size_t size_type;
|
|
||||||
GLM_FUNC_DECL size_type length() const;
|
|
||||||
static GLM_FUNC_DECL size_type value_size();
|
|
||||||
|
|
||||||
typedef tvec4<T> type;
|
|
||||||
typedef tvec4<bool> bool_type;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Data
|
|
||||||
|
|
||||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
|
||||||
value_type x, y, z, w;
|
|
||||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct{value_type x, y, z, w;};
|
|
||||||
struct{value_type r, g, b, a;};
|
|
||||||
struct{value_type s, t, p, q;};
|
|
||||||
};
|
|
||||||
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
|
||||||
union {value_type x, r, s;};
|
|
||||||
union {value_type y, g, t;};
|
|
||||||
union {value_type z, b, p;};
|
|
||||||
union {value_type w, a, q;};
|
|
||||||
# endif//GLM_COMPONENT
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Accesses
|
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type & operator[](size_type i);
|
|
||||||
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Implicit basic constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec4();
|
|
||||||
GLM_FUNC_DECL tvec4(type const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Explicit basic constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL explicit tvec4(
|
|
||||||
ctor);
|
|
||||||
GLM_FUNC_DECL explicit tvec4(
|
|
||||||
value_type const & s);
|
|
||||||
GLM_FUNC_DECL explicit tvec4(
|
|
||||||
value_type const & s0,
|
|
||||||
value_type const & s1,
|
|
||||||
value_type const & s2,
|
|
||||||
value_type const & s3);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Swizzle constructors
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec4(tref4<T> const & r);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Convertion scalar constructors
|
|
||||||
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(
|
|
||||||
U const & x);
|
|
||||||
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B, typename C, typename D>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(
|
|
||||||
A const & x,
|
|
||||||
B const & y,
|
|
||||||
C const & z,
|
|
||||||
D const & w);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Convertion vector constructors
|
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B, typename C>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v, B const & s1, C const & s2);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B, typename C>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B> const & v, C const & s2);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B, typename C>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec3<A> const & v, B const & s);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename A, typename B>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v1, tvec2<B> const & v2);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec4<U> const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Unary arithmetic operators
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<T> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
|
|
||||||
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v);
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator++();
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator--();
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Unary bit operators
|
|
||||||
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s);
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Swizzle operators
|
|
||||||
|
|
||||||
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
|
||||||
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
|
||||||
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
|
||||||
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
|
||||||
GLM_FUNC_DECL tref4<T> swizzle(comp X, comp Y, comp Z, comp W);
|
|
||||||
};
|
};
|
||||||
|
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
||||||
|
union {value_type x, r, s;};
|
||||||
|
union {value_type y, g, t;};
|
||||||
|
union {value_type z, b, p;};
|
||||||
|
union {value_type w, a, q;};
|
||||||
|
# endif//GLM_COMPONENT
|
||||||
|
|
||||||
template <typename T>
|
//////////////////////////////////////
|
||||||
struct tref4
|
// Accesses
|
||||||
{
|
|
||||||
GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w);
|
|
||||||
GLM_FUNC_DECL tref4(tref4<T> const & r);
|
|
||||||
GLM_FUNC_DECL tref4(tvec4<T> const & v);
|
|
||||||
|
|
||||||
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
GLM_FUNC_DECL value_type & operator[](size_type i);
|
||||||
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
|
||||||
|
|
||||||
T & x;
|
//////////////////////////////////////
|
||||||
T & y;
|
// Implicit basic constructors
|
||||||
T & z;
|
|
||||||
T & w;
|
|
||||||
};
|
|
||||||
|
|
||||||
GLM_DETAIL_IS_VECTOR(tvec4);
|
GLM_FUNC_DECL tvec4();
|
||||||
} //namespace detail
|
GLM_FUNC_DECL tvec4(type const & v);
|
||||||
|
|
||||||
namespace core{
|
//////////////////////////////////////
|
||||||
namespace type{
|
// Explicit basic constructors
|
||||||
|
|
||||||
//////////////////////////
|
GLM_FUNC_DECL explicit tvec4(
|
||||||
// Float definition
|
ctor);
|
||||||
|
GLM_FUNC_DECL explicit tvec4(
|
||||||
|
value_type const & s);
|
||||||
|
GLM_FUNC_DECL explicit tvec4(
|
||||||
|
value_type const & s0,
|
||||||
|
value_type const & s1,
|
||||||
|
value_type const & s2,
|
||||||
|
value_type const & s3);
|
||||||
|
|
||||||
namespace precision
|
//////////////////////////////////////
|
||||||
|
// Swizzle constructors
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec4(tref4<T> const & r);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion scalar constructors
|
||||||
|
|
||||||
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(
|
||||||
|
U const & x);
|
||||||
|
//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B, typename C, typename D>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(
|
||||||
|
A const & x,
|
||||||
|
B const & y,
|
||||||
|
C const & z,
|
||||||
|
D const & w);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Convertion vector constructors
|
||||||
|
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B, typename C>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v, B const & s1, C const & s2);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B, typename C>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B> const & v, C const & s2);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B, typename C>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C> const & v);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(tvec3<A> const & v, B const & s);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B> const & v);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename A, typename B>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(tvec2<A> const & v1, tvec2<B> const & v2);
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(tvec4<U> const & v);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<T> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
|
||||||
|
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v);
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator++();
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator--();
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Unary bit operators
|
||||||
|
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s);
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Swizzle operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL value_type swizzle(comp X) const;
|
||||||
|
GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y) const;
|
||||||
|
GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z) const;
|
||||||
|
GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||||
|
GLM_FUNC_DECL tref4<T> swizzle(comp X, comp Y, comp Z, comp W);
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct tref4
|
||||||
{
|
{
|
||||||
//! 4 components vector of high precision floating-point numbers.
|
GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref4(tref4<T> const & r);
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
GLM_FUNC_DECL tref4(tvec4<T> const & v);
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<highp_float> highp_vec4;
|
|
||||||
//! 4 components vector of medium precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<mediump_float> mediump_vec4;
|
|
||||||
//! 4 components vector of low precision floating-point numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<lowp_float> lowp_vec4;
|
|
||||||
|
|
||||||
//! 4 components vector of high precision signed integer numbers.
|
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
||||||
//! There is no guarantee on the actual precision.
|
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<highp_int> highp_ivec4;
|
|
||||||
//! 4 components vector of medium precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<mediump_int> mediump_ivec4;
|
|
||||||
//! 4 components vector of low precision signed integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<lowp_int> lowp_ivec4;
|
|
||||||
|
|
||||||
//! 4 components vector of high precision unsigned integer numbers.
|
T & x;
|
||||||
//! There is no guarantee on the actual precision.
|
T & y;
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
T & z;
|
||||||
//! \ingroup core_precision
|
T & w;
|
||||||
typedef detail::tvec4<highp_uint> highp_uvec4;
|
};
|
||||||
//! 4 components vector of medium precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<mediump_uint> mediump_uvec4;
|
|
||||||
//! 4 components vector of low precision unsigned integer numbers.
|
|
||||||
//! There is no guarantee on the actual precision.
|
|
||||||
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
|
||||||
//! \ingroup core_precision
|
|
||||||
typedef detail::tvec4<lowp_uint> lowp_uvec4;
|
|
||||||
}
|
|
||||||
//namespace precision
|
|
||||||
|
|
||||||
}//namespace type
|
GLM_DETAIL_IS_VECTOR(tvec4);
|
||||||
}//namespace core
|
}//namespace detail
|
||||||
|
|
||||||
using namespace core::type;
|
namespace core{
|
||||||
|
namespace type{
|
||||||
|
namespace precision
|
||||||
|
{
|
||||||
|
//! 4 components vector of high precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<highp_float> highp_vec4;
|
||||||
|
|
||||||
|
//! 4 components vector of medium precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<mediump_float> mediump_vec4;
|
||||||
|
|
||||||
|
//! 4 components vector of low precision floating-point numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.5.2 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<lowp_float> lowp_vec4;
|
||||||
|
|
||||||
|
//! 4 components vector of high precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<highp_int> highp_ivec4;
|
||||||
|
|
||||||
|
//! 4 components vector of medium precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<mediump_int> mediump_ivec4;
|
||||||
|
|
||||||
|
//! 4 components vector of low precision signed integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<lowp_int> lowp_ivec4;
|
||||||
|
|
||||||
|
//! 4 components vector of high precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<highp_uint> highp_uvec4;
|
||||||
|
|
||||||
|
//! 4 components vector of medium precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<mediump_uint> mediump_uvec4;
|
||||||
|
|
||||||
|
//! 4 components vector of low precision unsigned integer numbers.
|
||||||
|
//! There is no guarantee on the actual precision.
|
||||||
|
//! From GLSL 1.30.8 specification, section 4.1.5 Precision Qualifiers.
|
||||||
|
//! \ingroup core_precision
|
||||||
|
typedef detail::tvec4<lowp_uint> lowp_uvec4;
|
||||||
|
|
||||||
|
}//namespace precision
|
||||||
|
}//namespace type
|
||||||
|
}//namespace core
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
#include "type_vec4.inl"
|
#include "type_vec4.inl"
|
||||||
#endif
|
#endif//GLM_EXTERNAL_TEMPLATE
|
||||||
|
|
||||||
#endif//glm_core_type_gentype4
|
#endif//glm_core_type_gentype4
|
||||||
|
File diff suppressed because it is too large
Load Diff
30
glm/glm.hpp
30
glm/glm.hpp
@ -26,12 +26,6 @@
|
|||||||
//! GLM namespace, it contains all GLSL based features.
|
//! GLM namespace, it contains all GLSL based features.
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
namespace test
|
|
||||||
{
|
|
||||||
bool main_bug();
|
|
||||||
bool main_core();
|
|
||||||
}//namespace test
|
|
||||||
|
|
||||||
//! GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace.
|
//! GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace.
|
||||||
namespace core
|
namespace core
|
||||||
{
|
{
|
||||||
@ -39,13 +33,15 @@ namespace glm
|
|||||||
//! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section,
|
//! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section,
|
||||||
//! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification.
|
//! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification.
|
||||||
//! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification.
|
//! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification.
|
||||||
namespace type{}
|
namespace type
|
||||||
|
{
|
||||||
|
namespace precision{}
|
||||||
|
}
|
||||||
|
|
||||||
//! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification.
|
//! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification.
|
||||||
//! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions.
|
//! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions.
|
||||||
namespace function{}
|
namespace function{}
|
||||||
}
|
}//namespace core
|
||||||
//namespace core
|
|
||||||
|
|
||||||
//! G-Truc Creation stable extensions.
|
//! G-Truc Creation stable extensions.
|
||||||
namespace gtc{}
|
namespace gtc{}
|
||||||
@ -55,9 +51,12 @@ namespace glm
|
|||||||
namespace gtx{}
|
namespace gtx{}
|
||||||
|
|
||||||
//! VIRTREV extensions.
|
//! VIRTREV extensions.
|
||||||
namespace img{}
|
namespace virtrev{}
|
||||||
|
|
||||||
} //namespace glm
|
using namespace core::type;
|
||||||
|
using namespace core::type::precision;
|
||||||
|
using namespace core::function;
|
||||||
|
}//namespace glm
|
||||||
|
|
||||||
#include "./core/_detail.hpp"
|
#include "./core/_detail.hpp"
|
||||||
#include "./core/type.hpp"
|
#include "./core/type.hpp"
|
||||||
@ -73,13 +72,6 @@ namespace glm
|
|||||||
#include "./core/func_noise.hpp"
|
#include "./core/func_noise.hpp"
|
||||||
#include "./core/_swizzle.hpp"
|
#include "./core/_swizzle.hpp"
|
||||||
|
|
||||||
namespace glm
|
|
||||||
{
|
|
||||||
using namespace core::type;
|
|
||||||
using namespace core::type::precision;
|
|
||||||
using namespace core::function;
|
|
||||||
} //namespace glm
|
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
// check type sizes
|
// check type sizes
|
||||||
#ifndef GLM_STATIC_ASSERT_NULL
|
#ifndef GLM_STATIC_ASSERT_NULL
|
||||||
@ -98,4 +90,4 @@ namespace glm
|
|||||||
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform");
|
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform");
|
||||||
#endif//GLM_STATIC_ASSERT_NULL
|
#endif//GLM_STATIC_ASSERT_NULL
|
||||||
|
|
||||||
#endif //glm_glm
|
#endif//glm_glm
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Dependency:
|
// Dependency:
|
||||||
// - GLM core
|
// - GLM core
|
||||||
// - GLM_GTX_half
|
// - GLM_GTC_half_float
|
||||||
|
// - GLM_GTC_quaternion
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef glm_gtx_epsilon
|
#ifndef glm_gtx_epsilon
|
||||||
@ -17,6 +18,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/half_float.hpp"
|
#include "../gtc/half_float.hpp"
|
||||||
|
#include "../gtc/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||||
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
||||||
|
@ -157,6 +157,21 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
|
|||||||
abs(x.w - y.w) < epsilon.w);
|
abs(x.w - y.w) < epsilon.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename valType>
|
||||||
|
GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
|
||||||
|
(
|
||||||
|
detail::tquat<valType> const & x,
|
||||||
|
detail::tquat<valType> const & y,
|
||||||
|
detail::tquat<valType> const & epsilon
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return detail::tvec4<bool>(
|
||||||
|
abs(x.x - y.x) < epsilon.x,
|
||||||
|
abs(x.y - y.y) < epsilon.y,
|
||||||
|
abs(x.z - y.z) < epsilon.z,
|
||||||
|
abs(x.w - y.w) < epsilon.w);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec2<bool> notEqualEpsilon
|
GLM_FUNC_QUALIFIER detail::tvec2<bool> notEqualEpsilon
|
||||||
(
|
(
|
||||||
@ -199,6 +214,21 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
|
|||||||
abs(x.w - y.w) >= epsilon.w);
|
abs(x.w - y.w) >= epsilon.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename valType>
|
||||||
|
GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
|
||||||
|
(
|
||||||
|
detail::tquat<valType> const & x,
|
||||||
|
detail::tquat<valType> const & y,
|
||||||
|
detail::tquat<valType> const & epsilon
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return detail::tvec4<bool>(
|
||||||
|
abs(x.x - y.x) >= epsilon.x,
|
||||||
|
abs(x.y - y.y) >= epsilon.y,
|
||||||
|
abs(x.z - y.z) >= epsilon.z,
|
||||||
|
abs(x.w - y.w) >= epsilon.w);
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace epsilon
|
}//namespace epsilon
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -141,19 +141,19 @@ namespace quaternion ///< GLM_GTX_quaternion extension: Quaternion types and fun
|
|||||||
valType extractRealComponent(
|
valType extractRealComponent(
|
||||||
detail::tquat<valType> const & q);
|
detail::tquat<valType> const & q);
|
||||||
|
|
||||||
//! Returns roll value of euler angles.
|
//! Returns roll value of euler angles in degrees.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType roll(
|
valType roll(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns pitch value of euler angles.
|
//! Returns pitch value of euler angles in degrees.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType pitch(
|
valType pitch(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Returns yaw value of euler angles.
|
//! Returns yaw value of euler angles in degrees.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
valType yaw(
|
valType yaw(
|
||||||
@ -162,7 +162,7 @@ namespace quaternion ///< GLM_GTX_quaternion extension: Quaternion types and fun
|
|||||||
//! Returns euler angles, yitch as x, yaw as y, roll as z.
|
//! Returns euler angles, yitch as x, yaw as y, roll as z.
|
||||||
//! From GLM_GTX_quaternion extension.
|
//! From GLM_GTX_quaternion extension.
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
detail::tvec3<valType> eularAngles(
|
detail::tvec3<valType> eulerAngles(
|
||||||
detail::tquat<valType> const & x);
|
detail::tquat<valType> const & x);
|
||||||
|
|
||||||
//! Converts a quaternion to a 3 * 3 matrix.
|
//! Converts a quaternion to a 3 * 3 matrix.
|
||||||
|
@ -215,7 +215,7 @@ namespace quaternion
|
|||||||
detail::tquat<valType> const & q
|
detail::tquat<valType> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return atan2(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z);
|
return glm::degrees(atan2(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
@ -224,7 +224,7 @@ namespace quaternion
|
|||||||
detail::tquat<valType> const & q
|
detail::tquat<valType> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return atan2(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z);
|
return glm::degrees(atan2(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
@ -233,11 +233,11 @@ namespace quaternion
|
|||||||
detail::tquat<valType> const & q
|
detail::tquat<valType> const & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return asin(valType(-2) * (q.x * q.z - q.w * q.y));
|
return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename valType>
|
template <typename valType>
|
||||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> eularAngles
|
GLM_FUNC_QUALIFIER detail::tvec3<valType> eulerAngles
|
||||||
(
|
(
|
||||||
detail::tquat<valType> const & x
|
detail::tquat<valType> const & x
|
||||||
)
|
)
|
||||||
@ -256,28 +256,28 @@ namespace quaternion
|
|||||||
if(a <= typename detail::tquat<T>::value_type(0)) return x;
|
if(a <= typename detail::tquat<T>::value_type(0)) return x;
|
||||||
if(a >= typename detail::tquat<T>::value_type(1)) return y;
|
if(a >= typename detail::tquat<T>::value_type(1)) return y;
|
||||||
|
|
||||||
float fCos = dot(x, y);
|
T fCos = dot(x, y);
|
||||||
detail::tquat<T> y2(y); //BUG!!! tquat<T> y2;
|
detail::tquat<T> y2(y); //BUG!!! tquat<T> y2;
|
||||||
if(fCos < typename detail::tquat<T>::value_type(0))
|
if(fCos < T(0))
|
||||||
{
|
{
|
||||||
y2 = -y;
|
y2 = -y;
|
||||||
fCos = -fCos;
|
fCos = -fCos;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(fCos > 1.0f) // problem
|
//if(fCos > 1.0f) // problem
|
||||||
float k0, k1;
|
T k0, k1;
|
||||||
if(fCos > typename detail::tquat<T>::value_type(0.9999))
|
if(fCos > T(0.9999))
|
||||||
{
|
{
|
||||||
k0 = typename detail::tquat<T>::value_type(1) - a;
|
k0 = T(1) - a;
|
||||||
k1 = typename detail::tquat<T>::value_type(0) + a; //BUG!!! 1.0f + a;
|
k1 = T(0) + a; //BUG!!! 1.0f + a;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
typename detail::tquat<T>::value_type fSin = sqrt(T(1) - fCos * fCos);
|
T fSin = sqrt(T(1) - fCos * fCos);
|
||||||
typename detail::tquat<T>::value_type fAngle = atan(fSin, fCos);
|
T fAngle = atan(fSin, fCos);
|
||||||
typename detail::tquat<T>::value_type fOneOverSin = T(1) / fSin;
|
T fOneOverSin = T(1) / fSin;
|
||||||
k0 = sin((typename detail::tquat<T>::value_type(1) - a) * fAngle) * fOneOverSin;
|
k0 = sin((T(1) - a) * fAngle) * fOneOverSin;
|
||||||
k1 = sin((typename detail::tquat<T>::value_type(0) + a) * fAngle) * fOneOverSin;
|
k1 = sin((T(0) + a) * fAngle) * fOneOverSin;
|
||||||
}
|
}
|
||||||
|
|
||||||
return detail::tquat<T>(
|
return detail::tquat<T>(
|
||||||
@ -295,7 +295,7 @@ namespace quaternion
|
|||||||
T const & a
|
T const & a
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return glm::normalize(x * (1 - a) + (y * a));
|
return glm::normalize(x * (T(1) - a) + (y * a));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace quaternion
|
}//namespace quaternion
|
||||||
|
@ -17,7 +17,7 @@ namespace random
|
|||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER float signedRand1()
|
GLM_FUNC_QUALIFIER float signedRand1()
|
||||||
{
|
{
|
||||||
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
#if(GLM_COMPILER & GLM_COMPILER_VC)// && (GLM_COMPILER < GLM_COMPILER_VC2010)
|
||||||
#define RAND_SHIFT_NUM 5
|
#define RAND_SHIFT_NUM 5
|
||||||
#else
|
#else
|
||||||
#define RAND_SHIFT_NUM 0
|
#define RAND_SHIFT_NUM 0
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#ifndef GLM_EXT_VIRTREV_XSTREAM_HPP
|
|
||||||
#define GLM_EXT_VIRTREV_XSTREAM_HPP
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||||
// Virtrev SDK copyright matrem (matrem84.free.fr)
|
// Virtrev SDK copyright matrem (matrem84.free.fr)
|
||||||
@ -15,6 +12,9 @@
|
|||||||
// - GLM_GTX_matrix_selection
|
// - GLM_GTX_matrix_selection
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef GLM_EXT_VIRTREV_XSTREAM_HPP
|
||||||
|
#define GLM_EXT_VIRTREV_XSTREAM_HPP
|
||||||
|
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/matrix_access.hpp"
|
#include "../gtc/matrix_access.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
34
readme.txt
34
readme.txt
@ -1,13 +1,13 @@
|
|||||||
================================================================================
|
================================================================================
|
||||||
G-Truc Creation
|
OpenGL Mathematics (GLM)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
www.g-truc.net
|
glm.g-truc.net
|
||||||
glm@g-truc.net
|
glm@g-truc.net
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
The MIT License
|
The MIT License
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Copyright (c) 2005 - 2011 G-Truc Creation
|
Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -37,7 +37,19 @@ More informations in GLM manual:
|
|||||||
http://glm.g-truc.net/glm-0.9.2.pdf
|
http://glm.g-truc.net/glm-0.9.2.pdf
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.2.1: 2010-05-24
|
GLM 0.9.2.3: 2011-06-08
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
- Fixed build issues
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
GLM 0.9.2.2: 2011-06-02
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
- Expend matrix constructors flexibility
|
||||||
|
- Improved quaternion implementation
|
||||||
|
- Fixed many warnings across platforms and compilers
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
GLM 0.9.2.1: 2011-05-24
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Automatically detect CUDA support
|
- Automatically detect CUDA support
|
||||||
- Improved compiler detection
|
- Improved compiler detection
|
||||||
@ -46,7 +58,7 @@ GLM 0.9.2.1: 2010-05-24
|
|||||||
- Fixed and tested GLM_GTX_rotate_vector
|
- Fixed and tested GLM_GTX_rotate_vector
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.2.0: 2010-05-09
|
GLM 0.9.2.0: 2011-05-09
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Added CUDA support
|
- Added CUDA support
|
||||||
- Added CTest test suite
|
- Added CTest test suite
|
||||||
@ -56,27 +68,27 @@ GLM 0.9.2.0: 2010-05-09
|
|||||||
- Updated quaternion slerp interpolation
|
- Updated quaternion slerp interpolation
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.3: 2010-05-07
|
GLM 0.9.1.3: 2011-05-07
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Fixed bugs
|
- Fixed bugs
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.2: 2010-04-15
|
GLM 0.9.1.2: 2011-04-15
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Fixed bugs
|
- Fixed bugs
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.1: 2010-03-17
|
GLM 0.9.1.1: 2011-03-17
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Fixed bugs
|
- Fixed bugs
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.0: 2010-03-03
|
GLM 0.9.1.0: 2011-03-03
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Fixed bugs
|
- Fixed bugs
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.B: 2010-02-13
|
GLM 0.9.1.B: 2011-02-13
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Updated API documentation
|
- Updated API documentation
|
||||||
- Improved SIMD implementation
|
- Improved SIMD implementation
|
||||||
@ -89,7 +101,7 @@ GLM 0.9.0.8: 2011-02-13
|
|||||||
- Clarify that GLM is a header only library.
|
- Clarify that GLM is a header only library.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.1.A: 2010-01-31
|
GLM 0.9.1.A: 2011-01-31
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- Added SIMD support
|
- Added SIMD support
|
||||||
- Added new swizzle functions
|
- Added new swizzle functions
|
||||||
|
@ -29,67 +29,12 @@ int test_quat_type()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_quat_slerp()
|
|
||||||
{
|
|
||||||
int Error = 0;
|
|
||||||
|
|
||||||
glm::quat A(glm::vec3(0, 0, 1));
|
|
||||||
glm::quat B(glm::vec3(0, 1, 0));
|
|
||||||
glm::quat C = glm::mix(A, B, 0.5f);
|
|
||||||
glm::quat D(glm::normalize(glm::vec3(0, 1, 1)));
|
|
||||||
|
|
||||||
Error += C == D ? 0 : 1;
|
|
||||||
|
|
||||||
return Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int test_quat_length()
|
|
||||||
{
|
|
||||||
int Error = 0;
|
|
||||||
|
|
||||||
float A = glm::length(glm::quat(45.0f, glm::vec3(0, 0, 1)));
|
|
||||||
Error += A == 1.0f ? 0 : 1;
|
|
||||||
float B = glm::length(glm::quat(90.0f, glm::vec3(0, 0, 2)));
|
|
||||||
Error += B == 2.0f ? 0 : 1;
|
|
||||||
|
|
||||||
return Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int test_quat_normalize()
|
|
||||||
{
|
|
||||||
int Error = 0;
|
|
||||||
|
|
||||||
{
|
|
||||||
glm::quat Q(45.0f, glm::vec3(0, 0, 1));
|
|
||||||
glm::quat N = glm::normalize(Q);
|
|
||||||
float L = glm::length(N);
|
|
||||||
Error += L == 1.0f ? 0 : 1;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
glm::quat Q(45.0f, glm::vec3(0, 0, 2));
|
|
||||||
glm::quat N = glm::normalize(Q);
|
|
||||||
float L = glm::length(N);
|
|
||||||
Error += L == 1.0f ? 0 : 1;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
glm::quat Q(45.0f, glm::vec3(1, 2, 3));
|
|
||||||
glm::quat N = glm::normalize(Q);
|
|
||||||
float L = glm::length(N);
|
|
||||||
Error += L == 1.0f ? 0 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += test_quat_precision();
|
Error += test_quat_precision();
|
||||||
Error += test_quat_type();
|
Error += test_quat_type();
|
||||||
Error += test_quat_slerp();
|
|
||||||
Error += test_quat_length();
|
|
||||||
Error += test_quat_normalize();
|
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
glmCreateTestGTC(gtx_bit)
|
glmCreateTestGTC(gtx_bit)
|
||||||
glmCreateTestGTC(gtx_noise)
|
glmCreateTestGTC(gtx_noise)
|
||||||
glmCreateTestGTC(gtx_quaternion)
|
glmCreateTestGTC(gtx_quaternion)
|
||||||
|
glmCreateTestGTC(gtx_random)
|
||||||
glmCreateTestGTC(gtx_rotate_vector)
|
glmCreateTestGTC(gtx_rotate_vector)
|
||||||
glmCreateTestGTC(gtx_simd_vec4)
|
glmCreateTestGTC(gtx_simd_vec4)
|
||||||
glmCreateTestGTC(gtx_simd_mat4)
|
glmCreateTestGTC(gtx_simd_mat4)
|
||||||
|
@ -11,17 +11,40 @@
|
|||||||
#include <glm/gtx/noise.hpp>
|
#include <glm/gtx/noise.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
int main()
|
int test_simplex()
|
||||||
{
|
{
|
||||||
float ValueSNoise2D = glm::simplex(glm::vec2(0.5f));
|
float ValueSNoise2D = glm::simplex(glm::vec2(0.5f));
|
||||||
float ValueSNoise3D = glm::simplex(glm::vec3(0.5f));
|
float ValueSNoise3D = glm::simplex(glm::vec3(0.5f));
|
||||||
float ValueSNoise4D = glm::simplex(glm::vec4(0.5f));
|
float ValueSNoise4D = glm::simplex(glm::vec4(0.5f));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_perlin()
|
||||||
|
{
|
||||||
float ValueCNoise2D = glm::perlin(glm::vec2(0.5f));
|
float ValueCNoise2D = glm::perlin(glm::vec2(0.5f));
|
||||||
float ValueCNoise3D = glm::perlin(glm::vec3(0.5f));
|
float ValueCNoise3D = glm::perlin(glm::vec3(0.5f));
|
||||||
float ValueCNoise4D = glm::perlin(glm::vec4(0.5f));
|
float ValueCNoise4D = glm::perlin(glm::vec4(0.5f));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_perlin_pedioric()
|
||||||
|
{
|
||||||
float ValuePNoise2D = glm::perlin(glm::vec2(0.5f), glm::vec2(0.5f));
|
float ValuePNoise2D = glm::perlin(glm::vec2(0.5f), glm::vec2(0.5f));
|
||||||
float ValuePNoise3D = glm::perlin(glm::vec3(0.5f), glm::vec3(0.5f));
|
float ValuePNoise3D = glm::perlin(glm::vec3(0.5f), glm::vec3(0.5f));
|
||||||
float ValuePNoise4D = glm::perlin(glm::vec4(0.5f), glm::vec4(0.5f));
|
float ValuePNoise4D = glm::perlin(glm::vec4(0.5f), glm::vec4(0.5f));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_simplex();
|
||||||
|
Error += test_perlin();
|
||||||
|
Error += test_perlin_pedioric();
|
||||||
|
|
||||||
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,23 @@
|
|||||||
#include <glm/gtx/quaternion.hpp>
|
#include <glm/gtx/quaternion.hpp>
|
||||||
#include <glm/gtx/epsilon.hpp>
|
#include <glm/gtx/epsilon.hpp>
|
||||||
|
|
||||||
|
int test_quat_mix()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
glm::quat A = glm::angleAxis(0.0f, glm::vec3(0, 0, 1));
|
||||||
|
glm::quat B = glm::angleAxis(90.0f, glm::vec3(0, 0, 1));
|
||||||
|
glm::quat C = glm::mix(A, B, 0.5f);
|
||||||
|
glm::quat D = glm::angleAxis(45.0f, glm::vec3(0, 0, 1));
|
||||||
|
|
||||||
|
Error += glm::equalEpsilon(C.x, D.x, 0.01f) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(C.y, D.y, 0.01f) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(C.z, D.z, 0.01f) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(C.w, D.w, 0.01f) ? 0 : 1;
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
int test_quat_fastMix()
|
int test_quat_fastMix()
|
||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
@ -94,14 +111,42 @@ int test_quat_angle()
|
|||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int test_quat_normalize()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
glm::quat Q = glm::angleAxis(45.0f, glm::vec3(0, 0, 1));
|
||||||
|
glm::quat N = glm::normalize(Q);
|
||||||
|
float L = glm::length(N);
|
||||||
|
Error += glm::equalEpsilon(L, 1.0f, 0.000001f) ? 0 : 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
glm::quat Q = glm::angleAxis(45.0f, glm::vec3(0, 0, 2));
|
||||||
|
glm::quat N = glm::normalize(Q);
|
||||||
|
float L = glm::length(N);
|
||||||
|
Error += glm::equalEpsilon(L, 1.0f, 0.000001f) ? 0 : 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
glm::quat Q = glm::angleAxis(45.0f, glm::vec3(1, 2, 3));
|
||||||
|
glm::quat N = glm::normalize(Q);
|
||||||
|
float L = glm::length(N);
|
||||||
|
Error += glm::equalEpsilon(L, 1.0f, 0.000001f) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += test_quat_angle();
|
Error += test_quat_angle();
|
||||||
Error += test_quat_angleAxis();
|
Error += test_quat_angleAxis();
|
||||||
|
Error += test_quat_mix();
|
||||||
Error += test_quat_fastMix();
|
Error += test_quat_fastMix();
|
||||||
Error += test_quat_shortMix();
|
Error += test_quat_shortMix();
|
||||||
|
Error += test_quat_normalize();
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
98
test/gtx/gtx_random.cpp
Normal file
98
test/gtx/gtx_random.cpp
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Created : 2011-05-31
|
||||||
|
// Updated : 2011-05-31
|
||||||
|
// Licence : This source is under MIT licence
|
||||||
|
// File : test/gtx/random.cpp
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <glm/glm.hpp>
|
||||||
|
#include <glm/gtx/random.hpp>
|
||||||
|
#include <glm/gtx/epsilon.hpp>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int test_signedRand1()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
float ResultFloat = 0.0f;
|
||||||
|
double ResultDouble = 0.0f;
|
||||||
|
for(std::size_t i = 0; i < 100000; ++i)
|
||||||
|
{
|
||||||
|
ResultFloat += glm::signedRand1<float>();
|
||||||
|
ResultDouble += glm::signedRand1<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
Error += glm::equalEpsilon(ResultFloat, 0.0f, 0.0001f);
|
||||||
|
Error += glm::equalEpsilon(ResultDouble, 0.0, 0.0001);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_normalizedRand2()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
std::size_t Max = 100000;
|
||||||
|
float ResultFloat = 0.0f;
|
||||||
|
double ResultDouble = 0.0f;
|
||||||
|
for(std::size_t i = 0; i < Max; ++i)
|
||||||
|
{
|
||||||
|
ResultFloat += glm::length(glm::normalizedRand2<float>());
|
||||||
|
ResultDouble += glm::length(glm::normalizedRand2<double>());
|
||||||
|
}
|
||||||
|
|
||||||
|
Error += glm::equalEpsilon(ResultFloat, float(Max), 0.0001f);
|
||||||
|
Error += glm::equalEpsilon(ResultDouble, double(Max), 0.0001);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int test_normalizedRand3()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
std::size_t Max = 100000;
|
||||||
|
float ResultFloatA = 0.0f;
|
||||||
|
float ResultFloatB = 0.0f;
|
||||||
|
float ResultFloatC = 0.0f;
|
||||||
|
double ResultDoubleA = 0.0f;
|
||||||
|
double ResultDoubleB = 0.0f;
|
||||||
|
double ResultDoubleC = 0.0f;
|
||||||
|
for(std::size_t i = 0; i < Max; ++i)
|
||||||
|
{
|
||||||
|
ResultFloatA += glm::length(glm::normalizedRand3<float>());
|
||||||
|
ResultDoubleA += glm::length(glm::normalizedRand3<double>());
|
||||||
|
ResultFloatB += glm::length(glm::normalizedRand3(2.0f, 2.0f));
|
||||||
|
ResultDoubleB += glm::length(glm::normalizedRand3(2.0, 2.0));
|
||||||
|
ResultFloatC += glm::length(glm::normalizedRand3(1.0f, 3.0f));
|
||||||
|
ResultDoubleC += glm::length(glm::normalizedRand3(1.0, 3.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
Error += glm::equalEpsilon(ResultFloatA, float(Max), 0.0001f) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(ResultDoubleA, double(Max), 0.0001) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(ResultFloatB, float(Max * 2), 0.0001f) ? 0 : 1;
|
||||||
|
Error += glm::equalEpsilon(ResultDoubleB, double(Max * 2), 0.0001) ? 0 : 1;
|
||||||
|
Error += (ResultFloatC >= float(Max) && ResultFloatC <= float(Max * 3)) ? 0 : 1;
|
||||||
|
Error += (ResultDoubleC >= double(Max) && ResultDoubleC <= double(Max * 3)) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int Error = 0;
|
||||||
|
|
||||||
|
Error += test_signedRand1();
|
||||||
|
Error += test_normalizedRand2();
|
||||||
|
Error += test_normalizedRand3();
|
||||||
|
|
||||||
|
return Error;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user