diff --git a/include/Nazara/Physics/Geom.hpp b/include/Nazara/Physics/Geom.hpp index ba3500513..511b7019d 100644 --- a/include/Nazara/Physics/Geom.hpp +++ b/include/Nazara/Physics/Geom.hpp @@ -218,6 +218,8 @@ class NAZARA_PHYSICS_API NzNullGeom : public NzPhysGeom public: NzNullGeom(); + void ComputeInertialMatrix(NzVector3f* inertia, NzVector3f* center) const; + nzGeomType GetType() const override; template static NzNullGeomRef New(Args&&... args); diff --git a/src/Nazara/Physics/Geom.cpp b/src/Nazara/Physics/Geom.cpp index 5fcf4e8bf..e2676a0df 100644 --- a/src/Nazara/Physics/Geom.cpp +++ b/src/Nazara/Physics/Geom.cpp @@ -379,6 +379,15 @@ nzGeomType NzNullGeom::GetType() const return nzGeomType_Null; } +void NzNullGeom::ComputeInertialMatrix(NzVector3f* inertia, NzVector3f* center) const +{ + if (inertia) + inertia->MakeUnit(); + + if (center) + center->MakeZero(); +} + NewtonCollision* NzNullGeom::CreateHandle(NzPhysWorld* world) const { return NewtonCreateNull(world->GetHandle());