Physics/Geom: Fix NullGeom InertialMatrix
Former-commit-id: ac5e0c6cd9f775c29e37a4bb5a072eee2b224d0f
This commit is contained in:
parent
bef0736295
commit
67a9dc692a
|
|
@ -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<typename... Args> static NzNullGeomRef New(Args&&... args);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue