mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Update Assimp lib/dll/includes. Update glfw3 lib (all 64 bit now).
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2012, assimp team
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
@@ -25,21 +25,21 @@ conditions are met:
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"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 COPYRIGHT
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
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
|
||||
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.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file aiVector2D.inl
|
||||
/** @file vector2.inl
|
||||
* @brief Inline implementation of aiVector2t<TReal> operators
|
||||
*/
|
||||
#ifndef AI_VECTOR2D_INL_INC
|
||||
@@ -54,104 +54,104 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
template <typename TReal>
|
||||
template <typename TOther>
|
||||
aiVector2t<TReal>::operator aiVector2t<TOther> () const {
|
||||
return aiVector2t<TOther>(static_cast<TOther>(x),static_cast<TOther>(y));
|
||||
return aiVector2t<TOther>(static_cast<TOther>(x),static_cast<TOther>(y));
|
||||
}
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
void aiVector2t<TReal>::Set( TReal pX, TReal pY) {
|
||||
x = pX; y = pY;
|
||||
void aiVector2t<TReal>::Set( TReal pX, TReal pY) {
|
||||
x = pX; y = pY;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
TReal aiVector2t<TReal>::SquareLength() const {
|
||||
return x*x + y*y;
|
||||
return x*x + y*y;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
TReal aiVector2t<TReal>::Length() const {
|
||||
return ::sqrt( SquareLength());
|
||||
return std::sqrt( SquareLength());
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
aiVector2t<TReal>& aiVector2t<TReal>::Normalize() {
|
||||
*this /= Length();
|
||||
return *this;
|
||||
aiVector2t<TReal>& aiVector2t<TReal>::Normalize() {
|
||||
*this /= Length();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) {
|
||||
x += o.x; y += o.y;
|
||||
return *this;
|
||||
x += o.x; y += o.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) {
|
||||
x -= o.x; y -= o.y;
|
||||
return *this;
|
||||
x -= o.x; y -= o.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) {
|
||||
x *= f; y *= f;
|
||||
return *this;
|
||||
const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) {
|
||||
x *= f; y *= f;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
|
||||
x /= f; y /= f;
|
||||
return *this;
|
||||
x /= f; y /= f;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
TReal aiVector2t<TReal>::operator[](unsigned int i) const {
|
||||
return *(&x + i);
|
||||
return *(&x + i);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
TReal& aiVector2t<TReal>::operator[](unsigned int i) {
|
||||
return *(&x + i);
|
||||
return *(&x + i);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
bool aiVector2t<TReal>::operator== (const aiVector2t& other) const {
|
||||
return x == other.x && y == other.y;
|
||||
return x == other.x && y == other.y;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
|
||||
return x != other.x || y != other.y;
|
||||
return x != other.x || y != other.y;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
template<typename TReal>
|
||||
bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
|
||||
return
|
||||
std::abs(x - other.x) <= epsilon &&
|
||||
std::abs(y - other.y) <= epsilon;
|
||||
return
|
||||
std::abs(x - other.x) <= epsilon &&
|
||||
std::abs(y - other.y) <= epsilon;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
aiVector2t<TReal>& aiVector2t<TReal>::operator= (TReal f) {
|
||||
x = y = f;
|
||||
return *this;
|
||||
aiVector2t<TReal>& aiVector2t<TReal>::operator= (TReal f) {
|
||||
x = y = f;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
const aiVector2t<TReal> aiVector2t<TReal>::SymMul(const aiVector2t& o) {
|
||||
return aiVector2t(x*o.x,y*o.y);
|
||||
return aiVector2t(x*o.x,y*o.y);
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ const aiVector2t<TReal> aiVector2t<TReal>::SymMul(const aiVector2t& o) {
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator + (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
|
||||
{
|
||||
return aiVector2t<TReal>( v1.x + v2.x, v1.y + v2.y);
|
||||
return aiVector2t<TReal>( v1.x + v2.x, v1.y + v2.y);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -168,7 +168,7 @@ inline aiVector2t<TReal> operator + (const aiVector2t<TReal>& v1, const aiVector
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator - (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
|
||||
{
|
||||
return aiVector2t<TReal>( v1.x - v2.x, v1.y - v2.y);
|
||||
return aiVector2t<TReal>( v1.x - v2.x, v1.y - v2.y);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -176,7 +176,7 @@ inline aiVector2t<TReal> operator - (const aiVector2t<TReal>& v1, const aiVector
|
||||
template <typename TReal>
|
||||
inline TReal operator * (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
|
||||
{
|
||||
return v1.x*v2.x + v1.y*v2.y;
|
||||
return v1.x*v2.x + v1.y*v2.y;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -184,7 +184,7 @@ inline TReal operator * (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator * ( TReal f, const aiVector2t<TReal>& v)
|
||||
{
|
||||
return aiVector2t<TReal>( f*v.x, f*v.y);
|
||||
return aiVector2t<TReal>( f*v.x, f*v.y);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -192,7 +192,7 @@ inline aiVector2t<TReal> operator * ( TReal f, const aiVector2t<TReal>& v)
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator * ( const aiVector2t<TReal>& v, TReal f)
|
||||
{
|
||||
return aiVector2t<TReal>( f*v.x, f*v.y);
|
||||
return aiVector2t<TReal>( f*v.x, f*v.y);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -201,7 +201,7 @@ template <typename TReal>
|
||||
inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, TReal f)
|
||||
{
|
||||
|
||||
return v * (1/f);
|
||||
return v * (1/f);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -209,7 +209,7 @@ inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, TReal f)
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, const aiVector2t<TReal>& v2)
|
||||
{
|
||||
return aiVector2t<TReal>(v.x / v2.x,v.y / v2.y);
|
||||
return aiVector2t<TReal>(v.x / v2.x,v.y / v2.y);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -217,8 +217,8 @@ inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, const aiVector
|
||||
template <typename TReal>
|
||||
inline aiVector2t<TReal> operator - ( const aiVector2t<TReal>& v)
|
||||
{
|
||||
return aiVector2t<TReal>( -v.x, -v.y);
|
||||
return aiVector2t<TReal>( -v.x, -v.y);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user