Physics/PhysObject: Added Set(Angular)Velocity methods

Former-commit-id: cd506b93ad3be1f2c5972b784bef53e02a9211ef
This commit is contained in:
Lynix
2015-04-23 14:22:58 +02:00
parent a71c86c0ca
commit 22f8c1b0a3
2 changed files with 12 additions and 0 deletions

View File

@@ -217,6 +217,11 @@ bool NzPhysObject::IsSleeping() const
return NewtonBodyGetSleepState(m_body) != 0;
}
void NzPhysObject::SetAngularVelocity(const NzVector3f& angularVelocity)
{
NewtonBodySetOmega(m_body, angularVelocity);
}
void NzPhysObject::SetGeom(NzPhysGeomRef geom)
{
if (m_geom != geom)
@@ -276,6 +281,11 @@ void NzPhysObject::SetRotation(const NzQuaternionf& rotation)
UpdateBody();
}
void NzPhysObject::SetVelocity(const NzVector3f& velocity)
{
NewtonBodySetVelocity(m_body, velocity);
}
NzPhysObject& NzPhysObject::operator=(const NzPhysObject& object)
{
NzPhysObject physObj(object);