Add AddImpulse for PhysicsComponent2D (#141)
* Update PhysicsComponent2D.hpp * Update LuaBinding_SDK.hpp * Update LuaBinding_SDK.cpp * Update LuaBinding_SDK.cpp * Add : AddImpulse * Add : AddImpulse * Add : binding of PhysicsComponent2D * add : handle * fix alphabetical order * complete PhysicsComponent2D binding * Update LuaBinding_SDK.cpp * Update LuaBinding_SDK.hpp * Update PhysicsComponent2D.hpp * Update PhysicsComponent2D.inl * forgot : use namespace Nz and open namespace Ndk * Update PhysicsComponent2D.hpp * Add Addimpulse * Update PhysicsComponent3D.hpp
This commit is contained in:
@@ -50,7 +50,38 @@ namespace Ndk
|
||||
|
||||
m_object->AddForce(force, point, coordSys);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Applies a impulse to the entity
|
||||
*
|
||||
* \param impulse Impulse to apply on the entity
|
||||
*
|
||||
* \remark Produces a NazaraAssert if the physics object is invalid
|
||||
*/
|
||||
|
||||
inline void PhysicsComponent2D::AddImpulse(const Nz::Vector2f& impulse, Nz::CoordSys coordSys)
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid physics object");
|
||||
|
||||
m_object->AddImpulse(impulse, coordSys);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies a impulse to the entity
|
||||
*
|
||||
* \param impulse Impulse to apply on the entity
|
||||
* \param point Point where the impulse is applied
|
||||
*
|
||||
* \remark Produces a NazaraAssert if the physics object is invalid
|
||||
*/
|
||||
|
||||
inline void PhysicsComponent2D::AddImpulse(const Nz::Vector2f& impulse, const Nz::Vector2f& point, Nz::CoordSys coordSys)
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid physics object");
|
||||
|
||||
m_object->AddImpulse(impulse, point, coordSys);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies a torque to the entity
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user