readme and license
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 3 Jan 2016 13:46:08 +0000 (15:46 +0200)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 3 Jan 2016 13:46:08 +0000 (15:46 +0200)
14 files changed:
LICENSE [new file with mode: 0644]
README.md [new file with mode: 0644]
src/gmath.h
src/matrix.h
src/quat.cc
src/quat.h
src/quat.inl
src/ray.h
src/swizzle.h
src/vector.cc
src/vector.h
src/vector2.inl
src/vector3.inl
src/vector4.inl

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..536e666
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+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.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..8d4e872
--- /dev/null
+++ b/README.md
@@ -0,0 +1,25 @@
+gph-math: graphene math library
+===============================
+
+About
+-----
+Gph-math is a C++ math library for graphics programs. It's been written as part
+of the [graphene 3d engine](http://github.com/MutantStargoat/graphene) project,
+but it's really a standalone reusable math library with no further ties to
+graphene other than the namespace "gph".
+
+I intend to use this library for all my C++ graphics projects from now on,
+superseding [libvmath](http://github.com/jtsiomb/libvmath), which I've been
+using and evolving since the start of the century.
+
+Inspired by other modern math libraries like glm, gph-math follows the GLSL
+conventions wherever it makes sense, and doesn't clash with my code style,
+including the very elegant swizzle mechanism for conversions between vector
+types.
+
+License
+-------
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute it
+under the terms of the MIT/X11 license. See LICENSE for details.
index 14d5eb0..7c05bdc 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #ifndef GMATH_H_
 #define GMATH_H_
 
index f5dbaa9..535eb2e 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #ifndef GMATH_MATRIX_H_
 #define GMATH_MATRIX_H_
 
index 595943f..7b82ac0 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #include "quat.h"
 
 namespace gph {
index a03ae70..aabf2c2 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #ifndef QUATERNION_H_
 #define QUATERNION_H_
 
index 46606d0..5f9a4c5 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 inline Quaternion operator -(const Quaternion &q)
 {
        return Quaternion(-q.x, -q.y, -q.z, -q.w);
index 72dfc26..95f6438 100644 (file)
--- a/src/ray.h
+++ b/src/ray.h
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #ifndef GMATH_RAY_H_
 #define GMATH_RAY_H_
 
index 66d27d5..a572710 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 // the only function of this file is to hide the swizzle-macro eyesore
 
 // swizzle macros for Vector2
index 9532ccf..6861648 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #include "vector.h"
 #include "matrix.h"
 
index da3b09b..e0f642c 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 #ifndef GMATH_VEC_H_
 #define GMATH_VEC_H_
 
index 64aa0c4..0e91585 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 inline void Vector2::normalize()
 {
        float len = (float)sqrt(x * x + y * y);
index 8f6167c..03c8efe 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 inline void Vector3::normalize()
 {
        float len = (float)sqrt(x * x + y * y + z * z);
index c37eed1..8c5709a 100644 (file)
@@ -1,3 +1,12 @@
+/*
+gph-math - math library for graphics programs
+Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
+
+This program is free software. Feel free to use, modify, and/or redistribute
+it under the terms of the MIT/X11 license. See LICENSE for details.
+If you intend to redistribute parts of the code without the LICENSE file
+replace this paragraph with the full contents of the LICENSE file.
+*/
 inline void Vector4::normalize()
 {
        float len = (float)sqrt(x * x + y * y + z * z + w * w);