Merge branch 'master' into nazara-next
This commit is contained in:
@@ -27,8 +27,9 @@ namespace Nz
|
||||
public:
|
||||
Angle() = default;
|
||||
Angle(T angle);
|
||||
Angle(const Angle<AngleUnit::Degree, T>& angle);
|
||||
Angle(const Angle<AngleUnit::Radian, T>& angle);
|
||||
template<typename U> explicit Angle(const Angle<Unit, U>& Angle);
|
||||
Angle(const Angle&) = default;
|
||||
~Angle() = default;
|
||||
|
||||
T GetCos() const;
|
||||
@@ -51,9 +52,6 @@ namespace Nz
|
||||
Angle<AngleUnit::Radian, T> ToRadianAngle() const;
|
||||
String ToString() const;
|
||||
|
||||
template<AngleUnit U = Unit, typename = std::enable_if_t<U != AngleUnit::Degree>> operator Angle<AngleUnit::Degree, T>() const { return ToDegreeAngle(); } // GCC < 8 bug
|
||||
template<AngleUnit U = Unit, typename = std::enable_if_t<U != AngleUnit::Radian>> operator Angle<AngleUnit::Radian, T>() const { return ToRadianAngle(); } // GCC < 8 bug
|
||||
|
||||
Angle& operator=(const Angle&) = default;
|
||||
|
||||
Angle operator+(const Angle& other) const;
|
||||
|
||||
@@ -155,6 +155,28 @@ namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs an Angle object from a angle in degrees, converting if required
|
||||
*
|
||||
* \param value Angle object to copy
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T>::Angle(const Angle<AngleUnit::Degree, T>& angle) :
|
||||
value(Detail::AngleUtils<Unit>::FromDegrees(angle.value))
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs an Angle object from a angle in radians, converting if required
|
||||
*
|
||||
* \param value Angle object to copy
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T>::Angle(const Angle<AngleUnit::Radian, T>& angle) :
|
||||
value(Detail::AngleUtils<Unit>::FromRadians(angle.value))
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Computes the cosine of the angle
|
||||
* \return Cosine of angle
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Nz
|
||||
AbstractSocket(AbstractSocket&& abstractSocket) noexcept;
|
||||
virtual ~AbstractSocket();
|
||||
|
||||
void Close();
|
||||
void Close() noexcept;
|
||||
|
||||
void EnableBlocking(bool blocking);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Nz
|
||||
void SetSendBufferSize(std::size_t size);
|
||||
|
||||
AbstractSocket& operator=(const AbstractSocket&) = delete;
|
||||
AbstractSocket& operator=(AbstractSocket&& abstractSocket);
|
||||
AbstractSocket& operator=(AbstractSocket&& abstractSocket) noexcept;
|
||||
|
||||
// Signals:
|
||||
NazaraSignal(OnStateChanged, const AbstractSocket* /*socket*/, SocketState /*oldState*/, SocketState /*newState*/);
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace Nz
|
||||
bool SendMultiple(const IpAddress& to, const NetBuffer* buffers, std::size_t bufferCount, std::size_t* sent);
|
||||
bool SendPacket(const IpAddress& to, const NetPacket& packet);
|
||||
|
||||
UdpSocket& operator=(const UdpSocket& udpSocket) = delete;
|
||||
UdpSocket& operator=(UdpSocket && udpSocket) noexcept = default;
|
||||
|
||||
private:
|
||||
void OnClose() override;
|
||||
void OnOpened() override;
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace Nz
|
||||
|
||||
void SetGravity(const Vector3f& gravity);
|
||||
void SetMaxStepCount(std::size_t maxStepCount);
|
||||
void SetSolverModel(unsigned int model);
|
||||
void SetStepSize(float stepSize);
|
||||
void SetThreadCount(unsigned int threadCount);
|
||||
|
||||
@@ -72,7 +71,7 @@ namespace Nz
|
||||
CollisionCallback collisionCallback;
|
||||
};
|
||||
|
||||
static int OnAABBOverlap(const NewtonMaterial* const material, const NewtonBody* const body0, const NewtonBody* const body1, int threadIndex);
|
||||
static int OnAABBOverlap(const NewtonJoint* const contact, float timestep, int threadIndex);
|
||||
static void ProcessContact(const NewtonJoint* const contact, float timestep, int threadIndex);
|
||||
|
||||
std::unordered_map<Nz::UInt64, std::unique_ptr<Callback>> m_callbacks;
|
||||
|
||||
Reference in New Issue
Block a user