Fixed MomentOfInertia methods
This commit is contained in:
parent
f10f3b0bef
commit
1d94ed0ddc
|
@ -27,29 +27,29 @@ namespace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 & MomentOfInertia::CreateSphereMatrix( const Float mass, const Float radius)
|
Float4x4 & MomentOfInertia::CreateSphereMatrix( const Float mass, const Float radius, ::Oyster::Math::Float4x4 &targetMem )
|
||||||
{
|
{
|
||||||
return Formula::MomentOfInertia::Sphere(mass, radius);
|
return targetMem = Formula::MomentOfInertia::Sphere(mass, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 & MomentOfInertia::CreateHollowSphereMatrix( const Float mass, const Float radius)
|
Float4x4 & MomentOfInertia::CreateHollowSphereMatrix( const Float mass, const Float radius, ::Oyster::Math::Float4x4 &targetMem )
|
||||||
{
|
{
|
||||||
return Formula::MomentOfInertia::HollowSphere(mass, radius);
|
return targetMem = Formula::MomentOfInertia::HollowSphere(mass, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 & MomentOfInertia::CreateCuboidMatrix( const Float mass, const Float height, const Float width, const Float depth )
|
Float4x4 & MomentOfInertia::CreateCuboidMatrix( const Float mass, const Float height, const Float width, const Float depth, ::Oyster::Math::Float4x4 &targetMem )
|
||||||
{
|
{
|
||||||
return Formula::MomentOfInertia::Cuboid(mass, height, width, depth);
|
return targetMem = Formula::MomentOfInertia::Cuboid(mass, height, width, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 & MomentOfInertia::CreateCylinderMatrix( const Float mass, const Float height, const Float radius )
|
Float4x4 & MomentOfInertia::CreateCylinderMatrix( const Float mass, const Float height, const Float radius, ::Oyster::Math::Float4x4 &targetMem )
|
||||||
{
|
{
|
||||||
return Formula::MomentOfInertia::Cylinder(mass, height, radius);
|
return targetMem = Formula::MomentOfInertia::Cylinder(mass, height, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 & MomentOfInertia::CreateRodMatrix( const Float mass, const Float length )
|
Float4x4 & MomentOfInertia::CreateRodMatrix( const Float mass, const Float length, ::Oyster::Math::Float4x4 &targetMem )
|
||||||
{
|
{
|
||||||
return Formula::MomentOfInertia::RodCenter(mass, length);
|
return targetMem = Formula::MomentOfInertia::RodCenter(mass, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
API & API::Instance()
|
API & API::Instance()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef PHYSICS_API_H
|
#ifndef PHYSICS_API_H
|
||||||
#define PHYSICS_API_H
|
#define PHYSICS_API_H
|
||||||
|
|
||||||
#include "OysterCollision3D.h"
|
#include "OysterCollision3D.h"
|
||||||
|
@ -31,15 +31,15 @@ namespace Oyster
|
||||||
class PHYSICS_DLL_USAGE MomentOfInertia
|
class PHYSICS_DLL_USAGE MomentOfInertia
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static ::Oyster::Math::Float4x4 & CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius);
|
static ::Oyster::Math::Float4x4 & CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius, ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() );
|
||||||
|
|
||||||
static ::Oyster::Math::Float4x4 & CreateHollowSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius);
|
static ::Oyster::Math::Float4x4 & CreateHollowSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius, ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() );
|
||||||
|
|
||||||
static ::Oyster::Math::Float4x4 & CreateCuboidMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth );
|
static ::Oyster::Math::Float4x4 & CreateCuboidMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth, ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() );
|
||||||
|
|
||||||
static ::Oyster::Math::Float4x4 & CreateCylinderMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius );
|
static ::Oyster::Math::Float4x4 & CreateCylinderMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius, ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() );
|
||||||
|
|
||||||
static ::Oyster::Math::Float4x4 & CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length );
|
static ::Oyster::Math::Float4x4 & CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length, ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() );
|
||||||
};
|
};
|
||||||
|
|
||||||
class PHYSICS_DLL_USAGE API
|
class PHYSICS_DLL_USAGE API
|
||||||
|
|
Loading…
Reference in New Issue