Physics/PhysObject: Added Set(Angular)Velocity methods
Former-commit-id: cd506b93ad3be1f2c5972b784bef53e02a9211ef
This commit is contained in:
parent
a71c86c0ca
commit
22f8c1b0a3
|
|
@ -49,12 +49,14 @@ class NAZARA_API NzPhysObject : NzNonCopyable
|
|||
bool IsMoveable() const;
|
||||
bool IsSleeping() const;
|
||||
|
||||
void SetAngularVelocity(const NzVector3f& angularVelocity);
|
||||
void SetGeom(NzPhysGeomRef geom);
|
||||
void SetGravityFactor(float gravityFactor);
|
||||
void SetMass(float mass);
|
||||
void SetMassCenter(const NzVector3f& center);
|
||||
void SetPosition(const NzVector3f& position);
|
||||
void SetRotation(const NzQuaternionf& rotation);
|
||||
void SetVelocity(const NzVector3f& velocity);
|
||||
|
||||
NzPhysObject& operator=(const NzPhysObject& object);
|
||||
NzPhysObject& operator=(NzPhysObject&& object);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue