Various fixes
Former-commit-id: 26dfbdb3388c845a6e3039f816f19ffbb462d7b8 [formerly a6437e0b6e48dbd630440f8d2629b32e4756b48e] Former-commit-id: 8a1855fc1d4d7c343b7e1fdcd3c6a31f3134a59a
This commit is contained in:
parent
84c26ee77d
commit
96dc8c001e
|
|
@ -78,7 +78,7 @@ namespace Nz
|
||||||
* \param v Object to hash
|
* \param v Object to hash
|
||||||
*
|
*
|
||||||
* \remark a HashAppend specialization for type T is required
|
* \remark a HashAppend specialization for type T is required
|
||||||
*
|
*
|
||||||
* \see ComputeHash
|
* \see ComputeHash
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -124,6 +124,7 @@ namespace Nz
|
||||||
template<typename T, std::size_t N>
|
template<typename T, std::size_t N>
|
||||||
constexpr std::size_t CountOf(T(&name)[N]) noexcept
|
constexpr std::size_t CountOf(T(&name)[N]) noexcept
|
||||||
{
|
{
|
||||||
|
NazaraUnused(name);
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,10 @@ namespace Nz
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructs a ByteArray object with a raw memory and a size
|
* \brief Constructs a ByteArray object with a raw memory and a size
|
||||||
*
|
*
|
||||||
* \param ptr Pointer to raw memory
|
* \param buffer Pointer to raw memory
|
||||||
* \param n Size that can be accessed
|
* \param n Size that can be accessed
|
||||||
*
|
*
|
||||||
* \remark If preallocated space of ptr is less than the size, the behaviour is undefined
|
* \remark If preallocated space of buffer is less than the size, the behaviour is undefined
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline ByteArray::ByteArray(const void* buffer, size_type n) :
|
inline ByteArray::ByteArray(const void* buffer, size_type n) :
|
||||||
|
|
@ -62,10 +62,10 @@ namespace Nz
|
||||||
/*!
|
/*!
|
||||||
* \brief Appends the content of raw memory
|
* \brief Appends the content of raw memory
|
||||||
*
|
*
|
||||||
* \param ptr Constant pointer to raw memory
|
* \param buffer Constant pointer to raw memory
|
||||||
* \param n Size that can be read
|
* \param n Size that can be read
|
||||||
*
|
*
|
||||||
* \remark If preallocated space of ptr is less than the size, the behaviour is undefined
|
* \remark If preallocated space of buffer is less than the size, the behaviour is undefined
|
||||||
*
|
*
|
||||||
* \see Insert
|
* \see Insert
|
||||||
*/
|
*/
|
||||||
|
|
@ -298,11 +298,11 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Inserts n times the same value at the iterator position
|
* \brief Inserts n times the same byte at the iterator position
|
||||||
*
|
*
|
||||||
* \param pos Iterator to the position
|
* \param pos Iterator to the position
|
||||||
* \param n Number of repetitions
|
* \param n Number of repetitions
|
||||||
* \param value Value to repeat
|
* \param byte Value to repeat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline ByteArray::iterator ByteArray::Insert(const_iterator pos, size_type n, value_type byte)
|
inline ByteArray::iterator ByteArray::Insert(const_iterator pos, size_type n, value_type byte)
|
||||||
|
|
@ -359,10 +359,10 @@ namespace Nz
|
||||||
/*!
|
/*!
|
||||||
* \brief Prepends the content of raw memory
|
* \brief Prepends the content of raw memory
|
||||||
*
|
*
|
||||||
* \param ptr Constant pointer to raw memory
|
* \param buffer Constant pointer to raw memory
|
||||||
* \param n Size that can be read
|
* \param n Size that can be read
|
||||||
*
|
*
|
||||||
* \remark If preallocated space of ptr is less than the size, the behaviour is undefined
|
* \remark If preallocated space of buffer is less than the size, the behaviour is undefined
|
||||||
*
|
*
|
||||||
* \see Insert
|
* \see Insert
|
||||||
*/
|
*/
|
||||||
|
|
@ -682,8 +682,7 @@ namespace Nz
|
||||||
* \brief Checks whether the first byte array is equal to the second byte array
|
* \brief Checks whether the first byte array is equal to the second byte array
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator==(const ByteArray& rhs) const
|
inline bool ByteArray::operator==(const ByteArray& rhs) const
|
||||||
|
|
@ -695,8 +694,7 @@ namespace Nz
|
||||||
* \brief Checks whether the first byte array is equal to the second byte array
|
* \brief Checks whether the first byte array is equal to the second byte array
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator!=(const ByteArray& rhs) const
|
inline bool ByteArray::operator!=(const ByteArray& rhs) const
|
||||||
|
|
@ -708,8 +706,7 @@ namespace Nz
|
||||||
* \brief Checks whether the first byte array is less than the second byte array
|
* \brief Checks whether the first byte array is less than the second byte array
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator<(const ByteArray& rhs) const
|
inline bool ByteArray::operator<(const ByteArray& rhs) const
|
||||||
|
|
@ -721,8 +718,7 @@ namespace Nz
|
||||||
* \brief Checks whether the first byte array is less or equal than the second byte array
|
* \brief Checks whether the first byte array is less or equal than the second byte array
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator<=(const ByteArray& rhs) const
|
inline bool ByteArray::operator<=(const ByteArray& rhs) const
|
||||||
|
|
@ -731,11 +727,10 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Checks whether the first byte array is greather than the second byte array
|
* \brief Checks whether the first byte array is greater than the second byte array
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator>(const ByteArray& rhs) const
|
inline bool ByteArray::operator>(const ByteArray& rhs) const
|
||||||
|
|
@ -744,11 +739,10 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Checks whether the first byte array is greather or equal than the second byte array
|
* \brief Checks whether the first byte array is greater or equal than the second byte array
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ByteArray to compare in left hand side
|
* \param rhs ByteArray to compare with
|
||||||
* \param second ByteArray to compare in right hand side
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool ByteArray::operator>=(const ByteArray& rhs) const
|
inline bool ByteArray::operator>=(const ByteArray& rhs) const
|
||||||
|
|
|
||||||
|
|
@ -291,15 +291,16 @@ namespace Nz
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::ostream& operator<<(std::ostream& out, const ObjectHandle<T>& handle)
|
std::ostream& operator<<(std::ostream& out, const ObjectHandle<T>& handle)
|
||||||
{
|
{
|
||||||
return handle.ToString();
|
out << handle.ToString();
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Checks whether the first object handle is equal to the second object handle
|
* \brief Checks whether the first object handle is equal to the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator==(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -311,8 +312,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object is equal to the second object handle
|
* \brief Checks whether the object is equal to the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first Object to compare in left hand side
|
* \param lhs Object to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator==(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -324,8 +325,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object handle is equal to the second object
|
* \brief Checks whether the object handle is equal to the second object
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second Object to compare in right hand side
|
* \param rhs Object to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator==(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
@ -337,8 +338,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is equal to the second object handle
|
* \brief Checks whether the first object handle is equal to the second object handle
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator!=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -350,8 +351,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object is equal to the second object handle
|
* \brief Checks whether the object is equal to the second object handle
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first Object to compare in left hand side
|
* \param lhs Object to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator!=(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -363,8 +364,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object handle is equal to the second object
|
* \brief Checks whether the object handle is equal to the second object
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second Object to compare in right hand side
|
* \param rhs Object to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator!=(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
@ -376,8 +377,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator<(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -389,8 +390,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator<(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -402,8 +403,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator<(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
@ -415,8 +416,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator<=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -428,8 +429,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator<=(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -441,8 +442,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator<=(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
@ -454,8 +455,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator>(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -467,8 +468,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator>(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -480,8 +481,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator>(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
@ -493,8 +494,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
bool operator>=(const ObjectHandle<T>& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -506,8 +507,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const T& lhs, const ObjectHandle<T>& rhs)
|
bool operator>=(const T& lhs, const ObjectHandle<T>& rhs)
|
||||||
|
|
@ -519,8 +520,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectHandle to compare in left hand side
|
* \param lhs ObjectHandle to compare in left hand side
|
||||||
* \param second ObjectHandle to compare in right hand side
|
* \param rhs ObjectHandle to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const ObjectHandle<T>& lhs, const T& rhs)
|
bool operator>=(const ObjectHandle<T>& lhs, const T& rhs)
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
return m_object;
|
return m_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Assigns the object into this
|
* \brief Assigns the object into this
|
||||||
* \return A reference to this
|
* \return A reference to this
|
||||||
|
|
@ -251,8 +251,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is equal to the second object handle
|
* \brief Checks whether the first object handle is equal to the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator==(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -264,8 +264,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object is equal to the second object handle
|
* \brief Checks whether the object is equal to the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first Object to compare in left hand side
|
* \param lhs Object to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator==(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -277,8 +277,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object handle is equal to the second object
|
* \brief Checks whether the object handle is equal to the second object
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second Object to compare in right hand side
|
* \param rhs Object to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator==(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator==(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
@ -290,8 +290,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is equal to the second object handle
|
* \brief Checks whether the first object handle is equal to the second object handle
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator!=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -303,8 +303,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object is equal to the second object handle
|
* \brief Checks whether the object is equal to the second object handle
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first Object to compare in left hand side
|
* \param lhs Object to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator!=(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -316,8 +316,8 @@ namespace Nz
|
||||||
* \brief Checks whether the object handle is equal to the second object
|
* \brief Checks whether the object handle is equal to the second object
|
||||||
* \return false if it is the case
|
* \return false if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second Object to compare in right hand side
|
* \param rhs Object to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator!=(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator!=(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
@ -329,8 +329,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator<(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -342,8 +342,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator<(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -355,8 +355,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less than the second object handle
|
* \brief Checks whether the first object handle is less than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator<(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
@ -368,8 +368,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator<=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -381,8 +381,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator<=(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -394,8 +394,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is less or equal than the second object handle
|
* \brief Checks whether the first object handle is less or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator<=(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator<=(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
@ -407,8 +407,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator>(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -420,8 +420,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator>(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -433,8 +433,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather than the second object handle
|
* \brief Checks whether the first object handle is greather than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator>(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
@ -446,8 +446,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
bool operator>=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -459,8 +459,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const T& lhs, const ObjectRef<T>& rhs)
|
bool operator>=(const T& lhs, const ObjectRef<T>& rhs)
|
||||||
|
|
@ -472,8 +472,8 @@ namespace Nz
|
||||||
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
* \brief Checks whether the first object handle is greather or equal than the second object handle
|
||||||
* \return true if it is the case
|
* \return true if it is the case
|
||||||
*
|
*
|
||||||
* \param first ObjectRef to compare in left hand side
|
* \param lhs ObjectRef to compare in left hand side
|
||||||
* \param second ObjectRef to compare in right hand side
|
* \param rhs ObjectRef to compare in right hand side
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator>=(const ObjectRef<T>& lhs, const T& rhs)
|
bool operator>=(const ObjectRef<T>& lhs, const T& rhs)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ namespace Nz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline String::SharedString::SharedString(std::size_t strSize) :
|
inline String::SharedString::SharedString(std::size_t strSize) :
|
||||||
capacity(strSize),
|
capacity(strSize),
|
||||||
size(strSize),
|
size(strSize),
|
||||||
string(new char[strSize + 1])
|
string(new char[strSize + 1])
|
||||||
{
|
{
|
||||||
|
|
@ -84,16 +84,15 @@ namespace Nz
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
/*!
|
|
||||||
* \brief Specialisation of std to hash
|
|
||||||
* \return Result of the hash
|
|
||||||
*
|
|
||||||
* \param str String to hash
|
|
||||||
*/
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct hash<Nz::String>
|
struct hash<Nz::String>
|
||||||
{
|
{
|
||||||
|
/*!
|
||||||
|
* \brief Specialisation of std to hash
|
||||||
|
* \return Result of the hash
|
||||||
|
*
|
||||||
|
* \param str String to hash
|
||||||
|
*/
|
||||||
size_t operator()(const Nz::String& str) const
|
size_t operator()(const Nz::String& str) const
|
||||||
{
|
{
|
||||||
// Algorithme DJB2
|
// Algorithme DJB2
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,7 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Updates the bounding volume by a matrix
|
* \brief Updates the bounding volume
|
||||||
*
|
|
||||||
* \param transformMatrix Matrix transformation for our bounding volume
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline void Renderable::UpdateBoundingVolume() const
|
inline void Renderable::UpdateBoundingVolume() const
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ namespace Nz
|
||||||
*
|
*
|
||||||
* \param value Initial value
|
* \param value Initial value
|
||||||
* \param objective Target value
|
* \param objective Target value
|
||||||
* \parma increment One step value
|
* \param increment One step value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -412,7 +412,7 @@ namespace Nz
|
||||||
* \brief Gets the log in base 2 of integral number, only works for power of two !
|
* \brief Gets the log in base 2 of integral number, only works for power of two !
|
||||||
* \return Log of the number
|
* \return Log of the number
|
||||||
*
|
*
|
||||||
* \param number To get log in base 2
|
* \param pot To get log in base 2
|
||||||
*
|
*
|
||||||
* \remark Only works for power of two
|
* \remark Only works for power of two
|
||||||
* \remark If number is 0, 0 is returned
|
* \remark If number is 0, 0 is returned
|
||||||
|
|
@ -431,7 +431,7 @@ namespace Nz
|
||||||
* \return base^exponent for integral
|
* \return base^exponent for integral
|
||||||
*
|
*
|
||||||
* \param base Base of the exponentation
|
* \param base Base of the exponentation
|
||||||
* \parma exponent Power for the base
|
* \param exponent Power for the base
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//TODO: Mark as constexpr when supported by all major compilers
|
//TODO: Mark as constexpr when supported by all major compilers
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ namespace Nz
|
||||||
void Update(const Vector3<T>& translation);
|
void Update(const Vector3<T>& translation);
|
||||||
|
|
||||||
BoundingVolume operator*(T scalar) const;
|
BoundingVolume operator*(T scalar) const;
|
||||||
|
BoundingVolume& operator=(const BoundingVolume& other) = default;
|
||||||
|
|
||||||
BoundingVolume& operator*=(T scalar);
|
BoundingVolume& operator*=(T scalar);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ namespace Nz
|
||||||
|
|
||||||
Box operator*(T scalar) const;
|
Box operator*(T scalar) const;
|
||||||
Box operator*(const Vector3<T>& vec) const;
|
Box operator*(const Vector3<T>& vec) const;
|
||||||
|
Box& operator=(const Box& other) = default;
|
||||||
|
|
||||||
Box& operator*=(T scalar);
|
Box& operator*=(T scalar);
|
||||||
Box& operator*=(const Vector3<T>& vec);
|
Box& operator*=(const Vector3<T>& vec);
|
||||||
|
|
|
||||||
|
|
@ -787,7 +787,7 @@ namespace Nz
|
||||||
* \brief Multiplies the lengths with the scalar
|
* \brief Multiplies the lengths with the scalar
|
||||||
* \return A box where the position is the same and width, height and depth are the product of the old width, height and depth and the scalar
|
* \return A box where the position is the same and width, height and depth are the product of the old width, height and depth and the scalar
|
||||||
*
|
*
|
||||||
* \param scale The scalar to multiply width, height and depth with
|
* \param scalar The scalar to multiply width, height and depth with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ namespace Nz
|
||||||
EulerAngles operator-(const EulerAngles& angles) const;
|
EulerAngles operator-(const EulerAngles& angles) const;
|
||||||
/*EulerAngles operator*(const EulerAngles& angles) const;
|
/*EulerAngles operator*(const EulerAngles& angles) const;
|
||||||
EulerAngles operator/(const EulerAngles& angles) const;*/
|
EulerAngles operator/(const EulerAngles& angles) const;*/
|
||||||
|
EulerAngles& operator=(const EulerAngles& other) = default;
|
||||||
|
|
||||||
EulerAngles& operator+=(const EulerAngles& angles);
|
EulerAngles& operator+=(const EulerAngles& angles);
|
||||||
EulerAngles& operator-=(const EulerAngles& angles);
|
EulerAngles& operator-=(const EulerAngles& angles);
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ namespace Nz
|
||||||
IntersectionSide Intersect(const Sphere<T>& sphere) const;
|
IntersectionSide Intersect(const Sphere<T>& sphere) const;
|
||||||
IntersectionSide Intersect(const Vector3<T>* points, unsigned int pointCount) const;
|
IntersectionSide Intersect(const Vector3<T>* points, unsigned int pointCount) const;
|
||||||
|
|
||||||
|
Frustum& operator=(const Frustum& other) = default;
|
||||||
|
|
||||||
Frustum& Set(const Frustum& frustum);
|
Frustum& Set(const Frustum& frustum);
|
||||||
template<typename U> Frustum& Set(const Frustum<U>& frustum);
|
template<typename U> Frustum& Set(const Frustum<U>& frustum);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -750,7 +750,7 @@ namespace Nz
|
||||||
* \brief Inverts this matrix
|
* \brief Inverts this matrix
|
||||||
* \return A reference to this matrix inverted
|
* \return A reference to this matrix inverted
|
||||||
*
|
*
|
||||||
* \param bool Optional argument to know if matrix has been successfully inverted
|
* \param succeeded Optional argument to know if matrix has been successfully inverted
|
||||||
*
|
*
|
||||||
* \see InverseAffine
|
* \see InverseAffine
|
||||||
*/
|
*/
|
||||||
|
|
@ -769,7 +769,7 @@ namespace Nz
|
||||||
* \brief Inverts this matrix
|
* \brief Inverts this matrix
|
||||||
* \return A reference to this matrix inverted
|
* \return A reference to this matrix inverted
|
||||||
*
|
*
|
||||||
* \param bool Optional argument to know if matrix has been successfully inverted
|
* \param succeeded Optional argument to know if matrix has been successfully inverted
|
||||||
*
|
*
|
||||||
* \see Inverse
|
* \see Inverse
|
||||||
*/
|
*/
|
||||||
|
|
@ -1487,7 +1487,7 @@ namespace Nz
|
||||||
* \brief Compares the matrix to other one
|
* \brief Compares the matrix to other one
|
||||||
* \return true if the matrices are the same
|
* \return true if the matrices are the same
|
||||||
*
|
*
|
||||||
* \param matrix Other matrix to compare with
|
* \param mat Other matrix to compare with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -1504,7 +1504,7 @@ namespace Nz
|
||||||
* \brief Compares the matrix to other one
|
* \brief Compares the matrix to other one
|
||||||
* \return false if the matrices are the same
|
* \return false if the matrices are the same
|
||||||
*
|
*
|
||||||
* \param matrix Other matrix to compare with
|
* \param mat Other matrix to compare with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ namespace Nz
|
||||||
Vector3<T> operator()(unsigned int i) const;
|
Vector3<T> operator()(unsigned int i) const;
|
||||||
|
|
||||||
OrientedBox operator*(T scalar) const;
|
OrientedBox operator*(T scalar) const;
|
||||||
|
OrientedBox& operator=(const OrientedBox& other) = default;
|
||||||
|
|
||||||
OrientedBox& operator*=(T scalar);
|
OrientedBox& operator*=(T scalar);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ namespace Nz
|
||||||
* \brief Multiplies the lengths with the scalar
|
* \brief Multiplies the lengths with the scalar
|
||||||
* \return A OrientedBox where the position is the same and width, height and depth are the product of the old width, height and depth and the scalar
|
* \return A OrientedBox where the position is the same and width, height and depth are the product of the old width, height and depth and the scalar
|
||||||
*
|
*
|
||||||
* \param scale The scalar to multiply width, height and depth with
|
* \param scalar The scalar to multiply width, height and depth with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ namespace Nz
|
||||||
|
|
||||||
String ToString() const;
|
String ToString() const;
|
||||||
|
|
||||||
|
Plane& operator=(const Plane& other) = default;
|
||||||
|
|
||||||
bool operator==(const Plane& plane) const;
|
bool operator==(const Plane& plane) const;
|
||||||
bool operator!=(const Plane& plane) const;
|
bool operator!=(const Plane& plane) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ namespace Nz
|
||||||
String ToString() const;
|
String ToString() const;
|
||||||
|
|
||||||
Vector3<T> operator*(T lambda) const;
|
Vector3<T> operator*(T lambda) const;
|
||||||
|
Ray& operator=(const Ray& other) = default;
|
||||||
|
|
||||||
bool operator==(const Ray& ray) const;
|
bool operator==(const Ray& ray) const;
|
||||||
bool operator!=(const Ray& ray) const;
|
bool operator!=(const Ray& ray) const;
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ namespace Nz
|
||||||
Rect operator*(const Vector2<T>& vec) const;
|
Rect operator*(const Vector2<T>& vec) const;
|
||||||
Rect operator/(T scalar) const;
|
Rect operator/(T scalar) const;
|
||||||
Rect operator/(const Vector2<T>& vec) const;
|
Rect operator/(const Vector2<T>& vec) const;
|
||||||
|
Rect& operator=(const Rect& other) = default;
|
||||||
|
|
||||||
Rect& operator*=(T scalar);
|
Rect& operator*=(T scalar);
|
||||||
Rect& operator*=(const Vector2<T>& vec);
|
Rect& operator*=(const Vector2<T>& vec);
|
||||||
|
|
|
||||||
|
|
@ -629,7 +629,7 @@ namespace Nz
|
||||||
* \brief Multiplies the lengths with the scalar
|
* \brief Multiplies the lengths with the scalar
|
||||||
* \return A rectangle where the position is the same and width and height are the product of the old width and height and the scalar
|
* \return A rectangle where the position is the same and width and height are the product of the old width and height and the scalar
|
||||||
*
|
*
|
||||||
* \param scale The scalar to multiply width and height with
|
* \param scalar The scalar to multiply width and height with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -655,13 +655,13 @@ namespace Nz
|
||||||
* \brief Divides the lengths with the scalar
|
* \brief Divides the lengths with the scalar
|
||||||
* \return A rectangle where the position is the same and width and height are the quotient of the old width and height and the scalar
|
* \return A rectangle where the position is the same and width and height are the quotient of the old width and height and the scalar
|
||||||
*
|
*
|
||||||
* \param scale The scalar to divide width and height with
|
* \param scalar The scalar to divide width and height with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
Rect<T> Rect<T>::operator/(T scalar) const
|
Rect<T> Rect<T>::operator/(T scalar) const
|
||||||
{
|
{
|
||||||
return Rect(x, y, width/scalar, height/scalar);
|
return Rect(x, y, width / scalar, height / scalar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -745,7 +745,7 @@ namespace Nz
|
||||||
* \brief Compares the rectangle to other one
|
* \brief Compares the rectangle to other one
|
||||||
* \return true if the rectangles are the same
|
* \return true if the rectangles are the same
|
||||||
*
|
*
|
||||||
* \param rec Other rectangle to compare with
|
* \param rect Other rectangle to compare with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -759,7 +759,7 @@ namespace Nz
|
||||||
* \brief Compares the rectangle to other one
|
* \brief Compares the rectangle to other one
|
||||||
* \return false if the rectangles are the same
|
* \return false if the rectangles are the same
|
||||||
*
|
*
|
||||||
* \param rec Other rectangle to compare with
|
* \param rect Other rectangle to compare with
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ namespace Nz
|
||||||
T operator[](unsigned int i) const;
|
T operator[](unsigned int i) const;
|
||||||
|
|
||||||
Sphere operator*(T scalar) const;
|
Sphere operator*(T scalar) const;
|
||||||
|
Sphere& operator=(const Sphere& other) = default;
|
||||||
|
|
||||||
Sphere& operator*=(T scalar);
|
Sphere& operator*=(T scalar);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ namespace Nz
|
||||||
Vector2 operator*(T scale) const;
|
Vector2 operator*(T scale) const;
|
||||||
Vector2 operator/(const Vector2& vec) const;
|
Vector2 operator/(const Vector2& vec) const;
|
||||||
Vector2 operator/(T scale) const;
|
Vector2 operator/(T scale) const;
|
||||||
|
Vector2& operator=(const Vector2& other) = default;
|
||||||
|
|
||||||
Vector2& operator+=(const Vector2& vec);
|
Vector2& operator+=(const Vector2& vec);
|
||||||
Vector2& operator-=(const Vector2& vec);
|
Vector2& operator-=(const Vector2& vec);
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ namespace Nz
|
||||||
Vector3 operator*(T scale) const;
|
Vector3 operator*(T scale) const;
|
||||||
Vector3 operator/(const Vector3& vec) const;
|
Vector3 operator/(const Vector3& vec) const;
|
||||||
Vector3 operator/(T scale) const;
|
Vector3 operator/(T scale) const;
|
||||||
|
Vector3& operator=(const Vector3& vec) = default;
|
||||||
|
|
||||||
Vector3& operator+=(const Vector3& vec);
|
Vector3& operator+=(const Vector3& vec);
|
||||||
Vector3& operator-=(const Vector3& vec);
|
Vector3& operator-=(const Vector3& vec);
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ namespace Nz
|
||||||
Vector4 operator*(T scale) const;
|
Vector4 operator*(T scale) const;
|
||||||
Vector4 operator/(const Vector4& vec) const;
|
Vector4 operator/(const Vector4& vec) const;
|
||||||
Vector4 operator/(T scale) const;
|
Vector4 operator/(T scale) const;
|
||||||
|
Vector4& operator=(const Vector4& other) = default;
|
||||||
|
|
||||||
Vector4& operator+=(const Vector4& vec);
|
Vector4& operator+=(const Vector4& vec);
|
||||||
Vector4& operator-=(const Vector4& vec);
|
Vector4& operator-=(const Vector4& vec);
|
||||||
|
|
|
||||||
|
|
@ -385,7 +385,7 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets the position of the cursor
|
* \brief Sets the position of the cursor
|
||||||
* \return true if cursor is successfully positioned
|
* \return true if cursor is successfully positioned
|
||||||
*
|
*
|
||||||
* \param pos Position of the cursor
|
* \param pos Position of the cursor
|
||||||
|
|
@ -404,7 +404,7 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets the position of the cursor
|
* \brief Sets the position of the cursor
|
||||||
* \return true if cursor is successfully positioned
|
* \return true if cursor is successfully positioned
|
||||||
*
|
*
|
||||||
* \param offset Offset according to the cursor begin position
|
* \param offset Offset according to the cursor begin position
|
||||||
|
|
@ -725,7 +725,7 @@ namespace Nz
|
||||||
return true;
|
return true;
|
||||||
else if (path.Match("\\\\*")) // Ex: \\Laptop
|
else if (path.Match("\\\\*")) // Ex: \\Laptop
|
||||||
return true;
|
return true;
|
||||||
else if (path.StartsWith('\\')) // Special : '\' refering to the root
|
else if (path.StartsWith('\\')) // Special : '\' referring to the root
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include "..\..\..\include\Nazara\Core\StringStream.hpp"
|
|
||||||
// Copyright (C) 2015 Jérôme Leclercq
|
// Copyright (C) 2015 Jérôme Leclercq
|
||||||
// This file is part of the "Nazara Engine - Core module"
|
// This file is part of the "Nazara Engine - Core module"
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
|
||||||
|
|
@ -1352,6 +1352,15 @@ namespace Nz
|
||||||
|
|
||||||
void Image::Copy(UInt8* destination, const UInt8* source, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, unsigned int dstWidth, unsigned int dstHeight, unsigned int srcWidth, unsigned int srcHeight)
|
void Image::Copy(UInt8* destination, const UInt8* source, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, unsigned int dstWidth, unsigned int dstHeight, unsigned int srcWidth, unsigned int srcHeight)
|
||||||
{
|
{
|
||||||
|
#if NAZARA_UTILITY_SAFE
|
||||||
|
if (width == 0)
|
||||||
|
NazaraError("Width must be greater than zero");
|
||||||
|
if (height == 0)
|
||||||
|
NazaraError("Height must be greater than zero");
|
||||||
|
if (depth == 0)
|
||||||
|
NazaraError("Depth must be greater than zero");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dstWidth == 0)
|
if (dstWidth == 0)
|
||||||
dstWidth = width;
|
dstWidth = width;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue