Merge remote-tracking branch 'origin/Physics' into GameLogicBranch
This commit is contained in:
commit
275c1a96d9
|
@ -0,0 +1,11 @@
|
||||||
|
#define NOMINMAX
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include "OysterMath.h"
|
||||||
|
|
||||||
|
BOOL WINAPI DllMain( _In_ HINSTANCE hinstDLL,
|
||||||
|
_In_ DWORD fdwReason,
|
||||||
|
_In_ LPVOID lpvReserved )
|
||||||
|
{
|
||||||
|
return ::Oyster::Math::IsSupported();
|
||||||
|
}
|
|
@ -90,6 +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>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@ -100,6 +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>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@ -112,6 +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>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@ -126,6 +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>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@ -153,6 +157,7 @@
|
||||||
<ClCompile Include="Implementation\NullBody.cpp" />
|
<ClCompile Include="Implementation\NullBody.cpp" />
|
||||||
<ClCompile Include="Implementation\PhysicsAPI_Impl.cpp" />
|
<ClCompile Include="Implementation\PhysicsAPI_Impl.cpp" />
|
||||||
<ClCompile Include="Implementation\SimpleRigidBody.cpp" />
|
<ClCompile Include="Implementation\SimpleRigidBody.cpp" />
|
||||||
|
<ClCompile Include="DLLMain.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
@ -41,5 +41,8 @@
|
||||||
<ClCompile Include="Implementation\NullBody.cpp">
|
<ClCompile Include="Implementation\NullBody.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="DLLMain.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -4,6 +4,12 @@
|
||||||
#include "OysterCollision3D.h"
|
#include "OysterCollision3D.h"
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
|
|
||||||
|
#if defined DLL_EXPORT
|
||||||
|
#define DLL_USAGE __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define DLL_USAGE __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Oyster
|
namespace Oyster
|
||||||
{
|
{
|
||||||
namespace Physics
|
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.
|
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:
|
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);
|
||||||
|
@ -36,7 +42,7 @@ namespace Oyster
|
||||||
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 );
|
||||||
};
|
};
|
||||||
|
|
||||||
class API
|
class DLL_USAGE API
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef void (*EventAction_Collision)( unsigned int, unsigned int );
|
typedef void (*EventAction_Collision)( unsigned int, unsigned int );
|
||||||
|
@ -200,11 +206,16 @@ namespace Oyster
|
||||||
virtual ~API() {}
|
virtual ~API() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ICustomBody
|
//! documentation in progress
|
||||||
|
class DLL_USAGE ICustomBody
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ICustomBody() {};
|
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<ICustomBody> Clone() const = 0;
|
virtual ::Utility::DynamicMemory::UniquePointer<ICustomBody> Clone() const = 0;
|
||||||
|
|
||||||
virtual bool IsSubscribingCollisions() const = 0;
|
virtual bool IsSubscribingCollisions() const = 0;
|
||||||
|
@ -232,7 +243,7 @@ namespace Oyster
|
||||||
namespace Error
|
namespace Error
|
||||||
{ //! The content in here is used as API return errorvalues.
|
{ //! The content in here is used as API return errorvalues.
|
||||||
|
|
||||||
class NullBody : public ICustomBody
|
class DLL_USAGE NullBody : public ICustomBody
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~NullBody();
|
virtual ~NullBody();
|
||||||
|
|
Loading…
Reference in New Issue