Moar dll fixes for Physics

This commit is contained in:
Dander7BD 2013-11-25 12:21:44 +01:00
parent cc67d227ab
commit bf3dcd088b
3 changed files with 22 additions and 22 deletions

View File

@ -90,7 +90,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDLL;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -101,7 +101,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDLL;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -114,7 +114,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDLL;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -129,7 +129,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WINDLL;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -9,32 +9,32 @@ using namespace ::Utility::DynamicMemory;
API_Impl instance; API_Impl instance;
::Oyster::Math::Float4x4 & __stdcall MomentOfInertia::CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius) ::Oyster::Math::Float4x4 & MomentOfInertia::CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius)
{ {
return ::Oyster::Physics3D::Formula::MomentOfInertia::Sphere(mass, radius); return ::Oyster::Physics3D::Formula::MomentOfInertia::Sphere(mass, radius);
} }
::Oyster::Math::Float4x4 & __stdcall MomentOfInertia::CreateHollowSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius) ::Oyster::Math::Float4x4 & MomentOfInertia::CreateHollowSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius)
{ {
return ::Oyster::Physics3D::Formula::MomentOfInertia::HollowSphere(mass, radius); return ::Oyster::Physics3D::Formula::MomentOfInertia::HollowSphere(mass, radius);
} }
::Oyster::Math::Float4x4 & __stdcall MomentOfInertia::CreateCuboidMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth ) ::Oyster::Math::Float4x4 & MomentOfInertia::CreateCuboidMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth )
{ {
return ::Oyster::Physics3D::Formula::MomentOfInertia::Cuboid(mass, height, width, depth); return ::Oyster::Physics3D::Formula::MomentOfInertia::Cuboid(mass, height, width, depth);
} }
::Oyster::Math::Float4x4 & __stdcall MomentOfInertia::CreateCylinderMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius ) ::Oyster::Math::Float4x4 & MomentOfInertia::CreateCylinderMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius )
{ {
return ::Oyster::Physics3D::Formula::MomentOfInertia::Cylinder(mass, height, radius); return ::Oyster::Physics3D::Formula::MomentOfInertia::Cylinder(mass, height, radius);
} }
::Oyster::Math::Float4x4 & __stdcall MomentOfInertia::CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length ) ::Oyster::Math::Float4x4 & MomentOfInertia::CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length )
{ {
return ::Oyster::Physics3D::Formula::MomentOfInertia::RodCenter(mass, length); return ::Oyster::Physics3D::Formula::MomentOfInertia::RodCenter(mass, length);
} }
API & __stdcall API::Instance() API & API::Instance()
{ {
return instance; return instance;
} }

View File

@ -4,10 +4,10 @@
#include "OysterCollision3D.h" #include "OysterCollision3D.h"
#include "OysterMath.h" #include "OysterMath.h"
#if defined DLL_EXPORT #if defined PHYSICS_DLL_EXPORT
#define DLL_USAGE __declspec(dllexport) #define PHYSICS_DLL_USAGE __declspec(dllexport)
#else #else
#define DLL_USAGE __declspec(dllimport) #define PHYSICS_DLL_USAGE __declspec(dllimport)
#endif #endif
namespace Oyster namespace Oyster
@ -28,28 +28,28 @@ namespace Oyster
const float gravity_constant = (const float)6.67284e-11; //!< The _big_G_! ( N(m/kg)^2 ) Used in real gravityforcefields. const float gravity_constant = (const float)6.67284e-11; //!< The _big_G_! ( N(m/kg)^2 ) Used in real gravityforcefields.
} }
class DLL_USAGE MomentOfInertia class PHYSICS_DLL_USAGE MomentOfInertia
{ {
public: public:
static ::Oyster::Math::Float4x4 & __stdcall 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);
static ::Oyster::Math::Float4x4 & __stdcall 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);
static ::Oyster::Math::Float4x4 & __stdcall 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 );
static ::Oyster::Math::Float4x4 & __stdcall 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 );
static ::Oyster::Math::Float4x4 & __stdcall 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 );
}; };
class DLL_USAGE API class PHYSICS_DLL_USAGE API
{ {
public: public:
typedef void (*EventAction_Collision)( unsigned int, unsigned int ); typedef void (*EventAction_Collision)( unsigned int, unsigned int );
typedef void (*EventAction_Destruction)( unsigned int, ::Utility::DynamicMemory::UniquePointer<ICustomBody> ); typedef void (*EventAction_Destruction)( unsigned int, ::Utility::DynamicMemory::UniquePointer<ICustomBody> );
/** Gets the Physics instance. */ /** Gets the Physics instance. */
static API & __stdcall Instance(); static API & Instance();
/******************************************************** /********************************************************
* Sets the time length of each physics update frame. * Sets the time length of each physics update frame.
@ -207,7 +207,7 @@ namespace Oyster
}; };
//! documentation in progress //! documentation in progress
class DLL_USAGE ICustomBody class PHYSICS_DLL_USAGE ICustomBody
{ {
public: public:
virtual ~ICustomBody() {}; virtual ~ICustomBody() {};