Physics/PhysObject: Added Set(Angular)Velocity methods
Former-commit-id: cd506b93ad3be1f2c5972b784bef53e02a9211ef
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user