Upgrade Physics2D and Physics3D

This commit is contained in:
Jérôme Leclercq
2021-05-24 19:12:21 +02:00
parent 4bcb63d776
commit 8b0b5295f7
25 changed files with 239 additions and 448 deletions

View File

@@ -10,7 +10,7 @@ namespace Ndk
* \param geom Reference to a geometry symbolizing the entity
*/
inline CollisionComponent2D::CollisionComponent2D(Nz::Collider2DRef geom) :
inline CollisionComponent2D::CollisionComponent2D(std::shared_ptr<Nz::Collider2D> geom) :
m_geom(std::move(geom)),
m_bodyUpdated(false)
{
@@ -33,7 +33,7 @@ namespace Ndk
* \return A constant reference to the physics geometry
*/
inline const Nz::Collider2DRef& CollisionComponent2D::GetGeom() const
inline const std::shared_ptr<Nz::Collider2D>& CollisionComponent2D::GetGeom() const
{
return m_geom;
}
@@ -45,7 +45,7 @@ namespace Ndk
* \param geom Reference to a geometry symbolizing the entity
*/
inline CollisionComponent2D& CollisionComponent2D::operator=(Nz::Collider2DRef geom)
inline CollisionComponent2D& CollisionComponent2D::operator=(std::shared_ptr<Nz::Collider2D> geom)
{
SetGeom(geom);