diff --git a/Code/GamePhysics/GamePhysics.vcxproj b/Code/GamePhysics/GamePhysics.vcxproj index 5a308fcf..43da0eb2 100644 --- a/Code/GamePhysics/GamePhysics.vcxproj +++ b/Code/GamePhysics/GamePhysics.vcxproj @@ -154,7 +154,6 @@ - diff --git a/Code/GamePhysics/GamePhysics.vcxproj.filters b/Code/GamePhysics/GamePhysics.vcxproj.filters index 83f8bf43..256cd6b1 100644 --- a/Code/GamePhysics/GamePhysics.vcxproj.filters +++ b/Code/GamePhysics/GamePhysics.vcxproj.filters @@ -38,9 +38,6 @@ Source Files - - Source Files - Source Files diff --git a/Code/GamePhysics/Implementation/NullBody.cpp b/Code/GamePhysics/Implementation/NullBody.cpp deleted file mode 100644 index 82c75a78..00000000 --- a/Code/GamePhysics/Implementation/NullBody.cpp +++ /dev/null @@ -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 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 ) {} diff --git a/Code/GamePhysics/PhysicsAPI.h b/Code/GamePhysics/PhysicsAPI.h index 23a09a10..78a13cde 100644 --- a/Code/GamePhysics/PhysicsAPI.h +++ b/Code/GamePhysics/PhysicsAPI.h @@ -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 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 \ No newline at end of file