diff --git a/Code/GamePhysics/DLLMain.cpp b/Code/GamePhysics/DLLMain.cpp new file mode 100644 index 00000000..e46d1c83 --- /dev/null +++ b/Code/GamePhysics/DLLMain.cpp @@ -0,0 +1,11 @@ +#define NOMINMAX + +#include +#include "OysterMath.h" + +BOOL WINAPI DllMain( _In_ HINSTANCE hinstDLL, + _In_ DWORD fdwReason, + _In_ LPVOID lpvReserved ) +{ + return ::Oyster::Math::IsSupported(); +} \ No newline at end of file diff --git a/Code/GamePhysics/GamePhysics.vcxproj b/Code/GamePhysics/GamePhysics.vcxproj index f5493960..5a308fcf 100644 --- a/Code/GamePhysics/GamePhysics.vcxproj +++ b/Code/GamePhysics/GamePhysics.vcxproj @@ -90,6 +90,7 @@ Level3 Disabled $(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories) + _WINDLL;DLL_EXPORT;%(PreprocessorDefinitions) true @@ -100,6 +101,7 @@ Level3 Disabled $(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories) + _WINDLL;DLL_EXPORT;%(PreprocessorDefinitions) true @@ -112,6 +114,7 @@ true true $(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories) + _WINDLL;DLL_EXPORT;%(PreprocessorDefinitions) true @@ -126,6 +129,7 @@ true true $(SolutionDir)Misc;$(SolutionDir)OysterMath;$(SolutionDir)OysterPhysics3D;%(AdditionalIncludeDirectories) + _WINDLL;DLL_EXPORT;%(PreprocessorDefinitions) true @@ -153,6 +157,7 @@ + diff --git a/Code/GamePhysics/GamePhysics.vcxproj.filters b/Code/GamePhysics/GamePhysics.vcxproj.filters index 7118c2b5..83f8bf43 100644 --- a/Code/GamePhysics/GamePhysics.vcxproj.filters +++ b/Code/GamePhysics/GamePhysics.vcxproj.filters @@ -41,5 +41,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/Code/GamePhysics/PhysicsAPI.h b/Code/GamePhysics/PhysicsAPI.h index 9bec064a..23a09a10 100644 --- a/Code/GamePhysics/PhysicsAPI.h +++ b/Code/GamePhysics/PhysicsAPI.h @@ -4,6 +4,12 @@ #include "OysterCollision3D.h" #include "OysterMath.h" +#if defined DLL_EXPORT + #define DLL_USAGE __declspec(dllexport) +#else + #define DLL_USAGE __declspec(dllimport) +#endif + namespace Oyster { namespace Physics @@ -22,7 +28,7 @@ namespace Oyster const float gravity_constant = (const float)6.67284e-11; //!< The _big_G_! ( N(m/kg)^2 ) Used in real gravityforcefields. } - class MomentOfInertia + class DLL_USAGE MomentOfInertia { public: static ::Oyster::Math::Float4x4 & CreateSphereMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius); @@ -36,7 +42,7 @@ namespace Oyster static ::Oyster::Math::Float4x4 & CreateRodMatrix( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length ); }; - class API + class DLL_USAGE API { public: typedef void (*EventAction_Collision)( unsigned int, unsigned int ); @@ -200,11 +206,16 @@ namespace Oyster virtual ~API() {} }; - class ICustomBody + //! documentation in progress + class DLL_USAGE ICustomBody { public: virtual ~ICustomBody() {}; + /******************************************************** + * Creates a complete copy of the current (type)object. + * @return An ICustomBody pointer along with the responsibility to delete. + ********************************************************/ virtual ::Utility::DynamicMemory::UniquePointer Clone() const = 0; virtual bool IsSubscribingCollisions() const = 0; @@ -232,7 +243,7 @@ namespace Oyster namespace Error { //! The content in here is used as API return errorvalues. - class NullBody : public ICustomBody + class DLL_USAGE NullBody : public ICustomBody { public: virtual ~NullBody();