Explorar o código

Updated readme.rd

Christophe Riccio %!s(int64=10) %!d(string=hai) anos
pai
achega
20d1e6b06a
Modificáronse 1 ficheiros con 33 adicións e 64 borrados
  1. 33 64
      readme.md

+ 33 - 64
readme.md

@@ -1,10 +1,10 @@
 ![glm](doc/logo.png)
 ![glm](doc/logo.png)
 
 
-*OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the [OpenGL Shading Language (GLSL) specifications](https://www.opengl.org/registry/doc/GLSLangSpec.4.50.diff.pdf).
-*GLM provides classes and functions designed and implemented with the same naming conventions and functionalities than GLSL so that anyone who knows GLSL, can use GLM as well in C++.
-*This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...
-*This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physic simulations and any development context that requires a simple and convenient mathematics library.
-*GLM is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:
+OpenGL Mathematics (*GLM*) is a header only C++ mathematics library for graphics software based on the [OpenGL Shading Language (GLSL) specifications](https://www.opengl.org/registry/doc/GLSLangSpec.4.50.diff.pdf).
+*GLM* provides classes and functions designed and implemented with the same naming conventions and functionalities than GLSL so that anyone who knows GLSL, can use GLM as well in C++.
+This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...
+This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physic simulations and any development context that requires a simple and convenient mathematics library.
+*GLM* is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:
 - Apple Clang 4.0 and higher
 - Apple Clang 4.0 and higher
 - GCC 4.2 and higher
 - GCC 4.2 and higher
 - Intel C++ Composer XE 2013 and higher
 - Intel C++ Composer XE 2013 and higher
@@ -12,65 +12,26 @@
 - Visual C++ 2010 and higher
 - Visual C++ 2010 and higher
 - CUDA 4.0 and higher (experimental)
 - CUDA 4.0 and higher (experimental)
 - Any conform C++98 or C++11 compiler
 - Any conform C++98 or C++11 compiler
-*For more information about GLM, please have a look at the manual and the API reference documentation.
-*The source code and the documentation, including this manual, are licensed under the [Happy Bunny License (Modified MIT) and the MIT License](./copying.txt).
-*Thanks for contributing to the project by [submitting issues](https://github.com/g-truc/glm/issues) for bug reports and feature requests. Any feedback is welcome at [[email protected]](mailto://[email protected]).
-
-================================================================================
-OpenGL Mathematics (GLM)
---------------------------------------------------------------------------------
-GLM can be distributed and/or modified under the terms of either
-a) The Happy Bunny License, or b) the MIT License.
-
-================================================================================
-The Happy Bunny License (Modified MIT License)
---------------------------------------------------------------------------------
-Copyright (c) 2005 - 2015 G-Truc Creation
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-Restrictions:
- By making use of the Software for military purposes, you choose to make a
- Bunny unhappy.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-================================================================================
-The MIT License
---------------------------------------------------------------------------------
-Copyright (c) 2005 - 2015 G-Truc Creation
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+For more information about *GLM*, please have a look at the manual and the API reference documentation.
+The source code and the documentation, including this manual, are licensed under the [Happy Bunny License (Modified MIT) and the MIT License](./copying.txt).
+Thanks for contributing to the project by [submitting issues](https://github.com/g-truc/glm/issues) for bug reports and feature requests. Any feedback is welcome at [[email protected]](mailto://[email protected]).
+
+```c++
+#include <glm/vec3.hpp> // glm::vec3
+#include <glm/vec4.hpp> // glm::vec4
+#include <glm/mat4x4.hpp> // glm::mat4
+#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective
+
+glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
+{
+	glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f);
+	glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
+	View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
+	View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
+	glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
+	return Projection * View * Model;
+}
+```
 
 
 ================================================================================
 ================================================================================
 GLM Usage
 GLM Usage
@@ -81,6 +42,14 @@ GLM is a header only library, there is nothing to build, just include it.
 More informations in GLM manual:
 More informations in GLM manual:
 http://glm.g-truc.net/glm.pdf
 http://glm.g-truc.net/glm.pdf
 
 
+## Project Health
+
+| Service | System | Compiler | Options | Status |
+| ------- | ------ | -------- | ------- | ------ |
+| [Drone](https://drone.io/github.com/g-truc/glm) | Ubuntu 12.04 | GCC 4.8 | no tests | [![Build Status](https://drone.io/github.com/g-truc/glm/status.png)](https://drone.io/github.com/g-truc/glm/latest) |
+
+## Release notes
+
 ================================================================================
 ================================================================================
 GLM 0.9.7.0: 2015-XX-XX
 GLM 0.9.7.0: 2015-XX-XX
 --------------------------------------------------------------------------------
 --------------------------------------------------------------------------------