Merge remote-tracking branch 'origin/Physics' into GameLogicBranch
This commit is contained in:
commit
8ded483442
|
@ -154,7 +154,6 @@
|
|||
<ClInclude Include="PhysicsAPI.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Implementation\NullBody.cpp" />
|
||||
<ClCompile Include="Implementation\PhysicsAPI_Impl.cpp" />
|
||||
<ClCompile Include="Implementation\SimpleRigidBody.cpp" />
|
||||
<ClCompile Include="DLLMain.cpp" />
|
||||
|
|
|
@ -38,9 +38,6 @@
|
|||
<ClCompile Include="Implementation\SimpleRigidBody.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Implementation\NullBody.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DLLMain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
#include "..\PhysicsAPI.h"
|
||||
|
||||
using namespace ::Oyster::Physics;
|
||||
using namespace ::Oyster::Physics::Error;
|
||||
using namespace ::Oyster::Math;
|
||||
using namespace ::Oyster::Collision3D;
|
||||
using namespace ::Utility::DynamicMemory;
|
||||
|
||||
NullBody::~NullBody() {}
|
||||
|
||||
UniquePointer<ICustomBody> NullBody::Clone() const
|
||||
{
|
||||
return new NullBody( *this );
|
||||
}
|
||||
|
||||
bool NullBody::IsSubscribingCollisions() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool NullBody::Intersects( const ICustomBody &object, Float &deltaWhen, Float3 &worldPointOfContact ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool NullBody::Intersects( const ICollideable &shape ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Sphere & NullBody::GetBoundingSphere( Sphere &targetMem ) const
|
||||
{
|
||||
return targetMem = Sphere( Float3::null, 0.0f );
|
||||
}
|
||||
|
||||
Float3 & NullBody::GetNormalAt( const Float3 &worldPos, Float3 &targetMem ) const
|
||||
{
|
||||
return targetMem = Float3::standard_unit_z;
|
||||
}
|
||||
|
||||
Float3 & NullBody::GetCenter( Float3 &targetMem ) const
|
||||
{
|
||||
return targetMem = Float3::null;
|
||||
}
|
||||
|
||||
Float4x4 & NullBody::GetRotation( Float4x4 &targetMem ) const
|
||||
{
|
||||
return targetMem = Float4x4::identity;
|
||||
}
|
||||
|
||||
Float4x4 & NullBody::GetOrientation( Float4x4 &targetMem ) const
|
||||
{
|
||||
return targetMem = Float4x4::identity;
|
||||
}
|
||||
|
||||
Float4x4 & NullBody::GetView( Float4x4 &targetMem ) const
|
||||
{
|
||||
return targetMem = Float4x4::identity;
|
||||
}
|
||||
|
||||
UpdateState NullBody::Update( Float timeStepLength )
|
||||
{
|
||||
return resting;
|
||||
}
|
||||
|
||||
void NullBody::SetMomentOfInertiaTensor_KeepVelocity( const Float4x4 &localI ) {}
|
||||
|
||||
void NullBody::SetMomentOfInertiaTensor_KeepMomentum( const Float4x4 &localI ) {}
|
||||
|
||||
void NullBody::SetMass_KeepVelocity( Float m ) {}
|
||||
|
||||
void NullBody::SetMass_KeepMomentum( Float m ) {}
|
||||
|
||||
void NullBody::SetCenter( const Float3 &worldPos ) {}
|
||||
|
||||
void NullBody::SetRotation( const Float4x4 &rotation ) {}
|
||||
|
||||
void NullBody::SetOrientation( const Float4x4 &orientation ) {}
|
|
@ -239,41 +239,6 @@ namespace Oyster
|
|||
virtual void SetRotation( const ::Oyster::Math::Float4x4 &rotation ) = 0;
|
||||
virtual void SetOrientation( const ::Oyster::Math::Float4x4 &orientation ) = 0;
|
||||
};
|
||||
|
||||
namespace Error
|
||||
{ //! The content in here is used as API return errorvalues.
|
||||
|
||||
class DLL_USAGE NullBody : public ICustomBody
|
||||
{
|
||||
public:
|
||||
virtual ~NullBody();
|
||||
|
||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> Clone() const;
|
||||
|
||||
bool IsSubscribingCollisions() const;
|
||||
bool Intersects( const ICustomBody &object, ::Oyster::Math::Float &deltaWhen, ::Oyster::Math::Float3 &worldPointOfContact ) const;
|
||||
bool Intersects( const ::Oyster::Collision3D::ICollideable &shape ) const;
|
||||
|
||||
unsigned int GetReference() const;
|
||||
::Oyster::Collision3D::Sphere & GetBoundingSphere( ::Oyster::Collision3D::Sphere &targetMem = ::Oyster::Collision3D::Sphere() ) const;
|
||||
::Oyster::Math::Float3 & GetNormalAt( const ::Oyster::Math::Float3 &worldPos, ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
||||
::Oyster::Math::Float3 & GetCenter( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
||||
::Oyster::Math::Float4x4 & GetRotation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
||||
::Oyster::Math::Float4x4 & GetOrientation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
||||
::Oyster::Math::Float4x4 & GetView( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
||||
|
||||
UpdateState Update( ::Oyster::Math::Float timeStepLength );
|
||||
|
||||
void SetMomentOfInertiaTensor_KeepVelocity( const ::Oyster::Math::Float4x4 &localI );
|
||||
void SetMomentOfInertiaTensor_KeepMomentum( const ::Oyster::Math::Float4x4 &localI );
|
||||
void SetMass_KeepVelocity( ::Oyster::Math::Float m );
|
||||
void SetMass_KeepMomentum( ::Oyster::Math::Float m );
|
||||
void SetCenter( const ::Oyster::Math::Float3 &worldPos );
|
||||
void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
|
||||
void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
|
||||
|
||||
} const nobody;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue