Finish cleaning up the extensions section

This commit is contained in:
Jesse Talavera-Greenberg 2015-12-03 13:44:15 -05:00
parent 2e20b7b8a4
commit e78e560cfd

View File

@ -585,9 +585,9 @@ void foo()
\section{Stable Extensions}
GLM provides additional functionality on top of that provided by GLSL, including (but not limited to) quaternions, matrix transformations, random number generation, and color space conversion.
GLM provides additional functionality on top of GLSL's, including (but not limited to) quaternions, matrix transformations, random number generation, and color space conversion.
All additional functionality is part of the \verb|glm| namespace, and can be enabled by including the relevant header file. An included extension will also provide any core headers or other extensions it depends on.
All extra features are part of the \verb|glm| namespace, and can be enabled by including the relevant header file.
\begin{cppcode}
#include <glm/glm.hpp>
@ -630,27 +630,26 @@ Approximate equality comparisons for floating-point numbers, possibly with a use
\subsection{\texttt{GLM\_GTC\_integer}}
\textbf{Header:} \glmheader{gtc/integer}
Integer variants of GLM core functions.
Integer variants of core GLM functions.
\subsection{\texttt{GLM\_GTC\_matrix\_access}}
\textbf{Header:} \glmheader{gtc/matrix\_access}
Define functions to access rows or columns of a matrix easily.
Functions to conveniently access the individual rows or columns of a matrix.
\subsection{\texttt{GLM\_GTC\_matrix\_integer}}
\textbf{Header:} \glmheader{gtc/matrix\_integer}
Provide integer matrix types. Inverse and determinant functions are not supported for these types.
Integer matrix types similar to the core floating-point matrices. Some operations (such as inverse and determinant) are not supported.
\subsection{\texttt{GLM\_GTC\_matrix\_inverse}}
\textbf{Header:} \glmheader{gtc/matrix\_inverse}
Define additional matrix inverting functions.
Additional matrix inverse functions.
\subsection{\texttt{GLM\_GTC\_matrix\_transform}}
\textbf{Header:} \glmheader{gtc/matrix\_transform}
Define functions that generate common transformation matrices.
The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the \verb|lookAt| function generates a transform from world space into the specific eye space that the projective matrix functions (\verb|perspective|, \verb|ortho|, etc) are designed to expect. The OpenGL compatibility specifications define the particular layout of this eye space.
Matrix transformation functions that follow the old OpenGL fixed-function conventions. For example, the \verb|lookAt| function generates a transformation matrix that projects world coordinates into eye coordinates suitable for projection matrices (e.g. \verb|perspective|, \verb|ortho|). See the OpenGL compatibility specifications for more information about the layout of these generated matrices.
\subsection{\texttt{GLM\_GTC\_noise}}
\textbf{Header:} \glmheader{gtc/noise}
@ -714,16 +713,16 @@ Define 2D, 3D and 4D procedural noise functions.
\subsection{\texttt{GLM\_GTC\_packing}}
\textbf{Header:} \glmheader{gtc/packing}
Convert scalar and vector types to packed formats. This extension can also unpack packed data to the original format. The use of packing functions will results in precision lost. However, the extension guarantee that packing a value previously unpacked from the same format will be perform losslessly.
Convert scalar and vector types to and from packed formats, saving space at the cost of precision. However, packing a value into a format that it was previously unpacked from is \textbf{guaranteed} to be lossless.
\subsection{\texttt{GLM\_GTC\_quaternion}}
\textbf{Header:} \glmheader{gtc/quaternion}
Define a quaternion type and several quaternion operations.
Quaternions and operations upon thereof.
\subsection{\texttt{GLM\_GTC\_random}}
\textbf{Header:} \glmheader{gtc/random}
Generate random number from various distribution methods.
Probability distributions in up to four dimensions..
\begin{figure}[h]
\centering
@ -763,21 +762,20 @@ Generate random number from various distribution methods.
\subsection{\texttt{GLM\_GTC\_reciprocal}}
\textbf{Header:} \glmheader{gtc/reciprocal}
Provide hyperbolic functions: secant, cosecant, cotangent, etc.
Reciprocal trigonometric functions (e.g. secant, cosecant, tangent).
\subsection{\texttt{GLM\_GTC\_round}}
\textbf{Header:} \glmheader{gtc/round}
Rounding operation on power of two and multiple values.
Various rounding operations and common special cases thereof.
\subsection{\texttt{GLM\_GTC\_type\_precision}}
\textbf{Header:} \glmheader{gtc/type\_precision}
Add vector and matrix types with defined precisions, e.g. \verb|i8vec4|, which is a 4D vector of signed 8-bit integers.
Vector and matrix types with defined precisions, e.g. \verb|i8vec4|, which is a 4D vector of signed 8-bit integers.
This extension adds defines to set the default precision of each class of types added, in a manner identical to that described in section \ref{Default Precision}.
This extension adds defines to set the default precision of each class of types added:
Available defines for signed 8-bit integer types (\verb|glm::i8vec|*):
\begin{itemize}
@ -861,14 +859,12 @@ Available defines for 64-bit floating-point types (\verb|glm::f64vec|*, \verb|gl
\subsection{\texttt{GLM\_GTC\_type\_ptr}}
\textbf{Header:} \glmheader{gtc/type\_ptr}
Handle the interaction between pointers and vector, matrix types.
Facilitate interactions between pointers to raw values (e.g. \verb|float*|) and GLM types (e.g. \verb|mat4|).
This extension defines an overloaded function, \verb|glm::value_ptr|, which takes any of the core template types (\verb|vec3|, \verb|mat4|, etc.). It returns a pointer to the memory layout of the object. Matrix types store their values in column-major order.
This is useful for uploading data to matrices or copying data to buffer objects.
This extension defines an overloaded function, \verb|glm::value_ptr|, which returns a pointer to the memory layout of any GLM vector or matrix (\verb|vec3|, \verb|mat4|, etc.). Matrix types store their values in \textbf{column-major order}. This is useful for uploading data to matrices or for copying data to buffer objects.
\begin{cppcode}
// GLM_GTC_type_ptr extension provides a safe solution:
// GLM_GTC_type_ptr provides a safe solution:
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
@ -883,7 +879,7 @@ void foo()
\end{cppcode}
\begin{cppcode}
// Another solution inspired by STL:
// Another solution, this one inspired by the STL:
#include <glm/glm.hpp>
void foo()
@ -901,7 +897,7 @@ Note: It's possible to implement \glfunction{2}{glVertex} and similar functions
\subsection{\texttt{GLM\_GTC\_ulp}}
\textbf{Header:} \glmheader{gtc/ulp}
Allow the measurement of the accuracy of a function against a reference implementation. This extension works on floating-point data and provides results in \href{http://ljk.imag.fr/membres/Carine.Lucas/TPScilab/JMMuller/ulp-toms.pdf}{ULP}.
Measure a function's accuracy given a reference implementation of it. This extension works on floating-point data and provides results in \href{http://ljk.imag.fr/membres/Carine.Lucas/TPScilab/JMMuller/ulp-toms.pdf}{ULP}.
\subsection{\texttt{GLM\_GTC\_vec1}}
\textbf{Header:} \glmheader{gtc/vec1}
@ -914,7 +910,7 @@ Add *\verb|vec1| types.
\subsection{OpenGL Substitutes}
Most fixed-function APIs were deprecated in OpenGL 3.1, and removed entirely in OpenGL 3.2. GLM provides substitutes for some of this lost functionality.
Most fixed-function APIs were deprecated in OpenGL 3.1, and then removed entirely in OpenGL 3.2. GLM provides substitutes for some of this lost functionality.
\subsubsection{\glfunction{2}{glRotate}}
@ -1109,7 +1105,7 @@ glm::dmat4 perspective(
);
\end{cppcode}
One difference between GLM and GLU is that fovy is expressed in radians in GLM instead of degrees.
Note that in GLM, \verb|fovy| is expressed in \emph{radians}, not degrees.
\textbf{Extension:} \verb|GLM_GTC_matrix_transform|