diff --git a/Build b/Build index e7fece47..4016ab88 160000 --- a/Build +++ b/Build @@ -1 +1 @@ -Subproject commit e7fece47d728bcb6195ecbb2c6d78bd9be04e33d +Subproject commit 4016ab8885720c1e9117c7f9542f7c6d3f3e4bd3 diff --git a/README.md b/README.md index a3b493c7..e5416519 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,18 @@ Dependency packages sudo apt-get install realpath -License (DSB like) -================== + +Copyright (c) +============= + +Note : only for etk and EWOL + +2011, Edouard DUPIN + +License (DSB) +============= + +Note : only for etk and EWOL Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/Sources/libagg b/Sources/libagg index 4c65a104..9ca566ed 160000 --- a/Sources/libagg +++ b/Sources/libagg @@ -1 +1 @@ -Subproject commit 4c65a1049ab5f6d97f225ba44394c6b6444eddd7 +Subproject commit 9ca566ed85228973d9e442ee41d14d59e494a087 diff --git a/Sources/libetk/etk/math/Matrix.h b/Sources/libetk/etk/math/Matrix.h index 0e5b3849..6ee19da9 100644 --- a/Sources/libetk/etk/math/Matrix.h +++ b/Sources/libetk/etk/math/Matrix.h @@ -1,6 +1,6 @@ /** ******************************************************************************* - * @file etk/Matix.h + * @file etk/math/Matix.h * @brief Ewol Tool Kit : generique Matrix type (header) * @author Edouard DUPIN * @date 29/08/2012 @@ -253,6 +253,9 @@ namespace etk { T* operator[] (int32_t line) { return &m_data[line*m_size.x]; } + /***************************************************** + * Other mathematical function + *****************************************************/ /** * @ brief Transpose Matrix * @ return the transpose matrix @@ -268,6 +271,39 @@ namespace etk { } return tmpMatrix; }; + /** + * @ brief Create a convolution on the matrix : set convolution on the lines + * @ param[in] obj The convolution operator + * @ return the value of the convolution + */ + Matrix Convolution(Matrix& obj) + { + Matrix tmppp(1,1); + // TODO : ... + return tmppp; + }; + /** + * @ brief generate a devide of the curent Matrix with the specify power of 2 + * @ param[in] decalage The power of 2 of the division + * @ return the result + */ + Matrix& Fix(int32_t decalage) + { + Matrix tmppp(1,1); + // TODO : ... + return tmppp; + }; + /** + * @ brief generate a devide of the curent Matrix with the specify power of 2 + * @ param[in] decalage The power of 2 of the division + * @ return the result + */ + Matrix& Round2(int32_t decalage) + { + Matrix tmppp(1,1); + // TODO : ... + return tmppp; + }; /***************************************************** * other stupid action : *****************************************************/ diff --git a/Sources/libetk/etk/math/Plane.h b/Sources/libetk/etk/math/Plane.h index e69de29b..99504a89 100644 --- a/Sources/libetk/etk/math/Plane.h +++ b/Sources/libetk/etk/math/Plane.h @@ -0,0 +1,247 @@ +/** + ******************************************************************************* + * @file etk/math/Plane.h + * @brief Ewol Tool Kit : generique plane type (header) + * @author Edouard DUPIN + * @date 29/10/2012 + * @par Project + * Ewol TK + * + * @par Copyright + * Copyright 2011 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __ETK_TYPES_PLANE_H__ +#define __ETK_TYPES_PLANE_H__ + +#include +#include +#include + +namespace etk { + template class Plane + { + public : + //member variables + etk::Vector3D m_normal; //X.N+intercept=0 + T m_intercept; + public: + /***************************************************** + * Constructor + *****************************************************/ + Plane(void) : + m_normal(0, 0, 0), + m_intercept(0) + { + + } + Plane(etk::Vector3D _normal, T _intercept=0) : + m_normal(_normal), + m_intercept(_intercept) + { + + } + Plane(const Plane& obj) : + m_normal(obj.m_normal), + m_intercept(obj.m_intercept) + { + + } + /***************************************************** + * Destructor + *****************************************************/ + ~Plane(void) + { + + }; + + /** + * @brief + * @param[in,out] + * @return + */ + void SetNormal(const etk::Vector3D& obj) + { + m_normal=obj; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + void SetIntercept(float _intercept) + { + m_intercept=_intercept; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + void SetFromPoints(const etk::Vector3D & p0, + const etk::Vector3D & p1, + const etk::Vector3D & p2) + { + m_normal=(p1-p0).CrossProduct(p2-p0); + m_normal.Normalize(); + CalculateIntercept(p0); + }; + + /** + * @brief + * @param[in,out] + * @return + */ + void CalculateIntercept(const etk::Vector3D& pointOnPlane) + { + m_intercept=-m_normal.DotProduct(pointOnPlane); + } + + /** + * @brief + * @param[in,out] + * @return + */ + void Normalize(void) + { + float normalLength=m_normal.GetLength(); + m_normal/=normalLength; + m_intercept/=normalLength; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + etk::Vector3D GetNormal(void) + { + return m_normal; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + float GetIntercept() + { + return m_intercept; + } + + //find point of intersection of 3 planes + /** + * @brief + * @param[in,out] + * @return + */ + bool Intersect3(const Plane& p2, + const Plane & p3, + etk::Vector3D & result) + { + float denominator=m_normal.DotProduct((p2.m_normal).CrossProduct(p3.m_normal)); + //scalar triple product of normals + if(denominator==0.0f) { + //no intersection + return false; + } + etk::Vector3D temp1, temp2, temp3; + temp1=(p2.m_normal.CrossProduct(p3.m_normal))*m_intercept; + temp2=(p3.m_normal.CrossProduct(m_normal))*p2.m_intercept; + temp3=(m_normal.CrossProduct(p2.m_normal))*p3.m_intercept; + + result=(temp1+temp2+temp3)/(-denominator); + + return true; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + float GetDistance(const etk::Vector3D & point) const + { + return point.x*m_normal.x + + point.y*m_normal.y + + point.z*m_normal.z + + m_intercept; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + Plane LinearInterpolate(const Plane & p2, float factor) + { + Plane result; + result.m_normal=m_normal*(1.0f-factor) + p2.m_normal*factor; + result.m_normal.Normalize(); + result.m_intercept=m_intercept*(1.0f-factor) + p2.m_intercept*factor; + return result; + }; + + //operators + /** + * @brief + * @param[in,out] + * @return + */ + bool operator==(const Plane & obj) const + { + if( m_normal==obj.m_normal + && m_intercept==obj.m_intercept) { + return true; + } + return false; + }; + + /** + * @brief + * @param[in,out] + * @return + */ + bool operator!=(const Plane & obj) const + { + return!((*this)==obj); + } + + //unary operators + /** + * @brief + * @param[in,out] + * @return + */ + Plane operator-(void) const + { + return Plane(-m_normal, -m_intercept); + } + + /** + * @brief + * @param[in,out] + * @return + */ + Plane operator+(void) const + { + return *this; + } + }; +}; + +#endif + diff --git a/Sources/libetk/etk/math/Vector2D.h b/Sources/libetk/etk/math/Vector2D.h index 76fe2b66..583a09e1 100644 --- a/Sources/libetk/etk/math/Vector2D.h +++ b/Sources/libetk/etk/math/Vector2D.h @@ -170,16 +170,89 @@ namespace etk return result; } - T QuadDist(void) + /** + * @brief Set the vector at (0,0) + */ + void Zero(void) { - return x*x + y*y; - } + x=0; + y=0; + }; + /** + * @brief Set the vector at (1,1) + */ + void One(void) + { + x=0; + y=0; + }; - T Dist(void) + /** + * @brief normalize the curent vector + */ + void Normalize(void) { - return sqrt(x*x + y*y); - } - }; + float length=GetLength(); + if( length==1 + || length==0) { + return; + } + float scalefactor = 1.0f/length; + x *= scalefactor; + y *= scalefactor; + }; + + /** + * @brief Get the normalized vector + * @return a new vector normalized + */ + Vector2D GetNormalized(void) const + { + Vector2D tmp(*this); + tmp.Normalize(); + return tmp; + }; + + /** + * @brief Get the size of the vector + * @return the float value + */ + float GetLength(void) const + { + return (float)sqrt((x*x)+(y*y)); + }; + + /** + * @brief Get the square size of the vector + * @return flat value + */ + float GetSquaredLength(void) const + { + return (float)(x*x)+(y*y); + }; + + /** + * @brief Linar intermolation of the curent Vector + * @param[in] input + * @param[in] factor + * @return the interpolate vector + */ + Vector2D LinearInterpolate(const Vector2D & input, float factor) const + { + return (*this)*(1.0f-factor) + input*factor; + }; + + /** + * @brief Quadratic intermolation of the curent Vector + * @param[in] v1 + * @param[in] v2 + * @param[in] factor + * @return the interpolate vector + */ + Vector2D QuadraticInterpolate(const Vector2D & v2, const Vector2D & v3, float factor) const + { + return (*this)*(1.0f-factor)*(1.0f-factor) + 2*v2*factor*(1.0f-factor) + v3*factor*factor;} + }; }; #endif diff --git a/Sources/libetk/etk/math/Vector3D.h b/Sources/libetk/etk/math/Vector3D.h index 4553d712..2568f451 100644 --- a/Sources/libetk/etk/math/Vector3D.h +++ b/Sources/libetk/etk/math/Vector3D.h @@ -81,6 +81,12 @@ namespace etk z += (T)obj.z; return *this; } + const Vector3D& operator+= (const float val) { + x += val; + y += val; + z += val; + return *this; + } /***************************************************** * + operator *****************************************************/ @@ -91,6 +97,13 @@ namespace etk tmpp.z += (T)obj.z; return *this; } + Vector3D operator+ (const float val) { + Vector3D tmpp(x,y,y); + tmpp.x += val; + tmpp.y += val; + tmpp.z += val; + return *this; + } /***************************************************** * -= operator *****************************************************/ @@ -100,6 +113,12 @@ namespace etk z -= (T)obj.z; return *this; } + const Vector3D& operator-= (const float val) { + x -= val; + y -= val; + z -= val; + return *this; + } /***************************************************** * - operator *****************************************************/ @@ -110,13 +129,35 @@ namespace etk tmpp.z -= (T)obj.z; return *this; } + Vector3D operator- (const float val) { + Vector3D tmpp(x,y,y); + tmpp.x -= val; + tmpp.y -= val; + tmpp.z -= val; + return *this; + } /***************************************************** * /= operator *****************************************************/ const Vector3D& operator/= (const Vector3D& obj) { - x /= (T)obj.x; - y /= (T)obj.y; - z /= (T)obj.z; + if (obj.x != 0) { + x /= (T)obj.x; + } + if (obj.y != 0) { + y /= (T)obj.y; + } + if (obj.z != 0) { + z /= (T)obj.z; + } + return *this; + } + const Vector3D& operator/= (const float val) { + if (val==0) { + return *this; + } + x /= val; + y /= val; + z /= val; return *this; } /***************************************************** @@ -124,10 +165,26 @@ namespace etk *****************************************************/ Vector3D operator/ (const Vector3D& obj) { Vector3D tmpp(x,y,y); - tmpp.x /= (T)obj.x; - tmpp.y /= (T)obj.y; - tmpp.z /= (T)obj.z; - return *this; + if (obj.x != 0) { + tmpp.x /= (T)obj.x; + } + if (obj.y != 0) { + tmpp.y /= (T)obj.y; + } + if (obj.z != 0) { + tmpp.z /= (T)obj.z; + } + return tmpp; + } + Vector3D operator/ (const float val) { + Vector3D tmpp(x,y,y); + if (val==0) { + return tmpp; + } + tmpp.x /= val; + tmpp.y /= val; + tmpp.z /= val; + return tmpp; } /***************************************************** * *= operator @@ -138,6 +195,12 @@ namespace etk z *= (T)obj.z; return *this; } + const Vector3D& operator*= (const float val) { + x *= val; + y *= val; + z *= val; + return *this; + } /***************************************************** * * operator *****************************************************/ @@ -146,7 +209,14 @@ namespace etk tmpp.x *= (T)obj.x; tmpp.y *= (T)obj.y; tmpp.z *= (T)obj.z; - return *this; + return tmpp; + } + Vector3D operator* (const float val) { + Vector3D tmpp(x,y,y); + tmpp.x *= val; + tmpp.y *= val; + tmpp.z *= val; + return tmpp; } /***************************************************** * ++ operator @@ -180,6 +250,168 @@ namespace etk --(*this); return result; } + + void Zero(void) + { + x=0; + y=0; + z=0; + }; + void One(void) + { + x=1; + y=1; + z=1; + }; + + //vector algebra + Vector3D CrossProduct(const Vector3D& obj) const + { + return Vector3D( y*obj.z - z*obj.y, + z*obj.x - x*obj.z, + x*obj.y - y*obj.x); + }; + + float DotProduct(const Vector3D& obj) const + { + return x*obj.x + + y*obj.y + + z*obj.z; + }; + + void Normalize() + { + float length=GetLength(); + if(length==1 || length==0) { + return; + } + float scalefactor = 1.0f/length; + x *= scalefactor; + y *= scalefactor; + z *= scalefactor; + }; + + Vector3D GetNormalized() const + { + Vector3D tmpp(*this); + tmpp.Normalize(); + return tmpp; + }; + + float GetLength() const + { + return (float)sqrt((x*x)+(y*y)+(z*z)); + }; + + float GetSquaredLength() const + { + return (x*x)+(y*y)+(z*z); + }; + + //rotations + void RotateX(double angle) + { + (*this)=GetRotatedX(angle); + }; + + Vector3D GetRotatedX(double angle) const + { + if(angle==0.0) { + return (*this); + } + float sinAngle=(float)sin(M_PI*angle/180); + float cosAngle=(float)cos(M_PI*angle/180); + + return Vector3D( x, + y*cosAngle - z*sinAngle, + y*sinAngle + z*cosAngle); + }; + + void RotateY(double angle) + { + (*this)=GetRotatedY(angle); + }; + + Vector3D GetRotatedY(double angle) const + { + if(angle==0.0) { + return (*this); + } + float sinAngle=(float)sin(M_PI*angle/180); + float cosAngle=(float)cos(M_PI*angle/180); + return Vector3D( x*cosAngle + z*sinAngle, + y, + -x*sinAngle + z*cosAngle); + }; + + void RotateZ(double angle) + { + (*this)=GetRotatedZ(angle); + }; + + Vector3D GetRotatedZ(double angle) const + { + if(angle==0.0) { + return (*this); + } + float sinAngle=(float)sin(M_PI*angle/180); + float cosAngle=(float)cos(M_PI*angle/180); + return Vector3D( x*cosAngle - y*sinAngle, + x*sinAngle + y*cosAngle, + z); + }; + + void RotateAxis(double angle, const Vector3D & axis) + { + (*this)=GetRotatedAxis(angle, axis); + }; + + Vector3D GetRotatedAxis(double angle, const Vector3D & axis) const + { + if(angle==0.0) { + return (*this); + } + Vector3D u=axis.GetNormalized(); + Vector3D rotMatrixRow0, rotMatrixRow1, rotMatrixRow2; + float sinAngle=(float)sin(M_PI*angle/180); + float cosAngle=(float)cos(M_PI*angle/180); + float MinusCosAngle=1.0f-cosAngle; + rotMatrixRow0.x=(u.x)*(u.x) + cosAngle*(1-(u.x)*(u.x)); + rotMatrixRow0.y=(u.x)*(u.y)*(MinusCosAngle) - sinAngle*u.z; + rotMatrixRow0.z=(u.x)*(u.z)*(MinusCosAngle) + sinAngle*u.y; + rotMatrixRow1.x=(u.x)*(u.y)*(MinusCosAngle) + sinAngle*u.z; + rotMatrixRow1.y=(u.y)*(u.y) + cosAngle*(1-(u.y)*(u.y)); + rotMatrixRow1.z=(u.y)*(u.z)*(MinusCosAngle) - sinAngle*u.x; + rotMatrixRow2.x=(u.x)*(u.z)*(MinusCosAngle) - sinAngle*u.y; + rotMatrixRow2.y=(u.y)*(u.z)*(MinusCosAngle) + sinAngle*u.x; + rotMatrixRow2.z=(u.z)*(u.z) + cosAngle*(1-(u.z)*(u.z)); + return Vector3D( this->DotProduct(rotMatrixRow0), + this->DotProduct(rotMatrixRow1), + this->DotProduct(rotMatrixRow2)); + }; + + /** + * @brief Linar intermolation of the curent Vector + * @param[in] input + * @param[in] factor + * @return the interpolate vector + */ + Vector3D LinearInterpolate(const Vector3D& input, float factor) const + { + return (*this)*(1.0f-factor) + input*factor; + }; + + /** + * @brief Quadratic intermolation of the curent Vector + * @param[in] v1 + * @param[in] v2 + * @param[in] factor + * @return the interpolate vector + */ + Vector3D QuadraticInterpolate(const Vector3D& v2, const Vector3D& v3, float factor) const + { + return (*this)*(1.0f-factor)*(1.0f-factor) + 2*v2*factor*(1.0f-factor) + v3*factor*factor; + }; }; }; diff --git a/Sources/libetk/etk/math/Vector4D.h b/Sources/libetk/etk/math/Vector4D.h index 65cfd55c..c098c495 100644 --- a/Sources/libetk/etk/math/Vector4D.h +++ b/Sources/libetk/etk/math/Vector4D.h @@ -27,7 +27,178 @@ namespace etk { -//template class Vector4D + template class Vector4D + { + public: + T x; + T y; + union { + T z; + T width; + }; + union { + T w; + T height; + }; + public: + /***************************************************** + * Constructor + *****************************************************/ + Vector4D(void) : x(0), y(0), z(0), w(0) { }; + Vector4D(double _x, double _y, double _z, double _w) : x(_x), y(_y), z(_z), w(_w) { }; + Vector4D(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) { }; + Vector4D(int32_t _x, int32_t _y, int32_t _z, int32_t _w) : x(_x), y(_y), z(_z), w(_w) { }; + Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; + Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; + Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; + ~Vector4D(void) { }; + /***************************************************** + * = assigment + *****************************************************/ + const Vector4D& operator= (const Vector4D& obj ) { + x = (T)obj.x; + y = (T)obj.y; + z = (T)obj.z; + w = (T)obj.w; + return *this; + } + /***************************************************** + * == operator + *****************************************************/ + bool operator== (const Vector4D& obj) const { + if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z) { + return true; + } + return false; + } + /***************************************************** + * != operator + *****************************************************/ + bool operator!= (const Vector4D& obj) const { + if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z && (T)obj.w == w) { + return false; + } + return true; + } + /***************************************************** + * += operator + *****************************************************/ + const Vector4D& operator+= (const Vector4D& obj) { + x += (T)obj.x; + y += (T)obj.y; + z += (T)obj.z; + w += (T)obj.w; + return *this; + } + /***************************************************** + * + operator + *****************************************************/ + Vector4D operator+ (const Vector4D& obj) { + Vector4D tmpp(x,y,y); + tmpp.x += (T)obj.x; + tmpp.y += (T)obj.y; + tmpp.z += (T)obj.z; + tmpp.w += (T)obj.w; + return *this; + } + /***************************************************** + * -= operator + *****************************************************/ + const Vector4D& operator-= (const Vector4D& obj) { + x -= (T)obj.x; + y -= (T)obj.y; + z -= (T)obj.z; + w -= (T)obj.w; + return *this; + } + /***************************************************** + * - operator + *****************************************************/ + Vector4D operator- (const Vector4D& obj) { + Vector4D tmpp(x,y,y); + tmpp.x -= (T)obj.x; + tmpp.y -= (T)obj.y; + tmpp.z -= (T)obj.z; + tmpp.w -= (T)obj.w; + return *this; + } + /***************************************************** + * /= operator + *****************************************************/ + const Vector4D& operator/= (const Vector4D& obj) { + x /= (T)obj.x; + y /= (T)obj.y; + z /= (T)obj.z; + w /= (T)obj.w; + return *this; + } + /***************************************************** + * / operator + *****************************************************/ + Vector4D operator/ (const Vector4D& obj) { + Vector4D tmpp(x,y,y); + tmpp.x /= (T)obj.x; + tmpp.y /= (T)obj.y; + tmpp.z /= (T)obj.z; + tmpp.w /= (T)obj.w; + return *this; + } + /***************************************************** + * *= operator + *****************************************************/ + const Vector4D& operator*= (const Vector4D& obj) { + x *= (T)obj.x; + y *= (T)obj.y; + z *= (T)obj.z; + w *= (T)obj.w; + return *this; + } + /***************************************************** + * * operator + *****************************************************/ + Vector4D operator* (const Vector4D& obj) { + Vector4D tmpp(x,y,y); + tmpp.x *= (T)obj.x; + tmpp.y *= (T)obj.y; + tmpp.z *= (T)obj.z; + tmpp.w *= (T)obj.w; + return *this; + } + /***************************************************** + * ++ operator + *****************************************************/ + Vector4D& operator++() // prefix + { + ++x; + ++y; + ++z; + ++w; + return *this; + } + Vector4D operator++(int unused) // postfix + { + Vector4D result = *this; + ++(*this); + return result; + } + /***************************************************** + * -- operator + *****************************************************/ + Vector4D& operator--() // prefix + { + --x; + --y; + --z; + --w; + return *this; + } + Vector4D operator--(int unused) // postfix + { + Vector4D result = *this; + --(*this); + return result; + } + }; }; #endif diff --git a/Sources/libetk/etk/math/math.h b/Sources/libetk/etk/math/math.h index 021d3c31..74426cfd 100644 --- a/Sources/libetk/etk/math/math.h +++ b/Sources/libetk/etk/math/math.h @@ -22,6 +22,9 @@ ******************************************************************************* */ +#ifndef EPSILON +#define EPSILON 0.01f +#endif #include #include diff --git a/Sources/libetk/licence_BSD.txt b/Sources/libetk/licence_BSD.txt index e69de29b..d593521d 100644 --- a/Sources/libetk/licence_BSD.txt +++ b/Sources/libetk/licence_BSD.txt @@ -0,0 +1,35 @@ +Copyright (c) +============= + +2011, Edouard DUPIN + +License (DSB) +============= + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Sources/libewol/licence_BSD.txt b/Sources/libewol/licence_BSD.txt index e69de29b..d593521d 100644 --- a/Sources/libewol/licence_BSD.txt +++ b/Sources/libewol/licence_BSD.txt @@ -0,0 +1,35 @@ +Copyright (c) +============= + +2011, Edouard DUPIN + +License (DSB) +============= + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file