Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
970 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,120 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | ||
<title>Gl3n by Dav1dde</title> | ||
|
||
<link rel="stylesheet" href="stylesheets/styles.css"> | ||
<link rel="stylesheet" href="stylesheets/pygment_trac.css"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
</head> | ||
<body> | ||
<div class="wrapper"> | ||
<header> | ||
<h1>Gl3n</h1> | ||
<p></p> | ||
<p class="view"><a href="https://github.com/Dav1dde/gl3n">View the Project on GitHub <small>Dav1dde/gl3n</small></a></p> | ||
<ul> | ||
<li><a href="https://github.com/Dav1dde/gl3n/zipball/master">Download <strong>ZIP File</strong></a></li> | ||
<li><a href="https://github.com/Dav1dde/gl3n/tarball/master">Download <strong>TAR Ball</strong></a></li> | ||
<li><a href="https://github.com/Dav1dde/gl3n">Fork On <strong>GitHub</strong></a></li> | ||
</ul> | ||
</header> | ||
<section> | ||
<h3>Welcome to GitHub Pages.</h3> | ||
|
||
<p>This automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new branch:</p> | ||
|
||
<pre><code>$ cd your_repo_root/repo_name | ||
$ git fetch origin | ||
$ git checkout gh-pages | ||
</code></pre> | ||
|
||
<p>If you're using the GitHub for Mac, simply sync your repository and you'll see the new branch.</p> | ||
|
||
<h3>Designer Templates</h3> | ||
|
||
<p>We've crafted some handsome templates for you to use. Go ahead and continue to layouts to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved if it remained markdown format.</p> | ||
|
||
<h3>Rather Drive Stick?</h3> | ||
|
||
<p>If you prefer to not use the automatic generator, push a branch named <code>gh-pages</code> to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator written by our own Tom Preston-Werner. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.</p> | ||
|
||
<h3>Authors and Contributors</h3> | ||
|
||
<p>You can <a href="https://github.com/blog/821" class="user-mention">@mention</a> a GitHub username to generate a link to their profile. The resulting <code><a></code> element will link to the contributor's GitHub Profile. For example: In 2007, Chris Wanstrath (<a href="https://github.com/defunkt" class="user-mention">@defunkt</a>), PJ Hyett (<a href="https://github.com/pjhyett" class="user-mention">@pjhyett</a>), and Tom Preston-Werner (<a href="https://github.com/mojombo" class="user-mention">@mojombo</a>) founded GitHub.</p> | ||
|
||
<h3>Support or Contact</h3> | ||
|
||
<p>Having trouble with Pages? Check out the documentation at <a href="http://help.github.com/pages">http://help.github.com/pages</a> or contact support@github.com and we’ll help you sort it out.</p> | ||
</section> | ||
<footer> | ||
<p>This project is maintained by <a href="https://github.com/Dav1dde">Dav1dde</a></p> | ||
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p> | ||
</footer> | ||
</div> | ||
<script src="javascripts/scale.fix.js"></script> | ||
|
||
</body> | ||
</html> | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>index - gl3n's documentation</title> | ||
<link rel="stylesheet" type="text/css" href="./style.css"> | ||
<script type="text/javascript" src="./jquery.js"></script> | ||
<script type="text/javascript" src="./cutedoc.js"></script> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<div id="inner"> | ||
<big>index</big> - <small>gl3n's documentation</small> | ||
</div> | ||
</div> | ||
|
||
<div id="floating"> | ||
<div id="modulesouter"> | ||
<h3>Modules</h3> | ||
<div id="modules"><li><a href="./linalg.html" title="linear algebra">linalg</a></li><li><a href="./math.html" title="mathematical functions">math</a></li><li><a href="./interpolate.html" title="interpolation">interpolate</a></li><li><a href="./color/hsv.html" title="color">color/hsv</a></li><li><a href="./util.html" title="useful utilities">util</a></li></div> | ||
</div> | ||
|
||
<div id="childsouter"> | ||
<h3>Jump to</h3> | ||
<div id="childs"></div> | ||
</div> | ||
</div> | ||
|
||
<div id="content"> | ||
<!-- Generated by Ddoc from index.d --> | ||
|
||
|
||
<a href="https://bitbucket.org/dav1d/gl3n/overview">gl3n</a> provides all the math you need to work with OpenGL. | ||
Currently gl3n supports: | ||
<ul> <li>linear algebra</li> | ||
<ul> <li>vectors</li> | ||
<li>matrices</li> | ||
<li>quaternions</li> | ||
</ul> | ||
<li>interpolation</li> | ||
<ul> <li>linear interpolation (lerp)</li> | ||
<li>spherical linear interpolation (slerp)</li> | ||
<li>hermite interpolation</li> | ||
<li>catmull rom interpolation</li> | ||
</ul> | ||
<li>nearly all GLSL defined functions (according to spec 4.1)</li> | ||
<li>the power of D, e.g. dynamic swizzling, templated types (vectors, matrices, quaternions), impressive constructors and more!</li> | ||
</ul> | ||
<br /> | ||
Furthermore <a href="https://bitbucket.org/dav1d/gl3n/overview">gl3n</a> is MIT licensed, | ||
which allows you to use it everywhere you want it. | ||
<br /><br /> | ||
A little example of gl3n's power: | ||
<pre class="d_code">vec4 v4 = vec4(1.0f, vec3(2.0f, 3.0f, 4.0f)); | ||
vec4 v4_2 = vec4(1.0f, vec4(1.0f, 2.0f, 3.0f, 4.0f).xyz); <span class="code_comment">// "dynamic" swizzling with opDispatch | ||
</span>vec4 v4_3 = v4_2.xxyz; <span class="code_comment">// opDispatch returns a static array which you can pass directly to the ctor of a vector! | ||
</span> | ||
vec3 v3 = my_3dvec.rgb; | ||
<span style="color:blue;">float</span>[] foo = v4.xyzzzwzyyxw <span class="code_comment">// not useful but possible! | ||
</span> | ||
mat4 m4fv = mat4.translation(-0.5f, -0.54f, 0.42f).rotatex(PI).rotatez(PI/2); | ||
glUniformMatrix4fv(location, 1, GL_TRUE, m4fv.value_ptr); <span class="code_comment">// yes they are row major! | ||
</span> | ||
mat3 inv_view = view.rotation; | ||
mat3 inv_view = mat3(view); | ||
|
||
mat4 m4 = mat4(vec4(1.0f, 2.0f, 3.0f, 4.0f), 5.0f, 6.0f, 7.0f, 8.0f, vec4(...) ...); | ||
</pre> | ||
|
||
<pre class="d_code"><span style="color:blue;">alias</span> Vector!(<span style="color:blue;">real</span>, 3) vec3r; | ||
|
||
<span style="color:blue;">struct</span> Camera { | ||
vec3 position = vec3(0.0f, 0.0f, 0.0f); | ||
vec3r rot = vec3r(0.0f, 0.0f, 0.0f); | ||
|
||
Camera rotatex(<span style="color:blue;">real</span> alpha) { | ||
rot.x = rot.x + alpha; | ||
<span style="color:blue;">return</span> <span style="color:blue;">this</span>; | ||
} | ||
|
||
Camera rotatey(<span style="color:blue;">real</span> alpha) { | ||
<span class="code_comment">// do degrees radians conversion at compiletime! | ||
</span> rot.y = clamp(rot.y + alpha, cradians!(-70.0f), cradians!(70.0f)); | ||
<span style="color:blue;">return</span> <span style="color:blue;">this</span>; | ||
} | ||
|
||
Camera rotatez(<span style="color:blue;">real</span> alpha) { | ||
rot.z = rot.z + alpha; | ||
<span style="color:blue;">return</span> <span style="color:blue;">this</span>; | ||
} | ||
|
||
Camera move(<span style="color:blue;">float</span> x, <span style="color:blue;">float</span> y, <span style="color:blue;">float</span> z) { | ||
position += vec3(x, y, z); | ||
<span style="color:blue;">return</span> <span style="color:blue;">this</span>; | ||
} | ||
Camera move(vec3 s) { | ||
position += s; | ||
<span style="color:blue;">return</span> <span style="color:blue;">this</span>; | ||
} | ||
|
||
@property camera() { | ||
<span class="code_comment">// gl3n allows chaining of matrix (also quaternion) operations | ||
</span> <span style="color:blue;">return</span> mat4.identity.translate(-position.x, -position.y, -position.z) | ||
.rotatex(rot.x) | ||
.rotatey(rot.y); | ||
} | ||
} | ||
|
||
<span class="code_comment">// somwhere later in the code | ||
</span> glUniformMatrix4fv(programs.main.view, 1, GL_TRUE, cam.camera.value_ptr); | ||
<span class="code_comment">// or use a quaternion camera! | ||
</span> | ||
|
||
</pre> | ||
|
||
</div> | ||
<p align="center"><small>Copyright by 2012.<br/> | ||
Generated by ddoc, Theme: <a href="https://github.com/robik/cuteDoc">cutedoc</a>.</small></p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>gl3n.interpolate - gl3n's documentation</title> | ||
<link rel="stylesheet" type="text/css" href="./style.css"> | ||
<script type="text/javascript" src="./jquery.js"></script> | ||
<script type="text/javascript" src="./cutedoc.js"></script> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<div id="inner"> | ||
<big>gl3n.interpolate</big> - <small>gl3n's documentation</small> | ||
</div> | ||
</div> | ||
|
||
<div id="floating"> | ||
<div id="modulesouter"> | ||
<h3>Modules</h3> | ||
<div id="modules"><li><a href="./linalg.html" title="linear algebra">linalg</a></li><li><a href="./math.html" title="mathematical functions">math</a></li><li><a href="./interpolate.html" title="interpolation">interpolate</a></li><li><a href="./color/hsv.html" title="color">color/hsv</a></li><li><a href="./util.html" title="useful utilities">util</a></li></div> | ||
</div> | ||
|
||
<div id="childsouter"> | ||
<h3>Jump to</h3> | ||
<div id="childs"></div> | ||
</div> | ||
</div> | ||
|
||
<div id="content"> | ||
<!-- Generated by Ddoc from gl3n/interpolate.d --> | ||
<div class="summary">gl3n.<a class="psymbol" name="interpolate">interpolate</a> | ||
</div> | ||
<div class="stdsection"><b>Authors</b>:<br/> David Herberth | ||
</div> | ||
<div class="stdsection"><b>License</b>:<br/> MIT</div> | ||
|
||
<dl><h1 class="decl">T <a class="psymbol" name="interp">interp</a>(T)(T <i>a</i>, T <i>b</i>, float <i>t</i>); | ||
<br />alias <a class="psymbol" name="interp_linear">interp_linear</a>; | ||
<br />alias <a class="psymbol" name="lerp">lerp</a>; | ||
<br />alias <a class="psymbol" name="mix">mix</a>; | ||
</h1> | ||
<div class="decldd"><div class="summary">Interpolates linear between two points, also known as lerp.</div> | ||
|
||
</div> | ||
<h1 class="decl">T <a class="psymbol" name="interp_spherical">interp_spherical</a>(T)(T <i>a</i>, T <i>b</i>, float <i>t</i>); | ||
<br />alias <a class="psymbol" name="slerp">slerp</a>; | ||
</h1> | ||
<div class="decldd"><div class="summary">Interpolates spherical between to vectors or quaternions, also known as slerp.</div> | ||
|
||
</div> | ||
<h1 class="decl">T <a class="psymbol" name="interp_nearest">interp_nearest</a>(T)(T <i>x</i>, T <i>y</i>, float <i>t</i>); | ||
</h1> | ||
<div class="decldd"><div class="summary">Nearest interpolation of two points.</div> | ||
|
||
</div> | ||
<h1 class="decl">T <a class="psymbol" name="interp_catmullrom">interp_catmullrom</a>(T)(T <i>p0</i>, T <i>p1</i>, T <i>p2</i>, T <i>p3</i>, float <i>t</i>); | ||
</h1> | ||
<div class="decldd"><div class="summary">Catmull-rom interpolation between four points.</div> | ||
|
||
</div> | ||
<h1 class="decl">T <a class="psymbol" name="catmullrom_derivative">catmullrom_derivative</a>(T)(T <i>p0</i>, T <i>p1</i>, T <i>p2</i>, T <i>p3</i>, float <i>t</i>); | ||
</h1> | ||
<div class="decldd"><div class="summary">Catmull-derivatives of the interpolation between four points.</div> | ||
|
||
</div> | ||
<h1 class="decl">T <a class="psymbol" name="interp_hermite">interp_hermite</a>(T)(T <i>x</i>, T <i>tx</i>, T <i>y</i>, T <i>ty</i>, float <i>t</i>); | ||
</h1> | ||
<div class="decldd"><div class="summary">Hermite interpolation (cubic hermite spline).</div> | ||
|
||
</div> | ||
</dl> | ||
|
||
</div> | ||
<p align="center"><small>Copyright by 2012.<br/> | ||
Generated by ddoc, Theme: <a href="https://github.com/robik/cuteDoc">cutedoc</a>.</small></p> | ||
</body> | ||
</html> |
Oops, something went wrong.