Added PDF manual

This commit is contained in:
Christophe Riccio 2018-09-03 23:15:27 +02:00
parent fc4350f28f
commit 416fa93e42
5 changed files with 36 additions and 8 deletions

2
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,2 @@
{
}

BIN
doc/manual.pdf Normal file

Binary file not shown.

View File

@ -4,7 +4,7 @@
/// @defgroup ext_matrix_clip_space GLM_EXT_matrix_clip_space /// @defgroup ext_matrix_clip_space GLM_EXT_matrix_clip_space
/// @ingroup ext /// @ingroup ext
/// ///
/// Defines functions that generate common transformation matrices. /// Defines functions that generate clip space transformation matrices.
/// ///
/// The matrices generated by this extension use standard OpenGL fixed-function /// The matrices generated by this extension use standard OpenGL fixed-function
/// conventions. For example, the lookAt function generates a transform from world /// conventions. For example, the lookAt function generates a transform from world

View File

@ -1,10 +1,12 @@
![Alt](/doc/manual/logo-mini.png "GLM Logo") ![Alt](./doc/manual/logo-mini.png "GLM Logo")
# GLM 0.9.9 Manual # GLM 0.9.9 Manual
![Alt](/doc/manual/g-truc.png "G-Truc Logo") ![Alt](./doc/manual/g-truc.png "G-Truc Logo")
--- ---
<div style="page-break-after: always;"> </div>
## Table of Contents ## Table of Contents
+ [0. Licenses](#section0) + [0. Licenses](#section0)
+ [1. Getting started](#section1) + [1. Getting started](#section1)
@ -103,6 +105,8 @@
+ [10.7. Acknowledgements](#section10_7) + [10.7. Acknowledgements](#section10_7)
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section0"></a> Licenses ## <a name="section0"></a> Licenses
### The Happy Bunny License (Modified MIT License) ### The Happy Bunny License (Modified MIT License)
@ -131,7 +135,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
![](https://github.com/g-truc/glm/blob/manual/doc/manual/frontpage1.png) ![](./doc/manual/frontpage1.png)
### The MIT License ### The MIT License
@ -156,14 +160,16 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
![](https://github.com/g-truc/glm/blob/manual/doc/manual/frontpage2.png) ![](./doc/manual/frontpage2.png)
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section1"></a> 1. Getting started ## <a name="section1"></a> 1. Getting started
### <a name="section1_1"></a> 1.1. Using global headers ### <a name="section1_1"></a> 1.1. Using global headers
GLM is a header-only library, and thus does not need to be compiled. We can use GLM's implementation of GLSL's mathematics functionality by including the `<glm/glm.hpp>` header: GLM is a header-only library, and thus does not need to be compiled. We can use GLM's implementation of GLSL's mathematics functionality by including the `<glm/glm.hpp>` header:
```cpp ```cpp
#include <glm/glm.hpp> #include <glm/glm.hpp>
``` ```
@ -266,6 +272,8 @@ glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, gl
GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`. GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`.
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section2"></a> 2. Preprocessor configurations ## <a name="section2"></a> 2. Preprocessor configurations
### <a name="section2_1"></a> 2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration ### <a name="section2_1"></a> 2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration
@ -689,6 +697,8 @@ int average(int const A, int const B)
``` ```
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section3"></a> 3. Stable extensions ## <a name="section3"></a> 3. Stable extensions
### <a name="section3_1"></a> 3.1. Scalar types ### <a name="section3_1"></a> 3.1. Scalar types
@ -1336,6 +1346,8 @@ This extension exposes functions to transform objects.
Include `<glm/ext/quaternion_transform.hpp>` to use these features. Include `<glm/ext/quaternion_transform.hpp>` to use these features.
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section4"></a> 4. Recommended extensions ## <a name="section4"></a> 4. Recommended extensions
GLM extends the core GLSL feature set with extensions. These extensions include: quaternion, transformation, spline, matrix inverse, color spaces, etc. GLM extends the core GLSL feature set with extensions. These extensions include: quaternion, transformation, spline, matrix inverse, color spaces, etc.
@ -1578,6 +1590,8 @@ Add \*vec1 types.
`<glm/gtc/vec1.hpp>` need to be included to use these features. `<glm/gtc/vec1.hpp>` need to be included to use these features.
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section5"></a> 5. OpenGL interoperability ## <a name="section5"></a> 5. OpenGL interoperability
### <a name="section5_1"></a> 5.1. GLM replacements for deprecated OpenGL functions ### <a name="section5_1"></a> 5.1. GLM replacements for deprecated OpenGL functions
@ -1724,6 +1738,8 @@ glm::dvec3 unProject(glm::dvec3 const& win, glm::dmat4 const& model, glm::dmat4
From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>` From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section6"></a> 6. Known issues ## <a name="section6"></a> 6. Known issues
This section reports GLSL features that GLM can't accurately emulate due to language restrictions. This section reports GLSL features that GLM can't accurately emulate due to language restrictions.
@ -1763,6 +1779,8 @@ ivec3 foo(const vec4 & v)
``` ```
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section7"></a> 7. FAQ ## <a name="section7"></a> 7. FAQ
### <a name="section7_1"></a> 7.1 Why GLM follows GLSL specification and conventions? ### <a name="section7_1"></a> 7.1 Why GLM follows GLSL specification and conventions?
@ -1835,6 +1853,8 @@ GLM has some C++ <a href="http://en.cppreference.com/w/cpp/language/constexpr">c
Unfortunately, GCC and Clang doesn't support SIMD instrinsics as constant expressions. To allow constant expressions on all vectors and matrices types, define `GLM_FORCE_PURE` before including GLM headers. Unfortunately, GCC and Clang doesn't support SIMD instrinsics as constant expressions. To allow constant expressions on all vectors and matrices types, define `GLM_FORCE_PURE` before including GLM headers.
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section8"></a> 8. Code samples ## <a name="section8"></a> 8. Code samples
This series of samples only shows various GLM features without consideration of any sort. This series of samples only shows various GLM features without consideration of any sort.
@ -1969,6 +1989,8 @@ glm::vec3 lighting(intersection const& Intersection, material const& Material, l
``` ```
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section9"></a> 9. Contributing to GLM ## <a name="section9"></a> 9. Contributing to GLM
### <a name="section9_1"></a> 9.1. Submitting bug reports ### <a name="section9_1"></a> 9.1. Submitting bug reports
@ -2184,6 +2206,8 @@ namespace detail // glm::detail namespace is for implementation detail
``` ```
--- ---
<div style="page-break-after: always;"> </div>
## <a name="section10"></a> 10. References ## <a name="section10"></a> 10. References
### <a name="section10_1"></a> 10.1. OpenGL specifications ### <a name="section10_1"></a> 10.1. OpenGL specifications

View File

@ -26,8 +26,9 @@ Thanks for contributing to the project by [submitting issues](https://github.com
#include <glm/vec3.hpp> // glm::vec3 #include <glm/vec3.hpp> // glm::vec3
#include <glm/vec4.hpp> // glm::vec4 #include <glm/vec4.hpp> // glm::vec4
#include <glm/mat4x4.hpp> // glm::mat4 #include <glm/mat4x4.hpp> // glm::mat4
#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective #include <glm/ext/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale
#include <glm/gtc/constants.hpp> // glm::pi #include <glm/ext/matrix_clip_space.hpp> // glm::perspective
#include <glm/ext/constants.hpp> // glm::pi
glm::mat4 camera(float Translate, glm::vec2 const& Rotate) glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
{ {
@ -51,7 +52,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
## Release notes ## Release notes
### [GLM 0.9.9.1](https://github.com/g-truc/glm/commits/master) - 2018-0X-XX ### [GLM 0.9.9.1](https://github.com/g-truc/glm/releases/tag/0.9.9.1) - 2018-09-03
#### Features: #### Features:
- Added bitfieldDeinterleave to GTC_bitfield - Added bitfieldDeinterleave to GTC_bitfield
- Added missing equal and notEqual with epsilon for quaternion types to GTC_quaternion - Added missing equal and notEqual with epsilon for quaternion types to GTC_quaternion
@ -59,6 +60,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
- Added missing aligned matrix types to GTC_type_aligned - Added missing aligned matrix types to GTC_type_aligned
- Added C++17 detection - Added C++17 detection
- Added Visual C++ language standard version detection - Added Visual C++ language standard version detection
- Added PDF manual build from markdown
#### Improvements: #### Improvements:
- Added a section to the manual for contributing to GLM - Added a section to the manual for contributing to GLM