Improve documentation
Former-commit-id: 08d70f6a53a7f12d2748d145d1fe139595a1b39e
This commit is contained in:
parent
dbce7592a9
commit
1c4135fc09
|
|
@ -3,6 +3,7 @@
|
|||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::AbstractLogger
|
||||
* \brief Logger interface
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies the tuple to the function
|
||||
* \ingroup core
|
||||
* \brief Applies the tuple to the function (e.g. calls the function using the tuple content as arguments)
|
||||
* \return The result of the function
|
||||
*
|
||||
* \param fn Function
|
||||
|
|
@ -39,7 +40,6 @@ namespace Nz
|
|||
*
|
||||
* \see Apply
|
||||
*/
|
||||
|
||||
template<typename F, typename Tuple>
|
||||
auto Apply(F&& fn, Tuple&& t)
|
||||
{
|
||||
|
|
@ -49,7 +49,8 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies the tuple to the member function on an object
|
||||
* \ingroup core
|
||||
* \brief Applies the tuple to the member function on an object (e.g. calls the member function using the tuple content as arguments)
|
||||
* \return The result of the member function called
|
||||
*
|
||||
* \param object Object of a class
|
||||
|
|
@ -58,7 +59,6 @@ namespace Nz
|
|||
*
|
||||
* \see Apply
|
||||
*/
|
||||
|
||||
template<typename O, typename F, typename Tuple>
|
||||
auto Apply(O& object, F&& fn, Tuple&& t)
|
||||
{
|
||||
|
|
@ -68,15 +68,17 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Computes the hash of a hashable object
|
||||
* \return A bytearray which represents the hash
|
||||
*
|
||||
* \param hash Enumeration of type HashType
|
||||
* \param v Object to hash, must be convertible to "Nz::String"
|
||||
* \param v Object to hash
|
||||
*
|
||||
* \remark a HashAppend specialization for type T is required
|
||||
*
|
||||
* \see ComputeHash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ByteArray ComputeHash(HashType hash, const T& v)
|
||||
{
|
||||
|
|
@ -84,17 +86,18 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Computes the hash of a hashable object
|
||||
* \return A bytearray which represents the hash
|
||||
*
|
||||
* \param hash Pointer to abstract hash
|
||||
* \param v Object to hash, must be convertible to "Nz::String"
|
||||
* \param v Object to hash
|
||||
*
|
||||
* \remark Produce a NazaraAssert if pointer to Abstracthash is invalid
|
||||
* \remark a HashAppend specialization for type T is required
|
||||
*
|
||||
* \see ComputeHash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ByteArray ComputeHash(AbstractHash* hash, const T& v)
|
||||
{
|
||||
|
|
@ -108,6 +111,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Returns the number of elements in a C-array
|
||||
* \return The number of elements
|
||||
*
|
||||
|
|
@ -115,7 +119,6 @@ namespace Nz
|
|||
*
|
||||
* \see CountOf
|
||||
*/
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
constexpr std::size_t CountOf(T(&name)[N]) noexcept
|
||||
{
|
||||
|
|
@ -123,6 +126,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Returns the number of elements in a container
|
||||
* \return The number of elements
|
||||
*
|
||||
|
|
@ -130,7 +134,6 @@ namespace Nz
|
|||
*
|
||||
* \see CountOf
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::size_t CountOf(const T& c)
|
||||
{
|
||||
|
|
@ -138,12 +141,12 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Combines two hash in one
|
||||
*
|
||||
* \param seed First value that will be modified (expected to be 64bits)
|
||||
* \param v Second value to hash
|
||||
*/
|
||||
|
||||
// Algorithm from CityHash by Google
|
||||
// http://stackoverflow.com/questions/8513911/how-to-create-a-good-hash-combine-with-64-bit-output-inspired-by-boosthash-co
|
||||
template<typename T>
|
||||
|
|
@ -167,6 +170,7 @@ namespace Nz
|
|||
template<typename T> struct PointedType<T* const volatile> {typedef T type;};
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Serializes a boolean
|
||||
* \return true if serialization succedeed
|
||||
*
|
||||
|
|
@ -175,7 +179,6 @@ namespace Nz
|
|||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
inline bool Serialize(SerializationContext& context, bool value)
|
||||
{
|
||||
if (context.currentBitPos == 8)
|
||||
|
|
@ -194,6 +197,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Serializes an arithmetic type
|
||||
* \return true if serialization succedeed
|
||||
*
|
||||
|
|
@ -202,7 +206,6 @@ namespace Nz
|
|||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Serialize(SerializationContext& context, T value)
|
||||
{
|
||||
|
|
@ -222,6 +225,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Unserializes a boolean
|
||||
* \return true if unserialization succedeed
|
||||
*
|
||||
|
|
@ -230,7 +234,6 @@ namespace Nz
|
|||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
inline bool Unserialize(SerializationContext& context, bool* value)
|
||||
{
|
||||
if (context.currentBitPos == 8)
|
||||
|
|
@ -250,6 +253,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Unserializes an arithmetic type
|
||||
* \return true if unserialization succedeed
|
||||
*
|
||||
|
|
@ -260,7 +264,6 @@ namespace Nz
|
|||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Unserialize(SerializationContext& context, T* value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,14 +17,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Bitset<Block, Allocator>
|
||||
* \ingroup core
|
||||
* \class Nz::Bitset
|
||||
* \brief Core class that represents a set of bits
|
||||
*
|
||||
* This class meets the requirements of Container, AllocatorAwareContainer, SequenceContainer
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object by default
|
||||
* \brief Constructs a Bitset object by default
|
||||
*/
|
||||
|
||||
template<typename Block, class Allocator>
|
||||
|
|
@ -34,7 +35,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object of bitCount bits to value val
|
||||
* \brief Constructs a Bitset object of bitCount bits to value val
|
||||
*
|
||||
* \param bitCount Number of bits
|
||||
* \param val Value of those bits, by default false
|
||||
|
|
@ -48,7 +49,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from the contents initialized with a copy of the null-terminated character string pointed to by bits
|
||||
* \brief Constructs a Bitset object from the contents initialized with a copy of the null-terminated character string pointed to by bits
|
||||
*
|
||||
* \param bits Null-terminated character string containing only '0' and '1'
|
||||
*
|
||||
|
|
@ -62,7 +63,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from the contents initialized with a copy of the character string pointed to by bits takings the bitCount first characters
|
||||
* \brief Constructs a Bitset object from the contents initialized with a copy of the character string pointed to by bits takings the bitCount first characters
|
||||
*
|
||||
* \param bits Character string containing only '0' and '1'
|
||||
* \param bitCount Number of characters to take into consideration
|
||||
|
|
@ -96,7 +97,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from a Nz::String
|
||||
* \brief Constructs a Bitset object from a Nz::String
|
||||
*
|
||||
* \param bits String containing only '0' and '1'
|
||||
*/
|
||||
|
|
@ -912,7 +913,7 @@ namespace Nz
|
|||
|
||||
template<typename Block, class Allocator>
|
||||
template<bool BadCall>
|
||||
void* Bitset<Block, Allocator>::Bit::operator&() const
|
||||
void* Bitset::Bit::operator&() const
|
||||
{
|
||||
// The template is necessary to make it fail only when used
|
||||
static_assert(!BadCall, "It is impossible to take the address of a bit in a bitset");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::CallOnExit
|
||||
* \brief Core class that represents a function to call at the end of the scope
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Color
|
||||
* \brief Core class that represents a color
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@
|
|||
#ifndef NAZARA_CONFIG_CORE_HPP
|
||||
#define NAZARA_CONFIG_CORE_HPP
|
||||
|
||||
/*!
|
||||
* \defgroup core (NazaraCore) Core module
|
||||
* Core/System module including classes to handle threading, time, hardware info, memory management, etc...
|
||||
*/
|
||||
|
||||
/// Each modification of a parameter needs a recompilation of the module
|
||||
|
||||
// Precision of reals when transformed into string (Max. numbers after the coma)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Gets the platform endianness
|
||||
* \return Type of the endianness
|
||||
*/
|
||||
|
|
@ -22,6 +23,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Swaps the byte for endianness operations
|
||||
*
|
||||
* \param buffer Raw memory
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::StdLogger
|
||||
* \brief Core class that represents a functor
|
||||
* \ingroup core
|
||||
* \class Nz::FunctorWithoutArgs
|
||||
* \brief Core class that represents a functor using a function without argument
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
@ -16,7 +17,6 @@ namespace Nz
|
|||
*
|
||||
* \param func Function to execute
|
||||
*/
|
||||
|
||||
template<typename F>
|
||||
FunctorWithoutArgs<F>::FunctorWithoutArgs(F func) :
|
||||
m_func(func)
|
||||
|
|
@ -26,7 +26,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename F>
|
||||
void FunctorWithoutArgs<F>::Run()
|
||||
{
|
||||
|
|
@ -34,12 +33,17 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithoutArgs object with a function and its arguments
|
||||
* \ingroup core
|
||||
* \class Nz::FunctorWithArgs
|
||||
* \brief Core class that represents a functor using a function with arguments
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithArgs object with a function and its arguments
|
||||
*
|
||||
* \param func Function to execute
|
||||
* \param args Arguments for the function
|
||||
*/
|
||||
|
||||
template<typename F, typename... Args>
|
||||
FunctorWithArgs<F, Args...>::FunctorWithArgs(F func, Args&&... args) :
|
||||
m_func(func),
|
||||
|
|
@ -50,7 +54,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename F, typename... Args>
|
||||
void FunctorWithArgs<F, Args...>::Run()
|
||||
{
|
||||
|
|
@ -58,12 +61,17 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithoutArgs object with a member function and an object
|
||||
* \ingroup core
|
||||
* \class Nz::MemberWithoutArgs
|
||||
* \brief Core class that represents a functor using a member function
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a MemberWithoutArgs object with a member function and an object
|
||||
*
|
||||
* \param func Member function to execute
|
||||
* \param object Object to execute on
|
||||
*/
|
||||
|
||||
template<typename C>
|
||||
MemberWithoutArgs<C>::MemberWithoutArgs(void (C::*func)(), C* object) :
|
||||
m_func(func),
|
||||
|
|
@ -74,7 +82,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename C>
|
||||
void MemberWithoutArgs<C>::Run()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Initializer<Args...>
|
||||
* \ingroup core
|
||||
* \class Nz::Initializer
|
||||
* \brief Core class that represents a module initializer
|
||||
*/
|
||||
|
||||
|
|
@ -57,7 +58,6 @@ namespace Nz
|
|||
*
|
||||
* \param initialize Initialize the module
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::Initializer(bool initialize) :
|
||||
m_initialized(false)
|
||||
|
|
@ -71,7 +71,6 @@ namespace Nz
|
|||
*
|
||||
* \see Uninitialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::~Initializer()
|
||||
{
|
||||
|
|
@ -83,7 +82,6 @@ namespace Nz
|
|||
*
|
||||
* \see Uninitialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
bool Initializer<Args...>::Initialize()
|
||||
{
|
||||
|
|
@ -97,7 +95,6 @@ namespace Nz
|
|||
* \brief Checks whether the module is initialized
|
||||
* \return true if initialized
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
bool Initializer<Args...>::IsInitialized() const
|
||||
{
|
||||
|
|
@ -109,7 +106,6 @@ namespace Nz
|
|||
*
|
||||
* \see Initialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
void Initializer<Args...>::Uninitialize()
|
||||
{
|
||||
|
|
@ -121,7 +117,6 @@ namespace Nz
|
|||
* \brief Converts the initializer to boolean
|
||||
* \return true if initialized
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::operator bool() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \fn Nz::MemoryHelper
|
||||
* \brief Core functions that helps the handle of memory in the engine
|
||||
*/
|
||||
|
|
@ -26,7 +27,6 @@ namespace Nz
|
|||
*
|
||||
* \remark Uses MemoryManager with NAZARA_CORE_MANAGE_MEMORY defined else operator delete
|
||||
*/
|
||||
|
||||
inline void OperatorDelete(void* ptr)
|
||||
{
|
||||
#if NAZARA_CORE_MANAGE_MEMORY
|
||||
|
|
@ -41,7 +41,6 @@ namespace Nz
|
|||
*
|
||||
* \remark Uses MemoryManager with NAZARA_CORE_MANAGE_MEMORY defined else operator new
|
||||
*/
|
||||
|
||||
inline void* OperatorNew(std::size_t size)
|
||||
{
|
||||
#if NAZARA_CORE_MANAGE_MEMORY
|
||||
|
|
@ -58,7 +57,6 @@ namespace Nz
|
|||
* \param ptr Pointer to raw memory allocated
|
||||
* \param args Arguments for the constructor
|
||||
*/
|
||||
|
||||
template<typename T, typename... Args>
|
||||
T* PlacementNew(void* ptr, Args&&... args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryPool
|
||||
* \brief Core class that represents a memory pool
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryStream
|
||||
* \brief Constructs a MemoryStream object by default
|
||||
*/
|
||||
|
||||
inline MemoryStream::MemoryStream() :
|
||||
Stream(StreamOption_None, OpenMode_ReadWrite),
|
||||
m_pos(0)
|
||||
|
|
@ -23,7 +24,6 @@ namespace Nz
|
|||
* \param byteArray Bytes to stream
|
||||
* \param openMode Reading/writing mode for the stream
|
||||
*/
|
||||
|
||||
inline MemoryStream::MemoryStream(ByteArray* byteArray, UInt32 openMode) :
|
||||
MemoryStream()
|
||||
{
|
||||
|
|
@ -36,7 +36,6 @@ namespace Nz
|
|||
*
|
||||
* \remark Produces a NazaraAssert if buffer is invalid
|
||||
*/
|
||||
|
||||
inline ByteArray& MemoryStream::GetBuffer()
|
||||
{
|
||||
NazaraAssert(m_buffer, "Invalid buffer");
|
||||
|
|
@ -50,7 +49,6 @@ namespace Nz
|
|||
*
|
||||
* \remark Produces a NazaraAssert if buffer is invalid
|
||||
*/
|
||||
|
||||
inline const ByteArray& MemoryStream::GetBuffer() const
|
||||
{
|
||||
NazaraAssert(m_buffer, "Invalid buffer");
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Mutex
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ObjectRef
|
||||
* \brief Core class that represents a reference to an object
|
||||
*/
|
||||
|
|
@ -20,7 +21,6 @@ namespace Nz
|
|||
*
|
||||
* \remark Produces a NazaraError if object not found
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
ObjectRef<Type> ObjectLibrary<Type>::Get(const String& name)
|
||||
{
|
||||
|
|
@ -35,7 +35,6 @@ namespace Nz
|
|||
* \brief Checks whether the library has the object with that name
|
||||
* \return true if it the case
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
bool ObjectLibrary<Type>::Has(const String& name)
|
||||
{
|
||||
|
|
@ -48,7 +47,6 @@ namespace Nz
|
|||
* \param name Name of the object
|
||||
* \param object Object to stock
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
void ObjectLibrary<Type>::Register(const String& name, ObjectRef<Type> object)
|
||||
{
|
||||
|
|
@ -61,7 +59,6 @@ namespace Nz
|
|||
*
|
||||
* \param name Name of the object
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
ObjectRef<Type> ObjectLibrary<Type>::Query(const String& name)
|
||||
{
|
||||
|
|
@ -77,7 +74,6 @@ namespace Nz
|
|||
*
|
||||
* \param name Name of the object
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
void ObjectLibrary<Type>::Unregister(const String& name)
|
||||
{
|
||||
|
|
@ -87,7 +83,7 @@ namespace Nz
|
|||
template<typename Type>
|
||||
bool ObjectLibrary<Type>::Initialize()
|
||||
{
|
||||
return true; // Que faire
|
||||
return true; // Nothing to do
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ObjectRef
|
||||
* \brief Core class that represents a reference to an object
|
||||
*/
|
||||
|
|
@ -15,7 +16,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Constructs a ObjectRef object by default
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef() :
|
||||
m_object(nullptr)
|
||||
|
|
@ -27,7 +27,6 @@ namespace Nz
|
|||
*
|
||||
* \param object Pointer to handle like a reference (can be nullptr)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(T* object) :
|
||||
m_object(object)
|
||||
|
|
@ -41,7 +40,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef to assign into this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(const ObjectRef& ref) :
|
||||
m_object(ref.m_object)
|
||||
|
|
@ -55,7 +53,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef of type U to convert to type T
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
ObjectRef<T>::ObjectRef(const ObjectRef<U>& ref) :
|
||||
|
|
@ -68,7 +65,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef to move into this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(ObjectRef&& ref) noexcept :
|
||||
m_object(ref.m_object)
|
||||
|
|
@ -79,7 +75,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Destructs the object (remove a reference to the object when shared)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::~ObjectRef()
|
||||
{
|
||||
|
|
@ -91,7 +86,6 @@ namespace Nz
|
|||
* \brief Gets the underlying pointer
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::Get() const
|
||||
{
|
||||
|
|
@ -102,7 +96,6 @@ namespace Nz
|
|||
* \brief Checks whether the reference is valid
|
||||
* \return true if reference is not nullptr
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
bool ObjectRef<T>::IsValid() const
|
||||
{
|
||||
|
|
@ -113,7 +106,6 @@ namespace Nz
|
|||
* \brief Releases the handle of the pointer
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::Release()
|
||||
{
|
||||
|
|
@ -130,7 +122,6 @@ namespace Nz
|
|||
* \brief Resets the content of the ObjectRef with another pointer
|
||||
* \return true if old handle is destroyed
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
bool ObjectRef<T>::Reset(T* object)
|
||||
{
|
||||
|
|
@ -154,7 +145,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef to swap
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::Swap(ObjectRef& ref)
|
||||
{
|
||||
|
|
@ -169,7 +159,6 @@ namespace Nz
|
|||
*
|
||||
* \see IsValid
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::operator bool() const
|
||||
{
|
||||
|
|
@ -180,7 +169,6 @@ namespace Nz
|
|||
* \brief Dereferences the ObjectRef
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::operator T*() const
|
||||
{
|
||||
|
|
@ -191,20 +179,18 @@ namespace Nz
|
|||
* \brief Dereferences the ObjectRef
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::operator->() const
|
||||
{
|
||||
return m_object;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Assigns the object into this
|
||||
* \return A reference to this
|
||||
*
|
||||
* \param object Pointer to handle like a reference (can be nullptr)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(T* object)
|
||||
{
|
||||
|
|
@ -219,7 +205,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref The other ObjectRef
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(const ObjectRef& ref)
|
||||
{
|
||||
|
|
@ -234,7 +219,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef of type U to convert
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(const ObjectRef<U>& ref)
|
||||
|
|
@ -252,7 +236,6 @@ namespace Nz
|
|||
*
|
||||
* \param ref ObjectRef to move in this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(ObjectRef&& ref) noexcept
|
||||
{
|
||||
|
|
@ -267,12 +250,12 @@ namespace Nz
|
|||
namespace std
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Gives a hash representation of the object, specialisation of std
|
||||
* \return Hash of the ObjectRef
|
||||
*
|
||||
* \param object Object to hash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
struct hash<Nz::ObjectRef<T>>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::PrimitiveList
|
||||
* \brief Core class that represents a geometric primitive
|
||||
*/
|
||||
|
|
@ -19,7 +20,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeBox(const Vector3f& lengths, const Vector3ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -38,7 +38,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeBox(const Vector3f& lengths, const Vector3ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeBox(lengths, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -53,7 +52,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCone(float length, float radius, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -74,7 +72,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the cone
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCone(float length, float radius, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeCone(length, radius, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -88,7 +85,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCubicSphere(float size, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -108,7 +104,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the cubic sphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCubicSphere(float size, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeCubicSphere(size, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -122,7 +117,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeIcoSphere(float size, unsigned int recursionLevel, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -142,7 +136,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the icosphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeIcoSphere(float size, unsigned int recursionLevel, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeIcoSphere(size, recursionLevel, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -156,7 +149,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -174,7 +166,6 @@ namespace Nz
|
|||
* \param planeInfo Information for the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Planef& planeInfo, const Rectf& uvCoords)
|
||||
{
|
||||
MakePlane(size, subdivision, Matrix4f::Transform(planeInfo.distance * planeInfo.normal, Quaternionf::RotationBetween(Vector3f::Up(), planeInfo.normal)), uvCoords);
|
||||
|
|
@ -189,7 +180,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakePlane(size, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -204,7 +194,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
|
|
@ -226,7 +215,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeUVSphere(size, sliceCount, stackCount, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
|
|
@ -241,7 +229,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Box(const Vector3f& lengths, const Vector3ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -260,7 +247,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Box(const Vector3f& lengths, const Vector3ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -279,7 +265,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Cone(float length, float radius, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -299,7 +284,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the cone
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Cone(float length, float radius, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -317,7 +301,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::CubicSphere(float size, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -336,7 +319,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the cubic sphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::CubicSphere(float size, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -354,7 +336,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::IcoSphere(float size, unsigned int recursionLevel, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -373,7 +354,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the icosphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::IcoSphere(float size, unsigned int recursionLevel, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -391,7 +371,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -409,7 +388,6 @@ namespace Nz
|
|||
* \param planeInfo Information for the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Planef& plane, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -428,7 +406,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -447,7 +424,6 @@ namespace Nz
|
|||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::UVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
@ -467,7 +443,6 @@ namespace Nz
|
|||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::UVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::ResourceLoader<Type, Parameters>
|
||||
* \ingroup core
|
||||
* \class Nz::ResourceLoader
|
||||
* \brief Core class that represents a loader of resources
|
||||
*/
|
||||
|
||||
|
|
@ -22,7 +23,6 @@ namespace Nz
|
|||
*
|
||||
* \param extension Extension of the file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::IsExtensionSupported(const String& extension)
|
||||
{
|
||||
|
|
@ -52,7 +52,6 @@ namespace Nz
|
|||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromFile(Type* resource, const String& filePath, const Parameters& parameters)
|
||||
{
|
||||
|
|
@ -171,7 +170,6 @@ namespace Nz
|
|||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromMemory(Type* resource, const void* data, unsigned int size, const Parameters& parameters)
|
||||
{
|
||||
|
|
@ -268,7 +266,6 @@ namespace Nz
|
|||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromStream(Type* resource, Stream& stream, const Parameters& parameters)
|
||||
{
|
||||
|
|
@ -336,7 +333,6 @@ namespace Nz
|
|||
* \param fileLoader Optional function to load the data from a file in the resource
|
||||
* \param memoryLoader Optional function to load the data from a raw memory in the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceLoader<Type, Parameters>::RegisterLoader(ExtensionGetter extensionGetter, StreamChecker checkFunc, StreamLoader streamLoader, FileLoader fileLoader, MemoryLoader memoryLoader)
|
||||
{
|
||||
|
|
@ -368,7 +364,6 @@ namespace Nz
|
|||
* \param fileLoader Optional function to load the data from a file in the resource
|
||||
* \param memoryLoader Optional function to load the data from a raw memory in the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceLoader<Type, Parameters>::UnregisterLoader(ExtensionGetter extensionGetter, StreamChecker checkFunc, StreamLoader streamLoader, FileLoader fileLoader, MemoryLoader memoryLoader)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::ResourceManager<Type, Parameters>
|
||||
* \ingroup core
|
||||
* \class Nz::ResourceManager
|
||||
* \brief Core class that represents a resource manager
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Clears the content of the manager
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Clear()
|
||||
{
|
||||
|
|
@ -30,7 +30,6 @@ namespace Nz
|
|||
*
|
||||
* \param filePath Path to the asset that will be loaded
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
ObjectRef<Type> ResourceManager<Type, Parameters>::Get(const String& filePath)
|
||||
{
|
||||
|
|
@ -63,7 +62,6 @@ namespace Nz
|
|||
* \brief Gets the defaults parameters for the load
|
||||
* \return Default parameters for loading from file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
const Parameters& ResourceManager<Type, Parameters>::GetDefaultParameters()
|
||||
{
|
||||
|
|
@ -73,7 +71,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Purges the resource manager from every asset whose it is the only owner
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Purge()
|
||||
{
|
||||
|
|
@ -97,7 +94,6 @@ namespace Nz
|
|||
* \param filePath Path for the resource
|
||||
* \param resource Object to associate with
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Register(const String& filePath, ObjectRef<Type> resource)
|
||||
{
|
||||
|
|
@ -111,7 +107,6 @@ namespace Nz
|
|||
*
|
||||
* \param params Default parameters for loading from file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::SetDefaultParameters(const Parameters& params)
|
||||
{
|
||||
|
|
@ -123,7 +118,6 @@ namespace Nz
|
|||
*
|
||||
* \param filePath Path for the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Unregister(const String& filePath)
|
||||
{
|
||||
|
|
@ -136,7 +130,6 @@ namespace Nz
|
|||
* \brief Initializes the resource manager
|
||||
* \return true
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceManager<Type, Parameters>::Initialize()
|
||||
{
|
||||
|
|
@ -146,7 +139,6 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Uninitialize the resource manager
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Uninitialize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>
|
||||
* \ingroup core
|
||||
* \class Nz::Signal
|
||||
* \brief Core class that represents a signal, a list of objects waiting for its message
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...> object by default
|
||||
* \brief Constructs a Signal object by default
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
|
|
@ -24,7 +25,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...> object by move semantic
|
||||
* \brief Constructs a Signal object by move semantic
|
||||
*
|
||||
* \param signal Signal to move in this
|
||||
*/
|
||||
|
|
@ -240,12 +241,12 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>::Connection
|
||||
* \class Nz::Signal::Connection
|
||||
* \brief Core class that represents a connection attached to a signal
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::Connection object with a slot
|
||||
* \brief Constructs a Signal::Connection object with a slot
|
||||
*
|
||||
* \param slot Slot of the listener
|
||||
*/
|
||||
|
|
@ -293,12 +294,12 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>::ConnectionGuard
|
||||
* \class Nz::Signal::ConnectionGuard
|
||||
* \brief Core class that represents a RAII for a connection attached to a signal
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::ConnectionGuard object with a connection
|
||||
* \brief Constructs a Signal::ConnectionGuard object with a connection
|
||||
*
|
||||
* \param connection Connection for the scope
|
||||
*/
|
||||
|
|
@ -310,7 +311,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::ConnectionGuard object with a connection by move semantic
|
||||
* \brief Constructs a Signal::ConnectionGuard object with a connection by move semantic
|
||||
*
|
||||
* \param connection Connection for the scope
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::SparsePtr<T>
|
||||
* \ingroup core
|
||||
* \class Nz::SparsePtr
|
||||
* \brief Core class that represents a pointer and the step between two elements
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object by default
|
||||
* \brief Constructs a SparsePtr object by default
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
|
|
@ -23,7 +24,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object with a pointer
|
||||
* \brief Constructs a SparsePtr object with a pointer
|
||||
*
|
||||
* \param ptr Pointer to data
|
||||
*/
|
||||
|
|
@ -35,7 +36,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object with a pointer and a step
|
||||
* \brief Constructs a SparsePtr object with a pointer and a step
|
||||
*
|
||||
* \param ptr Pointer to data
|
||||
* \param stride Step between two elements
|
||||
|
|
@ -48,7 +49,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object from another type of SparsePtr
|
||||
* \brief Constructs a SparsePtr object from another type of SparsePtr
|
||||
*
|
||||
* \param ptr Pointer to data of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -214,7 +215,7 @@ namespace Nz
|
|||
*/
|
||||
|
||||
template<typename T>
|
||||
T* SparsePtr<T>::operator->() const
|
||||
T* SparsePtr::operator->() const
|
||||
{
|
||||
return reinterpret_cast<T*>(m_ptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Constructs a Stream object with options
|
||||
*
|
||||
* \param streamOptions Options for the stream
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Constructs a String object with a shared string by move semantic
|
||||
*
|
||||
* \param sharedString Shared string to move into this
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::TaskScheduler
|
||||
* \brief Core class that represents a thread pool
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Thread
|
||||
* \brief Core class that represents a thread
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a function
|
||||
* \brief Constructs a Thread object with a function
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
*/
|
||||
|
|
@ -25,7 +26,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a function and its parameters
|
||||
* \brief Constructs a Thread object with a function and its parameters
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
* \param args Arguments of the function
|
||||
|
|
@ -38,7 +39,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a member function and its object
|
||||
* \brief Constructs a Thread object with a member function and its object
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
* \param object Object on which the method will be called
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Approaches the objective, beginning with value and with increment
|
||||
* \return The nearest value of the objective you can get with the value and the increment for one step
|
||||
*
|
||||
|
|
@ -120,6 +121,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Clamps value between min and max and returns the expected value
|
||||
* \return If value is not in the interval of min..max, value obtained is the nearest limit of this interval
|
||||
*
|
||||
|
|
@ -135,6 +137,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets number of bits set in the number
|
||||
* \return The number of bits set to 1
|
||||
*
|
||||
|
|
@ -157,6 +160,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Converts degree to radian
|
||||
* \return The representation in radian of the angle in degree (0..2*pi)
|
||||
*
|
||||
|
|
@ -170,6 +174,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the unit from degree and convert it according to NAZARA_MATH_ANGLE_RADIAN
|
||||
* \return Express the degrees
|
||||
*
|
||||
|
|
@ -187,6 +192,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the unit from radian and convert it according to NAZARA_MATH_ANGLE_RADIAN
|
||||
* \return Express the radians
|
||||
*
|
||||
|
|
@ -204,6 +210,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the nearest power of two for the number
|
||||
* \return First power of two containing the number
|
||||
*
|
||||
|
|
@ -222,6 +229,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -249,6 +257,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -270,6 +279,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -285,6 +295,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -301,6 +312,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -316,6 +328,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits
|
||||
*
|
||||
|
|
@ -332,6 +345,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits + 1 for the dot
|
||||
*
|
||||
|
|
@ -346,6 +360,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits + 1 for the dot
|
||||
*
|
||||
|
|
@ -360,6 +375,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the number of digits to represent the number in base 10
|
||||
* \return Number of digits + 1 for the dot
|
||||
*
|
||||
|
|
@ -374,6 +390,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the log in base 2 of integral number
|
||||
* \return Log of the number (floor)
|
||||
*
|
||||
|
|
@ -391,6 +408,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the log in base 2 of integral number, only works for power of two !
|
||||
* \return Log of the number
|
||||
*
|
||||
|
|
@ -408,6 +426,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the power of integrals
|
||||
* \return base^exponent for integral
|
||||
*
|
||||
|
|
@ -426,6 +445,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Interpolates the value to other one with a factor of interpolation
|
||||
* \return A new value which is the interpolation of two values
|
||||
*
|
||||
|
|
@ -446,6 +466,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Multiplies X and Y, then add Z
|
||||
* \return The result of X * Y + Z
|
||||
*
|
||||
|
|
@ -487,6 +508,7 @@ namespace Nz
|
|||
#endif
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Normalizes the angle
|
||||
* \return Normalized value between 0..2*(pi if radian or 180 if degrees)
|
||||
*
|
||||
|
|
@ -512,6 +534,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Checks whether two numbers are equal
|
||||
* \return true if they are equal within a certain epsilon
|
||||
*
|
||||
|
|
@ -527,6 +550,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Checks whether two numbers are equal
|
||||
* \return true if they are equal within the max difference
|
||||
*
|
||||
|
|
@ -547,6 +571,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Converts the number to String
|
||||
* \return String representation of the number
|
||||
*
|
||||
|
|
@ -598,6 +623,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Converts radian to degree
|
||||
* \return The representation in degree of the angle in radian (0..360)
|
||||
*
|
||||
|
|
@ -611,6 +637,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Converts the string to number
|
||||
* \return Number which is represented by the string
|
||||
*
|
||||
|
|
@ -672,6 +699,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the degree from unit and convert it according to NAZARA_MATH_ANGLE_RADIAN
|
||||
* \return Express in degrees
|
||||
*
|
||||
|
|
@ -689,6 +717,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup math
|
||||
* \brief Gets the radian from unit and convert it according to NAZARA_MATH_ANGLE_RADIAN
|
||||
* \return Express in radians
|
||||
*
|
||||
|
|
|
|||
|
|
@ -15,14 +15,15 @@ namespace Nz
|
|||
{
|
||||
|
||||
/*!
|
||||
* \class Nz::BoundingVolume<T>
|
||||
* \ingroup math
|
||||
* \class Nz::BoundingVolume
|
||||
* \brief Math class that represents a bounding volume, a combination of a box and an oriented box
|
||||
*
|
||||
* \remark You need to call Update not to have undefined behaviour
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object by default
|
||||
* \brief Constructs a BoundingVolume object by default
|
||||
*
|
||||
* \remark extend is set to Extend_Null, aabb and obb are uninitialized
|
||||
*/
|
||||
|
|
@ -34,7 +35,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from Extend
|
||||
* \brief Constructs a BoundingVolume object from Extend
|
||||
* \param Extend Extend of the volume part of enumeration Extend
|
||||
*
|
||||
* \remark Aabb and obb are uninitialized
|
||||
|
|
@ -47,7 +48,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from its position and sizes
|
||||
* \brief Constructs a BoundingVolume object from its position and sizes
|
||||
*
|
||||
* \param X X component of position
|
||||
* \param Y Y component of position
|
||||
|
|
@ -66,7 +67,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from a box
|
||||
* \brief Constructs a BoundingVolume object from a box
|
||||
*
|
||||
* \param box Box<T> object
|
||||
*
|
||||
|
|
@ -80,7 +81,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from an oriented box
|
||||
* \brief Constructs a BoundingVolume object from an oriented box
|
||||
*
|
||||
* \param orientedBox OrientedBox<T> object
|
||||
*
|
||||
|
|
@ -94,7 +95,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from two vectors representing point of the space
|
||||
* \brief Constructs a BoundingVolume object from two vectors representing point of the space
|
||||
* (X, Y, Z) will be the components minimum of the two vectors and the (width, height, depth) will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
@ -110,7 +111,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a BoundingVolume<T> object from another type of BoundingVolume
|
||||
* \brief Constructs a BoundingVolume object from another type of BoundingVolume
|
||||
*
|
||||
* \param volume BoundingVolume of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -272,7 +273,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Sets a BoundingVolume<T> object from two vectors representing point of the space
|
||||
* \brief Sets a BoundingVolume object from two vectors representing point of the space
|
||||
* (X, Y, Z) will be the components minimum of the two vectors and the (width, height, depth) will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Box<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Box
|
||||
* \brief Math class that represents a three dimensional box
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from its width, height and depth
|
||||
* \brief Constructs a Box object from its width, height and depth
|
||||
*
|
||||
* \param Width Width of the box (following X)
|
||||
* \param Height Height of the box (following Y)
|
||||
|
|
@ -51,7 +52,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from an array of six elements
|
||||
* \brief Constructs a Box object from an array of six elements
|
||||
*
|
||||
* \param vec[6] vec[0] is X position, vec[1] is Y position, vec[2] is Z position, vec[3] is width, vec[4] is height and vec[5] is depth
|
||||
*/
|
||||
|
|
@ -63,7 +64,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from a Rect
|
||||
* \brief Constructs a Box object from a Rect
|
||||
*
|
||||
* \param rect Rectangle which describes (X, Y) position and (width, height) lenghts
|
||||
*
|
||||
|
|
@ -77,7 +78,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from a vector representing width, height and depth
|
||||
* \brief Constructs a Box object from a vector representing width, height and depth
|
||||
*
|
||||
* \param lengths (Width, Height, Depth) of the box
|
||||
*
|
||||
|
|
@ -91,7 +92,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from two vectors representing point of the space
|
||||
* \brief Constructs a Box object from two vectors representing point of the space
|
||||
* (X, Y, Z) will be the components minimum of the two vectors and the (width, height, depth) will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
@ -105,7 +106,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from another type of Box
|
||||
* \brief Constructs a Box object from another type of Box
|
||||
*
|
||||
* \param box Box of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -540,7 +541,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Box<T> object from its position and sizes
|
||||
* \brief Constructs a Box object from its position and sizes
|
||||
*
|
||||
* \param X X component of position
|
||||
* \param Y Y component of position
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@
|
|||
#ifndef NAZARA_CONFIG_MATH_HPP
|
||||
#define NAZARA_CONFIG_MATH_HPP
|
||||
|
||||
/*!
|
||||
* \defgroup math (NazaraMath) Mathematics module
|
||||
* 2D/3D mathematics module including matrix, vector, box, sphere, quaternion, ...
|
||||
*/
|
||||
|
||||
/// Each modification of a paramater of the module needs a recompilation of the unit
|
||||
|
||||
// Define the radian as unit for angles
|
||||
|
|
|
|||
|
|
@ -16,14 +16,15 @@ namespace Nz
|
|||
{
|
||||
|
||||
/*!
|
||||
* \class Nz::Vector4<T>
|
||||
* \ingroup math
|
||||
* \class Nz::EulerAngles
|
||||
* \brief Math class that represents an Euler angle. Those describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order
|
||||
*
|
||||
* \remark Rotation are "left-handed", it means that you take your left hand, put your thumb finger in the direction you want and you other fingers represent the way of rotating
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a EulerAngles<T> object from its components
|
||||
* \brief Constructs a EulerAngles object from its components
|
||||
*
|
||||
* \param P Pitch component = X axis
|
||||
* \param Y Yaw component = Y axis
|
||||
|
|
@ -37,7 +38,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a EulerAngles<T> object from an array of three elements
|
||||
* \brief Constructs a EulerAngles object from an array of three elements
|
||||
*
|
||||
* \param angles[3] angles[0] is pitch component, angles[1] is yaw component and angles[2] is roll component
|
||||
*/
|
||||
|
|
@ -49,7 +50,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a EulerAngles<T> object from a quaternion
|
||||
* \brief Constructs a EulerAngles object from a quaternion
|
||||
*
|
||||
* \param quat Quaternion representing a rotation of space
|
||||
*/
|
||||
|
|
@ -61,7 +62,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a EulerAngles<T> object from another type of EulerAngles
|
||||
* \brief Constructs a EulerAngles object from another type of EulerAngles
|
||||
*
|
||||
* \param angles EulerAngles of type U to convert to type T
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,14 +17,15 @@ namespace Nz
|
|||
{
|
||||
|
||||
/*!
|
||||
* \class Nz::Frustum<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Frustum
|
||||
* \brief Math class that represents a frustum in the three dimensional vector space
|
||||
*
|
||||
* Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Frustum<T> object from another type of Frustum
|
||||
* \brief Constructs a Frustum object from another type of Frustum
|
||||
*
|
||||
* \param frustum Frustum of type U to convert to type T
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,14 +22,15 @@ namespace Nz
|
|||
{
|
||||
|
||||
/*!
|
||||
* \class Nz::Matrix4<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Matrix4
|
||||
* \brief Math class that represents a transformation of the four dimensional vector space with the notion of projectivity
|
||||
*
|
||||
* \remark Matrix4 is said to be "row-major" and affine if last column is made of (0, 0, 0, 1)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Matrix4<T> object from its components
|
||||
* \brief Constructs a Matrix4 object from its components
|
||||
*
|
||||
* \param rIJ Matrix components at index(I, J)
|
||||
*/
|
||||
|
|
@ -47,7 +48,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Matrix4<T> object from an array of sixteen elements
|
||||
* \brief Constructs a Matrix4 object from an array of sixteen elements
|
||||
*
|
||||
* \param matrix[16] Matrix components
|
||||
*/
|
||||
|
|
@ -59,7 +60,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Matrix4<T> object from another type of Matrix4
|
||||
* \brief Constructs a Matrix4 object from another type of Matrix4
|
||||
*
|
||||
* \param matrix Matrix4 of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -1785,7 +1786,7 @@ std::ostream& operator<<(std::ostream& out, const Nz::Matrix4<T>& matrix)
|
|||
*/
|
||||
|
||||
template<typename T>
|
||||
Nz::Matrix4<T> operator*(T scale, const Nz::Matrix4<T>& matrix)
|
||||
Nz::Matrix4<T> operator*(T scale, const Nz::Matrix4& matrix)
|
||||
{
|
||||
return matrix * scale;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::OrientedBox<T>
|
||||
* \ingroup math
|
||||
* \class Nz::OrientedBox
|
||||
* \brief Math class that represents an oriented three dimensional box
|
||||
*
|
||||
* \remark You need to call Update not to have undefined behaviour
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a OrientedBox<T> object from its position and sizes
|
||||
* \brief Constructs a OrientedBox object from its position and sizes
|
||||
*
|
||||
* \param X X component of position
|
||||
* \param Y Y component of position
|
||||
|
|
@ -38,7 +39,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a OrientedBox<T> object from a box
|
||||
* \brief Constructs a OrientedBox object from a box
|
||||
*
|
||||
* \param box Box<T> object
|
||||
*/
|
||||
|
|
@ -50,7 +51,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a OrientedBox<T> object from two vectors representing point of the space
|
||||
* \brief Constructs a OrientedBox object from two vectors representing point of the space
|
||||
* (X, Y, Z) will be the components minimum of the two vectors and the (width, height, depth) will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
@ -64,7 +65,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a OrientedBox<T> object from another type of OrientedBox
|
||||
* \brief Constructs a OrientedBox object from another type of OrientedBox
|
||||
*
|
||||
* \param orientedBox OrientedBox of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -178,7 +179,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Sets a OrientedBox<T> object from two vectors representing point of the space
|
||||
* \brief Sets a OrientedBox object from two vectors representing point of the space
|
||||
* (X, Y, Z) will be the components minimum of the two vectors and the (width, height, depth) will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
|
|||
|
|
@ -12,14 +12,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Vector4<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Plane
|
||||
* \brief Math class that represents a plane in 3D
|
||||
*
|
||||
* \remark The convention used in this class is: If you ask for plane with normal (0, 1, 0) and distance 1, you will get 0 * X + 1 * Y + 0 * Z - 1 = 0 or Y = 1. Notice the sign minus before the distance on the left side of the equation
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from its components
|
||||
* \brief Constructs a Plane object from its components
|
||||
*
|
||||
* \param normalX X component of the normal
|
||||
* \param normalY Y component of the normal
|
||||
|
|
@ -34,7 +35,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from an array of four elements
|
||||
* \brief Constructs a Plane object from an array of four elements
|
||||
*
|
||||
* \param plane[4] plane[0] is X component, plane[1] is Y component, plane[2] is Z component and plane[3] is D
|
||||
*/
|
||||
|
|
@ -46,7 +47,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from a normal and a distance
|
||||
* \brief Constructs a Plane object from a normal and a distance
|
||||
*
|
||||
* \param Normal normal of the vector
|
||||
* \param D Distance to origin
|
||||
|
|
@ -59,7 +60,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from a normal and a point
|
||||
* \brief Constructs a Plane object from a normal and a point
|
||||
*
|
||||
* \param Normal Normal of the plane
|
||||
* \param point Point which verifies the equation of the plane
|
||||
|
|
@ -72,7 +73,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from three points
|
||||
* \brief Constructs a Plane object from three points
|
||||
*
|
||||
* \param point1 First point
|
||||
* \param point2 Second point
|
||||
|
|
@ -88,7 +89,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Plane<T> object from another type of Plane
|
||||
* \brief Constructs a Plane object from another type of Plane
|
||||
*
|
||||
* \param plane Plane of type U to convert to type T
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,14 +16,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Quaternion<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Quaternion
|
||||
* \brief Math class that represents an element of the quaternions
|
||||
*
|
||||
* \remark The quaternion is meant to be 'unit' to represent rotations in a three dimensional space
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Quaternion<T> object from its components
|
||||
* \brief Constructs a Quaternion object from its components
|
||||
*
|
||||
* \param W W component
|
||||
* \param X X component
|
||||
|
|
@ -38,7 +39,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Quaternion<T> object from a EulerAngles
|
||||
* \brief Constructs a Quaternion object from a EulerAngles
|
||||
*
|
||||
* \param angles Easier representation of rotation of space
|
||||
*
|
||||
|
|
@ -52,7 +53,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Quaternion<T> object from an angle and a direction
|
||||
* \brief Constructs a Quaternion object from an angle and a direction
|
||||
*
|
||||
* \param angle Unit depends of NAZARA_MATH_ANGLE_RADIAN
|
||||
* \param axis Vector3 which represents a direction, no need to be normalized
|
||||
|
|
@ -65,7 +66,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Quaternion<T> object from an array of four elements
|
||||
* \brief Constructs a Quaternion object from an array of four elements
|
||||
*
|
||||
* \param quat[4] quat[0] is W component, quat[1] is X component, quat[2] is Y component and quat[3] is Z component
|
||||
*/
|
||||
|
|
@ -85,7 +86,7 @@ namespace Nz
|
|||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Quaternion<T> object from another type of Quaternion
|
||||
* \brief Constructs a Quaternion object from another type of Quaternion
|
||||
*
|
||||
* \param quat Quaternion of type U to convert to type T
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,14 +11,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Ray<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Ray
|
||||
* \brief Math class that represents a ray or a straight line in 3D space
|
||||
*
|
||||
* This ray is meant to be understood like origin + lambda * direction, where lambda is a real positive parameter
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from its position and direction
|
||||
* \brief Constructs a Ray object from its position and direction
|
||||
*
|
||||
* \param X X position
|
||||
* \param Y Y position
|
||||
|
|
@ -35,7 +36,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from two Vector3
|
||||
* \brief Constructs a Ray object from two Vector3
|
||||
*
|
||||
* \param Origin Vector which represents the origin of the ray
|
||||
* \param Direction Vector which represents the direction of the ray
|
||||
|
|
@ -48,7 +49,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from two arrays of three elements
|
||||
* \brief Constructs a Ray object from two arrays of three elements
|
||||
*
|
||||
* \param Origin[3] Origin[0] is X position, Origin[1] is Y position and Origin[2] is Z position
|
||||
* \param Direction[3] Direction[0] is X direction, Direction[1] is Y direction and Direction[2] is Z direction
|
||||
|
|
@ -61,7 +62,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from the intersection of two planes
|
||||
* \brief Constructs a Ray object from the intersection of two planes
|
||||
*
|
||||
* \param planeOne First plane
|
||||
* \param planeTwo Second secant plane
|
||||
|
|
@ -77,7 +78,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from another type of Ray
|
||||
* \brief Constructs a Ray object from another type of Ray
|
||||
*
|
||||
* \param ray Ray of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -90,7 +91,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Ray<T> object from two Vector3 from another type of Ray
|
||||
* \brief Constructs a Ray object from two Vector3 from another type of Ray
|
||||
*
|
||||
* \param Origin Origin of type U to convert to type T
|
||||
* \param Direction Direction of type U to convert to type T
|
||||
|
|
|
|||
|
|
@ -13,14 +13,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Rect<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Rect
|
||||
* \brief Math class that represents an axis-aligned rectangle in two dimensions
|
||||
*
|
||||
* \remark The basis is said to be "left-hand". It means that with your left hand, the thumb is X positive, the index finger Y positive pointing to the bottom
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from its width and height
|
||||
* \brief Constructs a Rect object from its width and height
|
||||
*
|
||||
* \param Width Width of the rectangle (following X)
|
||||
* \param Height Height of the rectangle (following Y)
|
||||
|
|
@ -35,7 +36,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from its position, width and height
|
||||
* \brief Constructs a Rect object from its position, width and height
|
||||
*
|
||||
* \param X X position
|
||||
* \param Y Y position
|
||||
|
|
@ -50,7 +51,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from an array of four elements
|
||||
* \brief Constructs a Rect object from an array of four elements
|
||||
*
|
||||
* \param vec[4] vec[0] is X position, vec[1] is Y position, vec[2] is width and vec[3] is height
|
||||
*/
|
||||
|
|
@ -62,7 +63,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from a vector representing width and height
|
||||
* \brief Constructs a Rect object from a vector representing width and height
|
||||
*
|
||||
* \param lengths (Width, Height) of the rectangle
|
||||
*
|
||||
|
|
@ -76,7 +77,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from two vectors representing point of the space
|
||||
* \brief Constructs a Rect object from two vectors representing point of the space
|
||||
* (X, Y) will be the components minimum of the two vectors and the width and height will be the components maximum - minimum
|
||||
*
|
||||
* \param vec1 First point
|
||||
|
|
@ -90,7 +91,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Rect<T> object from another type of Rect
|
||||
* \brief Constructs a Rect object from another type of Rect
|
||||
*
|
||||
* \param rect Rect of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -504,7 +505,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Sets a Rect<T> object from two vectors representing point of the space
|
||||
* \brief Sets a Rect object from two vectors representing point of the space
|
||||
* (X, Y) will be the components minimum of the two vectors and the width and height will be the components maximum - minimum
|
||||
* \return A reference to this rectangle
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Sphere<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Sphere
|
||||
* \brief Math class that represents a sphere "S2" in a three dimensional euclidean space
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Sphere<T> object from its center position and radius
|
||||
* \brief Constructs a Sphere object from its center position and radius
|
||||
*
|
||||
* \param X X position
|
||||
* \param Y Y position
|
||||
|
|
@ -41,7 +42,7 @@ namespace Nz
|
|||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Sphere<T> object from its position and radius
|
||||
* \brief Constructs a Sphere object from its position and radius
|
||||
*
|
||||
* \param center Center of the sphere
|
||||
* \param Radius Half of the diameter
|
||||
|
|
@ -54,7 +55,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Sphere<T> object from an array of four elements
|
||||
* \brief Constructs a Sphere object from an array of four elements
|
||||
*
|
||||
* \param sphere[4] sphere[0] is X component, sphere[1] is Y component, sphere[2] is Z component and sphere[3] is radius
|
||||
*/
|
||||
|
|
@ -66,7 +67,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Sphere<T> object from another type of Sphere
|
||||
* \brief Constructs a Sphere object from another type of Sphere
|
||||
*
|
||||
* \param sphere Sphere of type U to convert to type T
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Vector2<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Vector2
|
||||
* \brief Math class that represents an element of the two dimensional vector space
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector2<T> object from its coordinates
|
||||
* \brief Constructs a Vector2 object from its coordinates
|
||||
*
|
||||
* \param X X component
|
||||
* \param Y Y component
|
||||
|
|
@ -32,7 +33,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs explicitely a Vector2<T> object from its "scale"
|
||||
* \brief Constructs explicitely a Vector2 object from its "scale"
|
||||
*
|
||||
* \param scale X component = Y component
|
||||
*/
|
||||
|
|
@ -44,7 +45,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector2<T> object from an array of two elements
|
||||
* \brief Constructs a Vector2 object from an array of two elements
|
||||
*
|
||||
* \param vec[2] vec[0] is X component and vec[1] is Y component
|
||||
*/
|
||||
|
|
@ -56,7 +57,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector2<T> object from another type of Vector2
|
||||
* \brief Constructs a Vector2 object from another type of Vector2
|
||||
*
|
||||
* \param vec Vector of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -69,7 +70,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector2<T> object from a Vector3
|
||||
* \brief Constructs a Vector2 object from a Vector3
|
||||
*
|
||||
* \param vec Vector3 where only the first two components are taken
|
||||
*/
|
||||
|
|
@ -81,7 +82,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector2<T> object from a Vector4
|
||||
* \brief Constructs a Vector2 object from a Vector4
|
||||
*
|
||||
* \param vec Vector4 where only the first two components are taken
|
||||
*/
|
||||
|
|
@ -988,7 +989,7 @@ std::ostream& operator<<(std::ostream& out, const Nz::Vector2<T>& vec)
|
|||
*/
|
||||
|
||||
template<typename T>
|
||||
Nz::Vector2<T> operator*(T scale, const Nz::Vector2<T>& vec)
|
||||
Nz::Vector2<T> operator*(T scale, const Nz::Vector2& vec)
|
||||
{
|
||||
return Nz::Vector2<T>(scale * vec.x, scale * vec.y);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,15 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Vector2<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Vector3
|
||||
* \brief Math class that represents an element of the three dimensional vector space
|
||||
*
|
||||
* \remark The basis is said to be "right-hand". It means that with your right hand, the thumb is X positive, the index finger Y positive and the middle finger (pointing to you) Z positive
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from its coordinates
|
||||
* \brief Constructs a Vector3 object from its coordinates
|
||||
*
|
||||
* \param X X component
|
||||
* \param Y Y component
|
||||
|
|
@ -35,7 +36,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from a component and a Vector2<T>
|
||||
* \brief Constructs a Vector3 object from a component and a Vector2<T>
|
||||
*
|
||||
* \param X X component
|
||||
* \param vec vec.X = Y component and vec.y = Z component
|
||||
|
|
@ -48,7 +49,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs explicitely a Vector3<T> object from its "scale"
|
||||
* \brief Constructs explicitely a Vector3 object from its "scale"
|
||||
*
|
||||
* \param scale X component = Y component = Z component
|
||||
*/
|
||||
|
|
@ -60,7 +61,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from an array of three elements
|
||||
* \brief Constructs a Vector3 object from an array of three elements
|
||||
*
|
||||
* \param vec[3] vec[0] is X component, vec[1] is Y component and vec[2] is Z component
|
||||
*/
|
||||
|
|
@ -72,7 +73,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from a Vector2<T> and a component
|
||||
* \brief Constructs a Vector3 object from a Vector2<T> and a component
|
||||
*
|
||||
* \param vec vec.X = X component and vec.y = Y component
|
||||
* \param Z Z component
|
||||
|
|
@ -85,7 +86,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from another type of Vector3
|
||||
* \brief Constructs a Vector3 object from another type of Vector3
|
||||
*
|
||||
* \param vec Vector of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -98,7 +99,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector3<T> object from a Vector4
|
||||
* \brief Constructs a Vector3 object from a Vector4
|
||||
*
|
||||
* \param vec Vector4 where only the first three components are taken
|
||||
*/
|
||||
|
|
@ -1299,7 +1300,7 @@ std::ostream& operator<<(std::ostream& out, const Nz::Vector3<T>& vec)
|
|||
*/
|
||||
|
||||
template<typename T>
|
||||
Nz::Vector3<T> operator*(T scale, const Nz::Vector3<T>& vec)
|
||||
Nz::Vector3<T> operator*(T scale, const Nz::Vector3& vec)
|
||||
{
|
||||
return Nz::Vector3<T>(scale * vec.x, scale * vec.y, scale * vec.z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,13 @@ namespace Nz
|
|||
{
|
||||
|
||||
/*!
|
||||
* \class Nz::Vector4<T>
|
||||
* \ingroup math
|
||||
* \class Nz::Vector4
|
||||
* \brief Math class that represents an element of the three dimensional vector space with the notion of projectivity. When the fourth component is 1, it describes an 'usual' point and when it is 0, it represents the point at infinity
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from its coordinates
|
||||
* \brief Constructs a Vector4 object from its coordinates
|
||||
*
|
||||
* \param X X component
|
||||
* \param Y Y component
|
||||
|
|
@ -36,7 +37,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from two components and a Vector2<T>
|
||||
* \brief Constructs a Vector4 object from two components and a Vector2<T>
|
||||
*
|
||||
* \param X X component
|
||||
* \param Y Y component
|
||||
|
|
@ -50,7 +51,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from one component, a Vector2<T> and one component
|
||||
* \brief Constructs a Vector4 object from one component, a Vector2<T> and one component
|
||||
*
|
||||
* \param X X component
|
||||
* \param vec vec.X = Y component and vec.y = Z component
|
||||
|
|
@ -64,7 +65,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from one component and a Vector3<T>
|
||||
* \brief Constructs a Vector4 object from one component and a Vector3<T>
|
||||
*
|
||||
* \param X X component
|
||||
* \param vec vec.X = Y component, vec.y = Z component and vec.z = W component
|
||||
|
|
@ -77,7 +78,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs explicitely a Vector4<T> object from its "scale"
|
||||
* \brief Constructs explicitely a Vector4 object from its "scale"
|
||||
*
|
||||
* \param scale X component = Y component = Z component = W component
|
||||
*/
|
||||
|
|
@ -89,7 +90,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from an array of four elements
|
||||
* \brief Constructs a Vector4 object from an array of four elements
|
||||
*
|
||||
* \param vec[4] vec[0] is X component, vec[1] is Y component, vec[2] is Z component and vec[3] is W component
|
||||
*/
|
||||
|
|
@ -101,7 +102,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from a Vector2<T> and two components
|
||||
* \brief Constructs a Vector4 object from a Vector2<T> and two components
|
||||
*
|
||||
* \param vec vec.X = X component and vec.y = Y component
|
||||
* \param Z Z component
|
||||
|
|
@ -115,7 +116,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from one component and a Vector3<T>
|
||||
* \brief Constructs a Vector4 object from one component and a Vector3<T>
|
||||
*
|
||||
* \param vec vec.X = X component, vec.y = Y component and vec.z = Z component
|
||||
* \param W W component
|
||||
|
|
@ -128,7 +129,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Vector4<T> object from another type of Vector4
|
||||
* \brief Constructs a Vector4 object from another type of Vector4
|
||||
*
|
||||
* \param vec Vector of type U to convert to type T
|
||||
*/
|
||||
|
|
@ -1037,7 +1038,7 @@ std::ostream& operator<<(std::ostream& out, const Nz::Vector4<T>& vec)
|
|||
|
||||
|
||||
template<typename T>
|
||||
Nz::Vector4<T> operator*(T scale, const Nz::Vector4<T>& vec)
|
||||
Nz::Vector4<T> operator*(T scale, const Nz::Vector4& vec)
|
||||
{
|
||||
return Nz::Vector4<T>(scale * vec.x, scale * vec.y, scale * vec.z, scale * vec.w);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::AbstractHash<T>
|
||||
* \ingroup core
|
||||
* \class Nz::AbstractHash
|
||||
* \brief Core class that represents the behaviour of the hash classes
|
||||
*
|
||||
* \remark This class is abstract
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::AbstractLogger<T>
|
||||
* \ingroup core
|
||||
* \class Nz::AbstractLogger
|
||||
* \brief Core class that represents the behaviour of the log classes
|
||||
*
|
||||
* \remark This class is abstract
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ByteArray
|
||||
* \brief Core class that represents an array of bytes
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ByteStream
|
||||
* \brief Core class that represents a stream of bytes
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Clock
|
||||
* \brief Utility class that measure the elapsed time
|
||||
*/
|
||||
|
|
@ -52,7 +53,6 @@ namespace Nz
|
|||
* \param startingValue The starting time value, in microseconds
|
||||
* \param paused The clock pause state
|
||||
*/
|
||||
|
||||
Clock::Clock(UInt64 startingValue, bool paused) :
|
||||
m_elapsedTime(startingValue),
|
||||
m_refTime(GetElapsedMicroseconds()),
|
||||
|
|
@ -66,7 +66,6 @@ namespace Nz
|
|||
*
|
||||
* \see GetMicroseconds, GetMilliseconds
|
||||
*/
|
||||
|
||||
float Clock::GetSeconds() const
|
||||
{
|
||||
return GetMicroseconds()/1000000.f;
|
||||
|
|
@ -78,7 +77,6 @@ namespace Nz
|
|||
*
|
||||
* \see GetMilliseconds, GetSeconds
|
||||
*/
|
||||
|
||||
UInt64 Clock::GetMicroseconds() const
|
||||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
|
@ -96,7 +94,6 @@ namespace Nz
|
|||
*
|
||||
* \see GetMicroseconds, GetSeconds
|
||||
*/
|
||||
|
||||
UInt64 Clock::GetMilliseconds() const
|
||||
{
|
||||
return GetMicroseconds()/1000;
|
||||
|
|
@ -108,7 +105,6 @@ namespace Nz
|
|||
*
|
||||
* \see Pause, Unpause
|
||||
*/
|
||||
|
||||
bool Clock::IsPaused() const
|
||||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
|
@ -124,7 +120,6 @@ namespace Nz
|
|||
*
|
||||
* \see IsPaused, Unpause
|
||||
*/
|
||||
|
||||
void Clock::Pause()
|
||||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
|
@ -140,7 +135,6 @@ namespace Nz
|
|||
* \brief Restart the clock
|
||||
* Restarts the clock, putting it's time counter back to zero (as if the clock got constructed).
|
||||
*/
|
||||
|
||||
void Clock::Restart()
|
||||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
|
@ -158,7 +152,6 @@ namespace Nz
|
|||
*
|
||||
* \see IsPaused, Unpause
|
||||
*/
|
||||
|
||||
void Clock::Unpause()
|
||||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ConditionVariable
|
||||
* \brief Core class that represents a condition variable
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::CoreCore
|
||||
* \ingroup core
|
||||
* \class Nz::Core
|
||||
* \brief Core class that represents the module initializer of Core
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Directory
|
||||
* \brief Core class that represents a directory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::DynLib
|
||||
* \brief Core class that represents a dynamic library loader
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Error
|
||||
* \brief Core class that represents an error
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ErrorFlags
|
||||
* \brief Core class that represents flags for error
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::File
|
||||
* \brief Core class that represents a file
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::FileLogger
|
||||
* \brief Core class that represents a file logger
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::GuillotineBinPack
|
||||
* \brief Core class that represents the "Guillotine problem", combination of the "Bin packing problem" and the "cutting stock"
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::HardwareInfo
|
||||
* \brief Core class that represents the info we can get from hardware
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::LockGuard
|
||||
* \brief Core class that represents a mutex wrapper that provides a convenient RAII-style mechanism
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Log
|
||||
* \brief Core class that represents a logger
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryManager
|
||||
* \brief Core class that represents a manager for the memory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryStream
|
||||
* \brief Core class that represents a stream of memory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryView
|
||||
* \brief Core class that represents a view of the memory behaving like a stream
|
||||
*/
|
||||
|
|
@ -134,7 +135,7 @@ namespace Nz
|
|||
{
|
||||
std::size_t endPos = static_cast<std::size_t>(m_pos + size);
|
||||
if (endPos > m_size)
|
||||
size = m_size - m_pos;
|
||||
size = static_cast<std::size_t>(m_size - m_pos);
|
||||
|
||||
NazaraAssert(buffer, "Invalid buffer");
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Mutex
|
||||
* \brief Core class that represents a binary semaphore, a mutex
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ParameterList
|
||||
* \brief Core class that represents a list of parameters
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::PluginManager
|
||||
* \brief Core class that represents a manager for plugin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::PrimitiveList
|
||||
* \brief Core class that represents a list of geometric primitives
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::RefCounted
|
||||
* \brief Core class that represents a reference with a counter
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Resource
|
||||
* \brief Core class that represents a resource
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Semaphore
|
||||
* \brief Core class that represents a counting semaphore
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::StdLogger
|
||||
* \brief Core class that represents a logger writing to standard output (stdout, stderr)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Stream
|
||||
* \brief Core class that represents a stream
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::String
|
||||
* \brief Core class that represents a string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::StringStream
|
||||
* \brief Core class that represents a stream of strings
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ namespace Nz
|
|||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::TaskScheduler<T>
|
||||
* \ingroup core
|
||||
* \class Nz::TaskScheduler
|
||||
* \brief Core class that represents a pool of threads
|
||||
*
|
||||
* \remark Initialized should be called first
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Thread<T>
|
||||
* \ingroup core
|
||||
* \class Nz::Thread
|
||||
* \brief Core class that represents a thread
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ namespace Nz
|
|||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Unicode
|
||||
* \brief Core class that represents a Unicode character
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue