Added some data to PhysicsAPI
GetRigidLinearVelocity() and void* as reference to game object.
This commit is contained in:
parent
5835a72acc
commit
c740bd5935
Binary file not shown.
|
@ -124,6 +124,12 @@ Float4x4 & SimpleRigidBody::GetView( Float4x4 &targetMem ) const
|
|||
return targetMem = this->rigid.GetView();
|
||||
}
|
||||
|
||||
Float3 SimpleRigidBody::GetRigidLinearVelocity() const
|
||||
{
|
||||
return this->rigid.GetLinearVelocity();
|
||||
}
|
||||
|
||||
|
||||
UpdateState SimpleRigidBody::Update( Float timeStepLength )
|
||||
{
|
||||
this->rigid.Update_LeapFrog( timeStepLength );
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Oyster { namespace Physics
|
|||
State GetState() const;
|
||||
State & GetState( State &targetMem ) const;
|
||||
void SetState( const State &state );
|
||||
::Oyster::Math::Float3 GetRigidLinearVelocity() const;
|
||||
|
||||
void CallSubscription( const ICustomBody *proto, const ICustomBody *deuter );
|
||||
bool IsAffectedByGravity() const;
|
||||
|
|
|
@ -126,6 +126,11 @@ Float4x4 & SphericalRigidBody::GetView( Float4x4 &targetMem ) const
|
|||
return targetMem = this->rigid.GetView();
|
||||
}
|
||||
|
||||
Float3 SphericalRigidBody::GetRigidLinearVelocity() const
|
||||
{
|
||||
return this->rigid.GetLinearVelocity();
|
||||
}
|
||||
|
||||
UpdateState SphericalRigidBody::Update( Float timeStepLength )
|
||||
{
|
||||
this->rigid.Update_LeapFrog( timeStepLength );
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace Oyster { namespace Physics
|
|||
State GetState() const;
|
||||
State & GetState( State &targetMem = State() ) const;
|
||||
void SetState( const State &state );
|
||||
::Oyster::Math::Float3 GetRigidLinearVelocity() const;
|
||||
|
||||
void CallSubscription( const ICustomBody *proto, const ICustomBody *deuter );
|
||||
bool IsAffectedByGravity() const;
|
||||
|
|
|
@ -243,6 +243,11 @@ namespace Oyster
|
|||
SubscriptMessage_ignore_collision_response
|
||||
};
|
||||
|
||||
/********************************************************
|
||||
* @param gameObjectRef: a pointer to the object in the game owning the rigid body.
|
||||
********************************************************/
|
||||
void* gameObjectRef;
|
||||
|
||||
typedef SubscriptMessage (*EventAction_Collision)( const ICustomBody *proto, const ICustomBody *deuter );
|
||||
typedef Struct::SimpleBodyDescription SimpleBodyDescription;
|
||||
typedef Struct::SphericalBodyDescription SphericalBodyDescription;
|
||||
|
@ -271,6 +276,11 @@ namespace Oyster
|
|||
********************************************************/
|
||||
virtual State & GetState( State &targetMem ) const = 0;
|
||||
|
||||
/********************************************************
|
||||
* @return the linear velocity of the rigid body in a vector.
|
||||
********************************************************/
|
||||
virtual Math::Float3 GetRigidLinearVelocity() const = 0;
|
||||
|
||||
/********************************************************
|
||||
* @todo TODO: need doc
|
||||
********************************************************/
|
||||
|
|
Loading…
Reference in New Issue