References in solution adjusted

All references to ::Utility::Memory changed to ::Utility::DynamicMemory
This commit is contained in:
Dander7BD 2013-11-13 14:50:08 +01:00
parent 893e6427a5
commit 19522d8ff6
21 changed files with 38 additions and 29 deletions

View File

@ -19,8 +19,8 @@ Box & Box::operator = ( const Box &box )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Box::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Box(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Box::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Box(*this) ); }
bool Box::Intersects( const ICollideable *target ) const
{

View File

@ -33,7 +33,7 @@ namespace Oyster { namespace Collision3D
Box & operator = ( const Box &box );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -21,8 +21,8 @@ BoxAxisAligned & BoxAxisAligned::operator = ( const BoxAxisAligned &box )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> BoxAxisAligned::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new BoxAxisAligned(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> BoxAxisAligned::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new BoxAxisAligned(*this) ); }
bool BoxAxisAligned::Intersects( const ICollideable *target ) const
{

View File

@ -27,7 +27,7 @@ namespace Oyster { namespace Collision3D
BoxAxisAligned & operator = ( const BoxAxisAligned &box );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -188,8 +188,8 @@ void Frustrum::WriteToByte( unsigned int &nextIndex, unsigned char targetMem[] )
nextIndex += 6 * ::Utility::StaticArray::NumElementsOf( this->plane[0].byte );
}
::Utility::Memory::UniquePointer<ICollideable> Frustrum::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Frustrum(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Frustrum::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Frustrum(*this) ); }
bool Frustrum::Intersects( const ICollideable *target ) const
{

View File

@ -37,7 +37,7 @@ namespace Oyster { namespace Collision3D
void Split( Frustrum targetList[], unsigned int numX, unsigned int numY = 1U, unsigned int numZ = 1u ) const; /// DEPRECATED
void WriteToByte( unsigned char targetMem[], unsigned int &nextIndex ) const; /// DEPRECATED
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -33,7 +33,7 @@ namespace Oyster { namespace Collision3D /// Contains a collection of 3D shapes
ICollideable( Type type = Type_undefined );
virtual ~ICollideable();
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const = 0;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const = 0;
virtual bool Intersects( const ICollideable *target ) const = 0;
virtual bool Contains( const ICollideable *target ) const = 0;
};

View File

@ -20,8 +20,8 @@ Line & Line::operator = ( const Line &line )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Line::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Line(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Line::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Line(*this) ); }
bool Line::Intersects( const ICollideable *target ) const
{

View File

@ -28,7 +28,7 @@ namespace Oyster { namespace Collision3D
Line & operator = ( const Line &line );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -57,6 +57,15 @@ namespace Oyster { namespace Physics3D
return ( momentOfInertia * ::Oyster::Math::Float4(angularVelocity, 0.0f) ).xyz;
}
/******************************************************************
* Returns the local angular momentum of a mass in rotation.
* @todo TODO: improve doc
******************************************************************/
inline ::Oyster::Math::Float3 AngularMomentum( const ::Oyster::Math::Float3 linearMomentum, const ::Oyster::Math::Float3 &offset )
{
return offset.Cross( linearMomentum );
}
/******************************************************************
* Returns the local tangential momentum at localPos, of a mass in rotation.
* @todo TODO: improve doc
@ -160,7 +169,7 @@ namespace Oyster { namespace Physics3D
*
* @todo TODO: improve doc
******************************************************************/
inline ::Oyster::Math::Float3 ImpulseTorque( const ::Oyster::Math::Float3 & offset, const ::Oyster::Math::Float3 &impulseForce )
inline ::Oyster::Math::Float3 ImpulseTorque( const ::Oyster::Math::Float3 & impulseForce, const ::Oyster::Math::Float3 &offset )
{
return offset.Cross( impulseForce );
}

View File

@ -19,8 +19,8 @@ Plane & Plane::operator = ( const Plane &plane )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Plane::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Plane(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Plane::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Plane(*this) ); }
bool Plane::Intersects( const ICollideable *target ) const
{

View File

@ -27,7 +27,7 @@ namespace Oyster { namespace Collision3D
Plane & operator = ( const Plane &plane );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -18,8 +18,8 @@ Point & Point::operator = ( const Point &point )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Point::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Point(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Point::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Point(*this) ); }
bool Point::Intersects( const ICollideable *target ) const
{

View File

@ -26,7 +26,7 @@ namespace Oyster { namespace Collision3D
Point & operator = ( const Point &point );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -19,8 +19,8 @@ Ray & Ray::operator = ( const Ray &ray )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Ray::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Ray(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Ray::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Ray(*this) ); }
bool Ray::Intersects( const ICollideable *target ) const
{

View File

@ -35,7 +35,7 @@ namespace Oyster { namespace Collision3D
Ray & operator = ( const Ray &ray );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -96,7 +96,7 @@ namespace Oyster { namespace Physics3D
void SetSize( const ::Oyster::Math::Float3 &widthHeight );
void SetCenter( const ::Oyster::Math::Float3 &p );
void SetImpulsTorque( const ::Oyster::Math::Float3 &t );
void SetImpulseTorque( const ::Oyster::Math::Float3 &t );
void SetAngularMomentum( const ::Oyster::Math::Float3 &h );
void SetAngularImpulseAcceleration( const ::Oyster::Math::Float3 &a );
void SetAngularVelocity( const ::Oyster::Math::Float3 &w );

View File

@ -15,8 +15,8 @@ Sphere & Sphere::operator = ( const Sphere &sphere )
return *this;
}
::Utility::Memory::UniquePointer<ICollideable> Sphere::Clone( ) const
{ return ::Utility::Memory::UniquePointer<ICollideable>( new Sphere(*this) ); }
::Utility::DynamicMemory::UniquePointer<ICollideable> Sphere::Clone( ) const
{ return ::Utility::DynamicMemory::UniquePointer<ICollideable>( new Sphere(*this) ); }
bool Sphere::Intersects( const ICollideable *target ) const
{

View File

@ -26,7 +26,7 @@ namespace Oyster { namespace Collision3D
Sphere & operator = ( const Sphere &sphere );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};

View File

@ -2,7 +2,7 @@
#include "OysterCollision3D.h"
using namespace ::Oyster::Collision3D;
using namespace ::Utility::Memory;
using namespace ::Utility::DynamicMemory;
Universe::Universe() : ICollideable(Type_universe) {}
Universe::~Universe() {}

View File

@ -18,7 +18,7 @@ namespace Oyster { namespace Collision3D
Universe & operator = ( const Universe &universe );
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
bool Intersects( const ICollideable *target ) const;
bool Contains( const ICollideable *target ) const;
};