summaryrefslogtreecommitdiffstats
path: root/debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html
diff options
context:
space:
mode:
Diffstat (limited to 'debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html')
-rw-r--r--debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html b/debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html
new file mode 100644
index 00000000..d180d210
--- /dev/null
+++ b/debian/fireflies/fireflies-2.08/libgfx/doc/mat4.html
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<!-- $Id: mat4.html 220 2001-01-16 21:21:46Z garland $ -->
+
+<html>
+
+<head>
+<title>libgfx: Matrix Math</title>
+<link rel=stylesheet href="cdoc.css" type="text/css">
+<meta name="Author" content="Michael Garland">
+</head>
+
+<body>
+
+<h2>Matrix Math</h2>
+
+<h3>class Mat4</h3>
+
+
+<p>This class implements a 4x4 real-valued matrix.
+Individual elements are represented with <code>double</code> precision
+floating point numbers. To use the <tt>Mat4</tt> class you must include the
+header
+<pre>
+ #include &lt;gfx/mat4.h&gt;
+</pre>
+
+<h4>Constructor Methods</h4>
+
+<p>The <tt>Mat4</tt> class defines the following set of constructors:
+
+<pre>
+ <i>// Initialize all elements to 0</i>
+ Mat4();
+
+ <i>// Initialize rows with given vectors</i>
+ Mat4(const Vec4&amp; r0,const Vec4&amp; r1,const Vec4&amp; r2,const Vec4&amp; r3);
+
+ <i>// Copy values from A</i>
+ Mat4(const Mat4&amp; A);
+</pre>
+
+
+<h4>Transformation Functions</h4>
+
+<p>Because 4x4 matrices are commonly used to represent linear homogeneous
+transformations in computer graphics, the matrix package provides several
+functions to construct transformation matrices. The operation of these
+functions is based directly on the definition of the corresponding
+transformations as used in OpenGL. The resulting matrices should be
+equivalent to those produced by OpenGL, to the extent allowed by limited
+floating point accuracy.
+
+<pre>
+ <i>// Construct translation, scaling, and rotation matrices.</i>
+ Mat4 translation_matrix(const Vec3&amp; delta);
+ Mat4 scaling_matrix(const Vec3&amp; scale);
+ Mat4 rotation_matrix_deg(double theta, const Vec3&amp; axis);
+ Mat4 rotation_matrix_rad(double theta, const Vec3&amp; axis);
+
+ <i>// Construct a perspective projection matrix.
+ // Direct analog of gluPerspective()</i>
+ Mat4 perspective_matrix(double fovy, double aspect,
+ double zmin=0.0, double zmax=0.0);
+
+ <i>// Construct a viewing transformation.
+ // Direct analog of gluLookAt()</i>
+ Mat4 lookat_matrix(const Vec3&amp; from, const Vec3&amp; at, const Vec3&amp; up);
+
+ <i>// Construct a viewport mapping.
+ // Direct analog of glViewport().</i>
+ Mat4 viewport_matrix(double w, double h);
+</pre>
+
+Note that the <tt>rotation_matrix()</tt> function comes in two forms, once
+which expects an angle in <em>radians</em> and one which expects an angle in
+<em>degrees</em>. The type of angle expected is made explicit in the function
+name (i.e., <tt>_rad</tt> and <tt>_deg</tt> suffixes) in an attempt to avoid
+confusion.
+
+
+</body>
+</html>