Major overhaul
This commit is contained in:
parent
fb9e33fc9b
commit
99146430a4
298
Code/DanBias.sln
298
Code/DanBias.sln
|
@ -24,6 +24,11 @@ EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkDependencies", "Network\NetworkDependencies\NetworkDependencies.vcxproj", "{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkDependencies", "Network\NetworkDependencies\NetworkDependencies.vcxproj", "{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GamePhysics", "GamePhysics\GamePhysics.vcxproj", "{104FA3E9-94D9-4E1D-A941-28A03BC8A095}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GamePhysics", "GamePhysics\GamePhysics.vcxproj", "{104FA3E9-94D9-4E1D-A941-28A03BC8A095}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2} = {6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274} = {B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A} = {22C0C4D8-6C43-406A-9CDB-76A4F800971A}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DanBiasGame", "Game\DanBiasGame\DanBiasGame.vcxproj", "{2A1BC987-AF42-4500-802D-89CD32FC1309}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DanBiasGame", "Game\DanBiasGame\DanBiasGame.vcxproj", "{2A1BC987-AF42-4500-802D-89CD32FC1309}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -45,14 +50,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameServer", "Game\GameServ
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aDanBiasGameLauncher", "Game\aDanBiasGameLauncher\aDanBiasGameLauncher.vcxproj", "{666FEA52-975F-41CD-B224-B19AF3C0ABBA}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aDanBiasGameLauncher", "Game\aDanBiasGameLauncher\aDanBiasGameLauncher.vcxproj", "{666FEA52-975F-41CD-B224-B19AF3C0ABBA}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Physics", "Physics", "{0D86E569-9C74-47F0-BDB2-390C0C9A084B}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BulletCollision", "Physics\BulletCollision\BulletCollision.vcxproj", "{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BulletDynamics", "Physics\BulletDynamics\BulletDynamics.vcxproj", "{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinearMath", "Physics\LinearMath\LinearMath.vcxproj", "{22C0C4D8-6C43-406A-9CDB-76A4F800971A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
|
MinSizeRel|Mixed Platforms = MinSizeRel|Mixed Platforms
|
||||||
|
MinSizeRel|Win32 = MinSizeRel|Win32
|
||||||
|
MinSizeRel|x64 = MinSizeRel|x64
|
||||||
Release|Mixed Platforms = Release|Mixed Platforms
|
Release|Mixed Platforms = Release|Mixed Platforms
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
|
RelWithDebInfo|Mixed Platforms = RelWithDebInfo|Mixed Platforms
|
||||||
|
RelWithDebInfo|Win32 = RelWithDebInfo|Win32
|
||||||
|
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
@ -61,240 +80,516 @@ Global
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|Win32.Build.0 = Debug|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|x64.ActiveCfg = Debug|x64
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|x64.Build.0 = Debug|x64
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Win32.ActiveCfg = Release|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Win32.Build.0 = Release|Win32
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|Win32.Build.0 = Release|Win32
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|x64.ActiveCfg = Release|x64
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|x64.ActiveCfg = Release|x64
|
||||||
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|x64.Build.0 = Release|x64
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.Release|x64.Build.0 = Release|x64
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{0EC83E64-230E-48EF-B08C-6AC9651B4F82}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Win32.ActiveCfg = Debug|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Win32.Build.0 = Debug|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|x64.ActiveCfg = Debug|x64
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|x64.Build.0 = Debug|x64
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Win32.ActiveCfg = Release|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Win32.Build.0 = Release|Win32
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|Win32.Build.0 = Release|Win32
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|x64.ActiveCfg = Release|x64
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|x64.ActiveCfg = Release|x64
|
||||||
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|x64.Build.0 = Release|x64
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.Release|x64.Build.0 = Release|x64
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{F10CBC03-9809-4CBA-95D8-327C287B18EE}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Win32.ActiveCfg = Debug|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Win32.Build.0 = Debug|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|x64.ActiveCfg = Debug|x64
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|x64.Build.0 = Debug|x64
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Win32.ActiveCfg = Release|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Win32.Build.0 = Release|Win32
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|Win32.Build.0 = Release|Win32
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|x64.ActiveCfg = Release|x64
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|x64.ActiveCfg = Release|x64
|
||||||
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|x64.Build.0 = Release|x64
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.Release|x64.Build.0 = Release|x64
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{4285BD3F-3C6C-4670-B7AF-A29AFEF5F6A8}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Win32.ActiveCfg = Debug|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Win32.Build.0 = Debug|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|x64.ActiveCfg = Debug|x64
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|x64.Build.0 = Debug|x64
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Win32.ActiveCfg = Release|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Win32.Build.0 = Release|Win32
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|Win32.Build.0 = Release|Win32
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|x64.ActiveCfg = Release|x64
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|x64.ActiveCfg = Release|x64
|
||||||
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|x64.Build.0 = Release|x64
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.Release|x64.Build.0 = Release|x64
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{34D6295A-00DD-4B1A-8258-97DA2818EC26}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Win32.ActiveCfg = Debug|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Win32.Build.0 = Debug|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|x64.ActiveCfg = Debug|x64
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|x64.Build.0 = Debug|x64
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Win32.ActiveCfg = Release|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Win32.Build.0 = Release|Win32
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|Win32.Build.0 = Release|Win32
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|x64.ActiveCfg = Release|x64
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|x64.ActiveCfg = Release|x64
|
||||||
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|x64.Build.0 = Release|x64
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.Release|x64.Build.0 = Release|x64
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{35AEA3C0-E0A7-4E1E-88CD-514AA5A442B1}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Win32.ActiveCfg = Debug|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Win32.Build.0 = Debug|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|x64.ActiveCfg = Debug|x64
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|x64.Build.0 = Debug|x64
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Win32.ActiveCfg = Release|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Win32.Build.0 = Release|Win32
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|Win32.Build.0 = Release|Win32
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|x64.ActiveCfg = Release|x64
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|x64.ActiveCfg = Release|x64
|
||||||
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|x64.Build.0 = Release|x64
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.Release|x64.Build.0 = Release|x64
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{7E3990D2-3D94-465C-B58D-64A74B3ECF9B}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Win32.ActiveCfg = Debug|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Win32.Build.0 = Debug|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|x64.ActiveCfg = Debug|x64
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|x64.Build.0 = Debug|x64
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Win32.ActiveCfg = Release|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Win32.Build.0 = Release|Win32
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|Win32.Build.0 = Release|Win32
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|x64.ActiveCfg = Release|x64
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|x64.ActiveCfg = Release|x64
|
||||||
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|x64.Build.0 = Release|x64
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.Release|x64.Build.0 = Release|x64
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{2EC4DDED-8F75-4C86-A10B-E1E8EB29F3EE}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Win32.ActiveCfg = Debug|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Win32.Build.0 = Debug|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|x64.ActiveCfg = Debug|x64
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|x64.Build.0 = Debug|x64
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Win32.ActiveCfg = Release|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Win32.Build.0 = Release|Win32
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|Win32.Build.0 = Release|Win32
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|x64.ActiveCfg = Release|x64
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|x64.ActiveCfg = Release|x64
|
||||||
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|x64.Build.0 = Release|x64
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.Release|x64.Build.0 = Release|x64
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{838B25C2-D19E-49FE-8CB0-9A977CA3C7E8}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Win32.ActiveCfg = Debug|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Win32.Build.0 = Debug|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|x64.ActiveCfg = Debug|x64
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|x64.Build.0 = Debug|x64
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Win32.ActiveCfg = Release|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Win32.Build.0 = Release|Win32
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|Win32.Build.0 = Release|Win32
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|x64.ActiveCfg = Release|x64
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|x64.ActiveCfg = Release|x64
|
||||||
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|x64.Build.0 = Release|x64
|
{6A066806-F43F-4B31-A4E3-57179674F460}.Release|x64.Build.0 = Release|x64
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6A066806-F43F-4B31-A4E3-57179674F460}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Win32.ActiveCfg = Debug|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Win32.Build.0 = Debug|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|x64.ActiveCfg = Debug|x64
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|x64.Build.0 = Debug|x64
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Win32.ActiveCfg = Release|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Win32.Build.0 = Release|Win32
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|Win32.Build.0 = Release|Win32
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|x64.ActiveCfg = Release|x64
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|x64.ActiveCfg = Release|x64
|
||||||
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|x64.Build.0 = Release|x64
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{C5AA09D0-6594-4CD3-BD92-1D380C7B3B50}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Win32.ActiveCfg = Debug|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Win32.Build.0 = Debug|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|x64.ActiveCfg = Debug|x64
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|x64.Build.0 = Debug|x64
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Win32.ActiveCfg = Release|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Win32.Build.0 = Release|Win32
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|Win32.Build.0 = Release|Win32
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|x64.ActiveCfg = Release|x64
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|x64.ActiveCfg = Release|x64
|
||||||
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|x64.Build.0 = Release|x64
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.Release|x64.Build.0 = Release|x64
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{104FA3E9-94D9-4E1D-A941-28A03BC8A095}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.ActiveCfg = Debug|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.Build.0 = Debug|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.ActiveCfg = Debug|x64
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.Build.0 = Debug|x64
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Win32.ActiveCfg = Release|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Win32.Build.0 = Release|Win32
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|Win32.Build.0 = Release|Win32
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|x64.ActiveCfg = Release|x64
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|x64.ActiveCfg = Release|x64
|
||||||
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|x64.Build.0 = Release|x64
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.Release|x64.Build.0 = Release|x64
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{2A1BC987-AF42-4500-802D-89CD32FC1309}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.ActiveCfg = Debug|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.Build.0 = Debug|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.ActiveCfg = Debug|x64
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.Build.0 = Debug|x64
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.ActiveCfg = Release|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.Build.0 = Release|Win32
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.Build.0 = Release|Win32
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|x64.ActiveCfg = Release|x64
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|x64.ActiveCfg = Release|x64
|
||||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|x64.Build.0 = Release|x64
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|x64.Build.0 = Release|x64
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Win32.ActiveCfg = Debug|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Win32.Build.0 = Debug|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|x64.ActiveCfg = Debug|x64
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|x64.Build.0 = Debug|x64
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Win32.ActiveCfg = Release|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Win32.Build.0 = Release|Win32
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|Win32.Build.0 = Release|Win32
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|x64.ActiveCfg = Release|x64
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|x64.ActiveCfg = Release|x64
|
||||||
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|x64.Build.0 = Release|x64
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.Release|x64.Build.0 = Release|x64
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{8690FDDF-C5B7-4C42-A337-BD5243F29B85}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Win32.Build.0 = Debug|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|x64.ActiveCfg = Debug|x64
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|x64.Build.0 = Debug|x64
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Win32.ActiveCfg = Release|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Win32.Build.0 = Release|Win32
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|Win32.Build.0 = Release|Win32
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|x64.ActiveCfg = Release|x64
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|x64.ActiveCfg = Release|x64
|
||||||
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|x64.Build.0 = Release|x64
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.Release|x64.Build.0 = Release|x64
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{460D625F-2AC9-4559-B809-0BA89CEAEDF4}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Win32.ActiveCfg = Debug|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Win32.Build.0 = Debug|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|x64.ActiveCfg = Debug|x64
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|x64.Build.0 = Debug|x64
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Win32.ActiveCfg = Release|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Win32.Build.0 = Release|Win32
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|Win32.Build.0 = Release|Win32
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|x64.ActiveCfg = Release|x64
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|x64.ActiveCfg = Release|x64
|
||||||
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|x64.Build.0 = Release|x64
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.Release|x64.Build.0 = Release|x64
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{DA2AA800-ED64-4649-8B3B-E7F1E3968B78}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Win32.ActiveCfg = Debug|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Win32.Build.0 = Debug|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|x64.ActiveCfg = Debug|x64
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|x64.Build.0 = Debug|x64
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Win32.ActiveCfg = Release|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Win32.Build.0 = Release|Win32
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|Win32.Build.0 = Release|Win32
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|x64.ActiveCfg = Release|x64
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|x64.ActiveCfg = Release|x64
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|x64.Build.0 = Release|x64
|
{060B1890-CBF3-4808-BA99-A4776222093B}.Release|x64.Build.0 = Release|x64
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{060B1890-CBF3-4808-BA99-A4776222093B}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Win32.ActiveCfg = Debug|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Win32.Build.0 = Debug|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|x64.ActiveCfg = Debug|x64
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|x64.Build.0 = Debug|x64
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Win32.ActiveCfg = Release|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Win32.Build.0 = Release|Win32
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|Win32.Build.0 = Release|Win32
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|x64.ActiveCfg = Release|x64
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|x64.ActiveCfg = Release|x64
|
||||||
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|x64.Build.0 = Release|x64
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.Release|x64.Build.0 = Release|x64
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{5128BD77-6472-4C4A-BE6F-724AD0E589C2}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Win32.ActiveCfg = Debug|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Win32.Build.0 = Debug|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|x64.ActiveCfg = Debug|x64
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|x64.Build.0 = Debug|x64
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Win32.ActiveCfg = Release|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Win32.Build.0 = Release|Win32
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|Win32.Build.0 = Release|Win32
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|x64.ActiveCfg = Release|x64
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|x64.ActiveCfg = Release|x64
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|x64.Build.0 = Release|x64
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.Release|x64.Build.0 = Release|x64
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Win32.ActiveCfg = Debug|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Win32.Build.0 = Debug|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|x64.ActiveCfg = Debug|x64
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|x64.Build.0 = Debug|x64
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.MinSizeRel|x64.Build.0 = Release|x64
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Mixed Platforms.Build.0 = Release|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Win32.ActiveCfg = Release|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Win32.Build.0 = Release|Win32
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|Win32.Build.0 = Release|Win32
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|x64.ActiveCfg = Release|x64
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|x64.ActiveCfg = Release|x64
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|x64.Build.0 = Release|x64
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.Release|x64.Build.0 = Release|x64
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||||
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Debug|x64.ActiveCfg = Debug|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.MinSizeRel|Mixed Platforms.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.MinSizeRel|Mixed Platforms.Build.0 = MinSizeRel|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.Release|x64.ActiveCfg = Release|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.RelWithDebInfo|Mixed Platforms.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.RelWithDebInfo|Mixed Platforms.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Debug|x64.ActiveCfg = Debug|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.MinSizeRel|Mixed Platforms.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.MinSizeRel|Mixed Platforms.Build.0 = MinSizeRel|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.Release|x64.ActiveCfg = Release|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.RelWithDebInfo|Mixed Platforms.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.RelWithDebInfo|Mixed Platforms.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.MinSizeRel|Mixed Platforms.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.MinSizeRel|Mixed Platforms.Build.0 = MinSizeRel|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.Release|x64.ActiveCfg = Release|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.RelWithDebInfo|Mixed Platforms.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.RelWithDebInfo|Mixed Platforms.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -311,5 +606,8 @@ Global
|
||||||
{060B1890-CBF3-4808-BA99-A4776222093B} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
{060B1890-CBF3-4808-BA99-A4776222093B} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
||||||
{143BD516-20A1-4890-A3E4-F8BFD02220E7} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
{143BD516-20A1-4890-A3E4-F8BFD02220E7} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
||||||
{666FEA52-975F-41CD-B224-B19AF3C0ABBA} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
{666FEA52-975F-41CD-B224-B19AF3C0ABBA} = {20720CA7-795C-45AD-A302-9383A6DD503A}
|
||||||
|
{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274} = {0D86E569-9C74-47F0-BDB2-390C0C9A084B}
|
||||||
|
{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2} = {0D86E569-9C74-47F0-BDB2-390C0C9A084B}
|
||||||
|
{22C0C4D8-6C43-406A-9CDB-76A4F800971A} = {0D86E569-9C74-47F0-BDB2-390C0C9A084B}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Camera::Camera()
|
Camera::Camera()
|
||||||
{
|
{
|
||||||
this->m_position = Oyster::Math::Float3(0, 50, 0);
|
this->m_position = Oyster::Math::Float3(0, 600, 0);
|
||||||
this->mRight = Oyster::Math::Float3(1, 0, 0);
|
this->mRight = Oyster::Math::Float3(1, 0, 0);
|
||||||
this->mUp = Oyster::Math::Float3(0, 1, 0);
|
this->mUp = Oyster::Math::Float3(0, 1, 0);
|
||||||
this->mLook = Oyster::Math::Float3(0, 0, 1);
|
this->mLook = Oyster::Math::Float3(0, 0, 1);
|
||||||
|
|
|
@ -465,13 +465,14 @@ void GameState::Protocol( ObjPos* pos )
|
||||||
if(privData->object[i]->GetId() == pos->object_ID)
|
if(privData->object[i]->GetId() == pos->object_ID)
|
||||||
{
|
{
|
||||||
privData->object[i]->setPos(world);
|
privData->object[i]->setPos(world);
|
||||||
|
|
||||||
if(i == myId) // playerobj
|
if(i == myId) // playerobj
|
||||||
{
|
{
|
||||||
Oyster::Math::Float3 right = Oyster::Math::Float3(world[0], world[1], world[2]);
|
Oyster::Math::Float3 right = Oyster::Math::Float3(world[0], world[1], world[2]);
|
||||||
Oyster::Math::Float3 up = Oyster::Math::Float3(world[4], world[5], world[6]);
|
Oyster::Math::Float3 up = Oyster::Math::Float3(world[4], world[5], world[6]);
|
||||||
Oyster::Math::Float3 objForward = (Oyster::Math::Float3(world[8], world[9], world[10]));
|
Oyster::Math::Float3 objForward = (Oyster::Math::Float3(world[8], world[9], world[10]));
|
||||||
Oyster::Math::Float3 pos = Oyster::Math::Float3(world[12], world[13], world[14]);
|
Oyster::Math::Float3 pos = Oyster::Math::Float3(world[12], world[13], world[14]);
|
||||||
|
|
||||||
|
|
||||||
Oyster::Math::Float3 cameraLook = camera->GetLook();
|
Oyster::Math::Float3 cameraLook = camera->GetLook();
|
||||||
Oyster::Math::Float3 cameraUp = camera->GetUp();
|
Oyster::Math::Float3 cameraUp = camera->GetUp();
|
||||||
|
@ -490,7 +491,7 @@ void GameState::Protocol( ObjPos* pos )
|
||||||
|
|
||||||
up *= 1;
|
up *= 1;
|
||||||
objForward *= -2;
|
objForward *= -2;
|
||||||
Oyster::Math::Float3 cameraPos = up + pos + objForward;
|
Oyster::Math::Float3 cameraPos = pos + up + objForward;
|
||||||
camera->SetPosition(cameraPos);
|
camera->SetPosition(cameraPos);
|
||||||
|
|
||||||
camera->UpdateViewMatrix();
|
camera->UpdateViewMatrix();
|
||||||
|
|
|
@ -64,11 +64,11 @@ void AttatchmentMassDriver::Update(float dt)
|
||||||
state = heldObject->GetState();
|
state = heldObject->GetState();
|
||||||
Oyster::Math::Float3 ownerPos = owner->GetPosition();
|
Oyster::Math::Float3 ownerPos = owner->GetPosition();
|
||||||
Oyster::Physics::ICustomBody::State ownerState = owner->GetRigidBody()->GetState();
|
Oyster::Physics::ICustomBody::State ownerState = owner->GetRigidBody()->GetState();
|
||||||
Oyster::Math::Float3 up = -ownerState.GetGravityNormal();
|
Oyster::Math::Float3 up = -ownerState.GetOrientation().v[2];
|
||||||
up *= -0.3;
|
up *= -0.3;
|
||||||
Oyster::Math::Float3 pos = ownerPos + up + (owner->GetLookDir().GetNormalized()*5);
|
Oyster::Math::Float3 pos = ownerPos + up + (owner->GetLookDir().GetNormalized()*5);
|
||||||
|
|
||||||
state.SetCenterPosition(pos);
|
state.centerPos = pos;
|
||||||
|
|
||||||
heldObject->SetState(state);
|
heldObject->SetState(state);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage, float
|
||||||
Oyster::Physics::API::Instance().ReleaseFromLimbo(heldObject);
|
Oyster::Physics::API::Instance().ReleaseFromLimbo(heldObject);
|
||||||
pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (700);
|
pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (700);
|
||||||
Oyster::Physics::ICustomBody::State state = heldObject->GetState();
|
Oyster::Physics::ICustomBody::State state = heldObject->GetState();
|
||||||
state.ApplyLinearImpulse((Oyster::Math::Float3)pushForce);
|
//state.ApplyLinearImpulse((Oyster::Math::Float3)pushForce);
|
||||||
heldObject->SetState(state);
|
heldObject->SetState(state);
|
||||||
|
|
||||||
hasObject = false;
|
hasObject = false;
|
||||||
|
@ -118,7 +118,7 @@ void AttatchmentMassDriver::ForceZip(const WEAPON_FIRE &usage, float dt)
|
||||||
Oyster::Physics::Struct::CustomBodyState state = this->owner->GetRigidBody()->GetState();
|
Oyster::Physics::Struct::CustomBodyState state = this->owner->GetRigidBody()->GetState();
|
||||||
|
|
||||||
//do something with state
|
//do something with state
|
||||||
state.ApplyLinearImpulse(Oyster::Math::Float3(this->owner->GetLookDir()) * (500 * dt));
|
//state.ApplyLinearImpulse(Oyster::Math::Float3(this->owner->GetLookDir()) * (500 * dt));
|
||||||
|
|
||||||
this->owner->GetRigidBody()->SetState(state);
|
this->owner->GetRigidBody()->SetState(state);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ void AttatchmentMassDriver::ForcePull(const WEAPON_FIRE &usage, float dt)
|
||||||
|
|
||||||
//if no object has been picked up then suck objects towards you
|
//if no object has been picked up then suck objects towards you
|
||||||
Oyster::Math::Float4 pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (100 * dt);
|
Oyster::Math::Float4 pushForce = Oyster::Math::Float4(this->owner->GetLookDir()) * (100 * dt);
|
||||||
Oyster::Math::Float4x4 aim = Oyster::Math3D::ViewMatrix_LookAtDirection(owner->GetLookDir(), owner->GetRigidBody()->GetGravityNormal(), owner->GetPosition());
|
Oyster::Math::Float4x4 aim = Oyster::Math3D::ViewMatrix_LookAtDirection(owner->GetLookDir(), owner->GetRigidBody()->GetState().GetOrientation().v[2].xyz, owner->GetPosition());
|
||||||
|
|
||||||
Oyster::Math::Float4x4 hitSpace = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/4,1,1,20);
|
Oyster::Math::Float4x4 hitSpace = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/4,1,1,20);
|
||||||
Oyster::Collision3D::Frustrum hitFrustum = Oyster::Collision3D::Frustrum(Oyster::Math3D::ViewProjectionMatrix(aim,hitSpace));
|
Oyster::Collision3D::Frustrum hitFrustum = Oyster::Collision3D::Frustrum(Oyster::Math3D::ViewProjectionMatrix(aim,hitSpace));
|
||||||
|
|
|
@ -68,7 +68,7 @@ using namespace GameLogic;
|
||||||
Oyster::Physics::ICustomBody::State state;
|
Oyster::Physics::ICustomBody::State state;
|
||||||
|
|
||||||
state = obj.GetState();
|
state = obj.GetState();
|
||||||
state.ApplyLinearImpulse(force);
|
//state.ApplyLinearImpulse(force);
|
||||||
obj.SetState(state);
|
obj.SetState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ using namespace GameLogic;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
state = obj->GetState();
|
state = obj->GetState();
|
||||||
state.ApplyLinearImpulse(((forcePushData*)(args))->pushForce);
|
//state.ApplyLinearImpulse(((forcePushData*)(args))->pushForce);
|
||||||
obj->SetState(state);
|
obj->SetState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ Game::PlayerData* Game::CreatePlayer()
|
||||||
int id = InsertObject(this->players, (PlayerData*)0);
|
int id = InsertObject(this->players, (PlayerData*)0);
|
||||||
|
|
||||||
this->players[id] = new PlayerData();
|
this->players[id] = new PlayerData();
|
||||||
this->players[id]->player->GetRigidBody()->SetSubscription(Game::PhysicsOnMove);
|
//this->players[id]->player->GetRigidBody()->SetSubscription(Game::PhysicsOnMove);
|
||||||
|
|
||||||
return this->players[id];
|
return this->players[id];
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ bool Game::NewFrame()
|
||||||
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
API::Instance().Update();
|
API::Instance().UpdateWorld();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < this->players.Size(); i++)
|
for (unsigned int i = 0; i < this->players.Size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ bool Game::NewFrame()
|
||||||
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
API::Instance().Update();
|
API::Instance().UpdateWorld();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < this->players.Size(); i++)
|
for (unsigned int i = 0; i < this->players.Size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ bool Game::NewFrame()
|
||||||
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
if(this->players[i]->player) this->players[i]->player->BeginFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
API::Instance().Update();
|
API::Instance().UpdateWorld();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < this->players.Size(); i++)
|
for (unsigned int i = 0; i < this->players.Size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -159,8 +159,8 @@ void Game::SetSubscription(GameEvent::ObjectEventFunctionType type, GameEvent::O
|
||||||
|
|
||||||
bool Game::Initiate()
|
bool Game::Initiate()
|
||||||
{
|
{
|
||||||
API::Instance().Init((int)pow(2u, 9u), 1u, Oyster::Math::Float3());
|
API::Instance().Init();
|
||||||
API::Instance().SetSubscription(Game::PhysicsOnDestroy);
|
//API::Instance().SetSubscription(Game::PhysicsOnDestroy);
|
||||||
this->initiated = true;
|
this->initiated = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,26 +6,26 @@ using namespace GameLogic;
|
||||||
Game::PlayerData::PlayerData()
|
Game::PlayerData::PlayerData()
|
||||||
{
|
{
|
||||||
//set some stats that are appropriate to a player
|
//set some stats that are appropriate to a player
|
||||||
Oyster::Physics::API::SimpleBodyDescription sbDesc;
|
Oyster::Math::Float3 centerPosition = Oyster::Math::Float3(0,608,-5);
|
||||||
sbDesc.centerPosition = Oyster::Math::Float3(0,608,0);
|
Oyster::Math::Float3 size = Oyster::Math::Float3(0.25f,1.0f,0.5f);
|
||||||
sbDesc.size = Oyster::Math::Float3(0.5f,2,1);
|
Oyster::Math::Float mass = 15;
|
||||||
sbDesc.mass = 70;
|
Oyster::Math::Float restitutionCoeff = 0.5;
|
||||||
sbDesc.restitutionCoeff = 0.5;
|
Oyster::Math::Float frictionCoeff_Static = 0.4;
|
||||||
sbDesc.frictionCoeff_Static = 0.4;
|
Oyster::Math::Float frictionCoeff_Dynamic = 0.3;
|
||||||
sbDesc.frictionCoeff_Dynamic = 0.3;
|
//sbDesc.quaternion = Oyster::Math::Float3(0, Oyster::Math::pi, 0);
|
||||||
sbDesc.rotation = Oyster::Math::Float3(0, Oyster::Math::pi, 0);
|
|
||||||
|
|
||||||
//create rigid body
|
//create rigid body
|
||||||
Oyster::Physics::ICustomBody *rigidBody = Oyster::Physics::API::Instance().CreateRigidBody(sbDesc).Release();
|
Oyster::Physics::ICustomBody* rigidBody = Oyster::Physics::API::Instance().AddCollisionBox(size, Oyster::Math::Float4(0, 0, 0, 1), centerPosition, mass);
|
||||||
|
|
||||||
//create player with this rigid body
|
//create player with this rigid body
|
||||||
this->player = new Player(rigidBody,Player::DefaultCollisionAfter, Player::PlayerCollision, OBJECT_TYPE::OBJECT_TYPE_PLAYER);
|
this->player = new Player(rigidBody,Player::DefaultCollisionAfter, Player::PlayerCollision, OBJECT_TYPE::OBJECT_TYPE_PLAYER);
|
||||||
this->player->GetRigidBody()->SetCustomTag(this);
|
this->player->GetRigidBody()->SetCustomTag(this);
|
||||||
/*Oyster::Physics::ICustomBody::State state;
|
|
||||||
|
Oyster::Physics::ICustomBody::State state;
|
||||||
this->player->GetRigidBody()->GetState(state);
|
this->player->GetRigidBody()->GetState(state);
|
||||||
state.SetRotation(Oyster::Math::Float3(0, Oyster::Math::pi, 0));
|
//state.SetRotation(Oyster::Math::Float3(0, Oyster::Math::pi, 0));
|
||||||
this->player->GetRigidBody()->SetState(state);
|
this->player->GetRigidBody()->SetState(state);
|
||||||
player->EndFrame();*/
|
player->EndFrame();
|
||||||
}
|
}
|
||||||
Game::PlayerData::PlayerData(int playerID,int teamID)
|
Game::PlayerData::PlayerData(int playerID,int teamID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,33 +51,17 @@ void Level::InitiateLevel(float radius)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add level sphere
|
// add level sphere
|
||||||
API::SphericalBodyDescription sbDesc;
|
ICustomBody* rigidBody = API::Instance().AddCollisionSphere(599.2f, Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 0, 0), 0);
|
||||||
sbDesc.centerPosition = Oyster::Math::Float4(0,0,0,1);
|
|
||||||
sbDesc.ignoreGravity = true;
|
|
||||||
sbDesc.radius = 600;
|
|
||||||
sbDesc.mass = 70;
|
|
||||||
sbDesc.frictionCoeff_Static = 0;
|
|
||||||
sbDesc.frictionCoeff_Dynamic = 0;
|
|
||||||
//sbDesc.rotation =
|
|
||||||
ICustomBody* rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
|
||||||
|
|
||||||
ICustomBody::State state;
|
ICustomBody::State state;
|
||||||
rigidBody->GetState(state);
|
rigidBody->GetState(state);
|
||||||
state.SetRestitutionCoeff(0.2);
|
state.restitutionCoeff = 0.2f;
|
||||||
rigidBody->SetState(state);
|
rigidBody->SetState(state);
|
||||||
|
|
||||||
levelObj = new StaticObject(rigidBody, LevelCollisionBefore, LevelCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_WORLD);
|
levelObj = new StaticObject(rigidBody, LevelCollisionBefore, LevelCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_WORLD);
|
||||||
rigidBody->SetCustomTag(levelObj);
|
rigidBody->SetCustomTag(levelObj);
|
||||||
|
|
||||||
//this->dynamicObjects = new DynamicArray< DynamicObject>;
|
|
||||||
// add box
|
|
||||||
API::SimpleBodyDescription sbDesc_TestBox;
|
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(10,320,0,1);
|
|
||||||
sbDesc_TestBox.ignoreGravity = false;
|
|
||||||
|
|
||||||
sbDesc_TestBox.mass = 15;
|
|
||||||
sbDesc_TestBox.size = Oyster::Math::Float4(1, 1, 1, 0);
|
|
||||||
sbDesc_TestBox.inertiaTensor.Cuboid(15, 1, 1, 1);
|
|
||||||
|
|
||||||
|
|
||||||
ICustomBody* rigidBody_TestBox;
|
ICustomBody* rigidBody_TestBox;
|
||||||
|
@ -86,9 +70,7 @@ void Level::InitiateLevel(float radius)
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
for(int i =0; i< nrOfBoxex; i ++)
|
for(int i =0; i< nrOfBoxex; i ++)
|
||||||
{
|
{
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(0,605 + i*5,5,1);
|
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 605 + i*5, 5), 5);
|
||||||
rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
|
||||||
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
|
|
||||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||||
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i]);
|
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i]);
|
||||||
|
@ -96,32 +78,28 @@ void Level::InitiateLevel(float radius)
|
||||||
offset += nrOfBoxex;
|
offset += nrOfBoxex;
|
||||||
for(int i =0; i< nrOfBoxex; i ++)
|
for(int i =0; i< nrOfBoxex; i ++)
|
||||||
{
|
{
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(-20,620, -200 +( i*7),0);
|
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0,5, -605 -( i*5)), 5);
|
||||||
rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
|
||||||
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
|
|
||||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||||
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i+offset]);
|
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i+offset]);
|
||||||
|
|
||||||
}
|
}
|
||||||
offset += nrOfBoxex;
|
offset += nrOfBoxex;
|
||||||
for(int i =0; i< nrOfBoxex; i ++)
|
for(int i =0; i< nrOfBoxex; i ++)
|
||||||
{
|
{
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(200,620 + ( i*7),0,0);
|
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(200, 620 + ( i*7), 0), 5);
|
||||||
rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
|
||||||
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
|
|
||||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||||
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i+offset]);
|
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i+offset]);
|
||||||
}
|
}
|
||||||
offset += nrOfBoxex;
|
offset += nrOfBoxex;
|
||||||
for(int i =0; i< nrOfBoxex; i ++)
|
for(int i =0; i< nrOfBoxex; i ++)
|
||||||
{
|
{
|
||||||
sbDesc_TestBox.centerPosition = Oyster::Math::Float4(5,605 + i*5,0,0);
|
rigidBody_TestBox = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(5, 605 + i*5, 0), 5);
|
||||||
rigidBody_TestBox = API::Instance().CreateRigidBody(sbDesc_TestBox).Release();
|
|
||||||
rigidBody_TestBox->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
|
|
||||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
this->dynamicObjects.Push(new DynamicObject(rigidBody_TestBox,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||||
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i]);
|
rigidBody_TestBox->SetCustomTag(this->dynamicObjects[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,43 +107,19 @@ void Level::InitiateLevel(float radius)
|
||||||
|
|
||||||
|
|
||||||
// add crystal
|
// add crystal
|
||||||
API::SimpleBodyDescription sbDesc_Crystal;
|
|
||||||
sbDesc_Crystal.centerPosition = Oyster::Math::Float4(10, 605, 0, 1);
|
|
||||||
sbDesc_Crystal.ignoreGravity = false;
|
|
||||||
sbDesc_Crystal.mass = 15;
|
|
||||||
sbDesc_Crystal.size = Oyster::Math::Float3(1, 2, 1);
|
|
||||||
sbDesc_Crystal.inertiaTensor.Cuboid(15, 1, 2, 1);
|
|
||||||
|
|
||||||
ICustomBody* rigidBody_Crystal = API::Instance().CreateRigidBody(sbDesc_Crystal).Release();
|
ICustomBody* rigidBody_Crystal = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(10, 605, 0), 5);
|
||||||
rigidBody_Crystal->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
this->dynamicObjects.Push(new DynamicObject(rigidBody_Crystal,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
this->dynamicObjects.Push(new DynamicObject(rigidBody_Crystal,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_BOX));
|
||||||
rigidBody_Crystal->SetCustomTag(this->dynamicObjects[nrOfBoxex]);
|
rigidBody_Crystal->SetCustomTag(this->dynamicObjects[nrOfBoxex]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// add house
|
// add house
|
||||||
API::SimpleBodyDescription sbDesc_House;
|
ICustomBody* rigidBody_House =API::Instance().AddCollisionBox(Oyster::Math::Float3(0.5f, 0.5f, 0.5f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(10, 905, 0), 0);
|
||||||
//sbDesc_House.centerPosition = Oyster::Math::Float4(212, 212, 0, 0);
|
|
||||||
sbDesc_House.centerPosition = Oyster::Math::Float4(-50, 690, 0, 1);
|
|
||||||
sbDesc_House.ignoreGravity = false;
|
|
||||||
sbDesc_House.rotation = Oyster::Math::Float3(0 ,Utility::Value::Radian(90.0f), 0);
|
|
||||||
sbDesc_House.mass = 90;
|
|
||||||
sbDesc_House.size = Oyster::Math::Float3(40,40,40);
|
|
||||||
|
|
||||||
|
|
||||||
ICustomBody* rigidBody_House = API::Instance().CreateRigidBody(sbDesc_House).Release();
|
|
||||||
rigidBody_House->SetSubscription(Level::PhysicsOnMoveLevel);
|
|
||||||
this->staticObjects.Push(new StaticObject(rigidBody_House,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_GENERIC));
|
this->staticObjects.Push(new StaticObject(rigidBody_House,Object::DefaultCollisionBefore, Object::DefaultCollisionAfter, OBJECT_TYPE::OBJECT_TYPE_GENERIC));
|
||||||
rigidBody_House->SetCustomTag(this->staticObjects[0]);
|
rigidBody_House->SetCustomTag(this->staticObjects[0]);
|
||||||
rigidBody_House->GetState(state);
|
|
||||||
Oyster::Math::Float4x4 world = state.GetOrientation();
|
|
||||||
|
|
||||||
|
|
||||||
// add gravitation
|
|
||||||
API::Gravity gravityWell;
|
|
||||||
gravityWell.gravityType = API::Gravity::GravityType_Well;
|
|
||||||
gravityWell.well.mass = 1e17f;
|
|
||||||
gravityWell.well.position = Oyster::Math::Float4(0,0,0,1);
|
|
||||||
API::Instance().AddGravity(gravityWell);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Level::AddPlayerToTeam(Player *player, int teamID)
|
void Level::AddPlayerToTeam(Player *player, int teamID)
|
||||||
|
|
|
@ -15,10 +15,8 @@ const Game *Object::gameInstance = (Game*)(&Game::Instance());
|
||||||
|
|
||||||
Object::Object()
|
Object::Object()
|
||||||
{
|
{
|
||||||
API::SimpleBodyDescription sbDesc;
|
|
||||||
|
|
||||||
this->rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
this->rigidBody = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.0f, 0.0f, 0.0f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 0, 0), 0);
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
|
|
||||||
this->type = OBJECT_TYPE::OBJECT_TYPE_UNKNOWN;
|
this->type = OBJECT_TYPE::OBJECT_TYPE_UNKNOWN;
|
||||||
this->objectID = GID();
|
this->objectID = GID();
|
||||||
|
@ -28,10 +26,7 @@ Object::Object()
|
||||||
|
|
||||||
Object::Object(OBJECT_TYPE type)
|
Object::Object(OBJECT_TYPE type)
|
||||||
{
|
{
|
||||||
API::SimpleBodyDescription sbDesc;
|
this->rigidBody = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.0f, 0.0f, 0.0f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 0, 0), 0);
|
||||||
|
|
||||||
this->rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
this->type = type;
|
this->type = type;
|
||||||
this->objectID = GID();
|
this->objectID = GID();
|
||||||
this->currPhysicsState = this->rigidBody->GetState();
|
this->currPhysicsState = this->rigidBody->GetState();
|
||||||
|
@ -40,7 +35,6 @@ Object::Object(OBJECT_TYPE type)
|
||||||
|
|
||||||
Object::Object(Oyster::Physics::ICustomBody *rigidBody, OBJECT_TYPE type)
|
Object::Object(Oyster::Physics::ICustomBody *rigidBody, OBJECT_TYPE type)
|
||||||
{
|
{
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
this->rigidBody = rigidBody;
|
this->rigidBody = rigidBody;
|
||||||
this->type = type;
|
this->type = type;
|
||||||
this->objectID = GID();
|
this->objectID = GID();
|
||||||
|
@ -50,10 +44,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody, OBJECT_TYPE type)
|
||||||
|
|
||||||
Object::Object(void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
Object::Object(void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
||||||
{
|
{
|
||||||
API::SimpleBodyDescription sbDesc;
|
this->rigidBody = API::Instance().AddCollisionBox(Oyster::Math::Float3(0.0f, 0.0f, 0.0f), Oyster::Math::Float4(0, 0, 0, 1), Oyster::Math::Float3(0, 0, 0), 0);
|
||||||
|
|
||||||
this->rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
|
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
|
|
||||||
this->type = type;
|
this->type = type;
|
||||||
this->objectID = GID();
|
this->objectID = GID();
|
||||||
|
@ -63,11 +54,7 @@ Object::Object(void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE
|
||||||
|
|
||||||
Object::Object(Oyster::Physics::ICustomBody *rigidBody ,void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
Object::Object(Oyster::Physics::ICustomBody *rigidBody ,void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
||||||
{
|
{
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
|
|
||||||
this->rigidBody = rigidBody;
|
this->rigidBody = rigidBody;
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(collisionFuncBefore));
|
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse)(collisionFuncAfter));
|
|
||||||
|
|
||||||
this->type = type;
|
this->type = type;
|
||||||
this->objectID = GID();
|
this->objectID = GID();
|
||||||
|
@ -77,11 +64,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody ,void* collisionFuncBefor
|
||||||
|
|
||||||
Object::Object(Oyster::Physics::ICustomBody *rigidBody ,Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncBefore)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter), Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncAfter)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), OBJECT_TYPE type)
|
Object::Object(Oyster::Physics::ICustomBody *rigidBody ,Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncBefore)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter), Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncAfter)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), OBJECT_TYPE type)
|
||||||
{
|
{
|
||||||
Oyster::Physics::API::Instance().AddObject(rigidBody);
|
|
||||||
|
|
||||||
this->rigidBody = rigidBody;
|
this->rigidBody = rigidBody;
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(collisionFuncBefore));
|
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse)(collisionFuncAfter));
|
|
||||||
|
|
||||||
|
|
||||||
this->type = type;
|
this->type = type;
|
||||||
|
@ -92,7 +75,7 @@ Object::Object(Oyster::Physics::ICustomBody *rigidBody ,Oyster::Physics::ICustom
|
||||||
|
|
||||||
void Object::ApplyLinearImpulse(Oyster::Math::Float3 force)
|
void Object::ApplyLinearImpulse(Oyster::Math::Float3 force)
|
||||||
{
|
{
|
||||||
newPhysicsState.ApplyLinearImpulse(force);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,86 +102,19 @@ Oyster::Physics::ICustomBody* Object::GetRigidBody()
|
||||||
void Object::BeginFrame()
|
void Object::BeginFrame()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
if(currPhysicsState.GetCenterPosition() !=currPhysicsState.GetCenterPosition())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
if(currPhysicsState.GetAngularAxis() !=currPhysicsState.GetAngularAxis())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
this->rigidBody->SetState(this->newPhysicsState);
|
this->rigidBody->SetState(this->newPhysicsState);
|
||||||
}
|
}
|
||||||
// update physic
|
// update physic
|
||||||
void Object::EndFrame()
|
void Object::EndFrame()
|
||||||
{
|
{
|
||||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
this->currPhysicsState = this->rigidBody->GetState();
|
|
||||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
if(currPhysicsState.GetGravityNormal() !=currPhysicsState.GetGravityNormal())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//if(currPhysicsState.GetGravityNormal()!= Float3::null)
|
|
||||||
{
|
|
||||||
Oyster::Math::Float4 axis;
|
|
||||||
Oyster::Math3D::SnapAngularAxis(Oyster::Math::Float4(currPhysicsState.GetAngularAxis(), 0), Oyster::Math::Float4::standard_unit_y, Oyster::Math::Float4(currPhysicsState.GetCenterPosition().GetNormalized(), 0), axis);
|
|
||||||
if(axis !=axis)
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
axis.Normalize();
|
|
||||||
currPhysicsState.SetRotation(axis.xyz);
|
|
||||||
currPhysicsState.SetAngularMomentum(Float3::null);
|
|
||||||
//Oyster::Math::Float3 debug = ::LinearAlgebra3D::WorldAxisOf(::LinearAlgebra3D::Rotation(axis.xyz), Oyster::Math::Float3::standard_unit_y);
|
|
||||||
//debug += currPhysicsState.GetGravityNormal();
|
|
||||||
}
|
|
||||||
//Oyster::Math::Float3 pos = currPhysicsState.GetCenterPosition();
|
|
||||||
//Oyster::Math::Float3 up = -currPhysicsState.GetGravityNormal();
|
|
||||||
//300, 0,0,
|
|
||||||
//1,0,0
|
|
||||||
|
|
||||||
/*if( pos.GetLength() < 301.5f)
|
|
||||||
{
|
|
||||||
Oyster::Math::Float moveUp = 301.5 - pos.GetLength();
|
|
||||||
up *= moveUp;
|
|
||||||
|
|
||||||
currPhysicsState.SetCenterPosition(pos + up);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
if(currPhysicsState.GetLinearMomentum() !=currPhysicsState.GetLinearMomentum())
|
|
||||||
{
|
|
||||||
//error
|
|
||||||
int i =0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->newPhysicsState = this->currPhysicsState;
|
this->newPhysicsState = this->currPhysicsState;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::setBeforeCollisonFunc(Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncBefore)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter))
|
void Object::setBeforeCollisonFunc(Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncBefore)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter))
|
||||||
{
|
{
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(collisionFuncBefore));
|
//this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(collisionFuncBefore));
|
||||||
}
|
}
|
||||||
void Object::setAfterCollisonFunc(Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncAfter)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss))
|
void Object::setAfterCollisonFunc(Oyster::Physics::ICustomBody::SubscriptMessage (*collisionFuncAfter)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss))
|
||||||
{
|
{
|
||||||
|
@ -209,7 +125,7 @@ Oyster::Math::Float3 Object::GetPosition()
|
||||||
{
|
{
|
||||||
Oyster::Physics::ICustomBody::State state;
|
Oyster::Physics::ICustomBody::State state;
|
||||||
state = this->rigidBody->GetState();
|
state = this->rigidBody->GetState();
|
||||||
return state.GetCenterPosition();
|
return state.centerPos;
|
||||||
}
|
}
|
||||||
Oyster::Math::Float4x4 Object::GetOrientation()
|
Oyster::Math::Float4x4 Object::GetOrientation()
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ void Player::EndFrame()
|
||||||
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
||||||
Oyster::Math::Float3 deltaAxis = up * (-dx * 0.02) ;
|
Oyster::Math::Float3 deltaAxis = up * (-dx * 0.02) ;
|
||||||
|
|
||||||
currPhysicsState.AddRotation(deltaAxis);
|
//currPhysicsState.AddRotation(deltaAxis);
|
||||||
dx = 0;
|
dx = 0;
|
||||||
this->newPhysicsState = this->currPhysicsState;
|
this->newPhysicsState = this->currPhysicsState;
|
||||||
}
|
}
|
||||||
|
@ -108,21 +108,21 @@ void Player::MoveForward()
|
||||||
{
|
{
|
||||||
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
||||||
//Oyster::Math::Float3 forward = lookDir;
|
//Oyster::Math::Float3 forward = lookDir;
|
||||||
newPhysicsState.ApplyLinearImpulse(forward * (MOVE_FORCE * this->gameInstance->GetFrameTime()));
|
//newPhysicsState.ApplyLinearImpulse(forward * (MOVE_FORCE * this->gameInstance->GetFrameTime()));
|
||||||
}
|
}
|
||||||
void Player::MoveBackwards()
|
void Player::MoveBackwards()
|
||||||
{
|
{
|
||||||
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
||||||
//Oyster::Math::Float3 forward = lookDir;
|
//Oyster::Math::Float3 forward = lookDir;
|
||||||
newPhysicsState.ApplyLinearImpulse(-forward * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
//newPhysicsState.ApplyLinearImpulse(-forward * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
||||||
}
|
}
|
||||||
void Player::MoveRight()
|
void Player::MoveRight()
|
||||||
{
|
{
|
||||||
//Do cross product with forward vector and negative gravity vector
|
//Do cross product with forward vector and negative gravity vector
|
||||||
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
||||||
//Oyster::Math::Float3 forward = lookDir;
|
//Oyster::Math::Float3 forward = lookDir;
|
||||||
Oyster::Math::Float3 r = (-currPhysicsState.GetGravityNormal()).Cross(forward);
|
//Oyster::Math::Float3 r = (-currPhysicsState.GetGravityNormal()).Cross(forward);
|
||||||
newPhysicsState.ApplyLinearImpulse(-r * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
//newPhysicsState.ApplyLinearImpulse(-r * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
||||||
|
|
||||||
}
|
}
|
||||||
void Player::MoveLeft()
|
void Player::MoveLeft()
|
||||||
|
@ -130,8 +130,8 @@ void Player::MoveLeft()
|
||||||
//Do cross product with forward vector and negative gravity vector
|
//Do cross product with forward vector and negative gravity vector
|
||||||
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
Oyster::Math::Float3 forward = currPhysicsState.GetOrientation().v[2];
|
||||||
//Oyster::Math::Float3 forward = lookDir;
|
//Oyster::Math::Float3 forward = lookDir;
|
||||||
Oyster::Math::Float3 r = (-currPhysicsState.GetGravityNormal()).Cross(forward); //Still get zero
|
//Oyster::Math::Float3 r = (-currPhysicsState.GetGravityNormal()).Cross(forward); //Still get zero
|
||||||
newPhysicsState.ApplyLinearImpulse(r * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
//newPhysicsState.ApplyLinearImpulse(r * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UseWeapon(const WEAPON_FIRE &usage)
|
void Player::UseWeapon(const WEAPON_FIRE &usage)
|
||||||
|
@ -144,7 +144,7 @@ void Player::Respawn(Oyster::Math::Float3 spawnPoint)
|
||||||
this->life = 100;
|
this->life = 100;
|
||||||
this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE;
|
this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE;
|
||||||
this->lookDir = Oyster::Math::Float4(1,0,0);
|
this->lookDir = Oyster::Math::Float4(1,0,0);
|
||||||
this->newPhysicsState.SetCenterPosition(spawnPoint);
|
this->newPhysicsState.centerPos = spawnPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::Rotate(const Oyster::Math3D::Float4 lookDir)
|
void Player::Rotate(const Oyster::Math3D::Float4 lookDir)
|
||||||
|
@ -162,7 +162,7 @@ void Player::Rotate(const Oyster::Math3D::Float4 lookDir)
|
||||||
void Player::Jump()
|
void Player::Jump()
|
||||||
{
|
{
|
||||||
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
Oyster::Math::Float3 up = currPhysicsState.GetOrientation().v[1];
|
||||||
newPhysicsState.ApplyLinearImpulse(up * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
//newPhysicsState.ApplyLinearImpulse(up * MOVE_FORCE * this->gameInstance->GetFrameTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::IsWalking()
|
bool Player::IsWalking()
|
||||||
|
@ -180,7 +180,7 @@ bool Player::IsIdle()
|
||||||
|
|
||||||
Oyster::Math::Float3 Player::GetPosition() const
|
Oyster::Math::Float3 Player::GetPosition() const
|
||||||
{
|
{
|
||||||
return (Oyster::Math::Float3)currPhysicsState.GetCenterPosition();
|
return (Oyster::Math::Float3)currPhysicsState.centerPos;
|
||||||
}
|
}
|
||||||
Oyster::Math::Float4x4 Player::GetOrientation() const
|
Oyster::Math::Float4x4 Player::GetOrientation() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,8 +18,8 @@ StaticObject::StaticObject(OBJECT_TYPE type)
|
||||||
StaticObject::StaticObject(Oyster::Physics::ICustomBody *rigidBody, OBJECT_TYPE type)
|
StaticObject::StaticObject(Oyster::Physics::ICustomBody *rigidBody, OBJECT_TYPE type)
|
||||||
:Object(rigidBody,type)
|
:Object(rigidBody,type)
|
||||||
{
|
{
|
||||||
this->rigidBody->SetGravity(true);
|
//this->rigidBody->SetGravity(true);
|
||||||
this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(CollisionManager::IgnoreCollision));
|
//this->rigidBody->SetSubscription((Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse)(CollisionManager::IgnoreCollision));
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticObject::StaticObject(void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
StaticObject::StaticObject(void* collisionFuncBefore, void* collisionFuncAfter, OBJECT_TYPE type)
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<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;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -97,6 +97,7 @@
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<ModuleDefinitionFile>
|
<ModuleDefinitionFile>
|
||||||
</ModuleDefinitionFile>
|
</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>$(SolutionDir)Physics/Debug/BulletCollision_Debug.lib;$(SolutionDir)Physics/Debug/BulletDynamics_Debug.lib;$(SolutionDir)Physics/Debug/LinearMath_Debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
@ -119,7 +120,7 @@
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<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;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WINDLL;PHYSICS_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
|
@ -31,11 +31,11 @@ Octree& Octree::operator=(const Octree& orig)
|
||||||
|
|
||||||
void Octree::AddObject(UniquePointer< ICustomBody > customBodyRef)
|
void Octree::AddObject(UniquePointer< ICustomBody > customBodyRef)
|
||||||
{
|
{
|
||||||
customBodyRef->SetScene( this );
|
//customBodyRef->SetScene( this );
|
||||||
Data data;
|
Data data;
|
||||||
//Data* tempPtr = this->worldNode.dataPtr;
|
//Data* tempPtr = this->worldNode.dataPtr;
|
||||||
|
|
||||||
data.container = customBodyRef->GetBoundingSphere();
|
//data.container = customBodyRef->GetBoundingSphere();
|
||||||
data.queueRef = -1;
|
data.queueRef = -1;
|
||||||
data.next = NULL;
|
data.next = NULL;
|
||||||
data.prev = NULL;
|
data.prev = NULL;
|
||||||
|
@ -216,7 +216,7 @@ unsigned int Octree::GetTemporaryReferenceOf( const ICustomBody* objRef ) const
|
||||||
|
|
||||||
void Octree::SetAsAltered( unsigned int tempRef )
|
void Octree::SetAsAltered( unsigned int tempRef )
|
||||||
{
|
{
|
||||||
this->leafData[tempRef].container = this->leafData[tempRef].customBodyRef->GetBoundingSphere();
|
//this->leafData[tempRef].container = this->leafData[tempRef].customBodyRef->GetBoundingSphere();
|
||||||
//! @todo TODO: implement stub
|
//! @todo TODO: implement stub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,274 +12,6 @@ using namespace ::Utility::Value;
|
||||||
|
|
||||||
API_Impl API_instance;
|
API_Impl API_instance;
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
/*void OnPossibleCollision( Octree& worldScene, unsigned int protoTempRef, unsigned int deuterTempRef )
|
|
||||||
{
|
|
||||||
auto proto = worldScene.GetCustomBody( protoTempRef );
|
|
||||||
auto deuter = worldScene.GetCustomBody( deuterTempRef );
|
|
||||||
|
|
||||||
Float4 worldPointOfContact;
|
|
||||||
if( proto->Intersects(*deuter, worldPointOfContact) )
|
|
||||||
{
|
|
||||||
// Apply CollisionResponse in pure gather pattern
|
|
||||||
ICustomBody::State protoState; proto->GetState( protoState );
|
|
||||||
ICustomBody::State deuterState; deuter->GetState( deuterState );
|
|
||||||
|
|
||||||
// calc from perspective of deuter.
|
|
||||||
Float4 normal = (worldPointOfContact - Float4(deuterState.GetCenterPosition(), 1.0f )); // Init value is only borrowed
|
|
||||||
//if( normal.Dot(normal) > 0.0f )
|
|
||||||
{
|
|
||||||
deuter->GetNormalAt( worldPointOfContact, normal );
|
|
||||||
}
|
|
||||||
//else
|
|
||||||
//{ // special case: deuter is completly contained within proto or they have overlapping centers.
|
|
||||||
|
|
||||||
// normal = Float4( protoState.GetCenterPosition() - deuterState.GetCenterPosition(), 0.0f );
|
|
||||||
// if( normal.Dot(normal) == 0.0f )
|
|
||||||
// { // they have overlapping centers. Rebound at least
|
|
||||||
// // calculate and store time interpolation value, for later rebound.
|
|
||||||
// proto->SetTimeOfContact( worldPointOfContact );
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // borrowing the negated normal of proto.
|
|
||||||
// proto->GetNormalAt( worldPointOfContact, normal );
|
|
||||||
// normal = -normal;
|
|
||||||
//}
|
|
||||||
normal.Normalize();
|
|
||||||
|
|
||||||
Float4 protoG = Float4(protoState.GetLinearMomentum( worldPointOfContact.xyz ), 0),
|
|
||||||
deuterG = Float4(deuterState.GetLinearMomentum( worldPointOfContact.xyz ), 0);
|
|
||||||
|
|
||||||
if( normal != normal ) // debug: trap
|
|
||||||
const char *breakpoint = "This should never happen";
|
|
||||||
|
|
||||||
if( protoG != protoG ) // debug: trap
|
|
||||||
const char *breakpoint = "This should never happen";
|
|
||||||
|
|
||||||
if( deuterG != deuterG ) // debug: trap
|
|
||||||
const char *breakpoint = "This should never happen";
|
|
||||||
|
|
||||||
Float protoG_Magnitude = protoG.Dot( normal ),
|
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
|
||||||
|
|
||||||
// if they are not relatively moving towards eachother, there is no collision
|
|
||||||
Float deltaPos = normal.Dot( Float4(deuterState.GetCenterPosition(), 1) - Float4(protoState.GetCenterPosition(), 1) );
|
|
||||||
if( deltaPos < 0.0f )
|
|
||||||
{
|
|
||||||
if( protoG_Magnitude >= deuterG_Magnitude )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( deltaPos > 0.0f )
|
|
||||||
{
|
|
||||||
if( protoG_Magnitude <= deuterG_Magnitude )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( proto->CallSubscription_BeforeCollisionResponse(proto) == ICustomBody::SubscriptMessage_ignore_collision_response )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// PLayerHAck
|
|
||||||
if( proto->CallSubscription_BeforeCollisionResponse(proto) == ICustomBody::SubscriptMessage_player_collision_response )
|
|
||||||
{
|
|
||||||
//Float3 linearMomentum = protoState.GetLinearMomentum();
|
|
||||||
//Float3 up = -protoState.GetGravityNormal();
|
|
||||||
//Float3 upForce = (linearMomentum.Dot(up) * up);
|
|
||||||
|
|
||||||
//Float3 noBounceForce = linearMomentum - upForce;
|
|
||||||
//protoState.SetLinearMomentum(noBounceForce);
|
|
||||||
//proto->SetState(protoState);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// calculate and store time interpolation value, for later rebound.
|
|
||||||
proto->SetTimeOfContact( worldPointOfContact );
|
|
||||||
|
|
||||||
// bounce
|
|
||||||
Float4 bounceD = normal * -Formula::CollisionResponse::Bounce( deuterState.GetRestitutionCoeff(),
|
|
||||||
deuterState.GetMass(), deuterG_Magnitude,
|
|
||||||
protoState.GetMass(), protoG_Magnitude );
|
|
||||||
|
|
||||||
|
|
||||||
// calc from perspective of proto
|
|
||||||
|
|
||||||
normal = (worldPointOfContact - Float4(protoState.GetCenterPosition(), 1.0f )).GetNormalized();
|
|
||||||
//if( normal.Dot(normal) > 0.0f )
|
|
||||||
{
|
|
||||||
proto->GetNormalAt( worldPointOfContact, normal );
|
|
||||||
protoG_Magnitude = protoG.Dot( normal );
|
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
|
||||||
normal.Normalize();
|
|
||||||
}
|
|
||||||
//else
|
|
||||||
//{ // special case: proto is completly contained within deuter.
|
|
||||||
// // borrowing the negated normal of deuter.
|
|
||||||
// deuter->GetNormalAt( worldPointOfContact, normal );
|
|
||||||
// normal = -normal;
|
|
||||||
// protoG_Magnitude = -protoG_Magnitude;
|
|
||||||
// deuterG_Magnitude = -deuterG_Magnitude;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if( normal != normal ) // debug: trap
|
|
||||||
const char *breakpoint = "This should never happen";
|
|
||||||
|
|
||||||
// bounce
|
|
||||||
Float4 bounceP = normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(),
|
|
||||||
protoState.GetMass(), protoG_Magnitude,
|
|
||||||
deuterState.GetMass(), deuterG_Magnitude );
|
|
||||||
|
|
||||||
Float4 bounce = Average( bounceD, bounceP );
|
|
||||||
|
|
||||||
Float4 friction = Formula::CollisionResponse::Friction( protoG_Magnitude, normal,
|
|
||||||
Float4(protoState.GetLinearMomentum(), 0), protoState.GetFrictionCoeff_Static(), protoState.GetFrictionCoeff_Kinetic(), protoState.GetMass(),
|
|
||||||
Float4(deuterState.GetLinearMomentum(), 0), deuterState.GetFrictionCoeff_Static(), deuterState.GetFrictionCoeff_Kinetic(), deuterState.GetMass());
|
|
||||||
|
|
||||||
if(protoState.GetMass() == 70)
|
|
||||||
{
|
|
||||||
const char* breakPoint = "here";
|
|
||||||
}
|
|
||||||
|
|
||||||
Float kineticEnergyPBefore = Oyster::Physics3D::Formula::LinearKineticEnergy( protoState.GetMass(), protoState.GetLinearMomentum()/protoState.GetMass() );
|
|
||||||
|
|
||||||
protoState.ApplyImpulse( bounce.xyz, worldPointOfContact.xyz, normal.xyz );
|
|
||||||
proto->SetState( protoState );
|
|
||||||
|
|
||||||
Float kineticEnergyPAFter = Oyster::Physics3D::Formula::LinearKineticEnergy( protoState.GetMass(), (protoState.GetLinearMomentum() + protoState.GetLinearImpulse())/protoState.GetMass() );
|
|
||||||
|
|
||||||
proto->CallSubscription_AfterCollisionResponse( deuter, kineticEnergyPBefore - kineticEnergyPAFter );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}*/
|
|
||||||
void OnPossibleCollision( Octree& worldScene, unsigned int protoTempRef, unsigned int deuterTempRef )
|
|
||||||
{
|
|
||||||
auto proto = worldScene.GetCustomBody( protoTempRef );
|
|
||||||
auto deuter = worldScene.GetCustomBody( deuterTempRef );
|
|
||||||
|
|
||||||
Float4 worldPointOfContact;
|
|
||||||
if( proto->Intersects(*deuter, worldPointOfContact) )
|
|
||||||
{
|
|
||||||
// Apply CollisionResponse in pure gather pattern
|
|
||||||
ICustomBody::State protoState; proto->GetState( protoState );
|
|
||||||
ICustomBody::State deuterState; deuter->GetState( deuterState );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Float4 normal = deuter->GetNormalAt(worldPointOfContact);
|
|
||||||
if(normal == Float4::null)
|
|
||||||
{
|
|
||||||
normal = Float4(deuterState.GetCenterPosition(), 1) - Float4(protoState.GetCenterPosition(), 1);
|
|
||||||
}
|
|
||||||
normal.Normalize();
|
|
||||||
|
|
||||||
Float4 protoG = Float4(protoState.GetLinearMomentum( worldPointOfContact.xyz ), 0),
|
|
||||||
deuterG = Float4(deuterState.GetLinearMomentum( worldPointOfContact.xyz ), 0);
|
|
||||||
|
|
||||||
Float protoG_Magnitude = protoG.Dot( normal ),
|
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
|
||||||
|
|
||||||
// If true the object is inside the world
|
|
||||||
if(worldPointOfContact.GetLength() < 600 && protoState.GetCenterPosition().GetLength() != 0)
|
|
||||||
{
|
|
||||||
Float overlap = 600 - worldPointOfContact.GetLength();
|
|
||||||
Float3 newPos = overlap*worldPointOfContact.GetNormalized();
|
|
||||||
protoState.SetCenterPosition(protoState.GetCenterPosition() + newPos);
|
|
||||||
protoState.SetLinearMomentum(Float3(0, 0, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
// If they are not relatively moving towards eachother, there is no collision
|
|
||||||
Float deltaPos = normal.Dot( Float4(deuterState.GetCenterPosition(), 1) - Float4(protoState.GetCenterPosition(), 1) );
|
|
||||||
if( deltaPos < 0.0f )
|
|
||||||
{
|
|
||||||
if( protoG_Magnitude >= deuterG_Magnitude )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( deltaPos > 0.0f )
|
|
||||||
{
|
|
||||||
if( protoG_Magnitude <= deuterG_Magnitude )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Proto
|
|
||||||
normal = -proto->GetNormalAt(worldPointOfContact);
|
|
||||||
if(normal == Float4::null)
|
|
||||||
{
|
|
||||||
normal = Float4(protoState.GetCenterPosition(), 1) - Float4(deuterState.GetCenterPosition(), 1);
|
|
||||||
}
|
|
||||||
normal.Normalize();
|
|
||||||
|
|
||||||
// Calculate and apply friction to rigid body
|
|
||||||
Float4 friction = Formula::CollisionResponse::Friction( protoG_Magnitude, normal,
|
|
||||||
Float4(protoState.GetLinearMomentum(), 0), protoState.GetFrictionCoeff_Static(), protoState.GetFrictionCoeff_Kinetic(), protoState.GetMass(),
|
|
||||||
Float4(deuterState.GetLinearMomentum(), 0), deuterState.GetFrictionCoeff_Static(), deuterState.GetFrictionCoeff_Kinetic(), deuterState.GetMass());
|
|
||||||
|
|
||||||
//protoState.ApplyFriction( -friction.xyz );
|
|
||||||
|
|
||||||
// If no other collision response is wanted then this will stop the bounce
|
|
||||||
if( proto->CallSubscription_BeforeCollisionResponse(proto) == ICustomBody::SubscriptMessage_ignore_collision_response )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Calaculate bounce
|
|
||||||
Float4 bounce = normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(),
|
|
||||||
protoState.GetMass(), protoG_Magnitude,
|
|
||||||
deuterState.GetMass(), deuterG_Magnitude );
|
|
||||||
// If bounce is not big enough to matter, set to 0
|
|
||||||
if( abs(bounce.x) < 0.001 )
|
|
||||||
{
|
|
||||||
bounce.x = 0;
|
|
||||||
}
|
|
||||||
if( abs(bounce.y) < 0.001 )
|
|
||||||
{
|
|
||||||
bounce.y = 0;
|
|
||||||
}
|
|
||||||
if( abs(bounce.z) < 0.001 )
|
|
||||||
{
|
|
||||||
bounce.z = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( bounce != bounce)
|
|
||||||
{
|
|
||||||
const char* breakpoint = "STOP";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate kinetic energy before impulse is applied
|
|
||||||
Float kineticEnergyBefore = Oyster::Physics3D::Formula::LinearKineticEnergy( protoState.GetMass(), protoState.GetLinearMomentum()/protoState.GetMass() );
|
|
||||||
|
|
||||||
// Apply the bounce as impulse
|
|
||||||
protoState.ApplyImpulse( bounce.xyz, worldPointOfContact.xyz, normal.xyz );
|
|
||||||
proto->SetState( protoState );
|
|
||||||
|
|
||||||
// Calculate kinetic energy after impulse is applied
|
|
||||||
Float kineticEnergyAfter = Oyster::Physics3D::Formula::LinearKineticEnergy( protoState.GetMass(), (protoState.GetLinearMomentum() + protoState.GetLinearImpulse())/protoState.GetMass() );
|
|
||||||
|
|
||||||
// Call a collision function with kinetic energy loss
|
|
||||||
proto->CallSubscription_AfterCollisionResponse( deuter, kineticEnergyBefore - kineticEnergyAfter );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
API & API::Instance()
|
API & API::Instance()
|
||||||
{
|
{
|
||||||
return API_instance;
|
return API_instance;
|
||||||
|
@ -287,280 +19,186 @@ API & API::Instance()
|
||||||
|
|
||||||
API_Impl::API_Impl()
|
API_Impl::API_Impl()
|
||||||
{
|
{
|
||||||
this->gravityConstant = Constant::gravity_constant;
|
this->broadphase = NULL;
|
||||||
this->epsilon = Constant::epsilon;
|
this->collisionConfiguration = NULL;
|
||||||
this->updateFrameLength = 1.0f / 120.0f;
|
this->dispatcher = NULL;
|
||||||
this->destructionAction = Default::EventAction_Destruction;
|
this->solver = NULL;
|
||||||
this->gravity = ::std::vector<Gravity>();
|
this->dynamicsWorld = NULL;
|
||||||
this->worldScene = Octree();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
API_Impl::~API_Impl() {}
|
API_Impl::~API_Impl()
|
||||||
|
|
||||||
void API_Impl::Init( unsigned int numObjects, unsigned int numGravityWells , const Float3 &worldSize )
|
|
||||||
{
|
{
|
||||||
unsigned char numLayers = 4; //!< @todo TODO: calc numLayers from worldSize
|
delete this->dynamicsWorld;
|
||||||
this->gravity.resize( 0 );
|
this->dynamicsWorld = NULL;
|
||||||
this->gravity.reserve( numGravityWells );
|
delete this->solver;
|
||||||
this->worldScene = Octree( numObjects, numLayers, worldSize );
|
this->solver = NULL;
|
||||||
}
|
delete this->dispatcher;
|
||||||
|
this->dispatcher = NULL;
|
||||||
|
delete this->collisionConfiguration;
|
||||||
|
this->collisionConfiguration = NULL;
|
||||||
|
delete this->broadphase;
|
||||||
|
this->broadphase = NULL;
|
||||||
|
|
||||||
void API_Impl::SetFrameTimeLength( float deltaTime )
|
for(int i = 0; i < this->customBodies.size(); i++)
|
||||||
{
|
|
||||||
this->updateFrameLength = deltaTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::SetGravityConstant( float g )
|
|
||||||
{
|
|
||||||
this->gravityConstant = g;
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::SetEpsilon( float e )
|
|
||||||
{
|
|
||||||
this->epsilon = e;
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::SetSubscription( API::EventAction_Destruction functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
{
|
||||||
this->destructionAction = functionPointer;
|
delete this->customBodies[i];
|
||||||
}
|
this->customBodies[i] = NULL;
|
||||||
else
|
|
||||||
{
|
|
||||||
this->destructionAction = Default::EventAction_Destruction;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float API_Impl::GetFrameTimeLength() const
|
// Bullet physics
|
||||||
|
ICustomBody* API_Impl::AddCollisionSphere(float radius, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass)
|
||||||
{
|
{
|
||||||
return this->updateFrameLength;
|
SimpleRigidBody* body = new SimpleRigidBody;
|
||||||
|
|
||||||
|
// Add collision shape
|
||||||
|
btCollisionShape* collisionShape = new btSphereShape(radius);
|
||||||
|
body->SetCollisionShape(collisionShape);
|
||||||
|
|
||||||
|
// Add motion state
|
||||||
|
btDefaultMotionState* motionState = new btDefaultMotionState(btTransform(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w),btVector3(position.x, position.y, position.z)));
|
||||||
|
body->SetMotionState(motionState);
|
||||||
|
|
||||||
|
// Add rigid body
|
||||||
|
btVector3 fallInertia(0, 0, 0);
|
||||||
|
collisionShape->calculateLocalInertia(mass, fallInertia);
|
||||||
|
btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, motionState, collisionShape, fallInertia);
|
||||||
|
btRigidBody* rigidBody = new btRigidBody(rigidBodyCI);
|
||||||
|
rigidBody->setUserPointer(body);
|
||||||
|
body->SetRigidBody(rigidBody);
|
||||||
|
|
||||||
|
// Add rigid body to world
|
||||||
|
this->dynamicsWorld->addRigidBody(rigidBody);
|
||||||
|
this->customBodies.push_back(body);
|
||||||
|
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
ICustomBody* API_Impl::AddCollisionBox(Float3 halfSize, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass)
|
||||||
|
{
|
||||||
|
SimpleRigidBody* body = new SimpleRigidBody;
|
||||||
|
|
||||||
|
// Add collision shape
|
||||||
|
btCollisionShape* collisionShape = new btBoxShape(btVector3(halfSize.x, halfSize.y, halfSize.z));
|
||||||
|
body->SetCollisionShape(collisionShape);
|
||||||
|
|
||||||
|
// Add motion state
|
||||||
|
btDefaultMotionState* motionState = new btDefaultMotionState(btTransform(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w),btVector3(position.x, position.y, position.z)));
|
||||||
|
body->SetMotionState(motionState);
|
||||||
|
|
||||||
|
// Add rigid body
|
||||||
|
btVector3 fallInertia(0, 0, 0);
|
||||||
|
collisionShape->calculateLocalInertia(mass, fallInertia);
|
||||||
|
btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, motionState, collisionShape, fallInertia);
|
||||||
|
btRigidBody* rigidBody = new btRigidBody(rigidBodyCI);
|
||||||
|
rigidBody->setUserPointer(body);
|
||||||
|
body->SetRigidBody(rigidBody);
|
||||||
|
|
||||||
|
// Add rigid body to world
|
||||||
|
this->dynamicsWorld->addRigidBody(rigidBody);
|
||||||
|
this->customBodies.push_back(body);
|
||||||
|
|
||||||
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
void API_Impl::Update()
|
void API_Impl::UpdateWorld()
|
||||||
{
|
{
|
||||||
|
this->dynamicsWorld->stepSimulation(1.0f/120.0f, 1.0f, 1.0f/120.0f);
|
||||||
|
|
||||||
ICustomBody::State state;
|
ICustomBody::State state;
|
||||||
::std::vector<ICustomBody*> updateList;
|
|
||||||
|
|
||||||
// Fetch objects in universe
|
for(unsigned int i = 0; i < this->customBodies.size(); i++ )
|
||||||
this->worldScene.Sample( Universe(), updateList );
|
|
||||||
|
|
||||||
// Change momentum for all rigid bodies
|
|
||||||
for( unsigned int i = 0; i < updateList.size(); i++ )
|
|
||||||
{
|
{
|
||||||
ICustomBody* proto = updateList[i];
|
this->customBodies[i]->GetState(state);
|
||||||
// Step 1: Apply gravity to rigid body
|
|
||||||
Float4 gravityImpulse = Float4::null;
|
|
||||||
proto->GetState( state );
|
|
||||||
|
|
||||||
Float4 deltaPosGrav = Float4( this->gravity[0].well.position, 1.0f ) - Float4( state.GetCenterPosition(), 1.0f );
|
btTransform trans;
|
||||||
Float rSquared = deltaPosGrav.Dot( deltaPosGrav );
|
dynamic_cast<SimpleRigidBody*>(this->customBodies[i])->GetMotionState()->getWorldTransform(trans);
|
||||||
if( rSquared != 0.0 )
|
state.centerPos = Float3(trans.getOrigin().x(), trans.getOrigin().y(), trans.getOrigin().z());
|
||||||
{
|
state.quaternion = Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w());
|
||||||
Float force = 9.82f*10.0f;
|
|
||||||
gravityImpulse += (this->updateFrameLength*force)*deltaPosGrav.GetNormalized();
|
|
||||||
}
|
|
||||||
|
|
||||||
Float posLength = state.GetCenterPosition().GetLength();
|
this->customBodies[i]->SetState(state);
|
||||||
if( gravityImpulse != Float4::null && posLength - 600 > state.GetReach().GetLength() )
|
|
||||||
{
|
|
||||||
state.ApplyLinearImpulse( gravityImpulse.xyz );
|
|
||||||
state.SetGravityNormal( gravityImpulse.GetNormalized().xyz );
|
|
||||||
proto->SetState( state );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 2: Step through octree and apply collision responses to rigid body
|
|
||||||
this->worldScene.Visit( proto, OnPossibleCollision );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go through all rigid bodies and move them according to their momentums
|
int numManifolds = this->dynamicsWorld->getDispatcher()->getNumManifolds();
|
||||||
for( unsigned int i = 0; i < updateList.size(); i++ )
|
for (int i=0;i<numManifolds;i++)
|
||||||
{
|
{
|
||||||
auto proto = updateList[i];
|
btPersistentManifold* contactManifold = this->dynamicsWorld->getDispatcher()->getManifoldByIndexInternal(i);
|
||||||
|
const btCollisionObject* obA = contactManifold->getBody0();
|
||||||
|
const btCollisionObject* obB = contactManifold->getBody1();
|
||||||
|
|
||||||
switch( proto->Update(this->updateFrameLength) )
|
ICustomBody* bodyA = (ICustomBody*)obA->getUserPointer();
|
||||||
|
ICustomBody* bodyB = (ICustomBody*)obB->getUserPointer();
|
||||||
|
|
||||||
|
dynamic_cast<SimpleRigidBody*>(bodyA)->CallSubsciptMessage(bodyA, bodyB, 0.0f);
|
||||||
|
dynamic_cast<SimpleRigidBody*>(bodyB)->CallSubsciptMessage(bodyB, bodyA, 0.0f);
|
||||||
|
|
||||||
|
int numContacts = contactManifold->getNumContacts();
|
||||||
|
for (int j=0;j<numContacts;j++)
|
||||||
{
|
{
|
||||||
case UpdateState_altered:
|
btManifoldPoint& pt = contactManifold->getContactPoint(j);
|
||||||
// Moves the container in the octree to the new rigid body position
|
if (pt.getDistance()<0.f)
|
||||||
this->worldScene.SetAsAltered( this->worldScene.GetTemporaryReferenceOf(proto) );
|
{
|
||||||
proto->CallSubscription_Move();
|
const btVector3& ptA = pt.getPositionWorldOnA();
|
||||||
case UpdateState_resting:
|
const btVector3& ptB = pt.getPositionWorldOnB();
|
||||||
default:
|
const btVector3& normalOnB = pt.m_normalWorldOnB;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void API_Impl::Init()
|
||||||
|
{
|
||||||
|
this->broadphase = new btDbvtBroadphase();
|
||||||
|
this->collisionConfiguration = new btDefaultCollisionConfiguration();
|
||||||
|
this->dispatcher = new btCollisionDispatcher(this->collisionConfiguration);
|
||||||
|
this->solver = new btSequentialImpulseConstraintSolver;
|
||||||
|
this->dynamicsWorld = new btDiscreteDynamicsWorld(this->dispatcher,this->broadphase,this->solver,this->collisionConfiguration);
|
||||||
|
this->dynamicsWorld->setGravity(btVector3(0,-10,0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool API_Impl::IsInLimbo( const ICustomBody* objRef )
|
bool API_Impl::IsInLimbo( const ICustomBody* objRef )
|
||||||
{
|
{
|
||||||
return this->worldScene.IsInLimbo( objRef );
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void API_Impl::MoveToLimbo( const ICustomBody* objRef )
|
void API_Impl::MoveToLimbo( const ICustomBody* objRef )
|
||||||
{
|
{
|
||||||
this->worldScene.MoveToLimbo( objRef );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void API_Impl::ReleaseFromLimbo( const ICustomBody* objRef )
|
void API_Impl::ReleaseFromLimbo( const ICustomBody* objRef )
|
||||||
{
|
{
|
||||||
this->worldScene.ReleaseFromLimbo( objRef );
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::AddObject( ::Utility::DynamicMemory::UniquePointer<ICustomBody> handle )
|
|
||||||
{
|
|
||||||
this->worldScene.AddObject( handle );
|
|
||||||
}
|
|
||||||
|
|
||||||
UniquePointer<ICustomBody> API_Impl::ExtractObject( const ICustomBody* objRef )
|
|
||||||
{
|
|
||||||
return this->worldScene.Extract( objRef );
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::DestroyObject( const ICustomBody* objRef )
|
|
||||||
{
|
|
||||||
UniquePointer<ICustomBody> object = this->worldScene.Extract( objRef );
|
|
||||||
if( object )
|
|
||||||
{
|
|
||||||
this->destructionAction( object );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::AddGravity( const API::Gravity &g )
|
|
||||||
{
|
|
||||||
this->gravity.push_back( g );
|
|
||||||
}
|
|
||||||
|
|
||||||
void API_Impl::RemoveGravity( const API::Gravity &g )
|
|
||||||
{
|
|
||||||
for( ::std::vector<Gravity>::size_type i = this->gravity.size() - 1; i >= 0; --i )
|
|
||||||
{
|
|
||||||
if( g == this->gravity[i] )
|
|
||||||
{
|
|
||||||
int end = this->gravity.size() - 1;
|
|
||||||
this->gravity[i] = this->gravity[end];
|
|
||||||
this->gravity.resize( end );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void API_Impl::ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) )
|
void API_Impl::ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) )
|
||||||
{
|
{
|
||||||
this->worldScene.Visit(collideable, args, hitAction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//void API_Impl::ApplyForceAt( const ICustomBody* objRef, const Float3 &worldPos, const Float3 &worldF )
|
namespace Oyster
|
||||||
//{
|
{
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
namespace Physics
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// //this->worldScene.GetCustomBody( tempRef )->Apply //!< @todo TODO: need function
|
|
||||||
// this->worldScene.SetAsAltered( tempRef );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetMomentOfInertiaTensor_KeepVelocity( const ICustomBody* objRef, const Float4x4 &localI )
|
|
||||||
//{ // deprecated
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetMomentOfInertiaTensor_KeepVelocity( localI );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetMomentOfInertiaTensor_KeepMomentum( const ICustomBody* objRef, const Float4x4 &localI )
|
|
||||||
//{ // deprecated
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetMomentOfInertiaTensor_KeepMomentum( localI );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetMass_KeepVelocity( const ICustomBody* objRef, Float m )
|
|
||||||
//{ // deprecated
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetMass_KeepVelocity( m );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetMass_KeepMomentum( const ICustomBody* objRef, Float m )
|
|
||||||
//{ // deprecated
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetMass_KeepMomentum( m );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetCenter( const ICustomBody* objRef, const Float3 &worldPos )
|
|
||||||
//{
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// //this->worldScene.GetCustomBody( tempRef )->Set //!< @todo TODO: need function
|
|
||||||
// this->worldScene.EvaluatePosition( tempRef );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetRotation( const ICustomBody* objRef, const Float4x4 &rotation )
|
|
||||||
//{
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetRotation( rotation );
|
|
||||||
// this->worldScene.EvaluatePosition( tempRef );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetOrientation( const ICustomBody* objRef, const Float4x4 &orientation )
|
|
||||||
//{
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetOrientation( orientation );
|
|
||||||
// this->worldScene.EvaluatePosition( tempRef );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void API_Impl::SetSize( const ICustomBody* objRef, const Float3 &size )
|
|
||||||
//{
|
|
||||||
// unsigned int tempRef = this->worldScene.GetTemporaryReferenceOf( objRef );
|
|
||||||
// if( tempRef != this->worldScene.invalid_ref )
|
|
||||||
// {
|
|
||||||
// this->worldScene.GetCustomBody( tempRef )->SetSize( size );
|
|
||||||
// this->worldScene.EvaluatePosition( tempRef );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
UniquePointer<ICustomBody> API_Impl::CreateRigidBody( const API::SimpleBodyDescription &desc ) const
|
|
||||||
{
|
|
||||||
return new SimpleRigidBody( desc );
|
|
||||||
}
|
|
||||||
|
|
||||||
UniquePointer<ICustomBody> API_Impl::CreateRigidBody( const API::SphericalBodyDescription &desc ) const
|
|
||||||
{
|
|
||||||
return new SphericalRigidBody( desc );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Oyster { namespace Physics
|
|
||||||
{
|
|
||||||
namespace Default
|
|
||||||
{
|
{
|
||||||
void EventAction_Destruction( ::Utility::DynamicMemory::UniquePointer<::Oyster::Physics::ICustomBody> proto )
|
namespace Default
|
||||||
{ /* Do nothing except allowing the proto uniquePointer destroy itself. */ }
|
{
|
||||||
|
void EventAction_Destruction( ::Utility::DynamicMemory::UniquePointer<::Oyster::Physics::ICustomBody> proto )
|
||||||
|
{ /* Do nothing except allowing the proto uniquePointer destroy itself. */ }
|
||||||
|
|
||||||
::Oyster::Physics::ICustomBody::SubscriptMessage EventAction_BeforeCollisionResponse( const ::Oyster::Physics::ICustomBody *proto, const ::Oyster::Physics::ICustomBody *deuter )
|
::Oyster::Physics::ICustomBody::SubscriptMessage EventAction_BeforeCollisionResponse( const ::Oyster::Physics::ICustomBody *proto, const ::Oyster::Physics::ICustomBody *deuter )
|
||||||
{ /* Do nothing except returning business as usual. */
|
{ /* Do nothing except returning business as usual. */
|
||||||
return ::Oyster::Physics::ICustomBody::SubscriptMessage_none;
|
return ::Oyster::Physics::ICustomBody::SubscriptMessage_none;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EventAction_AfterCollisionResponse( const ::Oyster::Physics::ICustomBody *proto, const ::Oyster::Physics::ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss )
|
||||||
|
{ /* Do nothing except returning business as usual. */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void EventAction_Move( const ::Oyster::Physics::ICustomBody *object )
|
||||||
|
{ /* Do nothing. */ }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void EventAction_AfterCollisionResponse( const ::Oyster::Physics::ICustomBody *proto, const ::Oyster::Physics::ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss )
|
}
|
||||||
{ /* Do nothing except returning business as usual. */
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventAction_Move( const ::Oyster::Physics::ICustomBody *object )
|
|
||||||
{ /* Do nothing. */ }
|
|
||||||
}
|
|
||||||
} }
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "../PhysicsAPI.h"
|
#include "../PhysicsAPI.h"
|
||||||
#include "Octree.h"
|
#include "Octree.h"
|
||||||
|
#include <btBulletDynamicsCommon.h>
|
||||||
|
|
||||||
namespace Oyster
|
namespace Oyster
|
||||||
{
|
{
|
||||||
|
@ -14,49 +15,27 @@ namespace Oyster
|
||||||
API_Impl();
|
API_Impl();
|
||||||
virtual ~API_Impl();
|
virtual ~API_Impl();
|
||||||
|
|
||||||
void Init( unsigned int numObjects, unsigned int numGravityWells , const ::Oyster::Math::Float3 &worldSize );
|
void Init();
|
||||||
|
|
||||||
void SetFrameTimeLength( float deltaTime );
|
|
||||||
void SetGravityConstant( float g );
|
|
||||||
void SetEpsilon( float e );
|
|
||||||
void SetSubscription( EventAction_Destruction functionPointer );
|
|
||||||
|
|
||||||
float GetFrameTimeLength() const;
|
|
||||||
|
|
||||||
void Update();
|
|
||||||
|
|
||||||
bool IsInLimbo( const ICustomBody* objRef );
|
bool IsInLimbo( const ICustomBody* objRef );
|
||||||
void MoveToLimbo( const ICustomBody* objRef );
|
void MoveToLimbo( const ICustomBody* objRef );
|
||||||
void ReleaseFromLimbo( const ICustomBody* objRef );
|
void ReleaseFromLimbo( const ICustomBody* objRef );
|
||||||
|
|
||||||
void AddObject( ::Utility::DynamicMemory::UniquePointer<ICustomBody> handle );
|
// Bullet physics
|
||||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> ExtractObject( const ICustomBody* objRef );
|
ICustomBody* AddCollisionSphere(float radius, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass);
|
||||||
void DestroyObject( const ICustomBody* objRef );
|
ICustomBody* AddCollisionBox(::Oyster::Math::Float3 halfSize, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass);
|
||||||
|
|
||||||
void AddGravity( const API::Gravity &g );
|
void UpdateWorld();
|
||||||
void RemoveGravity( const API::Gravity &g );
|
|
||||||
|
|
||||||
void ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) );
|
void ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) );
|
||||||
|
|
||||||
//void ApplyForceAt( const ICustomBody* objRef, const ::Oyster::Math::Float3 &worldPos, const ::Oyster::Math::Float3 &worldF );
|
|
||||||
|
|
||||||
//void SetMomentOfInertiaTensor_KeepVelocity( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &localI );
|
|
||||||
//void SetMomentOfInertiaTensor_KeepMomentum( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &localI );
|
|
||||||
//void SetMass_KeepVelocity( const ICustomBody* objRef, ::Oyster::Math::Float m );
|
|
||||||
//void SetMass_KeepMomentum( const ICustomBody* objRef, ::Oyster::Math::Float m );
|
|
||||||
//void SetCenter( const ICustomBody* objRef, const ::Oyster::Math::Float3 &worldPos );
|
|
||||||
//void SetRotation( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &rotation );
|
|
||||||
//void SetOrientation( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &orientation );
|
|
||||||
//void SetSize( const ICustomBody* objRef, const ::Oyster::Math::Float3 &size );
|
|
||||||
|
|
||||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> CreateRigidBody( const SimpleBodyDescription &desc ) const;
|
|
||||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> CreateRigidBody( const SphericalBodyDescription &desc ) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
::Oyster::Math::Float gravityConstant, updateFrameLength, epsilon;
|
btBroadphaseInterface* broadphase;
|
||||||
EventAction_Destruction destructionAction;
|
btDefaultCollisionConfiguration* collisionConfiguration;
|
||||||
::std::vector<API::Gravity> gravity;
|
btCollisionDispatcher* dispatcher;
|
||||||
Octree worldScene;
|
btSequentialImpulseConstraintSolver* solver;
|
||||||
|
btDiscreteDynamicsWorld* dynamicsWorld;
|
||||||
|
std::vector<ICustomBody*> customBodies;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Default
|
namespace Default
|
||||||
|
|
|
@ -8,296 +8,87 @@ using namespace ::Oyster::Collision3D;
|
||||||
using namespace ::Utility::DynamicMemory;
|
using namespace ::Utility::DynamicMemory;
|
||||||
using namespace ::Utility::Value;
|
using namespace ::Utility::Value;
|
||||||
|
|
||||||
namespace Private
|
|
||||||
{
|
|
||||||
const Float epsilon = (const Float)1e-20;
|
|
||||||
|
|
||||||
// Float calculations can suffer roundingerrors. Which is where epsilon = 1e-20 comes into the picture
|
|
||||||
inline bool EqualsZero( const Float &value )
|
|
||||||
{ // by Dan Andersson
|
|
||||||
return Abs( value ) < epsilon;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Contains( const Plane &container, const Float4 &pos )
|
|
||||||
{ // by Dan Andersson
|
|
||||||
return EqualsZero( container.normal.Dot( pos ) + container.phasing );
|
|
||||||
}
|
|
||||||
|
|
||||||
// revision of Ray Vs Plane intersect test, there ray is more of an axis
|
|
||||||
bool Intersects( const Ray &axis, const Plane &plane, Float &connectDistance )
|
|
||||||
{ // by Dan Andersson
|
|
||||||
Float c = plane.normal.Dot(axis.direction);
|
|
||||||
if( EqualsZero(c) )
|
|
||||||
{ // axis is parallell with the plane. (axis direction orthogonal with the planar normal)
|
|
||||||
connectDistance = 0.0f;
|
|
||||||
return Contains( plane, axis.origin );
|
|
||||||
}
|
|
||||||
|
|
||||||
connectDistance = -plane.phasing;
|
|
||||||
connectDistance -= plane.normal.Dot( axis.origin );
|
|
||||||
connectDistance /= c;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleRigidBody::SimpleRigidBody()
|
SimpleRigidBody::SimpleRigidBody()
|
||||||
{
|
{
|
||||||
this->rigid = RigidBody();
|
this->collisionShape = NULL;
|
||||||
this->rigid.SetMass_KeepMomentum( 16.0f );
|
this->motionState = NULL;
|
||||||
this->gravityNormal = Float3::null;
|
this->rigidBody = NULL;
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
this->state.centerPos = Float3(0.0f, 0.0f, 0.0f);
|
||||||
this->onMovement = Default::EventAction_Move;
|
this->state.quaternion = Quaternion(Float3(0.0f, 0.0f, 0.0f), 1.0f);
|
||||||
|
this->state.dynamicFrictionCoeff = 0.0f;
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
this->state.staticFrictionCoeff = 0.0f;
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
this->state.mass = 0.0f;
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
this->state.restitutionCoeff = 0.0f;
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
this->state.reach = Float3(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
this->scene = nullptr;
|
|
||||||
this->customTag = nullptr;
|
this->customTag = nullptr;
|
||||||
this->ignoreGravity = this->isForwarded = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleRigidBody::SimpleRigidBody( const API::SimpleBodyDescription &desc )
|
SimpleRigidBody::SimpleRigidBody( const API::SimpleBodyDescription &desc )
|
||||||
{
|
{
|
||||||
this->rigid = RigidBody();
|
this->collisionShape = NULL;
|
||||||
this->rigid.SetRotation( desc.rotation );
|
this->motionState = NULL;
|
||||||
this->rigid.centerPos = desc.centerPosition;
|
this->rigidBody = NULL;
|
||||||
this->rigid.SetSize( desc.size );
|
|
||||||
this->rigid.restitutionCoeff = desc.restitutionCoeff;
|
|
||||||
this->rigid.frictionCoeff_Static = desc.frictionCoeff_Static;
|
|
||||||
this->rigid.frictionCoeff_Kinetic = desc.frictionCoeff_Dynamic;
|
|
||||||
this->rigid.SetMass_KeepMomentum( desc.mass );
|
|
||||||
this->rigid.SetMomentOfInertia_KeepMomentum( desc.inertiaTensor );
|
|
||||||
this->deltaPos = Float4::null;
|
|
||||||
this->deltaAxis = Float4::null;
|
|
||||||
|
|
||||||
this->gravityNormal = Float3::null;
|
|
||||||
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
|
|
||||||
if( desc.subscription_onCollision )
|
|
||||||
{
|
|
||||||
this->onCollision = desc.subscription_onCollision;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( desc.subscription_onCollisionResponse )
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = desc.subscription_onCollisionResponse;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( desc.subscription_onMovement )
|
|
||||||
{
|
|
||||||
this->onMovement= desc.subscription_onMovement;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onMovement = Default::EventAction_Move;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->scene = nullptr;
|
|
||||||
this->customTag = nullptr;
|
this->customTag = nullptr;
|
||||||
this->ignoreGravity = desc.ignoreGravity;
|
|
||||||
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleRigidBody::~SimpleRigidBody() {}
|
SimpleRigidBody::~SimpleRigidBody()
|
||||||
|
|
||||||
UniquePointer<ICustomBody> SimpleRigidBody::Clone() const
|
|
||||||
{
|
{
|
||||||
return new SimpleRigidBody( *this );
|
delete this->motionState;
|
||||||
|
this->motionState = NULL;
|
||||||
|
delete this->collisionShape;
|
||||||
|
this->collisionShape = NULL;
|
||||||
|
delete this->rigidBody;
|
||||||
|
this->rigidBody = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleRigidBody::SetCollisionShape(btCollisionShape* shape)
|
||||||
|
{
|
||||||
|
this->collisionShape = shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleRigidBody::SetMotionState(btDefaultMotionState* motionState)
|
||||||
|
{
|
||||||
|
this->motionState = motionState;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleRigidBody::SetRigidBody(btRigidBody* rigidBody)
|
||||||
|
{
|
||||||
|
this->rigidBody = rigidBody;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleRigidBody::SetSubscription(EventAction_AfterCollisionResponse function)
|
||||||
|
{
|
||||||
|
this->afterCollision = function;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleRigidBody::CallSubsciptMessage(ICustomBody* bodyA, ICustomBody* bodyB, Oyster::Math::Float kineticEnergyLoss)
|
||||||
|
{
|
||||||
|
this->CallSubsciptMessage(bodyA, bodyB, kineticEnergyLoss);
|
||||||
|
}
|
||||||
|
|
||||||
|
btDefaultMotionState* SimpleRigidBody::GetMotionState() const
|
||||||
|
{
|
||||||
|
return this->motionState;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleRigidBody::State SimpleRigidBody::GetState() const
|
SimpleRigidBody::State SimpleRigidBody::GetState() const
|
||||||
{
|
{
|
||||||
return State( this->rigid.GetMass(), this->rigid.restitutionCoeff,
|
return this->state;
|
||||||
this->rigid.frictionCoeff_Static, this->rigid.frictionCoeff_Kinetic,
|
|
||||||
this->rigid.GetMomentOfInertia(), this->rigid.boundingReach,
|
|
||||||
this->rigid.centerPos, this->rigid.axis,
|
|
||||||
this->rigid.momentum_Linear, this->rigid.momentum_Angular,
|
|
||||||
this->rigid.gravityNormal );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleRigidBody::State & SimpleRigidBody::GetState( SimpleRigidBody::State &targetMem ) const
|
SimpleRigidBody::State & SimpleRigidBody::GetState( SimpleRigidBody::State &targetMem ) const
|
||||||
{
|
{
|
||||||
return targetMem = State( this->rigid.GetMass(), this->rigid.restitutionCoeff,
|
targetMem = this->state;
|
||||||
this->rigid.frictionCoeff_Static, this->rigid.frictionCoeff_Kinetic,
|
return targetMem;
|
||||||
this->rigid.GetMomentOfInertia(), this->rigid.boundingReach,
|
|
||||||
this->rigid.centerPos, this->rigid.axis,
|
|
||||||
this->rigid.momentum_Linear, this->rigid.momentum_Angular,
|
|
||||||
this->rigid.gravityNormal );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetState( const SimpleRigidBody::State &state )
|
void SimpleRigidBody::SetState( const SimpleRigidBody::State &state )
|
||||||
{
|
{
|
||||||
this->rigid.centerPos = state.GetCenterPosition();
|
this->state = state;
|
||||||
this->rigid.axis = state.GetAngularAxis();
|
|
||||||
this->rigid.boundingReach = state.GetReach();
|
|
||||||
this->rigid.momentum_Linear = state.GetLinearMomentum();
|
|
||||||
this->rigid.momentum_Angular = state.GetAngularMomentum();
|
|
||||||
this->rigid.impulse_Linear += state.GetLinearImpulse();
|
|
||||||
this->rigid.impulse_Angular += state.GetAngularImpulse();
|
|
||||||
this->rigid.restitutionCoeff = state.GetRestitutionCoeff();
|
|
||||||
this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static();
|
|
||||||
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
|
|
||||||
this->rigid.SetMass_KeepMomentum( state.GetMass() );
|
|
||||||
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
|
|
||||||
this->rigid.gravityNormal = state.GetGravityNormal();
|
|
||||||
|
|
||||||
if( state.IsForwarded() )
|
|
||||||
{
|
|
||||||
this->deltaPos += Float4(state.GetForward_DeltaPos(), 0);
|
|
||||||
this->deltaAxis += Float4(state.GetForward_DeltaAxis(), 0);
|
|
||||||
this->isForwarded;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( this->scene )
|
|
||||||
{
|
|
||||||
if( state.IsSpatiallyAltered() )
|
|
||||||
{
|
|
||||||
unsigned int tempRef = this->scene->GetTemporaryReferenceOf( this );
|
|
||||||
this->scene->SetAsAltered( tempRef );
|
|
||||||
this->scene->EvaluatePosition( tempRef );
|
|
||||||
}
|
|
||||||
else if( state.IsDisturbed() )
|
|
||||||
{
|
|
||||||
this->scene->SetAsAltered( this->scene->GetTemporaryReferenceOf(this) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ICustomBody::SubscriptMessage SimpleRigidBody::CallSubscription_BeforeCollisionResponse( const ICustomBody *deuter )
|
|
||||||
{
|
|
||||||
return this->onCollision( this, deuter );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::CallSubscription_AfterCollisionResponse( const ICustomBody *deuter, Float kineticEnergyLoss )
|
|
||||||
{
|
|
||||||
return this->onCollisionResponse( this, deuter, kineticEnergyLoss );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::CallSubscription_Move()
|
|
||||||
{
|
|
||||||
this->onMovement( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimpleRigidBody::IsAffectedByGravity() const
|
|
||||||
{
|
|
||||||
return !this->ignoreGravity;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimpleRigidBody::Intersects( const ICollideable &shape ) const
|
|
||||||
{
|
|
||||||
return Box( this->rigid.GetRotationMatrix(), this->rigid.centerPos, this->rigid.GetSize() ).Intersects( shape );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimpleRigidBody::Intersects( const ICollideable &shape, Float4 &worldPointOfContact ) const
|
|
||||||
{
|
|
||||||
return Box( this->rigid.GetRotationMatrix(), this->rigid.centerPos, this->rigid.GetSize() ).Intersects( shape, worldPointOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimpleRigidBody::Intersects( const ICustomBody &object, Float4 &worldPointOfContact ) const
|
|
||||||
{
|
|
||||||
return object.Intersects( Box(this->rigid.GetRotationMatrix(), this->rigid.centerPos, this->rigid.GetSize()), worldPointOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetTimeOfContact( Float4 &worldPointOfContact )
|
|
||||||
{
|
|
||||||
Point pointOfContact = Point( worldPointOfContact );
|
|
||||||
Box start = Box();
|
|
||||||
{
|
|
||||||
start.rotation = RotationMatrix( this->collisionRebound.previousSpatial.axis );
|
|
||||||
start.center = this->collisionRebound.previousSpatial.center;
|
|
||||||
start.boundingOffset = this->collisionRebound.previousSpatial.reach;
|
|
||||||
}
|
|
||||||
Box end = Box();
|
|
||||||
{
|
|
||||||
end.rotation = RotationMatrix( this->rigid.axis );
|
|
||||||
end.center = this->rigid.centerPos;
|
|
||||||
end.boundingOffset = this->rigid.boundingReach;
|
|
||||||
}
|
|
||||||
Float timeOfContact = ::Oyster::Collision3D::Utility::TimeOfContact( start, end, pointOfContact );
|
|
||||||
|
|
||||||
this->collisionRebound.timeOfContact = Min( this->collisionRebound.timeOfContact, timeOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
Sphere & SimpleRigidBody::GetBoundingSphere( Sphere &targetMem ) const
|
|
||||||
{
|
|
||||||
return targetMem = Sphere( this->rigid.centerPos, this->rigid.boundingReach.GetMagnitude() );
|
|
||||||
}
|
|
||||||
|
|
||||||
Float4 & SimpleRigidBody::GetNormalAt( const Float4 &worldPos, Float4 &targetMem ) const
|
|
||||||
{
|
|
||||||
Float4 offset = worldPos.xyz - this->rigid.centerPos;
|
|
||||||
Float distance = offset.Dot( offset );
|
|
||||||
Float3 normal = Float3::null;
|
|
||||||
|
|
||||||
if( distance != 0.0f )
|
|
||||||
{ // sanity check
|
|
||||||
Ray axis( Float4::standard_unit_w, offset / (Float)::std::sqrt(distance) );
|
|
||||||
Float minDistance = numeric_limits<Float>::max();
|
|
||||||
Float4x4 rotationMatrix = this->rigid.GetRotationMatrix();
|
|
||||||
|
|
||||||
if( Private::Intersects(axis, Plane(rotationMatrix.v[0], -this->rigid.boundingReach.x), axis.collisionDistance) )
|
|
||||||
{ // check along x-axis
|
|
||||||
if( axis.collisionDistance < 0.0f )
|
|
||||||
normal = -rotationMatrix.v[0].xyz;
|
|
||||||
else
|
|
||||||
normal = rotationMatrix.v[0].xyz;
|
|
||||||
|
|
||||||
minDistance = Abs( axis.collisionDistance );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Private::Intersects(axis, Plane(rotationMatrix.v[1], -this->rigid.boundingReach.y), axis.collisionDistance) )
|
|
||||||
{ // check along y-axis
|
|
||||||
distance = Abs( axis.collisionDistance ); // recycling memory
|
|
||||||
if( minDistance > distance )
|
|
||||||
{
|
|
||||||
if( axis.collisionDistance < 0.0f )
|
|
||||||
normal = -rotationMatrix.v[1].xyz;
|
|
||||||
else
|
|
||||||
normal = rotationMatrix.v[1].xyz;
|
|
||||||
|
|
||||||
minDistance = distance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Private::Intersects(axis, Plane(rotationMatrix.v[2], -this->rigid.boundingReach.z), axis.collisionDistance) )
|
|
||||||
{ // check along z-axis
|
|
||||||
if( minDistance > Abs( axis.collisionDistance ) )
|
|
||||||
{
|
|
||||||
if( axis.collisionDistance < 0.0f )
|
|
||||||
normal = -rotationMatrix.v[2].xyz;
|
|
||||||
else
|
|
||||||
normal = rotationMatrix.v[2].xyz;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
targetMem.xyz = normal;
|
|
||||||
targetMem.w = 0.0f;
|
|
||||||
return targetMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
Float3 & SimpleRigidBody::GetGravityNormal( Float3 &targetMem ) const
|
|
||||||
{
|
|
||||||
return targetMem = this->gravityNormal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void * SimpleRigidBody::GetCustomTag() const
|
void * SimpleRigidBody::GetCustomTag() const
|
||||||
|
@ -305,182 +96,10 @@ void * SimpleRigidBody::GetCustomTag() const
|
||||||
return this->customTag;
|
return this->customTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float3 & SimpleRigidBody::GetCenter( Float3 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.centerPos;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SimpleRigidBody::GetRotation( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.box.rotation;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SimpleRigidBody::GetOrientation( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.GetOrientation();
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SimpleRigidBody::GetView( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.GetView();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//Float3 SimpleRigidBody::GetRigidLinearVelocity() const
|
|
||||||
//{
|
|
||||||
// return this->rigid.GetLinearVelocity();
|
|
||||||
//}
|
|
||||||
|
|
||||||
UpdateState SimpleRigidBody::Update( Float timeStepLength )
|
|
||||||
{
|
|
||||||
if( this->collisionRebound.timeOfContact < 1.0f )
|
|
||||||
{ // Rebound if needed
|
|
||||||
this->rigid.centerPos = Lerp( this->collisionRebound.previousSpatial.center, this->rigid.centerPos, this->collisionRebound.timeOfContact );
|
|
||||||
this->rigid.SetRotation( Lerp(this->collisionRebound.previousSpatial.axis, this->rigid.axis, this->collisionRebound.timeOfContact) );
|
|
||||||
this->rigid.boundingReach = Lerp( this->collisionRebound.previousSpatial.reach, this->rigid.boundingReach, this->collisionRebound.timeOfContact );
|
|
||||||
timeStepLength *= 2.0f - this->collisionRebound.timeOfContact; // compensate for rebounded time
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maintain rotation resolution by keeping axis within [0, 2pi] (trigonometric methods gets faster too)
|
|
||||||
Float4 temp;
|
|
||||||
::std::modf( this->rigid.axis * (0.5f / pi), temp.xyz );
|
|
||||||
this->rigid.axis -= ((2.0f * pi) * temp).xyz;
|
|
||||||
|
|
||||||
// Update rebound data
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
|
|
||||||
// Check if this is close enough to be set resting
|
|
||||||
temp = Float4( this->rigid.impulse_Linear, 0.0f ) + Float4( this->rigid.impulse_Angular, 0.0f );
|
|
||||||
if( temp.Dot(temp) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
unsigned char resting = 0;
|
|
||||||
if( this->rigid.momentum_Linear.Dot(this->rigid.momentum_Linear) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
this->rigid.momentum_Linear = Float3::null;
|
|
||||||
resting = 1;
|
|
||||||
}
|
|
||||||
if( this->rigid.momentum_Angular.Dot(this->rigid.momentum_Angular) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
this->rigid.momentum_Angular = Float3::null;
|
|
||||||
++resting;
|
|
||||||
}
|
|
||||||
if( resting == 2 )
|
|
||||||
{
|
|
||||||
this->rigid.impulse_Linear = this->rigid.impulse_Angular = Float3::null;
|
|
||||||
return UpdateState_resting;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this->rigid.Update_LeapFrog( timeStepLength );
|
|
||||||
return UpdateState_altered;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::Predict( Float4 &outDeltaPos, Float4 &outDeltaAxis, const Float4 &actingLinearImpulse, const Float4 &actingAngularImpulse, Float deltaTime )
|
|
||||||
{
|
|
||||||
this->rigid.Predict_LeapFrog( outDeltaPos.xyz, outDeltaAxis.xyz, actingLinearImpulse.xyz, actingAngularImpulse.xyz, deltaTime );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetScene( void *scene )
|
|
||||||
{
|
|
||||||
this->scene = (Octree*)scene;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetSubscription( ICustomBody::EventAction_BeforeCollisionResponse functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onCollision = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetSubscription( ICustomBody::EventAction_AfterCollisionResponse functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetSubscription( ICustomBody::EventAction_Move functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onMovement = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onMovement = Default::EventAction_Move;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetGravity( bool ignore)
|
|
||||||
{
|
|
||||||
this->ignoreGravity = ignore;
|
|
||||||
this->gravityNormal = Float3::null;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetGravityNormal( const Float3 &normalizedVector )
|
|
||||||
{
|
|
||||||
this->gravityNormal = normalizedVector;
|
|
||||||
this->rigid.gravityNormal = Float4( this->gravityNormal, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleRigidBody::SetCustomTag( void *ref )
|
void SimpleRigidBody::SetCustomTag( void *ref )
|
||||||
{
|
{
|
||||||
this->customTag = ref;
|
this->customTag = ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
//void SimpleRigidBody::SetMomentOfInertiaTensor_KeepVelocity( const Float4x4 &localI )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMomentOfInertia_KeepVelocity( localI );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetMomentOfInertiaTensor_KeepMomentum( const Float4x4 &localI )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMomentOfInertia_KeepMomentum( localI );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetMass_KeepVelocity( Float m )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMass_KeepVelocity( m );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetMass_KeepMomentum( Float m )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMass_KeepMomentum( m );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetCenter( const Float3 &worldPos )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetCenter( worldPos );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetRotation( const Float4x4 &rotation )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetRotation( rotation );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetOrientation( const Float4x4 &orientation )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetOrientation( orientation );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetSize( const Float3 &size )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetSize( size );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SimpleRigidBody::SetMomentum( const Float3 &worldG )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetLinearMomentum( worldG );
|
|
||||||
//}
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
#define OYSTER_PHYSICS_SIMPLE_RIGIDBODY_H
|
#define OYSTER_PHYSICS_SIMPLE_RIGIDBODY_H
|
||||||
|
|
||||||
#include "..\PhysicsAPI.h"
|
#include "..\PhysicsAPI.h"
|
||||||
#include "RigidBody.h"
|
#include <btBulletDynamicsCommon.h>
|
||||||
#include "Octree.h"
|
|
||||||
|
|
||||||
namespace Oyster { namespace Physics
|
namespace Oyster { namespace Physics
|
||||||
{
|
{
|
||||||
|
@ -14,73 +13,32 @@ namespace Oyster { namespace Physics
|
||||||
SimpleRigidBody( const API::SimpleBodyDescription &desc );
|
SimpleRigidBody( const API::SimpleBodyDescription &desc );
|
||||||
virtual ~SimpleRigidBody();
|
virtual ~SimpleRigidBody();
|
||||||
|
|
||||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> Clone() const;
|
void SetCollisionShape(btCollisionShape* shape);
|
||||||
|
void SetMotionState(btDefaultMotionState* motionState);
|
||||||
|
void SetRigidBody(btRigidBody* rigidBody);
|
||||||
|
|
||||||
|
void SetSubscription(EventAction_AfterCollisionResponse function);
|
||||||
|
void CallSubsciptMessage(ICustomBody* bodyA, ICustomBody* bodyB, Math::Float kineticEnergyLoss);
|
||||||
|
|
||||||
State GetState() const;
|
State GetState() const;
|
||||||
State & GetState( State &targetMem ) const;
|
State & GetState( State &targetMem ) const;
|
||||||
void SetState( const State &state );
|
void SetState( const State &state );
|
||||||
//::Oyster::Math::Float3 GetRigidLinearVelocity() const;
|
|
||||||
|
|
||||||
SubscriptMessage CallSubscription_BeforeCollisionResponse( const ICustomBody *deuter );
|
btDefaultMotionState* GetMotionState() const;
|
||||||
void CallSubscription_AfterCollisionResponse( const ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss );
|
|
||||||
void CallSubscription_Move();
|
|
||||||
|
|
||||||
bool IsAffectedByGravity() const;
|
|
||||||
bool Intersects( const ::Oyster::Collision3D::ICollideable &shape ) const;
|
|
||||||
bool Intersects( const ::Oyster::Collision3D::ICollideable &shape, ::Oyster::Math::Float4 &worldPointOfContact ) const;
|
|
||||||
bool Intersects( const ICustomBody &object, ::Oyster::Math::Float4 &worldPointOfContact ) const;
|
|
||||||
|
|
||||||
void SetTimeOfContact( ::Oyster::Math::Float4 &worldPointOfContact );
|
|
||||||
|
|
||||||
::Oyster::Collision3D::Sphere & GetBoundingSphere( ::Oyster::Collision3D::Sphere &targetMem = ::Oyster::Collision3D::Sphere() ) const;
|
|
||||||
::Oyster::Math::Float4 & GetNormalAt( const ::Oyster::Math::Float4 &worldPos, ::Oyster::Math::Float4 &targetMem = ::Oyster::Math::Float4() ) const;
|
|
||||||
::Oyster::Math::Float3 & GetGravityNormal( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
|
||||||
void * GetCustomTag() const;
|
|
||||||
//::Oyster::Math::Float3 & GetCenter( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetRotation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetOrientation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetView( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
|
|
||||||
UpdateState Update( ::Oyster::Math::Float timeStepLength );
|
|
||||||
void Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime );
|
|
||||||
|
|
||||||
void SetScene( void *scene );
|
|
||||||
|
|
||||||
void SetSubscription( EventAction_BeforeCollisionResponse functionPointer );
|
|
||||||
void SetSubscription( EventAction_AfterCollisionResponse functionPointer );
|
|
||||||
void SetSubscription( EventAction_Move functionPointer );
|
|
||||||
|
|
||||||
void SetGravity( bool ignore);
|
|
||||||
void SetGravityNormal( const ::Oyster::Math::Float3 &normalizedVector );
|
|
||||||
void SetCustomTag( void *ref );
|
void SetCustomTag( void *ref );
|
||||||
//void SetMomentOfInertiaTensor_KeepVelocity( const ::Oyster::Math::Float4x4 &localI );
|
void* GetCustomTag() const;
|
||||||
//void SetMomentOfInertiaTensor_KeepMomentum( const ::Oyster::Math::Float4x4 &localI );
|
|
||||||
//void SetMass_KeepVelocity( ::Oyster::Math::Float m );
|
|
||||||
//void SetMass_KeepMomentum( ::Oyster::Math::Float m );
|
|
||||||
//void SetCenter( const ::Oyster::Math::Float3 &worldPos );
|
|
||||||
//void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
|
|
||||||
//void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
|
|
||||||
//void SetSize( const ::Oyster::Math::Float3 &size );
|
|
||||||
//void SetMomentum( const ::Oyster::Math::Float3 &worldG );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
::Oyster::Physics3D::RigidBody rigid;
|
btCollisionShape* collisionShape;
|
||||||
::Oyster::Math::Float4 deltaPos, deltaAxis;
|
btDefaultMotionState* motionState;
|
||||||
::Oyster::Math::Float3 gravityNormal;
|
btRigidBody* rigidBody;
|
||||||
|
|
||||||
struct
|
Struct::CustomBodyState state;
|
||||||
{
|
|
||||||
struct { ::Oyster::Math::Float3 center, axis, reach; } previousSpatial;
|
|
||||||
::Oyster::Math::Float timeOfContact;
|
|
||||||
} collisionRebound;
|
|
||||||
|
|
||||||
EventAction_BeforeCollisionResponse onCollision;
|
EventAction_AfterCollisionResponse afterCollision;
|
||||||
EventAction_AfterCollisionResponse onCollisionResponse;
|
|
||||||
EventAction_Move onMovement;
|
|
||||||
|
|
||||||
Octree *scene;
|
|
||||||
void *customTag;
|
void *customTag;
|
||||||
bool ignoreGravity, isForwarded;
|
|
||||||
};
|
};
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
|
@ -1,408 +0,0 @@
|
||||||
#include "SphericalRigidBody.h"
|
|
||||||
#include "PhysicsAPI_Impl.h"
|
|
||||||
|
|
||||||
using namespace ::Oyster::Physics;
|
|
||||||
using namespace ::Oyster::Physics3D;
|
|
||||||
using namespace ::Oyster::Math3D;
|
|
||||||
using namespace ::Oyster::Collision3D;
|
|
||||||
using namespace ::Utility::DynamicMemory;
|
|
||||||
using namespace ::Utility::Value;
|
|
||||||
|
|
||||||
SphericalRigidBody::SphericalRigidBody()
|
|
||||||
{
|
|
||||||
this->rigid = RigidBody();
|
|
||||||
this->rigid.SetMass_KeepMomentum( 16.0f );
|
|
||||||
this->gravityNormal = Float3::null;
|
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
|
||||||
this->onMovement = Default::EventAction_Move;
|
|
||||||
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
|
|
||||||
this->scene = nullptr;
|
|
||||||
this->customTag = nullptr;
|
|
||||||
this->ignoreGravity = this->isForwarded = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
SphericalRigidBody::SphericalRigidBody( const API::SphericalBodyDescription &desc )
|
|
||||||
{
|
|
||||||
this->rigid = RigidBody();
|
|
||||||
this->rigid.SetRotation( desc.rotation );
|
|
||||||
this->rigid.centerPos = desc.centerPosition;
|
|
||||||
this->rigid.boundingReach = Float4( desc.radius, desc.radius, desc.radius, 0.0f );
|
|
||||||
this->rigid.restitutionCoeff = desc.restitutionCoeff;
|
|
||||||
this->rigid.frictionCoeff_Static = desc.frictionCoeff_Static;
|
|
||||||
this->rigid.frictionCoeff_Kinetic = desc.frictionCoeff_Dynamic;
|
|
||||||
this->rigid.SetMass_KeepMomentum( desc.mass );
|
|
||||||
this->rigid.SetMomentOfInertia_KeepMomentum( MomentOfInertia::Sphere(desc.mass, desc.radius) );
|
|
||||||
this->deltaPos = Float4::null;
|
|
||||||
this->deltaAxis = Float4::null;
|
|
||||||
|
|
||||||
this->gravityNormal = Float3::null;
|
|
||||||
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
|
|
||||||
if( desc.subscription_onCollision )
|
|
||||||
{
|
|
||||||
this->onCollision = desc.subscription_onCollision;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( desc.subscription_onCollisionResponse )
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = desc.subscription_onCollisionResponse;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( desc.subscription_onMovement )
|
|
||||||
{
|
|
||||||
this->onMovement= desc.subscription_onMovement;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onMovement = Default::EventAction_Move;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->scene = nullptr;
|
|
||||||
this->customTag = nullptr;
|
|
||||||
this->ignoreGravity = desc.ignoreGravity;
|
|
||||||
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
SphericalRigidBody::~SphericalRigidBody() {}
|
|
||||||
|
|
||||||
UniquePointer<ICustomBody> SphericalRigidBody::Clone() const
|
|
||||||
{
|
|
||||||
return new SphericalRigidBody( *this );
|
|
||||||
}
|
|
||||||
|
|
||||||
SphericalRigidBody::State SphericalRigidBody::GetState() const
|
|
||||||
{
|
|
||||||
return State( this->rigid.GetMass(), this->rigid.restitutionCoeff,
|
|
||||||
this->rigid.frictionCoeff_Static, this->rigid.frictionCoeff_Kinetic,
|
|
||||||
this->rigid.GetMomentOfInertia(), this->rigid.boundingReach,
|
|
||||||
this->rigid.centerPos, this->rigid.axis,
|
|
||||||
this->rigid.momentum_Linear, this->rigid.momentum_Angular,
|
|
||||||
this->gravityNormal );
|
|
||||||
}
|
|
||||||
|
|
||||||
SphericalRigidBody::State & SphericalRigidBody::GetState( SphericalRigidBody::State &targetMem ) const
|
|
||||||
{
|
|
||||||
return targetMem = State( this->rigid.GetMass(), this->rigid.restitutionCoeff,
|
|
||||||
this->rigid.frictionCoeff_Static, this->rigid.frictionCoeff_Kinetic,
|
|
||||||
this->rigid.GetMomentOfInertia(), this->rigid.boundingReach,
|
|
||||||
this->rigid.centerPos, this->rigid.axis,
|
|
||||||
this->rigid.momentum_Linear, this->rigid.momentum_Angular,
|
|
||||||
this->gravityNormal );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetState( const SphericalRigidBody::State &state )
|
|
||||||
{
|
|
||||||
this->rigid.centerPos = state.GetCenterPosition();
|
|
||||||
this->rigid.axis = state.GetAngularAxis();
|
|
||||||
this->rigid.boundingReach = state.GetReach();
|
|
||||||
this->rigid.momentum_Linear = state.GetLinearMomentum();
|
|
||||||
this->rigid.momentum_Angular = state.GetAngularMomentum();
|
|
||||||
this->rigid.impulse_Linear += state.GetLinearImpulse();
|
|
||||||
this->rigid.impulse_Angular += state.GetAngularImpulse();
|
|
||||||
this->rigid.restitutionCoeff = state.GetRestitutionCoeff();
|
|
||||||
this->rigid.frictionCoeff_Static = state.GetFrictionCoeff_Static();
|
|
||||||
this->rigid.frictionCoeff_Kinetic = state.GetFrictionCoeff_Kinetic();
|
|
||||||
this->rigid.SetMass_KeepMomentum( state.GetMass() );
|
|
||||||
this->rigid.SetMomentOfInertia_KeepMomentum( state.GetMomentOfInertia() );
|
|
||||||
this->rigid.gravityNormal = state.GetGravityNormal();
|
|
||||||
|
|
||||||
if( state.IsForwarded() )
|
|
||||||
{
|
|
||||||
this->deltaPos += Float4(state.GetForward_DeltaPos(), 0);
|
|
||||||
this->deltaAxis += Float4(state.GetForward_DeltaAxis());
|
|
||||||
this->isForwarded = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( this->scene )
|
|
||||||
{
|
|
||||||
if( state.IsSpatiallyAltered() )
|
|
||||||
{
|
|
||||||
unsigned int tempRef = this->scene->GetTemporaryReferenceOf( this );
|
|
||||||
this->scene->SetAsAltered( tempRef );
|
|
||||||
this->scene->EvaluatePosition( tempRef );
|
|
||||||
}
|
|
||||||
else if( state.IsDisturbed() )
|
|
||||||
{
|
|
||||||
this->scene->SetAsAltered( this->scene->GetTemporaryReferenceOf(this) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ICustomBody::SubscriptMessage SphericalRigidBody::CallSubscription_BeforeCollisionResponse( const ICustomBody *deuter )
|
|
||||||
{
|
|
||||||
return this->onCollision( this, deuter );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::CallSubscription_AfterCollisionResponse( const ICustomBody *deuter, Float kineticEnergyLoss )
|
|
||||||
{
|
|
||||||
this->onCollisionResponse( this, deuter, kineticEnergyLoss);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SphericalRigidBody::CallSubscription_Move()
|
|
||||||
{
|
|
||||||
this->onMovement( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SphericalRigidBody::IsAffectedByGravity() const
|
|
||||||
{
|
|
||||||
return !this->ignoreGravity;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SphericalRigidBody::Intersects( const ICollideable &shape ) const
|
|
||||||
{
|
|
||||||
return Sphere( this->rigid.centerPos, this->rigid.boundingReach.x ).Intersects( shape );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SphericalRigidBody::Intersects( const ICollideable &shape, Float4 &worldPointOfContact ) const
|
|
||||||
{
|
|
||||||
return Sphere( this->rigid.centerPos, this->rigid.boundingReach.x ).Intersects( shape, worldPointOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SphericalRigidBody::Intersects( const ICustomBody &object, Float4 &worldPointOfContact ) const
|
|
||||||
{
|
|
||||||
return object.Intersects( Sphere(this->rigid.centerPos, this->rigid.boundingReach.x), worldPointOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetTimeOfContact( Float4 &worldPointOfContact )
|
|
||||||
{
|
|
||||||
Point pointOfContact = Point( worldPointOfContact );
|
|
||||||
Sphere start = Sphere( this->collisionRebound.previousSpatial.center, this->collisionRebound.previousSpatial.reach.x );
|
|
||||||
Sphere end = Sphere( this->rigid.centerPos, this->rigid.boundingReach.x );
|
|
||||||
|
|
||||||
Float timeOfContact = ::Oyster::Collision3D::Utility::TimeOfContact( start, end, pointOfContact );
|
|
||||||
|
|
||||||
this->collisionRebound.timeOfContact = Min( this->collisionRebound.timeOfContact, timeOfContact );
|
|
||||||
}
|
|
||||||
|
|
||||||
Sphere & SphericalRigidBody::GetBoundingSphere( Sphere &targetMem ) const
|
|
||||||
{
|
|
||||||
return targetMem = Sphere( this->rigid.centerPos, this->rigid.boundingReach.x );
|
|
||||||
}
|
|
||||||
|
|
||||||
Float4 & SphericalRigidBody::GetNormalAt( const Float4 &worldPos, Float4 &targetMem ) const
|
|
||||||
{
|
|
||||||
targetMem = Float4( worldPos.xyz - this->rigid.centerPos, 0);
|
|
||||||
Float magnitude = targetMem.GetMagnitude();
|
|
||||||
if( magnitude != 0.0f )
|
|
||||||
{ // sanity check
|
|
||||||
targetMem.Normalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
return targetMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
Float3 & SphericalRigidBody::GetGravityNormal( Float3 &targetMem ) const
|
|
||||||
{
|
|
||||||
return targetMem = this->gravityNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
void * SphericalRigidBody::GetCustomTag() const
|
|
||||||
{
|
|
||||||
return this->customTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Float3 & SphericalRigidBody::GetCenter( Float3 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.centerPos;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SphericalRigidBody::GetRotation( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.box.rotation;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SphericalRigidBody::GetOrientation( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.GetOrientation();
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Float4x4 & SphericalRigidBody::GetView( Float4x4 &targetMem ) const
|
|
||||||
//{
|
|
||||||
// return targetMem = this->rigid.GetView();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//Float3 SphericalRigidBody::GetRigidLinearVelocity() const
|
|
||||||
//{
|
|
||||||
// return this->rigid.GetLinearVelocity();
|
|
||||||
//}
|
|
||||||
|
|
||||||
UpdateState SphericalRigidBody::Update( Float timeStepLength )
|
|
||||||
{
|
|
||||||
if( this->collisionRebound.timeOfContact < 1.0f )
|
|
||||||
{ // Rebound if needed
|
|
||||||
this->rigid.centerPos = Lerp( this->collisionRebound.previousSpatial.center, this->rigid.centerPos, this->collisionRebound.timeOfContact );
|
|
||||||
this->rigid.SetRotation( Lerp(this->collisionRebound.previousSpatial.axis, this->rigid.axis, this->collisionRebound.timeOfContact) );
|
|
||||||
this->rigid.boundingReach = Lerp( this->collisionRebound.previousSpatial.reach, this->rigid.boundingReach, this->collisionRebound.timeOfContact );
|
|
||||||
timeStepLength *= 2.0f - this->collisionRebound.timeOfContact; // compensate for rebounded time
|
|
||||||
this->collisionRebound.timeOfContact = 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maintain rotation resolution by keeping axis within [0, 2pi] (trigonometric methods gets faster too)
|
|
||||||
Float4 temp;
|
|
||||||
::std::modf( this->rigid.axis * (0.5f / pi), temp.xyz );
|
|
||||||
this->rigid.axis -= ((2.0f * pi) * temp).xyz;
|
|
||||||
|
|
||||||
// Update rebound data
|
|
||||||
this->collisionRebound.previousSpatial.center = this->rigid.centerPos;
|
|
||||||
this->collisionRebound.previousSpatial.axis = this->rigid.axis;
|
|
||||||
this->collisionRebound.previousSpatial.reach = this->rigid.boundingReach;
|
|
||||||
|
|
||||||
// Check if this is close enough to be set resting
|
|
||||||
temp = Float4( this->rigid.impulse_Linear, 0.0f ) + Float4( this->rigid.impulse_Angular, 0.0f );
|
|
||||||
if( temp.Dot(temp) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
unsigned char resting = 0;
|
|
||||||
if( this->rigid.momentum_Linear.Dot(this->rigid.momentum_Linear) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
this->rigid.momentum_Linear = Float3::null;
|
|
||||||
resting = 1;
|
|
||||||
}
|
|
||||||
if( this->rigid.momentum_Angular.Dot(this->rigid.momentum_Angular) <= (Constant::epsilon * Constant::epsilon) )
|
|
||||||
{
|
|
||||||
this->rigid.momentum_Angular = Float3::null;
|
|
||||||
++resting;
|
|
||||||
}
|
|
||||||
if( resting == 2 )
|
|
||||||
{
|
|
||||||
this->rigid.impulse_Linear = this->rigid.impulse_Angular = Float3::null;
|
|
||||||
return UpdateState_resting;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this->rigid.Update_LeapFrog( timeStepLength );
|
|
||||||
return UpdateState_altered;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime )
|
|
||||||
{
|
|
||||||
this->rigid.Predict_LeapFrog( outDeltaPos.xyz, outDeltaAxis.xyz, actingLinearImpulse.xyz, actingAngularImpulse.xyz, deltaTime );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetScene( void *scene )
|
|
||||||
{
|
|
||||||
this->scene = (Octree*)scene;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetSubscription( ICustomBody::EventAction_BeforeCollisionResponse functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onCollision = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollision = Default::EventAction_BeforeCollisionResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetSubscription( ICustomBody::EventAction_AfterCollisionResponse functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onCollisionResponse = Default::EventAction_AfterCollisionResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetSubscription( ICustomBody::EventAction_Move functionPointer )
|
|
||||||
{
|
|
||||||
if( functionPointer )
|
|
||||||
{
|
|
||||||
this->onMovement = functionPointer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->onMovement = Default::EventAction_Move;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetGravity( bool ignore )
|
|
||||||
{
|
|
||||||
this->ignoreGravity = ignore;
|
|
||||||
this->gravityNormal = Float3::null;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetGravityNormal( const Float3 &normalizedVector )
|
|
||||||
{
|
|
||||||
this->gravityNormal = normalizedVector;
|
|
||||||
this->rigid.gravityNormal = Float4( this->gravityNormal, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SphericalRigidBody::SetCustomTag( void *ref )
|
|
||||||
{
|
|
||||||
this->customTag = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
//void SphericalRigidBody::SetMomentOfInertiaTensor_KeepVelocity( const Float4x4 &localI )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMomentOfInertia_KeepVelocity( localI );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetMomentOfInertiaTensor_KeepMomentum( const Float4x4 &localI )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMomentOfInertia_KeepMomentum( localI );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetMass_KeepVelocity( Float m )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMass_KeepVelocity( m );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetMass_KeepMomentum( Float m )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetMass_KeepMomentum( m );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetCenter( const Float3 &worldPos )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetCenter( worldPos );
|
|
||||||
// this->body.center = worldPos;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetRotation( const Float4x4 &rotation )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetRotation( rotation );
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetOrientation( const Float4x4 &orientation )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetOrientation( orientation );
|
|
||||||
// this->body.center = orientation.v[3].xyz;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetSize( const Float3 &size )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetSize( size );
|
|
||||||
// this->body.radius = 0.5f * Min( Min( size.x, size.y ), size.z ); // inline Min( FloatN )?
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void SphericalRigidBody::SetMomentum( const Float3 &worldG )
|
|
||||||
//{
|
|
||||||
// this->rigid.SetLinearMomentum( worldG );
|
|
||||||
//}
|
|
|
@ -1,87 +0,0 @@
|
||||||
#ifndef OYSTER_PHYSICS_SPHERICAL_RIGIDBODY_H
|
|
||||||
#define OYSTER_PHYSICS_SPHERICAL_RIGIDBODY_H
|
|
||||||
|
|
||||||
#include "..\PhysicsAPI.h"
|
|
||||||
#include "RigidBody.h"
|
|
||||||
#include "Sphere.h"
|
|
||||||
#include "Octree.h"
|
|
||||||
|
|
||||||
namespace Oyster { namespace Physics
|
|
||||||
{
|
|
||||||
class SphericalRigidBody : public ICustomBody
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SphericalRigidBody();
|
|
||||||
SphericalRigidBody( const API::SphericalBodyDescription &desc );
|
|
||||||
virtual ~SphericalRigidBody();
|
|
||||||
|
|
||||||
::Utility::DynamicMemory::UniquePointer<ICustomBody> Clone() const;
|
|
||||||
|
|
||||||
State GetState() const;
|
|
||||||
State & GetState( State &targetMem = State() ) const;
|
|
||||||
void SetState( const State &state );
|
|
||||||
//::Oyster::Math::Float3 GetRigidLinearVelocity() const;
|
|
||||||
|
|
||||||
SubscriptMessage CallSubscription_BeforeCollisionResponse( const ICustomBody *deuter );
|
|
||||||
void CallSubscription_AfterCollisionResponse( const ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss );
|
|
||||||
void CallSubscription_Move();
|
|
||||||
|
|
||||||
bool IsAffectedByGravity() const;
|
|
||||||
bool Intersects( const ::Oyster::Collision3D::ICollideable &shape ) const;
|
|
||||||
bool Intersects( const ::Oyster::Collision3D::ICollideable &shape, ::Oyster::Math::Float4 &worldPointOfContact ) const;
|
|
||||||
bool Intersects( const ICustomBody &object, ::Oyster::Math::Float4 &worldPointOfContact ) const;
|
|
||||||
|
|
||||||
void SetTimeOfContact( ::Oyster::Math::Float4 &worldPointOfContact );
|
|
||||||
|
|
||||||
::Oyster::Collision3D::Sphere & GetBoundingSphere( ::Oyster::Collision3D::Sphere &targetMem = ::Oyster::Collision3D::Sphere() ) const;
|
|
||||||
::Oyster::Math::Float4 & GetNormalAt( const ::Oyster::Math::Float4 &worldPos, ::Oyster::Math::Float4 &targetMem = ::Oyster::Math::Float4() ) const;
|
|
||||||
::Oyster::Math::Float3 & GetGravityNormal( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
|
||||||
void * GetCustomTag() const;
|
|
||||||
//::Oyster::Math::Float3 & GetCenter( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetRotation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetOrientation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
//::Oyster::Math::Float4x4 & GetView( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
|
|
||||||
|
|
||||||
UpdateState Update( ::Oyster::Math::Float timeStepLength );
|
|
||||||
void Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime );
|
|
||||||
|
|
||||||
void SetScene( void *scene );
|
|
||||||
|
|
||||||
void SetSubscription( EventAction_BeforeCollisionResponse functionPointer );
|
|
||||||
void SetSubscription( EventAction_AfterCollisionResponse functionPointer );
|
|
||||||
void SetSubscription( EventAction_Move functionPointer );
|
|
||||||
|
|
||||||
void SetGravity( bool ignore);
|
|
||||||
void SetGravityNormal( const ::Oyster::Math::Float3 &normalizedVector );
|
|
||||||
void SetCustomTag( void *ref );
|
|
||||||
//void SetMomentOfInertiaTensor_KeepVelocity( const ::Oyster::Math::Float4x4 &localI );
|
|
||||||
//void SetMomentOfInertiaTensor_KeepMomentum( const ::Oyster::Math::Float4x4 &localI );
|
|
||||||
//void SetMass_KeepVelocity( ::Oyster::Math::Float m );
|
|
||||||
//void SetMass_KeepMomentum( ::Oyster::Math::Float m );
|
|
||||||
//void SetCenter( const ::Oyster::Math::Float3 &worldPos );
|
|
||||||
//void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
|
|
||||||
//void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
|
|
||||||
//void SetSize( const ::Oyster::Math::Float3 &size );
|
|
||||||
//void SetMomentum( const ::Oyster::Math::Float3 &worldG );
|
|
||||||
|
|
||||||
private:
|
|
||||||
::Oyster::Physics3D::RigidBody rigid;
|
|
||||||
::Oyster::Math::Float4 deltaPos, deltaAxis;
|
|
||||||
::Oyster::Math::Float3 gravityNormal;
|
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct { ::Oyster::Math::Float3 center, axis, reach; } previousSpatial;
|
|
||||||
::Oyster::Math::Float timeOfContact;
|
|
||||||
} collisionRebound;
|
|
||||||
|
|
||||||
EventAction_BeforeCollisionResponse onCollision;
|
|
||||||
EventAction_AfterCollisionResponse onCollisionResponse;
|
|
||||||
EventAction_Move onMovement;
|
|
||||||
Octree *scene;
|
|
||||||
void *customTag;
|
|
||||||
bool ignoreGravity, isForwarded;
|
|
||||||
};
|
|
||||||
} }
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -55,35 +55,7 @@ namespace Oyster
|
||||||
* @param numGravityWells: The predicted max number of active gravity wells.
|
* @param numGravityWells: The predicted max number of active gravity wells.
|
||||||
* @param worldSize: The size of acceptable physics space.
|
* @param worldSize: The size of acceptable physics space.
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual void Init( unsigned int numObjects, unsigned int numGravityWells , const ::Oyster::Math::Float3 &worldSize ) = 0;
|
virtual void Init() = 0;
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the time length of each physics update frame.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetFrameTimeLength( float seconds ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the Gravityconstant in the physics that will be
|
|
||||||
* used in ForceField calculations.
|
|
||||||
* @param g: Default is the real world Constant::gravity_constant [N(m/kg)^2]
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetGravityConstant( float g ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the function that will be called by the engine
|
|
||||||
* whenever an object is being destroyed for some reason.
|
|
||||||
* - Because DestroyObject(...) were called.
|
|
||||||
* - Out of memory forced engine to destroy an object.
|
|
||||||
* @param functionPointer: If NULL, an empty default function will be set.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetSubscription( EventAction_Destruction functionPointer ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Triggers the engine to run next update frame.
|
|
||||||
* All accumulated forces and changes will be consumed.
|
|
||||||
* EventAction functions might be called.
|
|
||||||
********************************************************/
|
|
||||||
virtual void Update() = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* An object in limbo state will be ignored during the physics frame Update.
|
* An object in limbo state will be ignored during the physics frame Update.
|
||||||
|
@ -106,36 +78,15 @@ namespace Oyster
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual void ReleaseFromLimbo( const ICustomBody* objRef ) = 0;
|
virtual void ReleaseFromLimbo( const ICustomBody* objRef ) = 0;
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Introduces a new object into the engine.
|
|
||||||
* @param handle: A pointer along with the responsibility to delete.
|
|
||||||
********************************************************/
|
|
||||||
virtual void AddObject( ::Utility::DynamicMemory::UniquePointer<ICustomBody> handle ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
// Bullet physics
|
||||||
* Fetches and removes an object from the engine.
|
virtual ICustomBody* AddCollisionSphere(float radius, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass) = 0;
|
||||||
* Will not call the provided EventAction_Destruction method.
|
|
||||||
* @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
* @return A pointer along with the responsibility to delete. NULL if faulty objRef.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Utility::DynamicMemory::UniquePointer<ICustomBody> ExtractObject( const ICustomBody* objRef ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
virtual ICustomBody* AddCollisionBox(::Oyster::Math::Float3 halfSize, ::Oyster::Math::Float4 rotation, ::Oyster::Math::Float3 position, float mass) = 0;
|
||||||
* Removes an object from the engine.
|
|
||||||
* Will call the provided EventAction_Destruction method. Not if objRef is faulty.
|
virtual void UpdateWorld() = 0;
|
||||||
* @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
********************************************************/
|
|
||||||
virtual void DestroyObject( const ICustomBody* objRef ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* TODO: @todo doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void AddGravity( const API::Gravity &g ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* TODO: @todo doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void RemoveGravity( const API::Gravity &g ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* Applies an effect to objects that collide with the set volume.
|
* Applies an effect to objects that collide with the set volume.
|
||||||
|
@ -146,88 +97,6 @@ namespace Oyster
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual void ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) ) = 0;
|
virtual void ApplyEffect( const Oyster::Collision3D::ICollideable& collideable, void* args, void(hitAction)(ICustomBody*, void*) ) = 0;
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * Apply force on an object.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param worldPos: Relative to the world origo. (Not relative to object) [m]
|
|
||||||
// * @param worldF: Vector with the direction and magnitude of the force. [N]
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void ApplyForceAt( const ICustomBody* objRef, const ::Oyster::Math::Float3 &worldPos, const ::Oyster::Math::Float3 &worldF ) = 0;
|
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * Sets the MomentOfInertia tensor matrix of an object without changing it's angular velocity.
|
|
||||||
// * Noticeable effect: The angular momentum will change. Changing the amount of kinetic energy.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param localI: The tensor matrix relative to the axises of the object. @see MomentOfInertia namespace.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMomentOfInertiaTensor_KeepVelocity( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &localI ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Sets the MomentOfInertia tensor matrix of an object without changing it's angular momentum.
|
|
||||||
// * Noticeable effect: The angular velocity will change. Can be used to create slow effects.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param localI: The tensor matrix relative to the axises of the object. @see MomentOfInertia namespace.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMomentOfInertiaTensor_KeepMomentum( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &localI ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Sets the mass of an object without changing it's linear velocity.
|
|
||||||
// * Noticeable effect: The linear momentum will change. Changing the amount of kinetic energy.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param m: [kg]
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMass_KeepVelocity( const ICustomBody* objRef, ::Oyster::Math::Float m ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Sets the mass of an object without changing it's linear velocity.
|
|
||||||
// * Noticeable effect: The linear velocity will change. Can be used to create slow effects.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param m: [kg]
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMass_KeepMomentum( const ICustomBody* objRef, ::Oyster::Math::Float m ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Instantly moves an object.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param worldPos: Relative to the world origo. (Not relative to object) [m]
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetCenter( const ICustomBody* objRef, const ::Oyster::Math::Float3 &worldPos ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Instantly redirects object.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param rotation: New rotation.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetRotation( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &rotation ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Instantly moves and redirects object.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param orientation: New orientation.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetOrientation( const ICustomBody* objRef, const ::Oyster::Math::Float4x4 &orientation ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * Resizes the boundingBox.
|
|
||||||
// * @param objRef: A pointer to the ICustomBody representing a physical object.
|
|
||||||
// * @param size: New size of this [m]
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetSize( const ICustomBody* objRef, const ::Oyster::Math::Float3 &size ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Creates a new dynamically allocated object that can be used as a component for more complex ICustomBodies.
|
|
||||||
* @param desc: @see API::SimpleBodyDescription
|
|
||||||
* @return A pointer along with the responsibility to delete.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Utility::DynamicMemory::UniquePointer<ICustomBody> CreateRigidBody( const SimpleBodyDescription &desc ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Creates a new dynamically allocated object that can be used as a component for more complex ICustomBodies.
|
|
||||||
* @param desc: @see API::SphericalBodyDescription
|
|
||||||
* @return A pointer along with the responsibility to delete.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Utility::DynamicMemory::UniquePointer<ICustomBody> CreateRigidBody( const SphericalBodyDescription &desc ) const = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~API() {}
|
virtual ~API() {}
|
||||||
};
|
};
|
||||||
|
@ -246,190 +115,39 @@ namespace Oyster
|
||||||
SubscriptMessage_player_collision_response
|
SubscriptMessage_player_collision_response
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef SubscriptMessage (*EventAction_BeforeCollisionResponse)( const ICustomBody *proto, const ICustomBody *deuter );
|
typedef SubscriptMessage (*EventAction_BeforeCollisionResponse)( const ICustomBody *proto, const ICustomBody *deuter );
|
||||||
typedef void (*EventAction_AfterCollisionResponse)( const ICustomBody *proto, const ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss );
|
typedef void (*EventAction_AfterCollisionResponse)( const ICustomBody *proto, const ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss );
|
||||||
typedef void (*EventAction_Move)( const ICustomBody *object );
|
typedef void (*EventAction_Move)( const ICustomBody *object );
|
||||||
typedef Struct::SimpleBodyDescription SimpleBodyDescription;
|
|
||||||
typedef Struct::SphericalBodyDescription SphericalBodyDescription;
|
|
||||||
typedef Struct::CustomBodyState State;
|
typedef Struct::CustomBodyState State;
|
||||||
|
|
||||||
virtual ~ICustomBody() {};
|
virtual ~ICustomBody() {};
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* Creates a complete copy of the current (type)object.
|
* Gets the current state of the rigid body
|
||||||
* @return An ICustomBody pointer along with the responsibility to delete.
|
* @return the current state of the rigid body
|
||||||
********************************************************/
|
|
||||||
virtual ::Utility::DynamicMemory::UniquePointer<ICustomBody> Clone() const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @todo TODO: need doc
|
|
||||||
********************************************************/
|
|
||||||
virtual SubscriptMessage CallSubscription_BeforeCollisionResponse( const ICustomBody *deuter ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @todo TODO: need doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void CallSubscription_AfterCollisionResponse( const ICustomBody *deuter, ::Oyster::Math::Float kineticEnergyLoss ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @todo TODO: need doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void CallSubscription_Move() = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @todo TODO: need doc
|
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual State GetState() const = 0;
|
virtual State GetState() const = 0;
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* @todo TODO: need doc
|
* Gets the current state of the rigid body
|
||||||
|
* @param targetMem: The state is copied into targetMem
|
||||||
|
* @return the current state of the rigid body
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual State & GetState( State &targetMem ) const = 0;
|
virtual State & GetState( State &targetMem ) const = 0;
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* @return the linear velocity of the rigid body in a vector.
|
* Sets the current state of the rigid body
|
||||||
********************************************************/
|
********************************************************/
|
||||||
//virtual Math::Float3 GetRigidLinearVelocity() const = 0;
|
virtual void SetState( const State &state ) = 0;
|
||||||
|
|
||||||
/********************************************************
|
virtual void SetSubscription(EventAction_AfterCollisionResponse function) = 0;
|
||||||
* @todo TODO: need doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetState( const State &state ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @return true if Engine should apply gravity on this object.
|
|
||||||
********************************************************/
|
|
||||||
virtual bool IsAffectedByGravity() const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* param shape: Any defined sample shape.
|
|
||||||
* @return true if this truly intersects with shape.
|
|
||||||
********************************************************/
|
|
||||||
virtual bool Intersects( const ::Oyster::Collision3D::ICollideable &shape ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Performs a detailed Intersect test and returns if, when and where.
|
|
||||||
* @param shape: Any defined sample shape.
|
|
||||||
* @param worldPointOfContact: Where at timeOfContact, this and object touches eachother.
|
|
||||||
* @return true if this truly intersects with object.
|
|
||||||
********************************************************/
|
|
||||||
virtual bool Intersects( const ::Oyster::Collision3D::ICollideable &shape, ::Oyster::Math::Float4 &worldPointOfContact ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Performs a detailed Intersect test and returns if, when and where.
|
|
||||||
* @param object: What this is intersect testing against.
|
|
||||||
* @param worldPointOfContact: Where at timeOfContact, this and object touches eachother.
|
|
||||||
* @return true if this truly intersects with object.
|
|
||||||
********************************************************/
|
|
||||||
virtual bool Intersects( const ICustomBody &object, ::Oyster::Math::Float4 &worldPointOfContact ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets how far back it needs to be interpolated to not be overlapping worldPointOfContact.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetTimeOfContact( ::Oyster::Math::Float4 &worldPointOfContact ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Required by Engine's Collision Search.
|
|
||||||
* @param targetMem: Provided memory that written into and then returned.
|
|
||||||
* @return a sphere shape that contains the ICustomBody.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Oyster::Collision3D::Sphere & GetBoundingSphere( ::Oyster::Collision3D::Sphere &targetMem = ::Oyster::Collision3D::Sphere() ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Required by Engine's Collision Responsing.
|
|
||||||
* @param worldPos: Should be worldPointOfContact from Intersects( ... )
|
|
||||||
* @param targetMem: Provided memory that written into and then returned.
|
|
||||||
* @return a surface normal in worldSpace.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Oyster::Math::Float4 & GetNormalAt( const ::Oyster::Math::Float4 &worldPos, ::Oyster::Math::Float4 &targetMem = ::Oyster::Math::Float4() ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* The gravity normal will have same direction as the total gravity force pulling on this and have the magnitude of 1.0f.
|
|
||||||
* @param targetMem: Provided memory that written into and then returned.
|
|
||||||
* @return a normalized vector in worldSpace. Exception: Null vector if no gravity been applied.
|
|
||||||
********************************************************/
|
|
||||||
virtual ::Oyster::Math::Float3 & GetGravityNormal( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* @return the void pointer set by SetCustomTag.
|
* @return the void pointer set by SetCustomTag.
|
||||||
* nullptr if none is set.
|
* nullptr if none is set.
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual void * GetCustomTag() const = 0;
|
virtual void* GetCustomTag() const = 0;
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * The world position of this center of gravity.
|
|
||||||
// * @param targetMem: Provided memory that written into and then returned.
|
|
||||||
// * @return a position in worldSpace.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual ::Oyster::Math::Float3 & GetCenter( ::Oyster::Math::Float3 &targetMem = ::Oyster::Math::Float3() ) const = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * @param targetMem: Provided memory that written into and then returned.
|
|
||||||
// * @return a copy of this's rotation matrix.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual ::Oyster::Math::Float4x4 & GetRotation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * @param targetMem: Provided memory that written into and then returned.
|
|
||||||
// * @return a copy of this's orientation matrix.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual ::Oyster::Math::Float4x4 & GetOrientation( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * @param targetMem: Provided memory that written into and then returned.
|
|
||||||
// * @return a copy of this's view matrix.
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual ::Oyster::Math::Float4x4 & GetView( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* To not be called if is in Engine
|
|
||||||
* Is called during API::Update
|
|
||||||
********************************************************/
|
|
||||||
virtual UpdateState Update( ::Oyster::Math::Float timeStepLength ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @todo TODO: add doc
|
|
||||||
********************************************************/
|
|
||||||
virtual void Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets which scene this ICustomBody is within.
|
|
||||||
* Reserved to only be used by the scene.
|
|
||||||
* @todo TODO: create an IScene interface
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetScene( void *scene ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the function that will be called by the engine
|
|
||||||
* whenever a collision occurs.
|
|
||||||
* @param functionPointer: If NULL, an empty default function will be set.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetSubscription( EventAction_BeforeCollisionResponse functionPointer ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the function that will be called by the engine
|
|
||||||
* whenever a collision has finished.
|
|
||||||
* @param functionPointer: If NULL, an empty default function will be set.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetSubscription( EventAction_AfterCollisionResponse functionPointer ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Sets the function that will be called by the engine
|
|
||||||
* whenever an object have moved.
|
|
||||||
* @param functionPointer: If NULL, an empty default function will be set.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetSubscription( EventAction_Move functionPointer ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* @param ignore: True if Engine should not apply Gravity.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetGravity( bool ignore) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
|
||||||
* Used by Engine
|
|
||||||
* @param normalizedVector: Should have same direction as the pullinggravity.
|
|
||||||
********************************************************/
|
|
||||||
virtual void SetGravityNormal( const ::Oyster::Math::Float3 &normalizedVector ) = 0;
|
|
||||||
|
|
||||||
/********************************************************
|
/********************************************************
|
||||||
* Not used by the engine itself. Just a quality of life feature
|
* Not used by the engine itself. Just a quality of life feature
|
||||||
|
@ -437,60 +155,6 @@ namespace Oyster
|
||||||
* @param ref: Anything castable to a void pointer, the engine won't care.
|
* @param ref: Anything castable to a void pointer, the engine won't care.
|
||||||
********************************************************/
|
********************************************************/
|
||||||
virtual void SetCustomTag( void *ref ) = 0;
|
virtual void SetCustomTag( void *ref ) = 0;
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetMomentOfInertiaTensor_KeepVelocity(...) instead
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMomentOfInertiaTensor_KeepVelocity( const ::Oyster::Math::Float4x4 &localI ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetMomentOfInertiaTensor_KeepMomentum(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMomentOfInertiaTensor_KeepMomentum( const ::Oyster::Math::Float4x4 &localI ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetMass_KeepVelocity(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMass_KeepVelocity( ::Oyster::Math::Float m ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetMass_KeepMomentum(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMass_KeepMomentum( ::Oyster::Math::Float m ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetCenter(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetCenter( const ::Oyster::Math::Float3 &worldPos ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetRotation(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetRotation( const ::Oyster::Math::Float4x4 &rotation ) = 0;
|
|
||||||
//
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetOrientation(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetOrientation( const ::Oyster::Math::Float4x4 &orientation ) = 0;
|
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::SetSize(...)
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetSize( const ::Oyster::Math::Float3 &size ) = 0;
|
|
||||||
|
|
||||||
///********************************************************
|
|
||||||
// * To not be called if is in Engine
|
|
||||||
// * Use API::?? @todo TODO:
|
|
||||||
// ********************************************************/
|
|
||||||
//virtual void SetMomentum( const ::Oyster::Math::Float3 &worldG ) = 0;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,53 +10,14 @@ namespace Oyster
|
||||||
{
|
{
|
||||||
namespace Struct
|
namespace Struct
|
||||||
{
|
{
|
||||||
inline SimpleBodyDescription::SimpleBodyDescription()
|
inline CustomBodyState::CustomBodyState( ::Oyster::Math::Float mass, ::Oyster::Math::Float restitutionCoeff, ::Oyster::Math::Float staticFrictionCoeff, ::Oyster::Math::Float dynamicFrictionCoeff, const ::Oyster::Math::Float3 ¢erPos, const ::Oyster::Math::Quaternion& quaternion)
|
||||||
{
|
|
||||||
this->rotation = ::Oyster::Math::Float3::null;
|
|
||||||
this->centerPosition = ::Oyster::Math::Float3::null;
|
|
||||||
this->size = ::Oyster::Math::Float3( 1.0f );
|
|
||||||
this->mass = 6.0f;
|
|
||||||
this->restitutionCoeff = 1.0f;
|
|
||||||
this->frictionCoeff_Dynamic = 0.5f;
|
|
||||||
this->frictionCoeff_Static = 0.5f;
|
|
||||||
this->inertiaTensor = ::Oyster::Physics3D::MomentOfInertia();
|
|
||||||
this->subscription_onCollision = NULL;
|
|
||||||
this->subscription_onCollisionResponse = NULL;
|
|
||||||
this->subscription_onMovement = NULL;
|
|
||||||
this->ignoreGravity = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline SphericalBodyDescription::SphericalBodyDescription()
|
|
||||||
{
|
|
||||||
this->rotation = ::Oyster::Math::Float3::null;
|
|
||||||
this->centerPosition = ::Oyster::Math::Float3::null;
|
|
||||||
this->radius = 0.5f;
|
|
||||||
this->mass = 10.0f;
|
|
||||||
this->restitutionCoeff = 1.0f;
|
|
||||||
this->frictionCoeff_Dynamic = 0.5f;
|
|
||||||
this->frictionCoeff_Static = 0.5f;
|
|
||||||
this->subscription_onCollision = NULL;
|
|
||||||
this->subscription_onCollisionResponse = NULL;
|
|
||||||
this->subscription_onMovement = NULL;
|
|
||||||
this->ignoreGravity = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline CustomBodyState::CustomBodyState( ::Oyster::Math::Float mass, ::Oyster::Math::Float restitutionCoeff, ::Oyster::Math::Float staticFrictionCoeff, ::Oyster::Math::Float kineticFrictionCoeff, const ::Oyster::Physics3D::MomentOfInertia &inertiaTensor, const ::Oyster::Math::Float3 &reach, const ::Oyster::Math::Float3 ¢erPos, const ::Oyster::Math::Float3 &rotation, const ::Oyster::Math::Float3 &linearMomentum, const ::Oyster::Math::Float3 &angularMomentum, const ::Oyster::Math::Float3 &gravityNormal )
|
|
||||||
{
|
{
|
||||||
this->mass = mass;
|
this->mass = mass;
|
||||||
this->restitutionCoeff = restitutionCoeff;
|
this->restitutionCoeff = restitutionCoeff;
|
||||||
this->staticFrictionCoeff = staticFrictionCoeff;
|
this->staticFrictionCoeff = staticFrictionCoeff;
|
||||||
this->kineticFrictionCoeff = kineticFrictionCoeff;
|
this->dynamicFrictionCoeff = dynamicFrictionCoeff;
|
||||||
this->inertiaTensor = inertiaTensor;
|
|
||||||
this->reach = reach;
|
|
||||||
this->centerPos = centerPos;
|
this->centerPos = centerPos;
|
||||||
this->angularAxis = rotation;
|
this->quaternion = quaternion;
|
||||||
this->linearMomentum = linearMomentum;
|
|
||||||
this->angularMomentum = angularMomentum;
|
|
||||||
this->linearImpulse = this->angularImpulse = ::Oyster::Math::Float3::null;
|
|
||||||
this->deltaPos = this->deltaAxis = ::Oyster::Math::Float3::null;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = this->isForwarded = false;
|
|
||||||
this->gravityNormal = gravityNormal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline CustomBodyState & CustomBodyState::operator = ( const CustomBodyState &state )
|
inline CustomBodyState & CustomBodyState::operator = ( const CustomBodyState &state )
|
||||||
|
@ -64,488 +25,32 @@ namespace Oyster
|
||||||
this->mass = state.mass;
|
this->mass = state.mass;
|
||||||
this->restitutionCoeff = state.restitutionCoeff;
|
this->restitutionCoeff = state.restitutionCoeff;
|
||||||
this->staticFrictionCoeff = state.staticFrictionCoeff;
|
this->staticFrictionCoeff = state.staticFrictionCoeff;
|
||||||
this->kineticFrictionCoeff = state.kineticFrictionCoeff;
|
this->dynamicFrictionCoeff = state.dynamicFrictionCoeff;
|
||||||
this->inertiaTensor = state.inertiaTensor;
|
|
||||||
this->reach = state.reach;
|
|
||||||
this->centerPos = state.centerPos;
|
this->centerPos = state.centerPos;
|
||||||
this->angularAxis = state.angularAxis;
|
this->quaternion = state.quaternion;
|
||||||
this->linearMomentum = state.linearMomentum;
|
|
||||||
this->angularMomentum = state.angularMomentum;
|
|
||||||
this->linearImpulse = state.linearImpulse;
|
|
||||||
this->angularImpulse = state.angularImpulse;
|
|
||||||
this->deltaPos = state.deltaPos;
|
|
||||||
this->deltaAxis = state.deltaAxis;
|
|
||||||
this->isSpatiallyAltered = state.isSpatiallyAltered;
|
|
||||||
this->isDisturbed = state.isDisturbed;
|
|
||||||
this->isForwarded = state.isForwarded;
|
|
||||||
this->gravityNormal = state.gravityNormal;
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float CustomBodyState::GetMass() const
|
|
||||||
{
|
|
||||||
return this->mass;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float CustomBodyState::GetRestitutionCoeff() const
|
|
||||||
{
|
|
||||||
return this->restitutionCoeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float CustomBodyState::GetFrictionCoeff_Static() const
|
|
||||||
{
|
|
||||||
return this->staticFrictionCoeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float CustomBodyState::GetFrictionCoeff_Kinetic() const
|
|
||||||
{
|
|
||||||
return this->kineticFrictionCoeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Physics3D::MomentOfInertia & CustomBodyState::GetMomentOfInertia() const
|
|
||||||
{
|
|
||||||
return this->inertiaTensor;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetReach() const
|
|
||||||
{
|
|
||||||
return this->reach;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::Oyster::Math::Float3 CustomBodyState::GetSize() const
|
|
||||||
{
|
|
||||||
return 2.0f * this->GetReach();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetCenterPosition() const
|
|
||||||
{
|
|
||||||
return this->centerPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetAngularAxis() const
|
|
||||||
{
|
|
||||||
return this->angularAxis;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::Oyster::Math::Float4x4 CustomBodyState::GetRotation() const
|
inline ::Oyster::Math::Float4x4 CustomBodyState::GetRotation() const
|
||||||
{
|
{
|
||||||
return ::Oyster::Math3D::RotationMatrix( this->GetAngularAxis() );
|
return ::Oyster::Math3D::RotationMatrix( this->quaternion );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::Oyster::Math::Float4x4 CustomBodyState::GetOrientation() const
|
inline ::Oyster::Math::Float4x4 CustomBodyState::GetOrientation() const
|
||||||
{
|
{
|
||||||
return ::Oyster::Math3D::OrientationMatrix( this->angularAxis, this->centerPos );
|
return ::Oyster::Math3D::OrientationMatrix( this->quaternion, this->centerPos );
|
||||||
}
|
|
||||||
|
|
||||||
inline ::Oyster::Math::Float4x4 CustomBodyState::GetOrientation( const ::Oyster::Math::Float3 &offset ) const
|
|
||||||
{
|
|
||||||
return ::Oyster::Math3D::OrientationMatrix( this->angularAxis, (this->centerPos + offset) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::Oyster::Math::Float4x4 CustomBodyState::GetView() const
|
inline ::Oyster::Math::Float4x4 CustomBodyState::GetView() const
|
||||||
{
|
{
|
||||||
return ::Oyster::Math3D::ViewMatrix( this->angularAxis, this->centerPos );
|
return ::Oyster::Math3D::ViewMatrix( this->quaternion, this->centerPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::Oyster::Math::Float4x4 CustomBodyState::GetView( const ::Oyster::Math::Float3 &offset ) const
|
inline ::Oyster::Math::Float4x4 CustomBodyState::GetView( const ::Oyster::Math::Float3 &offset ) const
|
||||||
{
|
{
|
||||||
return ::Oyster::Math3D::ViewMatrix( this->angularAxis, (this->centerPos + offset) );
|
return ::Oyster::Math3D::ViewMatrix( this->quaternion, (this->centerPos + offset) );
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetLinearMomentum() const
|
|
||||||
{
|
|
||||||
return this->linearMomentum;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ::Oyster::Math::Float3 CustomBodyState::GetLinearMomentum( const ::Oyster::Math::Float3 &at ) const
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 offset = at - this->centerPos;
|
|
||||||
if( offset.Dot(offset) > 0.0f )
|
|
||||||
{
|
|
||||||
return this->linearMomentum + ::Oyster::Physics3D::Formula::TangentialLinearMomentum( this->angularMomentum, offset );
|
|
||||||
}
|
|
||||||
return this->linearMomentum;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetAngularMomentum() const
|
|
||||||
{
|
|
||||||
return this->angularMomentum;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetLinearImpulse() const
|
|
||||||
{
|
|
||||||
return this->linearImpulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetAngularImpulse() const
|
|
||||||
{
|
|
||||||
return this->angularImpulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetForward_DeltaPos() const
|
|
||||||
{
|
|
||||||
return this->deltaPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetForward_DeltaAxis() const
|
|
||||||
{
|
|
||||||
return this->deltaAxis;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const ::Oyster::Math::Float3 & CustomBodyState::GetGravityNormal() const
|
|
||||||
{
|
|
||||||
return this->gravityNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetMass_KeepMomentum( ::Oyster::Math::Float m )
|
|
||||||
{
|
|
||||||
this->mass = m;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetMass_KeepVelocity( ::Oyster::Math::Float m )
|
|
||||||
{
|
|
||||||
if( m != 0.0f )
|
|
||||||
{ // sanity block!
|
|
||||||
this->linearMomentum *= (m / this->mass);
|
|
||||||
this->mass = m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetRestitutionCoeff( ::Oyster::Math::Float e )
|
|
||||||
{
|
|
||||||
this->restitutionCoeff = e;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetFrictionCoeff( ::Oyster::Math::Float staticU, ::Oyster::Math::Float kineticU )
|
|
||||||
{
|
|
||||||
this->staticFrictionCoeff = staticU;
|
|
||||||
this->kineticFrictionCoeff = kineticU;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetMomentOfInertia_KeepMomentum( const ::Oyster::Physics3D::MomentOfInertia &tensor )
|
|
||||||
{
|
|
||||||
this->inertiaTensor = tensor;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetMomentOfInertia_KeepVelocity( const ::Oyster::Physics3D::MomentOfInertia &tensor )
|
|
||||||
{
|
|
||||||
::Oyster::Math::Quaternion rotation = ::Oyster::Math3D::Rotation(this->angularAxis);
|
|
||||||
::Oyster::Math::Float3 w = this->inertiaTensor.CalculateAngularVelocity( rotation, this->angularMomentum );
|
|
||||||
this->inertiaTensor = tensor;
|
|
||||||
this->angularMomentum = this->inertiaTensor.CalculateAngularMomentum( rotation, w );
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetSize( const ::Oyster::Math::Float3 &size )
|
|
||||||
{
|
|
||||||
this->SetReach( 0.5f * size );
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetReach( const ::Oyster::Math::Float3 &halfSize )
|
|
||||||
{
|
|
||||||
this->reach = halfSize;
|
|
||||||
this->reach = ::Utility::Value::Max( this->reach, ::Oyster::Math::Float3::null );
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetCenterPosition( const ::Oyster::Math::Float3 ¢erPos )
|
|
||||||
{
|
|
||||||
this->centerPos = centerPos;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetRotation( const ::Oyster::Math::Float3 &angularAxis )
|
|
||||||
{
|
|
||||||
this->angularAxis = angularAxis;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetOrientation( const ::Oyster::Math::Float3 &angularAxis, const ::Oyster::Math::Float3 &translation )
|
|
||||||
{
|
|
||||||
this->angularAxis = angularAxis ;
|
|
||||||
this->centerPos = translation;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetLinearMomentum( const ::Oyster::Math::Float3 &g )
|
|
||||||
{
|
|
||||||
this->linearMomentum = g;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetAngularMomentum( const ::Oyster::Math::Float3 &h )
|
|
||||||
{
|
|
||||||
this->angularMomentum = h;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetLinearImpulse( const ::Oyster::Math::Float3 &j )
|
|
||||||
{
|
|
||||||
this->linearImpulse = j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetAngularImpulse( const ::Oyster::Math::Float3 &j )
|
|
||||||
{
|
|
||||||
this->angularImpulse = j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::SetGravityNormal( const ::Oyster::Math::Float3 &gravityNormal )
|
|
||||||
{
|
|
||||||
this->gravityNormal = gravityNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::AddRotation( const ::Oyster::Math::Float3 &angularAxis )
|
|
||||||
{
|
|
||||||
this->angularAxis += angularAxis;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::AddTranslation( const ::Oyster::Math::Float3 &deltaPos )
|
|
||||||
{
|
|
||||||
this->centerPos += deltaPos;
|
|
||||||
this->isSpatiallyAltered = this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::ApplyLinearImpulse( const ::Oyster::Math::Float3 &j )
|
|
||||||
{
|
|
||||||
this->linearImpulse += j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::ApplyAngularImpulse( const ::Oyster::Math::Float3 &j )
|
|
||||||
{
|
|
||||||
this->angularImpulse += j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::ApplyImpulse( const ::Oyster::Math::Float3 &j, const ::Oyster::Math::Float3 &at, const ::Oyster::Math::Float3 &normal )
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 offset = at - this->centerPos;
|
|
||||||
if( offset.Dot(offset) > 0.0f )
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 deltaAngularImpulse = ::Oyster::Physics3D::Formula::AngularMomentum( j, offset );
|
|
||||||
|
|
||||||
this->linearImpulse -= ::Oyster::Physics3D::Formula::TangentialLinearMomentum( deltaAngularImpulse, offset );
|
|
||||||
this->angularImpulse += deltaAngularImpulse;
|
|
||||||
}
|
|
||||||
this->linearImpulse += j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::ApplyFriction( const ::Oyster::Math::Float3 &j )
|
|
||||||
{
|
|
||||||
this->linearImpulse += j;
|
|
||||||
this->isDisturbed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CustomBodyState::ApplyForwarding( const ::Oyster::Math::Float3 &deltaPos, const ::Oyster::Math::Float3 &deltaAxis )
|
|
||||||
{
|
|
||||||
this->deltaPos += deltaPos;
|
|
||||||
this->deltaAxis += deltaAxis;
|
|
||||||
this->isDisturbed = this->isForwarded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool CustomBodyState::IsSpatiallyAltered() const
|
|
||||||
{
|
|
||||||
return this->isSpatiallyAltered;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool CustomBodyState::IsDisturbed() const
|
|
||||||
{
|
|
||||||
return this->isDisturbed;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool CustomBodyState::IsForwarded() const
|
|
||||||
{
|
|
||||||
return this->isForwarded;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityWell::GravityWell( )
|
|
||||||
{
|
|
||||||
this->position = ::Oyster::Math::Float3::null;
|
|
||||||
this->mass = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityWell::GravityWell( const GravityWell &gravityWell )
|
|
||||||
{
|
|
||||||
this->position = gravityWell.position;
|
|
||||||
this->mass = gravityWell.mass;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityWell & GravityWell::operator = ( const GravityWell &gravityWell )
|
|
||||||
{
|
|
||||||
this->position = gravityWell.position;
|
|
||||||
this->mass = gravityWell.mass;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityWell::operator == ( const GravityWell &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->position == gravity.position )
|
|
||||||
if( this->mass == gravity.mass )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityWell::operator != ( const GravityWell &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->position == gravity.position )
|
|
||||||
if( this->mass == gravity.mass )
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirected::GravityDirected( )
|
|
||||||
{
|
|
||||||
this->impulse = ::Oyster::Math::Float3::null;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirected::GravityDirected( const GravityDirected &gravityDirected )
|
|
||||||
{
|
|
||||||
this->impulse = gravityDirected.impulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirected & GravityDirected::operator = ( const GravityDirected &gravityDirected )
|
|
||||||
{
|
|
||||||
this->impulse = gravityDirected.impulse;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityDirected::operator == ( const GravityDirected &gravity ) const
|
|
||||||
{
|
|
||||||
return this->impulse == gravity.impulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityDirected::operator != ( const GravityDirected &gravity ) const
|
|
||||||
{
|
|
||||||
return this->impulse != gravity.impulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirectedField::GravityDirectedField( )
|
|
||||||
{
|
|
||||||
this->normalizedDirection = ::Oyster::Math::Float3::null;
|
|
||||||
this->mass = 0.0f;
|
|
||||||
this->magnitude = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirectedField::GravityDirectedField( const GravityDirectedField &gravityDirectedField )
|
|
||||||
{
|
|
||||||
this->normalizedDirection = gravityDirectedField.normalizedDirection;
|
|
||||||
this->mass = gravityDirectedField.mass;
|
|
||||||
this->magnitude = gravityDirectedField.magnitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline GravityDirectedField & GravityDirectedField::operator = ( const GravityDirectedField &gravityDirectedField )
|
|
||||||
{
|
|
||||||
this->normalizedDirection = gravityDirectedField.normalizedDirection;
|
|
||||||
this->mass = gravityDirectedField.mass;
|
|
||||||
this->magnitude = gravityDirectedField.magnitude;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityDirectedField::operator == ( const GravityDirectedField &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->normalizedDirection == gravity.normalizedDirection )
|
|
||||||
if( this->mass == gravity.mass )
|
|
||||||
if( this->magnitude == gravity.magnitude )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool GravityDirectedField::operator != ( const GravityDirectedField &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->normalizedDirection == gravity.normalizedDirection )
|
|
||||||
if( this->mass == gravity.mass )
|
|
||||||
if( this->magnitude == gravity.magnitude )
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Gravity::Gravity()
|
|
||||||
{
|
|
||||||
this->gravityType = GravityType_Undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Gravity::Gravity( const Gravity &gravity )
|
|
||||||
{
|
|
||||||
this->gravityType = gravity.gravityType;
|
|
||||||
|
|
||||||
switch( gravity.gravityType )
|
|
||||||
{
|
|
||||||
case GravityType_Well:
|
|
||||||
this->well = gravity.well;
|
|
||||||
break;
|
|
||||||
case GravityType_Directed:
|
|
||||||
this->directed = gravity.directed;
|
|
||||||
break;
|
|
||||||
case GravityType_DirectedField:
|
|
||||||
this->directedField = gravity.directedField;
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Gravity & Gravity::operator = ( const Gravity &gravity )
|
|
||||||
{
|
|
||||||
this->gravityType = gravity.gravityType;
|
|
||||||
|
|
||||||
switch( gravity.gravityType )
|
|
||||||
{
|
|
||||||
case GravityType_Well:
|
|
||||||
this->well = gravity.well;
|
|
||||||
break;
|
|
||||||
case GravityType_Directed:
|
|
||||||
this->directed = gravity.directed;
|
|
||||||
break;
|
|
||||||
case GravityType_DirectedField:
|
|
||||||
this->directedField = gravity.directedField;
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Gravity::operator == ( const Gravity &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->gravityType == gravity.gravityType )
|
|
||||||
{
|
|
||||||
switch( this->gravityType )
|
|
||||||
{
|
|
||||||
case GravityType_Well: return this->well == gravity.well;
|
|
||||||
case GravityType_Directed: return this->directed == gravity.directed;
|
|
||||||
case GravityType_DirectedField: return this->directedField == gravity.directedField;
|
|
||||||
default: return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Gravity::operator != ( const Gravity &gravity ) const
|
|
||||||
{
|
|
||||||
if( this->gravityType == gravity.gravityType )
|
|
||||||
{
|
|
||||||
switch( this->gravityType )
|
|
||||||
{
|
|
||||||
case GravityType_Well: return this->well != gravity.well;
|
|
||||||
case GravityType_Directed: return this->directed != gravity.directed;
|
|
||||||
case GravityType_DirectedField: return this->directedField != gravity.directedField;
|
|
||||||
default: return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,212 +5,40 @@
|
||||||
#include "PhysicsAPI.h"
|
#include "PhysicsAPI.h"
|
||||||
#include "Inertia.h"
|
#include "Inertia.h"
|
||||||
|
|
||||||
namespace Oyster { namespace Physics
|
namespace Oyster
|
||||||
{
|
{
|
||||||
namespace Struct
|
namespace Physics
|
||||||
{
|
{
|
||||||
struct SimpleBodyDescription
|
namespace Struct
|
||||||
{
|
{
|
||||||
::Oyster::Math::Float3 rotation;
|
struct CustomBodyState
|
||||||
::Oyster::Math::Float3 centerPosition;
|
|
||||||
::Oyster::Math::Float3 size;
|
|
||||||
::Oyster::Math::Float mass;
|
|
||||||
::Oyster::Math::Float restitutionCoeff;
|
|
||||||
::Oyster::Math::Float frictionCoeff_Static;
|
|
||||||
::Oyster::Math::Float frictionCoeff_Dynamic;
|
|
||||||
::Oyster::Physics3D::MomentOfInertia inertiaTensor;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse subscription_onCollision;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse subscription_onCollisionResponse;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_Move subscription_onMovement;
|
|
||||||
bool ignoreGravity;
|
|
||||||
|
|
||||||
SimpleBodyDescription();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SphericalBodyDescription
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 rotation;
|
|
||||||
::Oyster::Math::Float3 centerPosition;
|
|
||||||
::Oyster::Math::Float radius;
|
|
||||||
::Oyster::Math::Float mass;
|
|
||||||
::Oyster::Math::Float restitutionCoeff;
|
|
||||||
::Oyster::Math::Float frictionCoeff_Static;
|
|
||||||
::Oyster::Math::Float frictionCoeff_Dynamic;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_BeforeCollisionResponse subscription_onCollision;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_AfterCollisionResponse subscription_onCollisionResponse;
|
|
||||||
::Oyster::Physics::ICustomBody::EventAction_Move subscription_onMovement;
|
|
||||||
bool ignoreGravity;
|
|
||||||
|
|
||||||
SphericalBodyDescription();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CustomBodyState
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CustomBodyState( ::Oyster::Math::Float mass = 1.0f,
|
|
||||||
::Oyster::Math::Float restitutionCoeff = 1.0f,
|
|
||||||
::Oyster::Math::Float staticFrictionCoeff = 1.0f,
|
|
||||||
::Oyster::Math::Float kineticFrictionCoeff = 1.0f,
|
|
||||||
const ::Oyster::Physics3D::MomentOfInertia &inertiaTensor = ::Oyster::Physics3D::MomentOfInertia(),
|
|
||||||
const ::Oyster::Math::Float3 &reach = ::Oyster::Math::Float3::null,
|
|
||||||
const ::Oyster::Math::Float3 ¢erPos = ::Oyster::Math::Float3::null,
|
|
||||||
const ::Oyster::Math::Float3 &rotation = ::Oyster::Math::Float3::null,
|
|
||||||
const ::Oyster::Math::Float3 &linearMomentum = ::Oyster::Math::Float3::null,
|
|
||||||
const ::Oyster::Math::Float3 &angularMomentum = ::Oyster::Math::Float3::null,
|
|
||||||
const ::Oyster::Math::Float3 &gravityNormal = ::Oyster::Math::Float3::null);
|
|
||||||
|
|
||||||
CustomBodyState & operator = ( const CustomBodyState &state );
|
|
||||||
|
|
||||||
const ::Oyster::Math::Float GetMass() const;
|
|
||||||
const ::Oyster::Math::Float GetRestitutionCoeff() const;
|
|
||||||
const ::Oyster::Math::Float GetFrictionCoeff_Static() const;
|
|
||||||
const ::Oyster::Math::Float GetFrictionCoeff_Kinetic() const;
|
|
||||||
const ::Oyster::Physics3D::MomentOfInertia & GetMomentOfInertia() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetReach() const;
|
|
||||||
::Oyster::Math::Float3 GetSize() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetCenterPosition() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetAngularAxis() const;
|
|
||||||
::Oyster::Math::Float4x4 GetRotation() const;
|
|
||||||
::Oyster::Math::Float4x4 GetOrientation() const;
|
|
||||||
::Oyster::Math::Float4x4 GetOrientation( const ::Oyster::Math::Float3 &offset ) const;
|
|
||||||
::Oyster::Math::Float4x4 GetView() const;
|
|
||||||
::Oyster::Math::Float4x4 GetView( const ::Oyster::Math::Float3 &offset ) const;
|
|
||||||
const ::Oyster::Math::Float3 & GetLinearMomentum() const;
|
|
||||||
::Oyster::Math::Float3 GetLinearMomentum( const ::Oyster::Math::Float3 &at ) const;
|
|
||||||
const ::Oyster::Math::Float3 & GetAngularMomentum() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetLinearImpulse() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetAngularImpulse() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetForward_DeltaPos() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetForward_DeltaAxis() const;
|
|
||||||
const ::Oyster::Math::Float3 & GetGravityNormal() const;
|
|
||||||
|
|
||||||
void SetMass_KeepMomentum( ::Oyster::Math::Float m );
|
|
||||||
void SetMass_KeepVelocity( ::Oyster::Math::Float m );
|
|
||||||
void SetRestitutionCoeff( ::Oyster::Math::Float e );
|
|
||||||
void SetFrictionCoeff( ::Oyster::Math::Float staticU, ::Oyster::Math::Float kineticU );
|
|
||||||
void SetMomentOfInertia_KeepMomentum( const ::Oyster::Physics3D::MomentOfInertia &tensor );
|
|
||||||
void SetMomentOfInertia_KeepVelocity( const ::Oyster::Physics3D::MomentOfInertia &tensor );
|
|
||||||
void SetSize( const ::Oyster::Math::Float3 &size );
|
|
||||||
void SetReach( const ::Oyster::Math::Float3 &halfSize );
|
|
||||||
void SetCenterPosition( const ::Oyster::Math::Float3 ¢erPos );
|
|
||||||
void SetRotation( const ::Oyster::Math::Float3 &angularAxis );
|
|
||||||
//void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
|
|
||||||
//void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
|
|
||||||
void SetOrientation( const ::Oyster::Math::Float3 &angularAxis, const ::Oyster::Math::Float3 &translation );
|
|
||||||
void SetLinearMomentum( const ::Oyster::Math::Float3 &g );
|
|
||||||
void SetAngularMomentum( const ::Oyster::Math::Float3 &h );
|
|
||||||
void SetLinearImpulse( const ::Oyster::Math::Float3 &j );
|
|
||||||
void SetAngularImpulse( const ::Oyster::Math::Float3 &j );
|
|
||||||
void SetGravityNormal( const ::Oyster::Math::Float3 &gravityNormal );
|
|
||||||
|
|
||||||
void AddRotation( const ::Oyster::Math::Float3 &angularAxis );
|
|
||||||
void AddTranslation( const ::Oyster::Math::Float3 &deltaPos );
|
|
||||||
|
|
||||||
void ApplyLinearImpulse( const ::Oyster::Math::Float3 &j );
|
|
||||||
void ApplyAngularImpulse( const ::Oyster::Math::Float3 &j );
|
|
||||||
void ApplyImpulse( const ::Oyster::Math::Float3 &j, const ::Oyster::Math::Float3 &at, const ::Oyster::Math::Float3 &normal );
|
|
||||||
void CustomBodyState::ApplyFriction( const ::Oyster::Math::Float3 &j);
|
|
||||||
void ApplyForwarding( const ::Oyster::Math::Float3 &deltaPos, const ::Oyster::Math::Float3 &deltaAxis );
|
|
||||||
|
|
||||||
bool IsSpatiallyAltered() const;
|
|
||||||
bool IsDisturbed() const;
|
|
||||||
bool IsForwarded() const;
|
|
||||||
|
|
||||||
::Oyster::Math::Float3 linearMomentum;
|
|
||||||
|
|
||||||
private:
|
|
||||||
::Oyster::Math::Float mass, restitutionCoeff, staticFrictionCoeff, kineticFrictionCoeff;
|
|
||||||
::Oyster::Physics3D::MomentOfInertia inertiaTensor;
|
|
||||||
::Oyster::Math::Float3 reach, centerPos, angularAxis;
|
|
||||||
::Oyster::Math::Float3 angularMomentum;
|
|
||||||
::Oyster::Math::Float3 linearImpulse, angularImpulse;
|
|
||||||
::Oyster::Math::Float3 deltaPos, deltaAxis; // Forwarding data sum
|
|
||||||
::Oyster::Math::Float3 gravityNormal;
|
|
||||||
|
|
||||||
bool isSpatiallyAltered, isDisturbed, isForwarded;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
###############################################################################
|
|
||||||
Can't define structs inside structs in a union therefor they are declared here.
|
|
||||||
###############################################################################
|
|
||||||
*/
|
|
||||||
struct GravityWell
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 position;
|
|
||||||
::Oyster::Math::Float mass;
|
|
||||||
|
|
||||||
GravityWell( );
|
|
||||||
GravityWell( const GravityWell &gravityWell );
|
|
||||||
GravityWell & operator = ( const GravityWell &gravityWell );
|
|
||||||
|
|
||||||
bool operator == ( const GravityWell &gravity ) const;
|
|
||||||
bool operator != ( const GravityWell &gravity ) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GravityDirected
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 impulse;
|
|
||||||
|
|
||||||
GravityDirected( );
|
|
||||||
GravityDirected( const GravityDirected &gravityDirected );
|
|
||||||
GravityDirected & operator = ( const GravityDirected &gravityDirected );
|
|
||||||
|
|
||||||
bool operator == ( const GravityDirected &gravity ) const;
|
|
||||||
bool operator != ( const GravityDirected &gravity ) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GravityDirectedField
|
|
||||||
{
|
|
||||||
::Oyster::Math::Float3 normalizedDirection;
|
|
||||||
::Oyster::Math::Float mass;
|
|
||||||
::Oyster::Math::Float magnitude;
|
|
||||||
|
|
||||||
GravityDirectedField( );
|
|
||||||
GravityDirectedField( const GravityDirectedField &gravityDirectedField );
|
|
||||||
GravityDirectedField & operator = ( const GravityDirectedField &gravityDirectedField );
|
|
||||||
|
|
||||||
bool operator == ( const GravityDirectedField &gravity ) const;
|
|
||||||
bool operator != ( const GravityDirectedField &gravity ) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Gravity
|
|
||||||
{
|
|
||||||
enum GravityType
|
|
||||||
{
|
{
|
||||||
GravityType_Undefined = -1,
|
public:
|
||||||
GravityType_Well = 0,
|
// Default constructor
|
||||||
GravityType_Directed = 1,
|
CustomBodyState( ::Oyster::Math::Float mass = 1.0f,
|
||||||
GravityType_DirectedField = 2,
|
::Oyster::Math::Float restitutionCoeff = 1.0f,
|
||||||
} gravityType;
|
::Oyster::Math::Float staticFrictionCoeff = 1.0f,
|
||||||
|
::Oyster::Math::Float dynamicFrictionCoeff = 1.0f,
|
||||||
|
const ::Oyster::Math::Float3 ¢erPos = ::Oyster::Math::Float3::null,
|
||||||
|
const ::Oyster::Math::Quaternion &quaternion = ::Oyster::Math::Quaternion(::Oyster::Math::Float3(0, 0, 0), 1));
|
||||||
|
|
||||||
union
|
// Assignment operator
|
||||||
{
|
CustomBodyState & operator = ( const CustomBodyState &state );
|
||||||
struct
|
|
||||||
{
|
|
||||||
GravityWell well;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct
|
// Get functions that calculate matrices that do not exist as variables
|
||||||
{
|
::Oyster::Math::Float4x4 GetRotation() const;
|
||||||
GravityDirected directed;
|
::Oyster::Math::Float4x4 GetOrientation() const;
|
||||||
};
|
::Oyster::Math::Float4x4 GetView() const;
|
||||||
|
::Oyster::Math::Float4x4 GetView( const ::Oyster::Math::Float3 &offset ) const;
|
||||||
|
|
||||||
struct
|
// Variables for state
|
||||||
{
|
::Oyster::Math::Float mass, restitutionCoeff, staticFrictionCoeff, dynamicFrictionCoeff;
|
||||||
GravityDirectedField directedField;
|
::Oyster::Math::Float3 reach, centerPos;
|
||||||
};
|
::Oyster::Math::Quaternion quaternion;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
Gravity( );
|
}
|
||||||
Gravity( const Gravity &gravity );
|
}
|
||||||
Gravity & operator = ( const Gravity &gravity );
|
|
||||||
|
|
||||||
bool operator == ( const Gravity &gravity ) const;
|
|
||||||
bool operator != ( const Gravity &gravity ) const;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} }
|
|
||||||
|
|
||||||
|
|
||||||
#include "PhysicsStructs-Impl.h"
|
#include "PhysicsStructs-Impl.h"
|
||||||
|
|
|
@ -13,7 +13,7 @@ using namespace ::Utility::Value;
|
||||||
RigidBody::RigidBody( )
|
RigidBody::RigidBody( )
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
this->centerPos = Float4::standard_unit_w;
|
this->centerPos = Float4::standard_unit_w;
|
||||||
this->axis = Float4::null;
|
this->quaternion = Quaternion(Float3(0, 0, 0), 1);
|
||||||
this->boundingReach = Float4( 0.5f, 0.5f, 0.5f, 0.0f );
|
this->boundingReach = Float4( 0.5f, 0.5f, 0.5f, 0.0f );
|
||||||
this->momentum_Linear = Float4::null;
|
this->momentum_Linear = Float4::null;
|
||||||
this->momentum_Angular = Float4::null;
|
this->momentum_Angular = Float4::null;
|
||||||
|
@ -24,13 +24,12 @@ RigidBody::RigidBody( )
|
||||||
this->frictionCoeff_Kinetic = 1.0f;
|
this->frictionCoeff_Kinetic = 1.0f;
|
||||||
this->mass = 10;
|
this->mass = 10;
|
||||||
this->momentOfInertiaTensor = MomentOfInertia();
|
this->momentOfInertiaTensor = MomentOfInertia();
|
||||||
this->rotation = Quaternion::identity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RigidBody & RigidBody::operator = ( const RigidBody &body )
|
RigidBody & RigidBody::operator = ( const RigidBody &body )
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
this->centerPos = body.centerPos;
|
this->centerPos = body.centerPos;
|
||||||
this->axis = body.axis;
|
this->quaternion = body.quaternion;
|
||||||
this->boundingReach = body.boundingReach;
|
this->boundingReach = body.boundingReach;
|
||||||
this->momentum_Linear = body.momentum_Linear;
|
this->momentum_Linear = body.momentum_Linear;
|
||||||
this->momentum_Angular = body.momentum_Angular;
|
this->momentum_Angular = body.momentum_Angular;
|
||||||
|
@ -41,7 +40,6 @@ RigidBody & RigidBody::operator = ( const RigidBody &body )
|
||||||
this->frictionCoeff_Kinetic = body.frictionCoeff_Kinetic;
|
this->frictionCoeff_Kinetic = body.frictionCoeff_Kinetic;
|
||||||
this->mass = body.mass;
|
this->mass = body.mass;
|
||||||
this->momentOfInertiaTensor = body.momentOfInertiaTensor;
|
this->momentOfInertiaTensor = body.momentOfInertiaTensor;
|
||||||
this->rotation = body.rotation;
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,19 +53,14 @@ void RigidBody::Update_LeapFrog( Float updateFrameLength )
|
||||||
this->momentum_Angular = this->momentum_Angular*0.99f;
|
this->momentum_Angular = this->momentum_Angular*0.99f;
|
||||||
|
|
||||||
// ds = dt * Formula::LinearVelocity( m, avg_G ) = dt * avg_G / m = (dt / m) * avg_G
|
// ds = dt * Formula::LinearVelocity( m, avg_G ) = dt * avg_G / m = (dt / m) * avg_G
|
||||||
Float3 delta = AverageWithDelta( this->momentum_Linear, this->impulse_Linear );
|
Float3 delta = this->momentum_Linear;
|
||||||
Float3 newPos = updateFrameLength*this->momentum_Linear;
|
Float3 newPos = (updateFrameLength)*this->momentum_Linear;
|
||||||
this->centerPos += newPos;
|
this->centerPos += newPos;
|
||||||
|
|
||||||
if(this->mass == 70)
|
|
||||||
{
|
|
||||||
const char *breakpoint = "STOP";
|
|
||||||
}
|
|
||||||
|
|
||||||
// updating the angular
|
// updating the angular
|
||||||
// dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H
|
// dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H
|
||||||
this->axis += updateFrameLength*this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, this->momentum_Angular );
|
/*this->axis += updateFrameLength*this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, this->momentum_Angular );
|
||||||
this->rotation = Rotation( this->axis );
|
this->rotation = Rotation( this->axis );*/
|
||||||
|
|
||||||
// update momentums and clear impulse_Linear and impulse_Angular
|
// update momentums and clear impulse_Linear and impulse_Angular
|
||||||
this->momentum_Linear += this->impulse_Linear;
|
this->momentum_Linear += this->impulse_Linear;
|
||||||
|
@ -89,14 +82,14 @@ void RigidBody::Predict_LeapFrog( Float3 &outDeltaPos, Float3 &outDeltaAxis, con
|
||||||
|
|
||||||
// dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H
|
// dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H
|
||||||
//outDeltaAxis = Formula::AngularVelocity( wMomentOfInertiaTensor.GetInverse(), AverageWithDelta(this->momentum_Angular, actingAngularImpulse) );
|
//outDeltaAxis = Formula::AngularVelocity( wMomentOfInertiaTensor.GetInverse(), AverageWithDelta(this->momentum_Angular, actingAngularImpulse) );
|
||||||
outDeltaAxis = this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, AverageWithDelta(this->momentum_Angular, this->impulse_Angular) );
|
//utDeltaAxis = this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, AverageWithDelta(this->momentum_Angular, this->impulse_Angular) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::Move( const Float3 &deltaPos, const Float3 &deltaAxis )
|
void RigidBody::Move( const Float3 &deltaPos, const Float3 &deltaAxis )
|
||||||
{
|
{
|
||||||
this->centerPos += deltaPos;
|
//this->centerPos += deltaPos;
|
||||||
this->axis += deltaAxis;
|
//this->axis += deltaAxis;
|
||||||
this->rotation = Rotation( this->axis );
|
//this->rotation = Rotation( this->axis );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::ApplyImpulse( const Float3 &worldJ, const Float3 &atWorldPos )
|
void RigidBody::ApplyImpulse( const Float3 &worldJ, const Float3 &atWorldPos )
|
||||||
|
@ -125,22 +118,22 @@ Float RigidBody::GetMass() const
|
||||||
|
|
||||||
const Quaternion & RigidBody::GetRotationQuaternion() const
|
const Quaternion & RigidBody::GetRotationQuaternion() const
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
return this->rotation;
|
return this->quaternion;
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 RigidBody::GetRotationMatrix() const
|
Float4x4 RigidBody::GetRotationMatrix() const
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
return RotationMatrix( this->rotation );
|
return RotationMatrix( quaternion );
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 RigidBody::GetOrientation() const
|
Float4x4 RigidBody::GetOrientation() const
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
return ::Oyster::Math3D::OrientationMatrix( this->rotation, this->centerPos );
|
return ::Oyster::Math3D::OrientationMatrix( this->quaternion, this->centerPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
Float4x4 RigidBody::GetView() const
|
Float4x4 RigidBody::GetView() const
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
return ViewMatrix( this->rotation, this->centerPos );
|
return ViewMatrix( this->quaternion, this->centerPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
Float3 RigidBody::GetVelocity_Linear() const
|
Float3 RigidBody::GetVelocity_Linear() const
|
||||||
|
@ -150,7 +143,7 @@ Float3 RigidBody::GetVelocity_Linear() const
|
||||||
|
|
||||||
Float3 RigidBody::GetVelocity_Angular() const
|
Float3 RigidBody::GetVelocity_Angular() const
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
return this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, this->momentum_Angular );
|
return Float3(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Float3 RigidBody::GetLinearMomentum( const Float3 &atWorldPos ) const
|
Float3 RigidBody::GetLinearMomentum( const Float3 &atWorldPos ) const
|
||||||
|
@ -165,9 +158,7 @@ Float3 RigidBody::GetLinearMomentum( const Float3 &atWorldPos ) const
|
||||||
|
|
||||||
void RigidBody::SetMomentOfInertia_KeepVelocity( const MomentOfInertia &localTensorI )
|
void RigidBody::SetMomentOfInertia_KeepVelocity( const MomentOfInertia &localTensorI )
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
Float3 w = this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, this->momentum_Angular );
|
|
||||||
this->momentOfInertiaTensor = localTensorI;
|
|
||||||
this->momentum_Angular = this->momentOfInertiaTensor.CalculateAngularVelocity( this->rotation, w );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::SetMomentOfInertia_KeepMomentum( const MomentOfInertia &localTensorI )
|
void RigidBody::SetMomentOfInertia_KeepMomentum( const MomentOfInertia &localTensorI )
|
||||||
|
@ -193,10 +184,9 @@ void RigidBody::SetMass_KeepMomentum( const Float &m )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::SetRotation( const Float3 &axis )
|
void RigidBody::SetRotation( const ::Oyster::Math::Quaternion &quaternion )
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
this->axis = axis;
|
this->quaternion = quaternion;
|
||||||
this->rotation = Rotation( this->axis );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::SetMomentum_Linear( const Float3 &worldG, const Float3 &atWorldPos )
|
void RigidBody::SetMomentum_Linear( const Float3 &worldG, const Float3 &atWorldPos )
|
||||||
|
@ -215,12 +205,12 @@ void RigidBody::SetVelocity_Linear( const Float3 &worldV, const Float3 &atWorldP
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
Float3 worldOffset = atWorldPos - this->centerPos;
|
Float3 worldOffset = atWorldPos - this->centerPos;
|
||||||
this->momentum_Linear = Formula::LinearMomentum( this->mass, VectorProjection(worldV, worldOffset) );
|
this->momentum_Linear = Formula::LinearMomentum( this->mass, VectorProjection(worldV, worldOffset) );
|
||||||
this->momentum_Angular = this->momentOfInertiaTensor.CalculateAngularMomentum( this->rotation, Formula::AngularVelocity(worldV, worldOffset) );
|
this->momentum_Angular = this->momentOfInertiaTensor.CalculateAngularMomentum( this->quaternion, Formula::AngularVelocity(worldV, worldOffset) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::SetVelocity_Angular( const Float3 &worldW )
|
void RigidBody::SetVelocity_Angular( const Float3 &worldW )
|
||||||
{ // by Dan Andersson
|
{ // by Dan Andersson
|
||||||
this->momentum_Angular = this->momentOfInertiaTensor.CalculateAngularMomentum( this->rotation, worldW );
|
this->momentum_Angular = this->momentOfInertiaTensor.CalculateAngularMomentum( this->quaternion, worldW );
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody::SetImpulse_Linear( const Float3 &worldJ, const Float3 &atWorldPos )
|
void RigidBody::SetImpulse_Linear( const Float3 &worldJ, const Float3 &atWorldPos )
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace Oyster { namespace Physics3D
|
||||||
struct RigidBody
|
struct RigidBody
|
||||||
{ //! A struct of a simple rigid body.
|
{ //! A struct of a simple rigid body.
|
||||||
public:
|
public:
|
||||||
|
::Oyster::Math::Quaternion quaternion;
|
||||||
::Oyster::Math::Float3 centerPos, //!< Location of the body's center in the world.
|
::Oyster::Math::Float3 centerPos, //!< Location of the body's center in the world.
|
||||||
axis, //!< Euler rotationAxis of the body.
|
|
||||||
boundingReach, //!<
|
boundingReach, //!<
|
||||||
momentum_Linear, //!< The linear momentum G (kg*m/s).
|
momentum_Linear, //!< The linear momentum G (kg*m/s).
|
||||||
momentum_Angular, //!< The angular momentum H (Nm*s) around an parallell axis.
|
momentum_Angular, //!< The angular momentum H (Nm*s) around an parallell axis.
|
||||||
|
@ -64,7 +64,7 @@ namespace Oyster { namespace Physics3D
|
||||||
void SetMass_KeepMomentum( const ::Oyster::Math::Float &m );
|
void SetMass_KeepMomentum( const ::Oyster::Math::Float &m );
|
||||||
|
|
||||||
//void SetOrientation( const ::Oyster::Math::Float4x4 &o );
|
//void SetOrientation( const ::Oyster::Math::Float4x4 &o );
|
||||||
void SetRotation( const ::Oyster::Math::Float3 &axis );
|
void SetRotation( const ::Oyster::Math::Quaternion &quaternion );
|
||||||
void SetSize( const ::Oyster::Math::Float3 &widthHeight );
|
void SetSize( const ::Oyster::Math::Float3 &widthHeight );
|
||||||
|
|
||||||
void SetMomentum_Linear( const ::Oyster::Math::Float3 &worldG, const ::Oyster::Math::Float3 &atWorldPos );
|
void SetMomentum_Linear( const ::Oyster::Math::Float3 &worldG, const ::Oyster::Math::Float3 &atWorldPos );
|
||||||
|
@ -81,7 +81,7 @@ namespace Oyster { namespace Physics3D
|
||||||
::Oyster::Math::Float mass; //!< m (kg)
|
::Oyster::Math::Float mass; //!< m (kg)
|
||||||
//::Oyster::Math::Float4x4 momentOfInertiaTensor; //!< I (Nm*s) Tensor matrix ( only need to be 3x3 matrix, but is 4x4 for future hardware acceleration ) (localValue)
|
//::Oyster::Math::Float4x4 momentOfInertiaTensor; //!< I (Nm*s) Tensor matrix ( only need to be 3x3 matrix, but is 4x4 for future hardware acceleration ) (localValue)
|
||||||
::Oyster::Physics3D::MomentOfInertia momentOfInertiaTensor;
|
::Oyster::Physics3D::MomentOfInertia momentOfInertiaTensor;
|
||||||
::Oyster::Math::Quaternion rotation; //!< RotationAxis of the body.
|
//::Oyster::Math::Quaternion rotation; //!< RotationAxis of the body.
|
||||||
};
|
};
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,487 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{B84D4C8B-DF9F-4B41-994D-A6FFFA64F274}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>BulletCollision</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)Physics\Debug\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">BulletCollision.dir\Debug\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">BulletCollision_Debug</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)Physics\Release</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">BulletCollision.dir\Release\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">BulletCollision</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\MinSizeRel\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">BulletCollision.dir\MinSizeRel\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">BulletCollision_MinsizeRel</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\RelWithDebInfo\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">BulletCollision.dir\RelWithDebInfo\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">BulletCollision_RelWithDebugInfo</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.lib</TargetExt>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Debug/</AssemblerListingLocation>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Release/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>MinSizeRel/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletCollision\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btAxisSweep3.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btBroadphaseProxy.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btDbvt.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btDbvtBroadphase.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btDispatcher.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btMultiSapBroadphase.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCache.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btQuantizedBvh.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\BroadphaseCollision\btSimpleBroadphase.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btActivatingCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btBox2dBox2dCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btBoxBoxCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btBoxBoxDetector.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btCollisionDispatcher.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btCollisionObject.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btCollisionWorld.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btCompoundCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btCompoundCompoundCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btConvex2dConvex2dAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btConvexConcaveCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btConvexConvexAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btConvexPlaneCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btDefaultCollisionConfiguration.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btEmptyCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btGhostObject.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btHashedSimplePairCache.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btManifoldResult.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btSimulationIslandManager.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btSphereBoxCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btSphereSphereCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btSphereTriangleCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\btUnionFind.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionDispatch\SphereTriangleDetector.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btBox2dShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btBoxShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btBvhTriangleMeshShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btCapsuleShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btCollisionShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btCompoundShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConcaveShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConeShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvex2dShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexHullShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexInternalShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexPointCloudShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexPolyhedron.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btConvexTriangleMeshShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btCylinderShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btEmptyShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btHeightfieldTerrainShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btMinkowskiSumShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btMultimaterialTriangleMeshShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btMultiSphereShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btOptimizedBvh.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btPolyhedralConvexShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btScaledBvhTriangleMeshShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btShapeHull.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btSphereShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btStaticPlaneShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btStridingMeshInterface.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTetrahedronShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleBuffer.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleCallback.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexArray.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexMaterialArray.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleMesh.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btTriangleMeshShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\CollisionShapes\btUniformScalingShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btContactProcessing.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btGenericPoolAllocator.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btGImpactBvh.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btGImpactCollisionAlgorithm.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btGImpactQuantizedBvh.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btGImpactShape.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\btTriangleShapeEx.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\gim_box_set.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\gim_contact.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\gim_memory.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\Gimpact\gim_tri_collision.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btContinuousConvexCollision.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btConvexCast.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkConvexCast.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkEpa2.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkEpaPenetrationDepthSolver.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkPairDetector.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btMinkowskiPenetrationDepthSolver.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btPersistentManifold.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btPolyhedralContactClipping.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btRaycastCallback.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btSubSimplexConvexCast.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletCollision\NarrowPhaseCollision\btVoronoiSimplexSolver.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btAxisSweep3.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btBroadphaseInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btBroadphaseProxy.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btDbvt.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btDbvtBroadphase.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btDispatcher.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btMultiSapBroadphase.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCache.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCallback.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btQuantizedBvh.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\BroadphaseCollision\btSimpleBroadphase.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btActivatingCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btBox2dBox2dCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btBoxBoxCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btBoxBoxDetector.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionConfiguration.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionCreateFunc.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionDispatcher.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionObject.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionObjectWrapper.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCollisionWorld.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCompoundCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btCompoundCompoundCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btConvex2dConvex2dAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btConvexConcaveCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btConvexConvexAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btConvexPlaneCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btDefaultCollisionConfiguration.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btEmptyCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btGhostObject.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btHashedSimplePairCache.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btManifoldResult.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btSimulationIslandManager.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btSphereBoxCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btSphereSphereCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btSphereTriangleCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\btUnionFind.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionDispatch\SphereTriangleDetector.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btBox2dShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btBoxShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btBvhTriangleMeshShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btCapsuleShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btCollisionMargin.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btCollisionShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btCompoundShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConcaveShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConeShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvex2dShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexHullShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexInternalShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexPointCloudShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexPolyhedron.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btConvexTriangleMeshShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btCylinderShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btEmptyShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btHeightfieldTerrainShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btMaterial.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btMinkowskiSumShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btMultimaterialTriangleMeshShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btMultiSphereShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btOptimizedBvh.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btPolyhedralConvexShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btScaledBvhTriangleMeshShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btShapeHull.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btSphereShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btStaticPlaneShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btStridingMeshInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTetrahedronShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleBuffer.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleCallback.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexArray.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexMaterialArray.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleInfoMap.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleMesh.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleMeshShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btTriangleShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\CollisionShapes\btUniformScalingShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btBoxCollision.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btClipPolygon.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btCompoundFromGimpact.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btContactProcessing.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGenericPoolAllocator.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGeometryOperations.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGImpactBvh.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGImpactCollisionAlgorithm.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGImpactMassUtil.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGImpactQuantizedBvh.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btGImpactShape.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btQuantization.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\btTriangleShapeEx.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_array.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_basic_geometry_operations.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_bitset.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_box_collision.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_box_set.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_clip_polygon.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_contact.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_geometry.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_geom_types.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_hash_table.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_linear_math.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_math.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_memory.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_radixsort.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\Gimpact\gim_tri_collision.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btContinuousConvexCollision.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btConvexCast.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btConvexPenetrationDepthSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btDiscreteCollisionDetectorInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkConvexCast.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkEpa2.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkEpaPenetrationDepthSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btGjkPairDetector.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btManifoldPoint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btMinkowskiPenetrationDepthSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btPersistentManifold.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btPointCollector.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btPolyhedralContactClipping.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btRaycastCallback.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btSimplexSolverInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btSubSimplexConvexCast.h" />
|
||||||
|
<ClInclude Include="..\src\BulletCollision\NarrowPhaseCollision\btVoronoiSimplexSolver.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
|
@ -0,0 +1 @@
|
||||||
|
# CMake generation timestamp file for this directory.
|
|
@ -0,0 +1,2 @@
|
||||||
|
# CMake generation dependency list for this directory.
|
||||||
|
C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision/CMakeLists.txt
|
|
@ -0,0 +1,217 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{0A758B62-DE3C-493C-985D-39E48A384A7C}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>INSTALL</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="..\..\CMakeFiles\2488fbf1c07ab778f5bdaf8ca8459122\INSTALL_force.rule">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/2488fbf1c07ab778f5bdaf8ca8459122/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/2488fbf1c07ab778f5bdaf8ca8459122/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/2488fbf1c07ab778f5bdaf8ca8459122/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/2488fbf1c07ab778f5bdaf8ca8459122/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletCollision\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="C:/Users/Robin/Programmering/Bullet/Binaries/ALL_BUILD.vcxproj">
|
||||||
|
<Project>F5149B3B-C2B1-4522-9FFD-121CED456BD3</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Install script for directory: C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletCollision
|
||||||
|
|
||||||
|
# Set the install prefix
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BULLET_PHYSICS")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
# Set the install configuration name.
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
IF(BUILD_TYPE)
|
||||||
|
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||||
|
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||||
|
ELSE(BUILD_TYPE)
|
||||||
|
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||||
|
ENDIF(BUILD_TYPE)
|
||||||
|
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
|
||||||
|
# Set the component getting installed.
|
||||||
|
IF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
IF(COMPONENT)
|
||||||
|
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||||
|
ELSE(COMPONENT)
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT)
|
||||||
|
ENDIF(COMPONENT)
|
||||||
|
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
|
|
@ -0,0 +1,343 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{6BCE5708-BFA3-4DE3-9942-E521A8A4EFE2}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>BulletDynamics</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)Physics\Debug\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">BulletDynamics.dir\Debug\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">BulletDynamics_Debug</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)Physics\Release</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">BulletDynamics.dir\Release\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">BulletDynamics</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\MinSizeRel\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">BulletDynamics.dir\MinSizeRel\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">BulletDynamics_MinsizeRel</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\RelWithDebInfo\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">BulletDynamics.dir\RelWithDebInfo\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">BulletDynamics_RelWithDebugInfo</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.lib</TargetExt>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Debug/</AssemblerListingLocation>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Release/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>MinSizeRel/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\BulletDynamics\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Character\btKinematicCharacterController.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btConeTwistConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btContactConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btFixedConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btGearConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btGeneric6DofConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btGeneric6DofSpringConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btHinge2Constraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btHingeConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btPoint2PointConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btSequentialImpulseConstraintSolver.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btSliderConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btSolve2LinearConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btTypedConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\ConstraintSolver\btUniversalConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Dynamics\btDiscreteDynamicsWorld.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Dynamics\btRigidBody.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Dynamics\btSimpleDynamicsWorld.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Dynamics\Bullet-C-API.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBody.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyConstraintSolver.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyDynamicsWorld.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyJointLimitConstraint.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyJointMotor.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Featherstone\btMultiBodyPoint2Point.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\MLCPSolvers\btDantzigLCP.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\MLCPSolvers\btMLCPSolver.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Vehicle\btRaycastVehicle.cpp" />
|
||||||
|
<ClCompile Include="..\src\BulletDynamics\Vehicle\btWheelInfo.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Character\btCharacterControllerInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Character\btKinematicCharacterController.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btConeTwistConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btConstraintSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btContactConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btContactSolverInfo.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btFixedConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btGearConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btGeneric6DofConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btGeneric6DofSpringConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btHinge2Constraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btHingeConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btJacobianEntry.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btPoint2PointConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btSequentialImpulseConstraintSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btSliderConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btSolve2LinearConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btSolverBody.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btSolverConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btTypedConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\ConstraintSolver\btUniversalConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Dynamics\btActionInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Dynamics\btDiscreteDynamicsWorld.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Dynamics\btDynamicsWorld.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Dynamics\btRigidBody.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Dynamics\btSimpleDynamicsWorld.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBody.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyConstraintSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyDynamicsWorld.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyJointLimitConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyJointMotor.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyLink.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyLinkCollider.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodyPoint2Point.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Featherstone\btMultiBodySolverConstraint.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btDantzigLCP.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btDantzigSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btMLCPSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btMLCPSolverInterface.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btPATHSolver.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\MLCPSolvers\btSolveProjectedGaussSeidel.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Vehicle\btRaycastVehicle.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Vehicle\btVehicleRaycaster.h" />
|
||||||
|
<ClInclude Include="..\src\BulletDynamics\Vehicle\btWheelInfo.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
|
@ -0,0 +1 @@
|
||||||
|
# CMake generation timestamp file for this directory.
|
|
@ -0,0 +1,2 @@
|
||||||
|
# CMake generation dependency list for this directory.
|
||||||
|
C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics/CMakeLists.txt
|
|
@ -0,0 +1,217 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{0A758B62-DE3C-493C-985D-39E48A384A7C}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>INSTALL</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="..\..\CMakeFiles\26c1e2c959f534a1cd3ce71328ceef74\INSTALL_force.rule">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/26c1e2c959f534a1cd3ce71328ceef74/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/26c1e2c959f534a1cd3ce71328ceef74/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/26c1e2c959f534a1cd3ce71328ceef74/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/26c1e2c959f534a1cd3ce71328ceef74/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\BulletDynamics\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="C:/Users/Robin/Programmering/Bullet/Binaries/ALL_BUILD.vcxproj">
|
||||||
|
<Project>F5149B3B-C2B1-4522-9FFD-121CED456BD3</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Install script for directory: C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/BulletDynamics
|
||||||
|
|
||||||
|
# Set the install prefix
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BULLET_PHYSICS")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
# Set the install configuration name.
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
IF(BUILD_TYPE)
|
||||||
|
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||||
|
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||||
|
ELSE(BUILD_TYPE)
|
||||||
|
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||||
|
ENDIF(BUILD_TYPE)
|
||||||
|
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
|
||||||
|
# Set the component getting installed.
|
||||||
|
IF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
IF(COMPONENT)
|
||||||
|
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||||
|
ELSE(COMPONENT)
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT)
|
||||||
|
ENDIF(COMPONENT)
|
||||||
|
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
// todo - implement these as you see fit.
|
||||||
|
inline GLint glRenderMode(GLenum a0) { return GL_RENDER; }; // ymmv. should return previous mode
|
||||||
|
inline GLenum glGetError() { return GL_NO_ERROR; };
|
||||||
|
inline GLboolean glIsList(GLuint a0) { return GL_TRUE; };
|
||||||
|
inline GLuint glGenLists(GLsizei a0) { return (GLuint)a0; };
|
||||||
|
inline const GLubyte* glGetString(GLenum a0) { return (const GLubyte *)"egl-xyzzy"; };
|
||||||
|
inline GLboolean glIsEnabled(GLenum a0) { return GL_TRUE; };
|
||||||
|
inline GLboolean glAreTexturesResident(GLsizei a0,const GLuint * a1,GLboolean * a2) { return GL_TRUE; };
|
||||||
|
inline GLboolean glIsTexture(GLuint a0) { return GL_TRUE; };
|
||||||
|
inline void glGetBooleanv(GLenum a0,GLboolean * a1) { *a1 = GL_TRUE; };
|
||||||
|
inline void glGetDoublev(GLenum a0,GLdouble * a1) { *a1 = 0.0; };
|
||||||
|
inline void glGetFloatv(GLenum a0,GLfloat * a1) { *a1 = 0.0f; };
|
||||||
|
inline void glGetIntegerv(GLenum a0,GLint * a1) { *a1 = 0; };
|
|
@ -0,0 +1,706 @@
|
||||||
|
#ifndef EGL_DEFS_H
|
||||||
|
#define EGL_DEFS_H
|
||||||
|
|
||||||
|
typedef unsigned int GLenum;
|
||||||
|
typedef unsigned char GLboolean;
|
||||||
|
typedef unsigned int GLbitfield;
|
||||||
|
typedef void GLvoid;
|
||||||
|
typedef signed char GLbyte;
|
||||||
|
typedef short GLshort;
|
||||||
|
typedef int GLint;
|
||||||
|
typedef unsigned char GLubyte;
|
||||||
|
typedef unsigned short GLushort;
|
||||||
|
typedef unsigned int GLuint;
|
||||||
|
typedef int GLsizei;
|
||||||
|
typedef float GLfloat;
|
||||||
|
typedef float GLclampf;
|
||||||
|
typedef double GLdouble;
|
||||||
|
typedef double GLclampd;
|
||||||
|
|
||||||
|
#define __gl_h_
|
||||||
|
#define GL_VERSION_1_1 1
|
||||||
|
#define GL_VERSION_1_2 1
|
||||||
|
#define GL_VERSION_1_3 1
|
||||||
|
#define GL_ARB_imaging 1
|
||||||
|
#define GL_FALSE 0x0
|
||||||
|
#define GL_TRUE 0x1
|
||||||
|
#define GL_BYTE 0x1400
|
||||||
|
#define GL_UNSIGNED_BYTE 0x1401
|
||||||
|
#define GL_SHORT 0x1402
|
||||||
|
#define GL_UNSIGNED_SHORT 0x1403
|
||||||
|
#define GL_INT 0x1404
|
||||||
|
#define GL_UNSIGNED_INT 0x1405
|
||||||
|
#define GL_FLOAT 0x1406
|
||||||
|
#define GL_2_BYTES 0x1407
|
||||||
|
#define GL_3_BYTES 0x1408
|
||||||
|
#define GL_4_BYTES 0x1409
|
||||||
|
#define GL_DOUBLE 0x140A
|
||||||
|
#define GL_POINTS 0x0000
|
||||||
|
#define GL_LINES 0x0001
|
||||||
|
#define GL_LINE_LOOP 0x0002
|
||||||
|
#define GL_LINE_STRIP 0x0003
|
||||||
|
#define GL_TRIANGLES 0x0004
|
||||||
|
#define GL_TRIANGLE_STRIP 0x0005
|
||||||
|
#define GL_TRIANGLE_FAN 0x0006
|
||||||
|
#define GL_QUADS 0x0007
|
||||||
|
#define GL_QUAD_STRIP 0x0008
|
||||||
|
#define GL_POLYGON 0x0009
|
||||||
|
#define GL_VERTEX_ARRAY 0x8074
|
||||||
|
#define GL_NORMAL_ARRAY 0x8075
|
||||||
|
#define GL_COLOR_ARRAY 0x8076
|
||||||
|
#define GL_INDEX_ARRAY 0x8077
|
||||||
|
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||||
|
#define GL_EDGE_FLAG_ARRAY 0x8079
|
||||||
|
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||||
|
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||||
|
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||||
|
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||||
|
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||||
|
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||||
|
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||||
|
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||||
|
#define GL_INDEX_ARRAY_TYPE 0x8085
|
||||||
|
#define GL_INDEX_ARRAY_STRIDE 0x8086
|
||||||
|
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||||
|
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||||
|
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||||
|
#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
|
||||||
|
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||||
|
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||||
|
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||||
|
#define GL_INDEX_ARRAY_POINTER 0x8091
|
||||||
|
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||||
|
#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
|
||||||
|
#define GL_V2F 0x2A20
|
||||||
|
#define GL_V3F 0x2A21
|
||||||
|
#define GL_C4UB_V2F 0x2A22
|
||||||
|
#define GL_C4UB_V3F 0x2A23
|
||||||
|
#define GL_C3F_V3F 0x2A24
|
||||||
|
#define GL_N3F_V3F 0x2A25
|
||||||
|
#define GL_C4F_N3F_V3F 0x2A26
|
||||||
|
#define GL_T2F_V3F 0x2A27
|
||||||
|
#define GL_T4F_V4F 0x2A28
|
||||||
|
#define GL_T2F_C4UB_V3F 0x2A29
|
||||||
|
#define GL_T2F_C3F_V3F 0x2A2A
|
||||||
|
#define GL_T2F_N3F_V3F 0x2A2B
|
||||||
|
#define GL_T2F_C4F_N3F_V3F 0x2A2C
|
||||||
|
#define GL_T4F_C4F_N3F_V4F 0x2A2D
|
||||||
|
#define GL_MATRIX_MODE 0x0BA0
|
||||||
|
#define GL_MODELVIEW 0x1700
|
||||||
|
#define GL_PROJECTION 0x1701
|
||||||
|
#define GL_TEXTURE 0x1702
|
||||||
|
#define GL_POINT_SMOOTH 0x0B10
|
||||||
|
#define GL_POINT_SIZE 0x0B11
|
||||||
|
#define GL_POINT_SIZE_GRANULARITY 0x0B13
|
||||||
|
#define GL_POINT_SIZE_RANGE 0x0B12
|
||||||
|
#define GL_LINE_SMOOTH 0x0B20
|
||||||
|
#define GL_LINE_STIPPLE 0x0B24
|
||||||
|
#define GL_LINE_STIPPLE_PATTERN 0x0B25
|
||||||
|
#define GL_LINE_STIPPLE_REPEAT 0x0B26
|
||||||
|
#define GL_LINE_WIDTH 0x0B21
|
||||||
|
#define GL_LINE_WIDTH_GRANULARITY 0x0B23
|
||||||
|
#define GL_LINE_WIDTH_RANGE 0x0B22
|
||||||
|
#define GL_POINT 0x1B00
|
||||||
|
#define GL_LINE 0x1B01
|
||||||
|
#define GL_FILL 0x1B02
|
||||||
|
#define GL_CW 0x0900
|
||||||
|
#define GL_CCW 0x0901
|
||||||
|
#define GL_FRONT 0x0404
|
||||||
|
#define GL_BACK 0x0405
|
||||||
|
#define GL_POLYGON_MODE 0x0B40
|
||||||
|
#define GL_POLYGON_SMOOTH 0x0B41
|
||||||
|
#define GL_POLYGON_STIPPLE 0x0B42
|
||||||
|
#define GL_EDGE_FLAG 0x0B43
|
||||||
|
#define GL_CULL_FACE 0x0B44
|
||||||
|
#define GL_CULL_FACE_MODE 0x0B45
|
||||||
|
#define GL_FRONT_FACE 0x0B46
|
||||||
|
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||||
|
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||||
|
#define GL_POLYGON_OFFSET_POINT 0x2A01
|
||||||
|
#define GL_POLYGON_OFFSET_LINE 0x2A02
|
||||||
|
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||||
|
#define GL_COMPILE 0x1300
|
||||||
|
#define GL_COMPILE_AND_EXECUTE 0x1301
|
||||||
|
#define GL_LIST_BASE 0x0B32
|
||||||
|
#define GL_LIST_INDEX 0x0B33
|
||||||
|
#define GL_LIST_MODE 0x0B30
|
||||||
|
#define GL_NEVER 0x0200
|
||||||
|
#define GL_LESS 0x0201
|
||||||
|
#define GL_EQUAL 0x0202
|
||||||
|
#define GL_LEQUAL 0x0203
|
||||||
|
#define GL_GREATER 0x0204
|
||||||
|
#define GL_NOTEQUAL 0x0205
|
||||||
|
#define GL_GEQUAL 0x0206
|
||||||
|
#define GL_ALWAYS 0x0207
|
||||||
|
#define GL_DEPTH_TEST 0x0B71
|
||||||
|
#define GL_DEPTH_BITS 0x0D56
|
||||||
|
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||||
|
#define GL_DEPTH_FUNC 0x0B74
|
||||||
|
#define GL_DEPTH_RANGE 0x0B70
|
||||||
|
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||||
|
#define GL_DEPTH_COMPONENT 0x1902
|
||||||
|
#define GL_LIGHTING 0x0B50
|
||||||
|
#define GL_LIGHT0 0x4000
|
||||||
|
#define GL_LIGHT1 0x4001
|
||||||
|
#define GL_LIGHT2 0x4002
|
||||||
|
#define GL_LIGHT3 0x4003
|
||||||
|
#define GL_LIGHT4 0x4004
|
||||||
|
#define GL_LIGHT5 0x4005
|
||||||
|
#define GL_LIGHT6 0x4006
|
||||||
|
#define GL_LIGHT7 0x4007
|
||||||
|
#define GL_SPOT_EXPONENT 0x1205
|
||||||
|
#define GL_SPOT_CUTOFF 0x1206
|
||||||
|
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||||
|
#define GL_LINEAR_ATTENUATION 0x1208
|
||||||
|
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||||
|
#define GL_AMBIENT 0x1200
|
||||||
|
#define GL_DIFFUSE 0x1201
|
||||||
|
#define GL_SPECULAR 0x1202
|
||||||
|
#define GL_SHININESS 0x1601
|
||||||
|
#define GL_EMISSION 0x1600
|
||||||
|
#define GL_POSITION 0x1203
|
||||||
|
#define GL_SPOT_DIRECTION 0x1204
|
||||||
|
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||||
|
#define GL_COLOR_INDEXES 0x1603
|
||||||
|
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||||
|
#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
|
||||||
|
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||||
|
#define GL_FRONT_AND_BACK 0x0408
|
||||||
|
#define GL_SHADE_MODEL 0x0B54
|
||||||
|
#define GL_FLAT 0x1D00
|
||||||
|
#define GL_SMOOTH 0x1D01
|
||||||
|
#define GL_COLOR_MATERIAL 0x0B57
|
||||||
|
#define GL_COLOR_MATERIAL_FACE 0x0B55
|
||||||
|
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
|
||||||
|
#define GL_NORMALIZE 0x0BA1
|
||||||
|
#define GL_CLIP_PLANE0 0x3000
|
||||||
|
#define GL_CLIP_PLANE1 0x3001
|
||||||
|
#define GL_CLIP_PLANE2 0x3002
|
||||||
|
#define GL_CLIP_PLANE3 0x3003
|
||||||
|
#define GL_CLIP_PLANE4 0x3004
|
||||||
|
#define GL_CLIP_PLANE5 0x3005
|
||||||
|
#define GL_ACCUM_RED_BITS 0x0D58
|
||||||
|
#define GL_ACCUM_GREEN_BITS 0x0D59
|
||||||
|
#define GL_ACCUM_BLUE_BITS 0x0D5A
|
||||||
|
#define GL_ACCUM_ALPHA_BITS 0x0D5B
|
||||||
|
#define GL_ACCUM_CLEAR_VALUE 0x0B80
|
||||||
|
#define GL_ACCUM 0x0100
|
||||||
|
#define GL_ADD 0x0104
|
||||||
|
#define GL_LOAD 0x0101
|
||||||
|
#define GL_MULT 0x0103
|
||||||
|
#define GL_RETURN 0x0102
|
||||||
|
#define GL_ALPHA_TEST 0x0BC0
|
||||||
|
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||||
|
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||||
|
#define GL_BLEND 0x0BE2
|
||||||
|
#define GL_BLEND_SRC 0x0BE1
|
||||||
|
#define GL_BLEND_DST 0x0BE0
|
||||||
|
#define GL_ZERO 0x0
|
||||||
|
#define GL_ONE 0x1
|
||||||
|
#define GL_SRC_COLOR 0x0300
|
||||||
|
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||||
|
#define GL_SRC_ALPHA 0x0302
|
||||||
|
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||||
|
#define GL_DST_ALPHA 0x0304
|
||||||
|
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||||
|
#define GL_DST_COLOR 0x0306
|
||||||
|
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||||
|
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||||
|
#define GL_FEEDBACK 0x1C01
|
||||||
|
#define GL_RENDER 0x1C00
|
||||||
|
#define GL_SELECT 0x1C02
|
||||||
|
#define GL_2D 0x0600
|
||||||
|
#define GL_3D 0x0601
|
||||||
|
#define GL_3D_COLOR 0x0602
|
||||||
|
#define GL_3D_COLOR_TEXTURE 0x0603
|
||||||
|
#define GL_4D_COLOR_TEXTURE 0x0604
|
||||||
|
#define GL_POINT_TOKEN 0x0701
|
||||||
|
#define GL_LINE_TOKEN 0x0702
|
||||||
|
#define GL_LINE_RESET_TOKEN 0x0707
|
||||||
|
#define GL_POLYGON_TOKEN 0x0703
|
||||||
|
#define GL_BITMAP_TOKEN 0x0704
|
||||||
|
#define GL_DRAW_PIXEL_TOKEN 0x0705
|
||||||
|
#define GL_COPY_PIXEL_TOKEN 0x0706
|
||||||
|
#define GL_PASS_THROUGH_TOKEN 0x0700
|
||||||
|
#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
|
||||||
|
#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
|
||||||
|
#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
|
||||||
|
#define GL_SELECTION_BUFFER_POINTER 0x0DF3
|
||||||
|
#define GL_SELECTION_BUFFER_SIZE 0x0DF4
|
||||||
|
#define GL_FOG 0x0B60
|
||||||
|
#define GL_FOG_MODE 0x0B65
|
||||||
|
#define GL_FOG_DENSITY 0x0B62
|
||||||
|
#define GL_FOG_COLOR 0x0B66
|
||||||
|
#define GL_FOG_INDEX 0x0B61
|
||||||
|
#define GL_FOG_START 0x0B63
|
||||||
|
#define GL_FOG_END 0x0B64
|
||||||
|
#define GL_LINEAR 0x2601
|
||||||
|
#define GL_EXP 0x0800
|
||||||
|
#define GL_EXP2 0x0801
|
||||||
|
#define GL_LOGIC_OP 0x0BF1
|
||||||
|
#define GL_INDEX_LOGIC_OP 0x0BF1
|
||||||
|
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||||
|
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||||
|
#define GL_CLEAR 0x1500
|
||||||
|
#define GL_SET 0x150F
|
||||||
|
#define GL_COPY 0x1503
|
||||||
|
#define GL_COPY_INVERTED 0x150C
|
||||||
|
#define GL_NOOP 0x1505
|
||||||
|
#define GL_INVERT 0x150A
|
||||||
|
#define GL_AND 0x1501
|
||||||
|
#define GL_NAND 0x150E
|
||||||
|
#define GL_OR 0x1507
|
||||||
|
#define GL_NOR 0x1508
|
||||||
|
#define GL_XOR 0x1506
|
||||||
|
#define GL_EQUIV 0x1509
|
||||||
|
#define GL_AND_REVERSE 0x1502
|
||||||
|
#define GL_AND_INVERTED 0x1504
|
||||||
|
#define GL_OR_REVERSE 0x150B
|
||||||
|
#define GL_OR_INVERTED 0x150D
|
||||||
|
#define GL_STENCIL_BITS 0x0D57
|
||||||
|
#define GL_STENCIL_TEST 0x0B90
|
||||||
|
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||||
|
#define GL_STENCIL_FUNC 0x0B92
|
||||||
|
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||||
|
#define GL_STENCIL_FAIL 0x0B94
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||||
|
#define GL_STENCIL_REF 0x0B97
|
||||||
|
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||||
|
#define GL_STENCIL_INDEX 0x1901
|
||||||
|
#define GL_KEEP 0x1E00
|
||||||
|
#define GL_REPLACE 0x1E01
|
||||||
|
#define GL_INCR 0x1E02
|
||||||
|
#define GL_DECR 0x1E03
|
||||||
|
#define GL_NONE 0x0
|
||||||
|
#define GL_LEFT 0x0406
|
||||||
|
#define GL_RIGHT 0x0407
|
||||||
|
#define GL_FRONT_LEFT 0x0400
|
||||||
|
#define GL_FRONT_RIGHT 0x0401
|
||||||
|
#define GL_BACK_LEFT 0x0402
|
||||||
|
#define GL_BACK_RIGHT 0x0403
|
||||||
|
#define GL_AUX0 0x0409
|
||||||
|
#define GL_AUX1 0x040A
|
||||||
|
#define GL_AUX2 0x040B
|
||||||
|
#define GL_AUX3 0x040C
|
||||||
|
#define GL_COLOR_INDEX 0x1900
|
||||||
|
#define GL_RED 0x1903
|
||||||
|
#define GL_GREEN 0x1904
|
||||||
|
#define GL_BLUE 0x1905
|
||||||
|
#define GL_ALPHA 0x1906
|
||||||
|
#define GL_LUMINANCE 0x1909
|
||||||
|
#define GL_LUMINANCE_ALPHA 0x190A
|
||||||
|
#define GL_ALPHA_BITS 0x0D55
|
||||||
|
#define GL_RED_BITS 0x0D52
|
||||||
|
#define GL_GREEN_BITS 0x0D53
|
||||||
|
#define GL_BLUE_BITS 0x0D54
|
||||||
|
#define GL_INDEX_BITS 0x0D51
|
||||||
|
#define GL_SUBPIXEL_BITS 0x0D50
|
||||||
|
#define GL_AUX_BUFFERS 0x0C00
|
||||||
|
#define GL_READ_BUFFER 0x0C02
|
||||||
|
#define GL_DRAW_BUFFER 0x0C01
|
||||||
|
#define GL_DOUBLEBUFFER 0x0C32
|
||||||
|
#define GL_STEREO 0x0C33
|
||||||
|
#define GL_BITMAP 0x1A00
|
||||||
|
#define GL_COLOR 0x1800
|
||||||
|
#define GL_DEPTH 0x1801
|
||||||
|
#define GL_STENCIL 0x1802
|
||||||
|
#define GL_DITHER 0x0BD0
|
||||||
|
#define GL_RGB 0x1907
|
||||||
|
#define GL_RGBA 0x1908
|
||||||
|
#define GL_MAX_LIST_NESTING 0x0B31
|
||||||
|
#define GL_MAX_EVAL_ORDER 0x0D30
|
||||||
|
#define GL_MAX_LIGHTS 0x0D31
|
||||||
|
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||||
|
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||||
|
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
||||||
|
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
|
||||||
|
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||||
|
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
|
||||||
|
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||||
|
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||||
|
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||||
|
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
|
||||||
|
#define GL_ATTRIB_STACK_DEPTH 0x0BB0
|
||||||
|
#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
|
||||||
|
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||||
|
#define GL_COLOR_WRITEMASK 0x0C23
|
||||||
|
#define GL_CURRENT_INDEX 0x0B01
|
||||||
|
#define GL_CURRENT_COLOR 0x0B00
|
||||||
|
#define GL_CURRENT_NORMAL 0x0B02
|
||||||
|
#define GL_CURRENT_RASTER_COLOR 0x0B04
|
||||||
|
#define GL_CURRENT_RASTER_DISTANCE 0x0B09
|
||||||
|
#define GL_CURRENT_RASTER_INDEX 0x0B05
|
||||||
|
#define GL_CURRENT_RASTER_POSITION 0x0B07
|
||||||
|
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
|
||||||
|
#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
|
||||||
|
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||||
|
#define GL_INDEX_CLEAR_VALUE 0x0C20
|
||||||
|
#define GL_INDEX_MODE 0x0C30
|
||||||
|
#define GL_INDEX_WRITEMASK 0x0C21
|
||||||
|
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||||
|
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||||
|
#define GL_NAME_STACK_DEPTH 0x0D70
|
||||||
|
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||||
|
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||||
|
#define GL_RENDER_MODE 0x0C40
|
||||||
|
#define GL_RGBA_MODE 0x0C31
|
||||||
|
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||||
|
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||||
|
#define GL_VIEWPORT 0x0BA2
|
||||||
|
#define GL_AUTO_NORMAL 0x0D80
|
||||||
|
#define GL_MAP1_COLOR_4 0x0D90
|
||||||
|
#define GL_MAP1_INDEX 0x0D91
|
||||||
|
#define GL_MAP1_NORMAL 0x0D92
|
||||||
|
#define GL_MAP1_TEXTURE_COORD_1 0x0D93
|
||||||
|
#define GL_MAP1_TEXTURE_COORD_2 0x0D94
|
||||||
|
#define GL_MAP1_TEXTURE_COORD_3 0x0D95
|
||||||
|
#define GL_MAP1_TEXTURE_COORD_4 0x0D96
|
||||||
|
#define GL_MAP1_VERTEX_3 0x0D97
|
||||||
|
#define GL_MAP1_VERTEX_4 0x0D98
|
||||||
|
#define GL_MAP2_COLOR_4 0x0DB0
|
||||||
|
#define GL_MAP2_INDEX 0x0DB1
|
||||||
|
#define GL_MAP2_NORMAL 0x0DB2
|
||||||
|
#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
|
||||||
|
#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
|
||||||
|
#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
|
||||||
|
#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
|
||||||
|
#define GL_MAP2_VERTEX_3 0x0DB7
|
||||||
|
#define GL_MAP2_VERTEX_4 0x0DB8
|
||||||
|
#define GL_MAP1_GRID_DOMAIN 0x0DD0
|
||||||
|
#define GL_MAP1_GRID_SEGMENTS 0x0DD1
|
||||||
|
#define GL_MAP2_GRID_DOMAIN 0x0DD2
|
||||||
|
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
|
||||||
|
#define GL_COEFF 0x0A00
|
||||||
|
#define GL_ORDER 0x0A01
|
||||||
|
#define GL_DOMAIN 0x0A02
|
||||||
|
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||||
|
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||||
|
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||||
|
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||||
|
#define GL_FOG_HINT 0x0C54
|
||||||
|
#define GL_DONT_CARE 0x1100
|
||||||
|
#define GL_FASTEST 0x1101
|
||||||
|
#define GL_NICEST 0x1102
|
||||||
|
#define GL_SCISSOR_BOX 0x0C10
|
||||||
|
#define GL_SCISSOR_TEST 0x0C11
|
||||||
|
#define GL_MAP_COLOR 0x0D10
|
||||||
|
#define GL_MAP_STENCIL 0x0D11
|
||||||
|
#define GL_INDEX_SHIFT 0x0D12
|
||||||
|
#define GL_INDEX_OFFSET 0x0D13
|
||||||
|
#define GL_RED_SCALE 0x0D14
|
||||||
|
#define GL_RED_BIAS 0x0D15
|
||||||
|
#define GL_GREEN_SCALE 0x0D18
|
||||||
|
#define GL_GREEN_BIAS 0x0D19
|
||||||
|
#define GL_BLUE_SCALE 0x0D1A
|
||||||
|
#define GL_BLUE_BIAS 0x0D1B
|
||||||
|
#define GL_ALPHA_SCALE 0x0D1C
|
||||||
|
#define GL_ALPHA_BIAS 0x0D1D
|
||||||
|
#define GL_DEPTH_SCALE 0x0D1E
|
||||||
|
#define GL_DEPTH_BIAS 0x0D1F
|
||||||
|
#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
|
||||||
|
#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
|
||||||
|
#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
|
||||||
|
#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
|
||||||
|
#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
|
||||||
|
#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
|
||||||
|
#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
|
||||||
|
#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
|
||||||
|
#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
|
||||||
|
#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
|
||||||
|
#define GL_PIXEL_MAP_S_TO_S 0x0C71
|
||||||
|
#define GL_PIXEL_MAP_I_TO_I 0x0C70
|
||||||
|
#define GL_PIXEL_MAP_I_TO_R 0x0C72
|
||||||
|
#define GL_PIXEL_MAP_I_TO_G 0x0C73
|
||||||
|
#define GL_PIXEL_MAP_I_TO_B 0x0C74
|
||||||
|
#define GL_PIXEL_MAP_I_TO_A 0x0C75
|
||||||
|
#define GL_PIXEL_MAP_R_TO_R 0x0C76
|
||||||
|
#define GL_PIXEL_MAP_G_TO_G 0x0C77
|
||||||
|
#define GL_PIXEL_MAP_B_TO_B 0x0C78
|
||||||
|
#define GL_PIXEL_MAP_A_TO_A 0x0C79
|
||||||
|
#define GL_PACK_ALIGNMENT 0x0D05
|
||||||
|
#define GL_PACK_LSB_FIRST 0x0D01
|
||||||
|
#define GL_PACK_ROW_LENGTH 0x0D02
|
||||||
|
#define GL_PACK_SKIP_PIXELS 0x0D04
|
||||||
|
#define GL_PACK_SKIP_ROWS 0x0D03
|
||||||
|
#define GL_PACK_SWAP_BYTES 0x0D00
|
||||||
|
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||||
|
#define GL_UNPACK_LSB_FIRST 0x0CF1
|
||||||
|
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||||
|
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
|
||||||
|
#define GL_UNPACK_SKIP_ROWS 0x0CF3
|
||||||
|
#define GL_UNPACK_SWAP_BYTES 0x0CF0
|
||||||
|
#define GL_ZOOM_X 0x0D16
|
||||||
|
#define GL_ZOOM_Y 0x0D17
|
||||||
|
#define GL_TEXTURE_ENV 0x2300
|
||||||
|
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||||
|
#define GL_TEXTURE_1D 0x0DE0
|
||||||
|
#define GL_TEXTURE_2D 0x0DE1
|
||||||
|
#define GL_TEXTURE_WRAP_S 0x2802
|
||||||
|
#define GL_TEXTURE_WRAP_T 0x2803
|
||||||
|
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||||
|
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||||
|
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||||
|
#define GL_TEXTURE_GEN_S 0x0C60
|
||||||
|
#define GL_TEXTURE_GEN_T 0x0C61
|
||||||
|
#define GL_TEXTURE_GEN_MODE 0x2500
|
||||||
|
#define GL_TEXTURE_BORDER_COLOR 0x1004
|
||||||
|
#define GL_TEXTURE_WIDTH 0x1000
|
||||||
|
#define GL_TEXTURE_HEIGHT 0x1001
|
||||||
|
#define GL_TEXTURE_BORDER 0x1005
|
||||||
|
#define GL_TEXTURE_COMPONENTS 0x1003
|
||||||
|
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||||
|
#define GL_TEXTURE_GREEN_SIZE 0x805D
|
||||||
|
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||||
|
#define GL_TEXTURE_ALPHA_SIZE 0x805F
|
||||||
|
#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
|
||||||
|
#define GL_TEXTURE_INTENSITY_SIZE 0x8061
|
||||||
|
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||||
|
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||||
|
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||||
|
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||||
|
#define GL_OBJECT_LINEAR 0x2401
|
||||||
|
#define GL_OBJECT_PLANE 0x2501
|
||||||
|
#define GL_EYE_LINEAR 0x2400
|
||||||
|
#define GL_EYE_PLANE 0x2502
|
||||||
|
#define GL_SPHERE_MAP 0x2402
|
||||||
|
#define GL_DECAL 0x2101
|
||||||
|
#define GL_MODULATE 0x2100
|
||||||
|
#define GL_NEAREST 0x2600
|
||||||
|
#define GL_REPEAT 0x2901
|
||||||
|
#define GL_CLAMP 0x2900
|
||||||
|
#define GL_S 0x2000
|
||||||
|
#define GL_T 0x2001
|
||||||
|
#define GL_R 0x2002
|
||||||
|
#define GL_Q 0x2003
|
||||||
|
#define GL_TEXTURE_GEN_R 0x0C62
|
||||||
|
#define GL_TEXTURE_GEN_Q 0x0C63
|
||||||
|
#define GL_VENDOR 0x1F00
|
||||||
|
#define GL_RENDERER 0x1F01
|
||||||
|
#define GL_VERSION 0x1F02
|
||||||
|
#define GL_EXTENSIONS 0x1F03
|
||||||
|
#define GL_NO_ERROR 0x0
|
||||||
|
#define GL_INVALID_ENUM 0x0500
|
||||||
|
#define GL_INVALID_VALUE 0x0501
|
||||||
|
#define GL_INVALID_OPERATION 0x0502
|
||||||
|
#define GL_STACK_OVERFLOW 0x0503
|
||||||
|
#define GL_STACK_UNDERFLOW 0x0504
|
||||||
|
#define GL_OUT_OF_MEMORY 0x0505
|
||||||
|
#define GL_CURRENT_BIT 0x00000001
|
||||||
|
#define GL_POINT_BIT 0x00000002
|
||||||
|
#define GL_LINE_BIT 0x00000004
|
||||||
|
#define GL_POLYGON_BIT 0x00000008
|
||||||
|
#define GL_POLYGON_STIPPLE_BIT 0x00000010
|
||||||
|
#define GL_PIXEL_MODE_BIT 0x00000020
|
||||||
|
#define GL_LIGHTING_BIT 0x00000040
|
||||||
|
#define GL_FOG_BIT 0x00000080
|
||||||
|
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||||
|
#define GL_ACCUM_BUFFER_BIT 0x00000200
|
||||||
|
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||||
|
#define GL_VIEWPORT_BIT 0x00000800
|
||||||
|
#define GL_TRANSFORM_BIT 0x00001000
|
||||||
|
#define GL_ENABLE_BIT 0x00002000
|
||||||
|
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||||
|
#define GL_HINT_BIT 0x00008000
|
||||||
|
#define GL_EVAL_BIT 0x00010000
|
||||||
|
#define GL_LIST_BIT 0x00020000
|
||||||
|
#define GL_TEXTURE_BIT 0x00040000
|
||||||
|
#define GL_SCISSOR_BIT 0x00080000
|
||||||
|
#define GL_ALL_ATTRIB_BITS 0x000FFFFF
|
||||||
|
#define GL_PROXY_TEXTURE_1D 0x8063
|
||||||
|
#define GL_PROXY_TEXTURE_2D 0x8064
|
||||||
|
#define GL_TEXTURE_PRIORITY 0x8066
|
||||||
|
#define GL_TEXTURE_RESIDENT 0x8067
|
||||||
|
#define GL_TEXTURE_BINDING_1D 0x8068
|
||||||
|
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||||
|
#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
|
||||||
|
#define GL_ALPHA4 0x803B
|
||||||
|
#define GL_ALPHA8 0x803C
|
||||||
|
#define GL_ALPHA12 0x803D
|
||||||
|
#define GL_ALPHA16 0x803E
|
||||||
|
#define GL_LUMINANCE4 0x803F
|
||||||
|
#define GL_LUMINANCE8 0x8040
|
||||||
|
#define GL_LUMINANCE12 0x8041
|
||||||
|
#define GL_LUMINANCE16 0x8042
|
||||||
|
#define GL_LUMINANCE4_ALPHA4 0x8043
|
||||||
|
#define GL_LUMINANCE6_ALPHA2 0x8044
|
||||||
|
#define GL_LUMINANCE8_ALPHA8 0x8045
|
||||||
|
#define GL_LUMINANCE12_ALPHA4 0x8046
|
||||||
|
#define GL_LUMINANCE12_ALPHA12 0x8047
|
||||||
|
#define GL_LUMINANCE16_ALPHA16 0x8048
|
||||||
|
#define GL_INTENSITY 0x8049
|
||||||
|
#define GL_INTENSITY4 0x804A
|
||||||
|
#define GL_INTENSITY8 0x804B
|
||||||
|
#define GL_INTENSITY12 0x804C
|
||||||
|
#define GL_INTENSITY16 0x804D
|
||||||
|
#define GL_R3_G3_B2 0x2A10
|
||||||
|
#define GL_RGB4 0x804F
|
||||||
|
#define GL_RGB5 0x8050
|
||||||
|
#define GL_RGB8 0x8051
|
||||||
|
#define GL_RGB10 0x8052
|
||||||
|
#define GL_RGB12 0x8053
|
||||||
|
#define GL_RGB16 0x8054
|
||||||
|
#define GL_RGBA2 0x8055
|
||||||
|
#define GL_RGBA4 0x8056
|
||||||
|
#define GL_RGB5_A1 0x8057
|
||||||
|
#define GL_RGBA8 0x8058
|
||||||
|
#define GL_RGB10_A2 0x8059
|
||||||
|
#define GL_RGBA12 0x805A
|
||||||
|
#define GL_RGBA16 0x805B
|
||||||
|
#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
|
||||||
|
#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
|
||||||
|
#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
|
||||||
|
#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
|
||||||
|
#define GL_RESCALE_NORMAL 0x803A
|
||||||
|
#define GL_CLAMP_TO_EDGE 0x812F
|
||||||
|
#define GL_MAX_ELEMENTS_VERTICES 0x80E8
|
||||||
|
#define GL_MAX_ELEMENTS_INDICES 0x80E9
|
||||||
|
#define GL_BGR 0x80E0
|
||||||
|
#define GL_BGRA 0x80E1
|
||||||
|
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||||
|
#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
|
||||||
|
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||||
|
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
|
||||||
|
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||||
|
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
|
||||||
|
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||||
|
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
|
||||||
|
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
|
||||||
|
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
|
||||||
|
#define GL_UNSIGNED_INT_10_10_10_2 0x8036
|
||||||
|
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
|
||||||
|
#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
|
||||||
|
#define GL_SINGLE_COLOR 0x81F9
|
||||||
|
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
|
||||||
|
#define GL_TEXTURE_MIN_LOD 0x813A
|
||||||
|
#define GL_TEXTURE_MAX_LOD 0x813B
|
||||||
|
#define GL_TEXTURE_BASE_LEVEL 0x813C
|
||||||
|
#define GL_TEXTURE_MAX_LEVEL 0x813D
|
||||||
|
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||||
|
#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
|
||||||
|
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||||
|
#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
|
||||||
|
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||||
|
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||||
|
#define GL_PACK_SKIP_IMAGES 0x806B
|
||||||
|
#define GL_PACK_IMAGE_HEIGHT 0x806C
|
||||||
|
#define GL_UNPACK_SKIP_IMAGES 0x806D
|
||||||
|
#define GL_UNPACK_IMAGE_HEIGHT 0x806E
|
||||||
|
#define GL_TEXTURE_3D 0x806F
|
||||||
|
#define GL_PROXY_TEXTURE_3D 0x8070
|
||||||
|
#define GL_TEXTURE_DEPTH 0x8071
|
||||||
|
#define GL_TEXTURE_WRAP_R 0x8072
|
||||||
|
#define GL_MAX_3D_TEXTURE_SIZE 0x8073
|
||||||
|
#define GL_TEXTURE_BINDING_3D 0x806A
|
||||||
|
#define GL_CONSTANT_COLOR 0x8001
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||||
|
#define GL_CONSTANT_ALPHA 0x8003
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||||
|
#define GL_COLOR_TABLE 0x80D0
|
||||||
|
#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
|
||||||
|
#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
|
||||||
|
#define GL_PROXY_COLOR_TABLE 0x80D3
|
||||||
|
#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
|
||||||
|
#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
|
||||||
|
#define GL_COLOR_TABLE_SCALE 0x80D6
|
||||||
|
#define GL_COLOR_TABLE_BIAS 0x80D7
|
||||||
|
#define GL_COLOR_TABLE_FORMAT 0x80D8
|
||||||
|
#define GL_COLOR_TABLE_WIDTH 0x80D9
|
||||||
|
#define GL_COLOR_TABLE_RED_SIZE 0x80DA
|
||||||
|
#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
|
||||||
|
#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
|
||||||
|
#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
|
||||||
|
#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
|
||||||
|
#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
|
||||||
|
#define GL_CONVOLUTION_1D 0x8010
|
||||||
|
#define GL_CONVOLUTION_2D 0x8011
|
||||||
|
#define GL_SEPARABLE_2D 0x8012
|
||||||
|
#define GL_CONVOLUTION_BORDER_MODE 0x8013
|
||||||
|
#define GL_CONVOLUTION_FILTER_SCALE 0x8014
|
||||||
|
#define GL_CONVOLUTION_FILTER_BIAS 0x8015
|
||||||
|
#define GL_REDUCE 0x8016
|
||||||
|
#define GL_CONVOLUTION_FORMAT 0x8017
|
||||||
|
#define GL_CONVOLUTION_WIDTH 0x8018
|
||||||
|
#define GL_CONVOLUTION_HEIGHT 0x8019
|
||||||
|
#define GL_MAX_CONVOLUTION_WIDTH 0x801A
|
||||||
|
#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
|
||||||
|
#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
|
||||||
|
#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
|
||||||
|
#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
|
||||||
|
#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
|
||||||
|
#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
|
||||||
|
#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
|
||||||
|
#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
|
||||||
|
#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
|
||||||
|
#define GL_CONSTANT_BORDER 0x8151
|
||||||
|
#define GL_REPLICATE_BORDER 0x8153
|
||||||
|
#define GL_CONVOLUTION_BORDER_COLOR 0x8154
|
||||||
|
#define GL_COLOR_MATRIX 0x80B1
|
||||||
|
#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
|
||||||
|
#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
|
||||||
|
#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
|
||||||
|
#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
|
||||||
|
#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
|
||||||
|
#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
|
||||||
|
#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
|
||||||
|
#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
|
||||||
|
#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
|
||||||
|
#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
|
||||||
|
#define GL_HISTOGRAM 0x8024
|
||||||
|
#define GL_PROXY_HISTOGRAM 0x8025
|
||||||
|
#define GL_HISTOGRAM_WIDTH 0x8026
|
||||||
|
#define GL_HISTOGRAM_FORMAT 0x8027
|
||||||
|
#define GL_HISTOGRAM_RED_SIZE 0x8028
|
||||||
|
#define GL_HISTOGRAM_GREEN_SIZE 0x8029
|
||||||
|
#define GL_HISTOGRAM_BLUE_SIZE 0x802A
|
||||||
|
#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
|
||||||
|
#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
|
||||||
|
#define GL_HISTOGRAM_SINK 0x802D
|
||||||
|
#define GL_MINMAX 0x802E
|
||||||
|
#define GL_MINMAX_FORMAT 0x802F
|
||||||
|
#define GL_MINMAX_SINK 0x8030
|
||||||
|
#define GL_TABLE_TOO_LARGE 0x8031
|
||||||
|
#define GL_BLEND_EQUATION 0x8009
|
||||||
|
#define GL_MIN 0x8007
|
||||||
|
#define GL_MAX 0x8008
|
||||||
|
#define GL_FUNC_ADD 0x8006
|
||||||
|
#define GL_FUNC_SUBTRACT 0x800A
|
||||||
|
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||||
|
#define GL_BLEND_COLOR 0x8005
|
||||||
|
#define GL_TEXTURE0_ARB 0x84C0
|
||||||
|
#define GL_TEXTURE1_ARB 0x84C1
|
||||||
|
#define GL_TEXTURE2_ARB 0x84C2
|
||||||
|
#define GL_TEXTURE3_ARB 0x84C3
|
||||||
|
#define GL_TEXTURE4_ARB 0x84C4
|
||||||
|
#define GL_TEXTURE5_ARB 0x84C5
|
||||||
|
#define GL_TEXTURE6_ARB 0x84C6
|
||||||
|
#define GL_TEXTURE7_ARB 0x84C7
|
||||||
|
#define GL_TEXTURE8_ARB 0x84C8
|
||||||
|
#define GL_TEXTURE9_ARB 0x84C9
|
||||||
|
#define GL_TEXTURE10_ARB 0x84CA
|
||||||
|
#define GL_TEXTURE11_ARB 0x84CB
|
||||||
|
#define GL_TEXTURE12_ARB 0x84CC
|
||||||
|
#define GL_TEXTURE13_ARB 0x84CD
|
||||||
|
#define GL_TEXTURE14_ARB 0x84CE
|
||||||
|
#define GL_TEXTURE15_ARB 0x84CF
|
||||||
|
#define GL_TEXTURE16_ARB 0x84D0
|
||||||
|
#define GL_TEXTURE17_ARB 0x84D1
|
||||||
|
#define GL_TEXTURE18_ARB 0x84D2
|
||||||
|
#define GL_TEXTURE19_ARB 0x84D3
|
||||||
|
#define GL_TEXTURE20_ARB 0x84D4
|
||||||
|
#define GL_TEXTURE21_ARB 0x84D5
|
||||||
|
#define GL_TEXTURE22_ARB 0x84D6
|
||||||
|
#define GL_TEXTURE23_ARB 0x84D7
|
||||||
|
#define GL_TEXTURE24_ARB 0x84D8
|
||||||
|
#define GL_TEXTURE25_ARB 0x84D9
|
||||||
|
#define GL_TEXTURE26_ARB 0x84DA
|
||||||
|
#define GL_TEXTURE27_ARB 0x84DB
|
||||||
|
#define GL_TEXTURE28_ARB 0x84DC
|
||||||
|
#define GL_TEXTURE29_ARB 0x84DD
|
||||||
|
#define GL_TEXTURE30_ARB 0x84DE
|
||||||
|
#define GL_TEXTURE31_ARB 0x84DF
|
||||||
|
#define GL_ACTIVE_TEXTURE_ARB 0x84E0
|
||||||
|
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
|
||||||
|
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,20 @@
|
||||||
|
inline void glFinish() {xGLL(EGL_TOKEN_glFinish);};
|
||||||
|
inline void glClear(GLbitfield a0) {xGLL(EGL_TOKEN_glClear);xGLL(a0);};
|
||||||
|
inline void glFlush() {xGLL(EGL_TOKEN_glFlush);};
|
||||||
|
inline void glMatrixMode(GLenum a0) {xGLL(EGL_TOKEN_glMatrixMode);xGLL(a0);};
|
||||||
|
inline void glOrtho(GLdouble a0,GLdouble a1,GLdouble a2,GLdouble a3,GLdouble a4,GLdouble a5) {xGLL(EGL_TOKEN_glOrtho);xGLL(a0);xGLL(a1);xGLL(a2);xGLL(a3);xGLL(a4);xGLL(a5);};
|
||||||
|
inline void glFrustum(GLdouble a0,GLdouble a1,GLdouble a2,GLdouble a3,GLdouble a4,GLdouble a5) {xGLL(EGL_TOKEN_glFrustum);xGLL(a0);xGLL(a1);xGLL(a2);xGLL(a3);xGLL(a4);xGLL(a5);};
|
||||||
|
inline void glViewport(GLint a0,GLint a1,GLsizei a2,GLsizei a3) {xGLL(EGL_TOKEN_glViewport);xGLL(a0);xGLL(a1);xGLL(a2);xGLL(a3);};
|
||||||
|
inline void glPushMatrix() {xGLL(EGL_TOKEN_glPushMatrix);};
|
||||||
|
inline void glPopMatrix() {xGLL(EGL_TOKEN_glPopMatrix);};
|
||||||
|
inline void glLoadIdentity() {xGLL(EGL_TOKEN_glLoadIdentity);};
|
||||||
|
inline void glLoadMatrixd(const GLdouble * a0) {xGLL(EGL_TOKEN_glLoadMatrixd);xGLL(a0);};
|
||||||
|
inline void glLoadMatrixf(const GLfloat * a0) {xGLL(EGL_TOKEN_glLoadMatrixf);xGLL(a0);};
|
||||||
|
inline void glMultMatrixd(const GLdouble * a0) {xGLL(EGL_TOKEN_glMultMatrixd);xGLL(a0);};
|
||||||
|
inline void glMultMatrixf(const GLfloat * a0) {xGLL(EGL_TOKEN_glMultMatrixf);xGLL(a0);};
|
||||||
|
inline void glRotated(GLdouble a0,GLdouble a1,GLdouble a2,GLdouble a3) {xGLL(EGL_TOKEN_glRotated);xGLL(a0);xGLL(a1);xGLL(a2);xGLL(a3);};
|
||||||
|
inline void glRotatef(GLfloat a0,GLfloat a1,GLfloat a2,GLfloat a3) {xGLL(EGL_TOKEN_glRotatef);xGLL(a0);xGLL(a1);xGLL(a2);xGLL(a3);};
|
||||||
|
inline void glScaled(GLdouble a0,GLdouble a1,GLdouble a2) {xGLL(EGL_TOKEN_glScaled);xGLL(a0);xGLL(a1);xGLL(a2);};
|
||||||
|
inline void glScalef(GLfloat a0,GLfloat a1,GLfloat a2) {xGLL(EGL_TOKEN_glScalef);xGLL(a0);xGLL(a1);xGLL(a2);};
|
||||||
|
inline void glTranslated(GLdouble a0,GLdouble a1,GLdouble a2) {xGLL(EGL_TOKEN_glTranslated);xGLL(a0);xGLL(a1);xGLL(a2);};
|
||||||
|
inline void glTranslatef(GLfloat a0,GLfloat a1,GLfloat a2) {xGLL(EGL_TOKEN_glTranslatef);xGLL(a0);xGLL(a1);xGLL(a2);};
|
|
@ -0,0 +1,459 @@
|
||||||
|
#ifndef EGL_TOKENS_H
|
||||||
|
#define EGL_TOKENS_H
|
||||||
|
|
||||||
|
#define EGL_TOKEN_glClearIndex 0x0
|
||||||
|
#define EGL_TOKEN_glClearColor 0x1
|
||||||
|
#define EGL_TOKEN_glClear 0x2
|
||||||
|
#define EGL_TOKEN_glIndexMask 0x3
|
||||||
|
#define EGL_TOKEN_glColorMask 0x4
|
||||||
|
#define EGL_TOKEN_glAlphaFunc 0x5
|
||||||
|
#define EGL_TOKEN_glBlendFunc 0x6
|
||||||
|
#define EGL_TOKEN_glLogicOp 0x7
|
||||||
|
#define EGL_TOKEN_glCullFace 0x8
|
||||||
|
#define EGL_TOKEN_glFrontFace 0x9
|
||||||
|
#define EGL_TOKEN_glPointSize 0xa
|
||||||
|
#define EGL_TOKEN_glLineWidth 0xb
|
||||||
|
#define EGL_TOKEN_glLineStipple 0xc
|
||||||
|
#define EGL_TOKEN_glPolygonMode 0xd
|
||||||
|
#define EGL_TOKEN_glPolygonOffset 0xe
|
||||||
|
#define EGL_TOKEN_glPolygonStipple 0xf
|
||||||
|
#define EGL_TOKEN_glGetPolygonStipple 0x10
|
||||||
|
#define EGL_TOKEN_glEdgeFlag 0x11
|
||||||
|
#define EGL_TOKEN_glEdgeFlagv 0x12
|
||||||
|
#define EGL_TOKEN_glScissor 0x13
|
||||||
|
#define EGL_TOKEN_glClipPlane 0x14
|
||||||
|
#define EGL_TOKEN_glGetClipPlane 0x15
|
||||||
|
#define EGL_TOKEN_glDrawBuffer 0x16
|
||||||
|
#define EGL_TOKEN_glReadBuffer 0x17
|
||||||
|
#define EGL_TOKEN_glEnable 0x18
|
||||||
|
#define EGL_TOKEN_glDisable 0x19
|
||||||
|
#define EGL_TOKEN_glIsEnabled 0x1a
|
||||||
|
#define EGL_TOKEN_glEnableClientState 0x1b
|
||||||
|
#define EGL_TOKEN_glDisableClientState 0x1c
|
||||||
|
#define EGL_TOKEN_glGetBooleanv 0x1d
|
||||||
|
#define EGL_TOKEN_glGetDoublev 0x1e
|
||||||
|
#define EGL_TOKEN_glGetFloatv 0x1f
|
||||||
|
#define EGL_TOKEN_glGetIntegerv 0x20
|
||||||
|
#define EGL_TOKEN_glPushAttrib 0x21
|
||||||
|
#define EGL_TOKEN_glPopAttrib 0x22
|
||||||
|
#define EGL_TOKEN_glPushClientAttrib 0x23
|
||||||
|
#define EGL_TOKEN_glPopClientAttrib 0x24
|
||||||
|
#define EGL_TOKEN_glRenderMode 0x25
|
||||||
|
#define EGL_TOKEN_glGetError 0x26
|
||||||
|
#define EGL_TOKEN_glGetString 0x27
|
||||||
|
#define EGL_TOKEN_glFinish 0x28
|
||||||
|
#define EGL_TOKEN_glFlush 0x29
|
||||||
|
#define EGL_TOKEN_glHint 0x2a
|
||||||
|
#define EGL_TOKEN_glClearDepth 0x2b
|
||||||
|
#define EGL_TOKEN_glDepthFunc 0x2c
|
||||||
|
#define EGL_TOKEN_glDepthMask 0x2d
|
||||||
|
#define EGL_TOKEN_glDepthRange 0x2e
|
||||||
|
#define EGL_TOKEN_glClearAccum 0x2f
|
||||||
|
#define EGL_TOKEN_glAccum 0x30
|
||||||
|
#define EGL_TOKEN_glMatrixMode 0x31
|
||||||
|
#define EGL_TOKEN_glOrtho 0x32
|
||||||
|
#define EGL_TOKEN_glFrustum 0x33
|
||||||
|
#define EGL_TOKEN_glViewport 0x34
|
||||||
|
#define EGL_TOKEN_glPushMatrix 0x35
|
||||||
|
#define EGL_TOKEN_glPopMatrix 0x36
|
||||||
|
#define EGL_TOKEN_glLoadIdentity 0x37
|
||||||
|
#define EGL_TOKEN_glLoadMatrixd 0x38
|
||||||
|
#define EGL_TOKEN_glLoadMatrixf 0x39
|
||||||
|
#define EGL_TOKEN_glMultMatrixd 0x3a
|
||||||
|
#define EGL_TOKEN_glMultMatrixf 0x3b
|
||||||
|
#define EGL_TOKEN_glRotated 0x3c
|
||||||
|
#define EGL_TOKEN_glRotatef 0x3d
|
||||||
|
#define EGL_TOKEN_glScaled 0x3e
|
||||||
|
#define EGL_TOKEN_glScalef 0x3f
|
||||||
|
#define EGL_TOKEN_glTranslated 0x40
|
||||||
|
#define EGL_TOKEN_glTranslatef 0x41
|
||||||
|
#define EGL_TOKEN_glIsList 0x42
|
||||||
|
#define EGL_TOKEN_glDeleteLists 0x43
|
||||||
|
#define EGL_TOKEN_glGenLists 0x44
|
||||||
|
#define EGL_TOKEN_glNewList 0x45
|
||||||
|
#define EGL_TOKEN_glEndList 0x46
|
||||||
|
#define EGL_TOKEN_glCallList 0x47
|
||||||
|
#define EGL_TOKEN_glCallLists 0x48
|
||||||
|
#define EGL_TOKEN_glListBase 0x49
|
||||||
|
#define EGL_TOKEN_glBegin 0x4a
|
||||||
|
#define EGL_TOKEN_glEnd 0x4b
|
||||||
|
#define EGL_TOKEN_glVertex2d 0x4c
|
||||||
|
#define EGL_TOKEN_glVertex2f 0x4d
|
||||||
|
#define EGL_TOKEN_glVertex2i 0x4e
|
||||||
|
#define EGL_TOKEN_glVertex2s 0x4f
|
||||||
|
#define EGL_TOKEN_glVertex3d 0x50
|
||||||
|
#define EGL_TOKEN_glVertex3f 0x51
|
||||||
|
#define EGL_TOKEN_glVertex3i 0x52
|
||||||
|
#define EGL_TOKEN_glVertex3s 0x53
|
||||||
|
#define EGL_TOKEN_glVertex4d 0x54
|
||||||
|
#define EGL_TOKEN_glVertex4f 0x55
|
||||||
|
#define EGL_TOKEN_glVertex4i 0x56
|
||||||
|
#define EGL_TOKEN_glVertex4s 0x57
|
||||||
|
#define EGL_TOKEN_glVertex2dv 0x58
|
||||||
|
#define EGL_TOKEN_glVertex2fv 0x59
|
||||||
|
#define EGL_TOKEN_glVertex2iv 0x5a
|
||||||
|
#define EGL_TOKEN_glVertex2sv 0x5b
|
||||||
|
#define EGL_TOKEN_glVertex3dv 0x5c
|
||||||
|
#define EGL_TOKEN_glVertex3fv 0x5d
|
||||||
|
#define EGL_TOKEN_glVertex3iv 0x5e
|
||||||
|
#define EGL_TOKEN_glVertex3sv 0x5f
|
||||||
|
#define EGL_TOKEN_glVertex4dv 0x60
|
||||||
|
#define EGL_TOKEN_glVertex4fv 0x61
|
||||||
|
#define EGL_TOKEN_glVertex4iv 0x62
|
||||||
|
#define EGL_TOKEN_glVertex4sv 0x63
|
||||||
|
#define EGL_TOKEN_glNormal3b 0x64
|
||||||
|
#define EGL_TOKEN_glNormal3d 0x65
|
||||||
|
#define EGL_TOKEN_glNormal3f 0x66
|
||||||
|
#define EGL_TOKEN_glNormal3i 0x67
|
||||||
|
#define EGL_TOKEN_glNormal3s 0x68
|
||||||
|
#define EGL_TOKEN_glNormal3bv 0x69
|
||||||
|
#define EGL_TOKEN_glNormal3dv 0x6a
|
||||||
|
#define EGL_TOKEN_glNormal3fv 0x6b
|
||||||
|
#define EGL_TOKEN_glNormal3iv 0x6c
|
||||||
|
#define EGL_TOKEN_glNormal3sv 0x6d
|
||||||
|
#define EGL_TOKEN_glIndexd 0x6e
|
||||||
|
#define EGL_TOKEN_glIndexf 0x6f
|
||||||
|
#define EGL_TOKEN_glIndexi 0x70
|
||||||
|
#define EGL_TOKEN_glIndexs 0x71
|
||||||
|
#define EGL_TOKEN_glIndexub 0x72
|
||||||
|
#define EGL_TOKEN_glIndexdv 0x73
|
||||||
|
#define EGL_TOKEN_glIndexfv 0x74
|
||||||
|
#define EGL_TOKEN_glIndexiv 0x75
|
||||||
|
#define EGL_TOKEN_glIndexsv 0x76
|
||||||
|
#define EGL_TOKEN_glIndexubv 0x77
|
||||||
|
#define EGL_TOKEN_glColor3b 0x78
|
||||||
|
#define EGL_TOKEN_glColor3d 0x79
|
||||||
|
#define EGL_TOKEN_glColor3f 0x7a
|
||||||
|
#define EGL_TOKEN_glColor3i 0x7b
|
||||||
|
#define EGL_TOKEN_glColor3s 0x7c
|
||||||
|
#define EGL_TOKEN_glColor3ub 0x7d
|
||||||
|
#define EGL_TOKEN_glColor3ui 0x7e
|
||||||
|
#define EGL_TOKEN_glColor3us 0x7f
|
||||||
|
#define EGL_TOKEN_glColor4b 0x80
|
||||||
|
#define EGL_TOKEN_glColor4d 0x81
|
||||||
|
#define EGL_TOKEN_glColor4f 0x82
|
||||||
|
#define EGL_TOKEN_glColor4i 0x83
|
||||||
|
#define EGL_TOKEN_glColor4s 0x84
|
||||||
|
#define EGL_TOKEN_glColor4ub 0x85
|
||||||
|
#define EGL_TOKEN_glColor4ui 0x86
|
||||||
|
#define EGL_TOKEN_glColor4us 0x87
|
||||||
|
#define EGL_TOKEN_glColor3bv 0x88
|
||||||
|
#define EGL_TOKEN_glColor3dv 0x89
|
||||||
|
#define EGL_TOKEN_glColor3fv 0x8a
|
||||||
|
#define EGL_TOKEN_glColor3iv 0x8b
|
||||||
|
#define EGL_TOKEN_glColor3sv 0x8c
|
||||||
|
#define EGL_TOKEN_glColor3ubv 0x8d
|
||||||
|
#define EGL_TOKEN_glColor3uiv 0x8e
|
||||||
|
#define EGL_TOKEN_glColor3usv 0x8f
|
||||||
|
#define EGL_TOKEN_glColor4bv 0x90
|
||||||
|
#define EGL_TOKEN_glColor4dv 0x91
|
||||||
|
#define EGL_TOKEN_glColor4fv 0x92
|
||||||
|
#define EGL_TOKEN_glColor4iv 0x93
|
||||||
|
#define EGL_TOKEN_glColor4sv 0x94
|
||||||
|
#define EGL_TOKEN_glColor4ubv 0x95
|
||||||
|
#define EGL_TOKEN_glColor4uiv 0x96
|
||||||
|
#define EGL_TOKEN_glColor4usv 0x97
|
||||||
|
#define EGL_TOKEN_glTexCoord1d 0x98
|
||||||
|
#define EGL_TOKEN_glTexCoord1f 0x99
|
||||||
|
#define EGL_TOKEN_glTexCoord1i 0x9a
|
||||||
|
#define EGL_TOKEN_glTexCoord1s 0x9b
|
||||||
|
#define EGL_TOKEN_glTexCoord2d 0x9c
|
||||||
|
#define EGL_TOKEN_glTexCoord2f 0x9d
|
||||||
|
#define EGL_TOKEN_glTexCoord2i 0x9e
|
||||||
|
#define EGL_TOKEN_glTexCoord2s 0x9f
|
||||||
|
#define EGL_TOKEN_glTexCoord3d 0xa0
|
||||||
|
#define EGL_TOKEN_glTexCoord3f 0xa1
|
||||||
|
#define EGL_TOKEN_glTexCoord3i 0xa2
|
||||||
|
#define EGL_TOKEN_glTexCoord3s 0xa3
|
||||||
|
#define EGL_TOKEN_glTexCoord4d 0xa4
|
||||||
|
#define EGL_TOKEN_glTexCoord4f 0xa5
|
||||||
|
#define EGL_TOKEN_glTexCoord4i 0xa6
|
||||||
|
#define EGL_TOKEN_glTexCoord4s 0xa7
|
||||||
|
#define EGL_TOKEN_glTexCoord1dv 0xa8
|
||||||
|
#define EGL_TOKEN_glTexCoord1fv 0xa9
|
||||||
|
#define EGL_TOKEN_glTexCoord1iv 0xaa
|
||||||
|
#define EGL_TOKEN_glTexCoord1sv 0xab
|
||||||
|
#define EGL_TOKEN_glTexCoord2dv 0xac
|
||||||
|
#define EGL_TOKEN_glTexCoord2fv 0xad
|
||||||
|
#define EGL_TOKEN_glTexCoord2iv 0xae
|
||||||
|
#define EGL_TOKEN_glTexCoord2sv 0xaf
|
||||||
|
#define EGL_TOKEN_glTexCoord3dv 0xb0
|
||||||
|
#define EGL_TOKEN_glTexCoord3fv 0xb1
|
||||||
|
#define EGL_TOKEN_glTexCoord3iv 0xb2
|
||||||
|
#define EGL_TOKEN_glTexCoord3sv 0xb3
|
||||||
|
#define EGL_TOKEN_glTexCoord4dv 0xb4
|
||||||
|
#define EGL_TOKEN_glTexCoord4fv 0xb5
|
||||||
|
#define EGL_TOKEN_glTexCoord4iv 0xb6
|
||||||
|
#define EGL_TOKEN_glTexCoord4sv 0xb7
|
||||||
|
#define EGL_TOKEN_glRasterPos2d 0xb8
|
||||||
|
#define EGL_TOKEN_glRasterPos2f 0xb9
|
||||||
|
#define EGL_TOKEN_glRasterPos2i 0xba
|
||||||
|
#define EGL_TOKEN_glRasterPos2s 0xbb
|
||||||
|
#define EGL_TOKEN_glRasterPos3d 0xbc
|
||||||
|
#define EGL_TOKEN_glRasterPos3f 0xbd
|
||||||
|
#define EGL_TOKEN_glRasterPos3i 0xbe
|
||||||
|
#define EGL_TOKEN_glRasterPos3s 0xbf
|
||||||
|
#define EGL_TOKEN_glRasterPos4d 0xc0
|
||||||
|
#define EGL_TOKEN_glRasterPos4f 0xc1
|
||||||
|
#define EGL_TOKEN_glRasterPos4i 0xc2
|
||||||
|
#define EGL_TOKEN_glRasterPos4s 0xc3
|
||||||
|
#define EGL_TOKEN_glRasterPos2dv 0xc4
|
||||||
|
#define EGL_TOKEN_glRasterPos2fv 0xc5
|
||||||
|
#define EGL_TOKEN_glRasterPos2iv 0xc6
|
||||||
|
#define EGL_TOKEN_glRasterPos2sv 0xc7
|
||||||
|
#define EGL_TOKEN_glRasterPos3dv 0xc8
|
||||||
|
#define EGL_TOKEN_glRasterPos3fv 0xc9
|
||||||
|
#define EGL_TOKEN_glRasterPos3iv 0xca
|
||||||
|
#define EGL_TOKEN_glRasterPos3sv 0xcb
|
||||||
|
#define EGL_TOKEN_glRasterPos4dv 0xcc
|
||||||
|
#define EGL_TOKEN_glRasterPos4fv 0xcd
|
||||||
|
#define EGL_TOKEN_glRasterPos4iv 0xce
|
||||||
|
#define EGL_TOKEN_glRasterPos4sv 0xcf
|
||||||
|
#define EGL_TOKEN_glRectd 0xd0
|
||||||
|
#define EGL_TOKEN_glRectf 0xd1
|
||||||
|
#define EGL_TOKEN_glRecti 0xd2
|
||||||
|
#define EGL_TOKEN_glRects 0xd3
|
||||||
|
#define EGL_TOKEN_glRectdv 0xd4
|
||||||
|
#define EGL_TOKEN_glRectfv 0xd5
|
||||||
|
#define EGL_TOKEN_glRectiv 0xd6
|
||||||
|
#define EGL_TOKEN_glRectsv 0xd7
|
||||||
|
#define EGL_TOKEN_glVertexPointer 0xd8
|
||||||
|
#define EGL_TOKEN_glNormalPointer 0xd9
|
||||||
|
#define EGL_TOKEN_glColorPointer 0xda
|
||||||
|
#define EGL_TOKEN_glIndexPointer 0xdb
|
||||||
|
#define EGL_TOKEN_glTexCoordPointer 0xdc
|
||||||
|
#define EGL_TOKEN_glEdgeFlagPointer 0xdd
|
||||||
|
#define EGL_TOKEN_glGetPointerv 0xde
|
||||||
|
#define EGL_TOKEN_glArrayElement 0xdf
|
||||||
|
#define EGL_TOKEN_glDrawArrays 0xe0
|
||||||
|
#define EGL_TOKEN_glDrawElements 0xe1
|
||||||
|
#define EGL_TOKEN_glInterleavedArrays 0xe2
|
||||||
|
#define EGL_TOKEN_glShadeModel 0xe3
|
||||||
|
#define EGL_TOKEN_glLightf 0xe4
|
||||||
|
#define EGL_TOKEN_glLighti 0xe5
|
||||||
|
#define EGL_TOKEN_glLightfv 0xe6
|
||||||
|
#define EGL_TOKEN_glLightiv 0xe7
|
||||||
|
#define EGL_TOKEN_glGetLightfv 0xe8
|
||||||
|
#define EGL_TOKEN_glGetLightiv 0xe9
|
||||||
|
#define EGL_TOKEN_glLightModelf 0xea
|
||||||
|
#define EGL_TOKEN_glLightModeli 0xeb
|
||||||
|
#define EGL_TOKEN_glLightModelfv 0xec
|
||||||
|
#define EGL_TOKEN_glLightModeliv 0xed
|
||||||
|
#define EGL_TOKEN_glMaterialf 0xee
|
||||||
|
#define EGL_TOKEN_glMateriali 0xef
|
||||||
|
#define EGL_TOKEN_glMaterialfv 0xf0
|
||||||
|
#define EGL_TOKEN_glMaterialiv 0xf1
|
||||||
|
#define EGL_TOKEN_glGetMaterialfv 0xf2
|
||||||
|
#define EGL_TOKEN_glGetMaterialiv 0xf3
|
||||||
|
#define EGL_TOKEN_glColorMaterial 0xf4
|
||||||
|
#define EGL_TOKEN_glPixelZoom 0xf5
|
||||||
|
#define EGL_TOKEN_glPixelStoref 0xf6
|
||||||
|
#define EGL_TOKEN_glPixelStorei 0xf7
|
||||||
|
#define EGL_TOKEN_glPixelTransferf 0xf8
|
||||||
|
#define EGL_TOKEN_glPixelTransferi 0xf9
|
||||||
|
#define EGL_TOKEN_glPixelMapfv 0xfa
|
||||||
|
#define EGL_TOKEN_glPixelMapuiv 0xfb
|
||||||
|
#define EGL_TOKEN_glPixelMapusv 0xfc
|
||||||
|
#define EGL_TOKEN_glGetPixelMapfv 0xfd
|
||||||
|
#define EGL_TOKEN_glGetPixelMapuiv 0xfe
|
||||||
|
#define EGL_TOKEN_glGetPixelMapusv 0xff
|
||||||
|
#define EGL_TOKEN_glBitmap 0x100
|
||||||
|
#define EGL_TOKEN_glReadPixels 0x101
|
||||||
|
#define EGL_TOKEN_glDrawPixels 0x102
|
||||||
|
#define EGL_TOKEN_glCopyPixels 0x103
|
||||||
|
#define EGL_TOKEN_glStencilFunc 0x104
|
||||||
|
#define EGL_TOKEN_glStencilMask 0x105
|
||||||
|
#define EGL_TOKEN_glStencilOp 0x106
|
||||||
|
#define EGL_TOKEN_glClearStencil 0x107
|
||||||
|
#define EGL_TOKEN_glTexGend 0x108
|
||||||
|
#define EGL_TOKEN_glTexGenf 0x109
|
||||||
|
#define EGL_TOKEN_glTexGeni 0x10a
|
||||||
|
#define EGL_TOKEN_glTexGendv 0x10b
|
||||||
|
#define EGL_TOKEN_glTexGenfv 0x10c
|
||||||
|
#define EGL_TOKEN_glTexGeniv 0x10d
|
||||||
|
#define EGL_TOKEN_glGetTexGendv 0x10e
|
||||||
|
#define EGL_TOKEN_glGetTexGenfv 0x10f
|
||||||
|
#define EGL_TOKEN_glGetTexGeniv 0x110
|
||||||
|
#define EGL_TOKEN_glTexEnvf 0x111
|
||||||
|
#define EGL_TOKEN_glTexEnvi 0x112
|
||||||
|
#define EGL_TOKEN_glTexEnvfv 0x113
|
||||||
|
#define EGL_TOKEN_glTexEnviv 0x114
|
||||||
|
#define EGL_TOKEN_glGetTexEnvfv 0x115
|
||||||
|
#define EGL_TOKEN_glGetTexEnviv 0x116
|
||||||
|
#define EGL_TOKEN_glTexParameterf 0x117
|
||||||
|
#define EGL_TOKEN_glTexParameteri 0x118
|
||||||
|
#define EGL_TOKEN_glTexParameterfv 0x119
|
||||||
|
#define EGL_TOKEN_glTexParameteriv 0x11a
|
||||||
|
#define EGL_TOKEN_glGetTexParameterfv 0x11b
|
||||||
|
#define EGL_TOKEN_glGetTexParameteriv 0x11c
|
||||||
|
#define EGL_TOKEN_glGetTexLevelParameterfv 0x11d
|
||||||
|
#define EGL_TOKEN_glGetTexLevelParameteriv 0x11e
|
||||||
|
#define EGL_TOKEN_glTexImage1D 0x11f
|
||||||
|
#define EGL_TOKEN_glTexImage2D 0x120
|
||||||
|
#define EGL_TOKEN_glGetTexImage 0x121
|
||||||
|
#define EGL_TOKEN_glGenTextures 0x122
|
||||||
|
#define EGL_TOKEN_glDeleteTextures 0x123
|
||||||
|
#define EGL_TOKEN_glBindTexture 0x124
|
||||||
|
#define EGL_TOKEN_glPrioritizeTextures 0x125
|
||||||
|
#define EGL_TOKEN_glAreTexturesResident 0x126
|
||||||
|
#define EGL_TOKEN_glIsTexture 0x127
|
||||||
|
#define EGL_TOKEN_glTexSubImage1D 0x128
|
||||||
|
#define EGL_TOKEN_glTexSubImage2D 0x129
|
||||||
|
#define EGL_TOKEN_glCopyTexImage1D 0x12a
|
||||||
|
#define EGL_TOKEN_glCopyTexImage2D 0x12b
|
||||||
|
#define EGL_TOKEN_glCopyTexSubImage1D 0x12c
|
||||||
|
#define EGL_TOKEN_glCopyTexSubImage2D 0x12d
|
||||||
|
#define EGL_TOKEN_glMap1d 0x12e
|
||||||
|
#define EGL_TOKEN_glMap1f 0x12f
|
||||||
|
#define EGL_TOKEN_glMap2d 0x130
|
||||||
|
#define EGL_TOKEN_glMap2f 0x131
|
||||||
|
#define EGL_TOKEN_glGetMapdv 0x132
|
||||||
|
#define EGL_TOKEN_glGetMapfv 0x133
|
||||||
|
#define EGL_TOKEN_glGetMapiv 0x134
|
||||||
|
#define EGL_TOKEN_glEvalCoord1d 0x135
|
||||||
|
#define EGL_TOKEN_glEvalCoord1f 0x136
|
||||||
|
#define EGL_TOKEN_glEvalCoord1dv 0x137
|
||||||
|
#define EGL_TOKEN_glEvalCoord1fv 0x138
|
||||||
|
#define EGL_TOKEN_glEvalCoord2d 0x139
|
||||||
|
#define EGL_TOKEN_glEvalCoord2f 0x13a
|
||||||
|
#define EGL_TOKEN_glEvalCoord2dv 0x13b
|
||||||
|
#define EGL_TOKEN_glEvalCoord2fv 0x13c
|
||||||
|
#define EGL_TOKEN_glMapGrid1d 0x13d
|
||||||
|
#define EGL_TOKEN_glMapGrid1f 0x13e
|
||||||
|
#define EGL_TOKEN_glMapGrid2d 0x13f
|
||||||
|
#define EGL_TOKEN_glMapGrid2f 0x140
|
||||||
|
#define EGL_TOKEN_glEvalPoint1 0x141
|
||||||
|
#define EGL_TOKEN_glEvalPoint2 0x142
|
||||||
|
#define EGL_TOKEN_glEvalMesh1 0x143
|
||||||
|
#define EGL_TOKEN_glEvalMesh2 0x144
|
||||||
|
#define EGL_TOKEN_glFogf 0x145
|
||||||
|
#define EGL_TOKEN_glFogi 0x146
|
||||||
|
#define EGL_TOKEN_glFogfv 0x147
|
||||||
|
#define EGL_TOKEN_glFogiv 0x148
|
||||||
|
#define EGL_TOKEN_glFeedbackBuffer 0x149
|
||||||
|
#define EGL_TOKEN_glPassThrough 0x14a
|
||||||
|
#define EGL_TOKEN_glSelectBuffer 0x14b
|
||||||
|
#define EGL_TOKEN_glInitNames 0x14c
|
||||||
|
#define EGL_TOKEN_glLoadName 0x14d
|
||||||
|
#define EGL_TOKEN_glPushName 0x14e
|
||||||
|
#define EGL_TOKEN_glPopName 0x14f
|
||||||
|
#define EGL_TOKEN_glDrawRangeElements 0x150
|
||||||
|
#define EGL_TOKEN_glTexImage3D 0x151
|
||||||
|
#define EGL_TOKEN_glTexSubImage3D 0x152
|
||||||
|
#define EGL_TOKEN_glCopyTexSubImage3D 0x153
|
||||||
|
#define EGL_TOKEN_glColorTable 0x154
|
||||||
|
#define EGL_TOKEN_glColorSubTable 0x155
|
||||||
|
#define EGL_TOKEN_glColorTableParameteriv 0x156
|
||||||
|
#define EGL_TOKEN_glColorTableParameterfv 0x157
|
||||||
|
#define EGL_TOKEN_glCopyColorSubTable 0x158
|
||||||
|
#define EGL_TOKEN_glCopyColorTable 0x159
|
||||||
|
#define EGL_TOKEN_glGetColorTable 0x15a
|
||||||
|
#define EGL_TOKEN_glGetColorTableParameterfv 0x15b
|
||||||
|
#define EGL_TOKEN_glGetColorTableParameteriv 0x15c
|
||||||
|
#define EGL_TOKEN_glBlendEquation 0x15d
|
||||||
|
#define EGL_TOKEN_glBlendColor 0x15e
|
||||||
|
#define EGL_TOKEN_glHistogram 0x15f
|
||||||
|
#define EGL_TOKEN_glResetHistogram 0x160
|
||||||
|
#define EGL_TOKEN_glGetHistogram 0x161
|
||||||
|
#define EGL_TOKEN_glGetHistogramParameterfv 0x162
|
||||||
|
#define EGL_TOKEN_glGetHistogramParameteriv 0x163
|
||||||
|
#define EGL_TOKEN_glMinmax 0x164
|
||||||
|
#define EGL_TOKEN_glResetMinmax 0x165
|
||||||
|
#define EGL_TOKEN_glGetMinmax 0x166
|
||||||
|
#define EGL_TOKEN_glGetMinmaxParameterfv 0x167
|
||||||
|
#define EGL_TOKEN_glGetMinmaxParameteriv 0x168
|
||||||
|
#define EGL_TOKEN_glConvolutionFilter1D 0x169
|
||||||
|
#define EGL_TOKEN_glConvolutionFilter2D 0x16a
|
||||||
|
#define EGL_TOKEN_glConvolutionParameterf 0x16b
|
||||||
|
#define EGL_TOKEN_glConvolutionParameterfv 0x16c
|
||||||
|
#define EGL_TOKEN_glConvolutionParameteri 0x16d
|
||||||
|
#define EGL_TOKEN_glConvolutionParameteriv 0x16e
|
||||||
|
#define EGL_TOKEN_glCopyConvolutionFilter1D 0x16f
|
||||||
|
#define EGL_TOKEN_glCopyConvolutionFilter2D 0x170
|
||||||
|
#define EGL_TOKEN_glGetConvolutionFilter 0x171
|
||||||
|
#define EGL_TOKEN_glGetConvolutionParameterfv 0x172
|
||||||
|
#define EGL_TOKEN_glGetConvolutionParameteriv 0x173
|
||||||
|
#define EGL_TOKEN_glSeparableFilter2D 0x174
|
||||||
|
#define EGL_TOKEN_glGetSeparableFilter 0x175
|
||||||
|
#define EGL_TOKEN_glActiveTexture 0x176
|
||||||
|
#define EGL_TOKEN_glClientActiveTexture 0x177
|
||||||
|
#define EGL_TOKEN_glCompressedTexImage1D 0x178
|
||||||
|
#define EGL_TOKEN_glCompressedTexImage2D 0x179
|
||||||
|
#define EGL_TOKEN_glCompressedTexImage3D 0x17a
|
||||||
|
#define EGL_TOKEN_glCompressedTexSubImage1D 0x17b
|
||||||
|
#define EGL_TOKEN_glCompressedTexSubImage2D 0x17c
|
||||||
|
#define EGL_TOKEN_glCompressedTexSubImage3D 0x17d
|
||||||
|
#define EGL_TOKEN_glGetCompressedTexImage 0x17e
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1d 0x17f
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1dv 0x180
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1f 0x181
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1fv 0x182
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1i 0x183
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1iv 0x184
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1s 0x185
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1sv 0x186
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2d 0x187
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2dv 0x188
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2f 0x189
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2fv 0x18a
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2i 0x18b
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2iv 0x18c
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2s 0x18d
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2sv 0x18e
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3d 0x18f
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3dv 0x190
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3f 0x191
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3fv 0x192
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3i 0x193
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3iv 0x194
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3s 0x195
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3sv 0x196
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4d 0x197
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4dv 0x198
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4f 0x199
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4fv 0x19a
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4i 0x19b
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4iv 0x19c
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4s 0x19d
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4sv 0x19e
|
||||||
|
#define EGL_TOKEN_glLoadTransposeMatrixd 0x19f
|
||||||
|
#define EGL_TOKEN_glLoadTransposeMatrixf 0x1a0
|
||||||
|
#define EGL_TOKEN_glMultTransposeMatrixd 0x1a1
|
||||||
|
#define EGL_TOKEN_glMultTransposeMatrixf 0x1a2
|
||||||
|
#define EGL_TOKEN_glSampleCoverage 0x1a3
|
||||||
|
#define EGL_TOKEN_glActiveTextureARB 0x1a4
|
||||||
|
#define EGL_TOKEN_glClientActiveTextureARB 0x1a5
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1dARB 0x1a6
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1dvARB 0x1a7
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1fARB 0x1a8
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1fvARB 0x1a9
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1iARB 0x1aa
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1ivARB 0x1ab
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1sARB 0x1ac
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord1svARB 0x1ad
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2dARB 0x1ae
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2dvARB 0x1af
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2fARB 0x1b0
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2fvARB 0x1b1
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2iARB 0x1b2
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2ivARB 0x1b3
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2sARB 0x1b4
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord2svARB 0x1b5
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3dARB 0x1b6
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3dvARB 0x1b7
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3fARB 0x1b8
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3fvARB 0x1b9
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3iARB 0x1ba
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3ivARB 0x1bb
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3sARB 0x1bc
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord3svARB 0x1bd
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4dARB 0x1be
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4dvARB 0x1bf
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4fARB 0x1c0
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4fvARB 0x1c1
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4iARB 0x1c2
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4ivARB 0x1c3
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4sARB 0x1c4
|
||||||
|
#define EGL_TOKEN_glMultiTexCoord4svARB 0x1c5
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,422 @@
|
||||||
|
#define glClearIndex(_a0) {(void)(_a0);}
|
||||||
|
#define glClearColor(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glIndexMask(_a0) {(void)(_a0);}
|
||||||
|
#define glColorMask(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glAlphaFunc(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glBlendFunc(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glLogicOp(_a0) {(void)(_a0);}
|
||||||
|
#define glCullFace(_a0) {(void)(_a0);}
|
||||||
|
#define glFrontFace(_a0) {(void)(_a0);}
|
||||||
|
#define glPointSize(_a0) {(void)(_a0);}
|
||||||
|
#define glLineWidth(_a0) {(void)(_a0);}
|
||||||
|
#define glLineStipple(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPolygonMode(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPolygonOffset(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPolygonStipple(_a0) {(void)(_a0);}
|
||||||
|
#define glGetPolygonStipple(_a0) {(void)(_a0);}
|
||||||
|
#define glEdgeFlag(_a0) {(void)(_a0);}
|
||||||
|
#define glEdgeFlagv(_a0) {(void)(_a0);}
|
||||||
|
#define glScissor(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glClipPlane(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glGetClipPlane(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glDrawBuffer(_a0) {(void)(_a0);}
|
||||||
|
#define glReadBuffer(_a0) {(void)(_a0);}
|
||||||
|
#define glEnable(_a0) {(void)(_a0);}
|
||||||
|
#define glDisable(_a0) {(void)(_a0);}
|
||||||
|
#define glEnableClientState(_a0) {(void)(_a0);}
|
||||||
|
#define glDisableClientState(_a0) {(void)(_a0);}
|
||||||
|
#define glPushAttrib(_a0) {(void)(_a0);}
|
||||||
|
#define glPopAttrib() {}
|
||||||
|
#define glPushClientAttrib(_a0) {(void)(_a0);}
|
||||||
|
#define glPopClientAttrib() {}
|
||||||
|
#define glHint(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glClearDepth(_a0) {(void)(_a0);}
|
||||||
|
#define glDepthFunc(_a0) {(void)(_a0);}
|
||||||
|
#define glDepthMask(_a0) {(void)(_a0);}
|
||||||
|
#define glDepthRange(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glClearAccum(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glAccum(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glDeleteLists(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glNewList(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glEndList() {}
|
||||||
|
#define glCallList(_a0) {(void)(_a0);}
|
||||||
|
#define glCallLists(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glListBase(_a0) {(void)(_a0);}
|
||||||
|
#define glBegin(_a0) {(void)(_a0);}
|
||||||
|
#define glEnd() {}
|
||||||
|
#define glVertex2d(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glVertex2f(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glVertex2i(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glVertex2s(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glVertex3d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glVertex3f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glVertex3i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glVertex3s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glVertex4d(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glVertex4f(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glVertex4i(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glVertex4s(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glVertex2dv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex2fv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex2iv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex2sv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex3dv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex3fv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex3iv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex3sv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex4dv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex4fv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex4iv(_a0) {(void)(_a0);}
|
||||||
|
#define glVertex4sv(_a0) {(void)(_a0);}
|
||||||
|
#define glNormal3b(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glNormal3d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glNormal3f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glNormal3i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glNormal3s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glNormal3bv(_a0) {(void)(_a0);}
|
||||||
|
#define glNormal3dv(_a0) {(void)(_a0);}
|
||||||
|
#define glNormal3fv(_a0) {(void)(_a0);}
|
||||||
|
#define glNormal3iv(_a0) {(void)(_a0);}
|
||||||
|
#define glNormal3sv(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexd(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexf(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexi(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexs(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexub(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexdv(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexfv(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexiv(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexsv(_a0) {(void)(_a0);}
|
||||||
|
#define glIndexubv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3b(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3ub(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3ui(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor3us(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColor4b(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4d(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4f(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4i(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4s(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4ub(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4ui(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor4us(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glColor3bv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3dv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3fv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3iv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3sv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3ubv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3uiv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor3usv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4bv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4dv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4fv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4iv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4sv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4ubv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4uiv(_a0) {(void)(_a0);}
|
||||||
|
#define glColor4usv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1d(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1f(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1i(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1s(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord2d(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glTexCoord2f(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glTexCoord2i(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glTexCoord2s(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glTexCoord3d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexCoord3f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexCoord3i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexCoord3s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexCoord4d(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glTexCoord4f(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glTexCoord4i(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glTexCoord4s(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glTexCoord1dv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1fv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1iv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord1sv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord2dv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord2fv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord2iv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord2sv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord3dv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord3fv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord3iv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord3sv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord4dv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord4fv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord4iv(_a0) {(void)(_a0);}
|
||||||
|
#define glTexCoord4sv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos2d(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRasterPos2f(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRasterPos2i(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRasterPos2s(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRasterPos3d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glRasterPos3f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glRasterPos3i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glRasterPos3s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glRasterPos4d(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRasterPos4f(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRasterPos4i(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRasterPos4s(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRasterPos2dv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos2fv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos2iv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos2sv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos3dv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos3fv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos3iv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos3sv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos4dv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos4fv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos4iv(_a0) {(void)(_a0);}
|
||||||
|
#define glRasterPos4sv(_a0) {(void)(_a0);}
|
||||||
|
#define glRectd(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRectf(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRecti(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRects(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glRectdv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRectfv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRectiv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glRectsv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glVertexPointer(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glNormalPointer(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColorPointer(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glIndexPointer(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexCoordPointer(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glEdgeFlagPointer(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glGetPointerv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glArrayElement(_a0) {(void)(_a0);}
|
||||||
|
#define glDrawArrays(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glDrawElements(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glInterleavedArrays(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glShadeModel(_a0) {(void)(_a0);}
|
||||||
|
#define glLightf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glLighti(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glLightfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glLightiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetLightfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetLightiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glLightModelf(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glLightModeli(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glLightModelfv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glLightModeliv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMaterialf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMateriali(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMaterialfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMaterialiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetMaterialfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetMaterialiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColorMaterial(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelZoom(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelStoref(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelStorei(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelTransferf(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelTransferi(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPixelMapfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glPixelMapuiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glPixelMapusv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetPixelMapfv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glGetPixelMapuiv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glGetPixelMapusv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glBitmap(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glReadPixels(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glDrawPixels(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glCopyPixels(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glStencilFunc(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glStencilMask(_a0) {(void)(_a0);}
|
||||||
|
#define glStencilOp(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glClearStencil(_a0) {(void)(_a0);}
|
||||||
|
#define glTexGend(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexGenf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexGeni(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexGendv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexGenfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexGeniv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexGendv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexGenfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexGeniv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexEnvf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexEnvi(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexEnvfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexEnviv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexEnvfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexEnviv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexParameterf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexParameteri(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetTexLevelParameterfv(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glGetTexLevelParameteriv(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glTexImage1D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);}
|
||||||
|
#define glTexImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);}
|
||||||
|
#define glGetTexImage(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glGenTextures(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glDeleteTextures(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glBindTexture(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glPrioritizeTextures(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glTexSubImage1D(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glTexSubImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);}
|
||||||
|
#define glCopyTexImage1D(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glCopyTexImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);}
|
||||||
|
#define glCopyTexSubImage1D(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glCopyTexSubImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);}
|
||||||
|
#define glMap1d(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glMap1f(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glMap2d(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);(void)(_a9);}
|
||||||
|
#define glMap2f(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);(void)(_a9);}
|
||||||
|
#define glGetMapdv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetMapfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetMapiv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glEvalCoord1d(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalCoord1f(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalCoord1dv(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalCoord1fv(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalCoord2d(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glEvalCoord2f(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glEvalCoord2dv(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalCoord2fv(_a0) {(void)(_a0);}
|
||||||
|
#define glMapGrid1d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMapGrid1f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMapGrid2d(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glMapGrid2f(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glEvalPoint1(_a0) {(void)(_a0);}
|
||||||
|
#define glEvalPoint2(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glEvalMesh1(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glEvalMesh2(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glFogf(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glFogi(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glFogfv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glFogiv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glFeedbackBuffer(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glPassThrough(_a0) {(void)(_a0);}
|
||||||
|
#define glSelectBuffer(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glInitNames() {}
|
||||||
|
#define glLoadName(_a0) {(void)(_a0);}
|
||||||
|
#define glPushName(_a0) {(void)(_a0);}
|
||||||
|
#define glPopName() {}
|
||||||
|
#define glDrawRangeElements(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glTexImage3D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);(void)(_a9);}
|
||||||
|
#define glTexSubImage3D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9,_a10) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);(void)(_a9);(void)(_a10);}
|
||||||
|
#define glCopyTexSubImage3D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);}
|
||||||
|
#define glColorTable(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glColorSubTable(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glColorTableParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glColorTableParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glCopyColorSubTable(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glCopyColorTable(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glGetColorTable(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glGetColorTableParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetColorTableParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glBlendEquation(_a0) {(void)(_a0);}
|
||||||
|
#define glBlendColor(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glHistogram(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glResetHistogram(_a0) {(void)(_a0);}
|
||||||
|
#define glGetHistogram(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glGetHistogramParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetHistogramParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMinmax(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glResetMinmax(_a0) {(void)(_a0);}
|
||||||
|
#define glGetMinmax(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glGetMinmaxParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetMinmaxParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glConvolutionFilter1D(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glConvolutionFilter2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glConvolutionParameterf(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glConvolutionParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glConvolutionParameteri(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glConvolutionParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glCopyConvolutionFilter1D(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glCopyConvolutionFilter2D(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glGetConvolutionFilter(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glGetConvolutionParameterfv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glGetConvolutionParameteriv(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glSeparableFilter2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);}
|
||||||
|
#define glGetSeparableFilter(_a0,_a1,_a2,_a3,_a4,_a5) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);}
|
||||||
|
#define glActiveTexture(_a0) {(void)(_a0);}
|
||||||
|
#define glClientActiveTexture(_a0) {(void)(_a0);}
|
||||||
|
#define glCompressedTexImage1D(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glCompressedTexImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);}
|
||||||
|
#define glCompressedTexImage3D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);}
|
||||||
|
#define glCompressedTexSubImage1D(_a0,_a1,_a2,_a3,_a4,_a5,_a6) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);}
|
||||||
|
#define glCompressedTexSubImage2D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);}
|
||||||
|
#define glCompressedTexSubImage3D(_a0,_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9,_a10) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);(void)(_a5);(void)(_a6);(void)(_a7);(void)(_a8);(void)(_a9);(void)(_a10);}
|
||||||
|
#define glGetCompressedTexImage(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord1d(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1dv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1f(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1fv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1i(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1iv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1s(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1sv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2d(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2dv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2f(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2fv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2i(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2iv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2s(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2sv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3d(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3dv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3f(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3fv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3i(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3iv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3s(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3sv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4d(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4dv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4f(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4fv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4i(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4iv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4s(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4sv(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glLoadTransposeMatrixd(_a0) {(void)(_a0);}
|
||||||
|
#define glLoadTransposeMatrixf(_a0) {(void)(_a0);}
|
||||||
|
#define glMultTransposeMatrixd(_a0) {(void)(_a0);}
|
||||||
|
#define glMultTransposeMatrixf(_a0) {(void)(_a0);}
|
||||||
|
#define glSampleCoverage(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glActiveTextureARB(_a0) {(void)(_a0);}
|
||||||
|
#define glClientActiveTextureARB(_a0) {(void)(_a0);}
|
||||||
|
#define glMultiTexCoord1dARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1dvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1fARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1fvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1iARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1ivARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1sARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord1svARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2dARB(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2dvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2fARB(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2fvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2iARB(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2ivARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord2sARB(_a0,_a1,_a2) {(void)(_a0);(void)(_a1);(void)(_a2);}
|
||||||
|
#define glMultiTexCoord2svARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3dARB(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3dvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3fARB(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3fvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3iARB(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3ivARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord3sARB(_a0,_a1,_a2,_a3) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);}
|
||||||
|
#define glMultiTexCoord3svARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4dARB(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4dvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4fARB(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4fvARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4iARB(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4ivARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
||||||
|
#define glMultiTexCoord4sARB(_a0,_a1,_a2,_a3,_a4) {(void)(_a0);(void)(_a1);(void)(_a2);(void)(_a3);(void)(_a4);}
|
||||||
|
#define glMultiTexCoord4svARB(_a0,_a1) {(void)(_a0);(void)(_a1);}
|
|
@ -0,0 +1,47 @@
|
||||||
|
#ifndef __EGL_H
|
||||||
|
#define __EGL_H
|
||||||
|
|
||||||
|
// include types and defines
|
||||||
|
|
||||||
|
#include <GL/egl_defs.h>
|
||||||
|
|
||||||
|
// include log tokens
|
||||||
|
|
||||||
|
#include <GL/egl_tokens.h>
|
||||||
|
|
||||||
|
// include simple void functions we ignore
|
||||||
|
|
||||||
|
#include <GL/egl_void.h>
|
||||||
|
|
||||||
|
// include functions that need a bit of work, but we don't log
|
||||||
|
|
||||||
|
#include <GL/egl_cpx.h>
|
||||||
|
|
||||||
|
// include functions we log
|
||||||
|
|
||||||
|
#ifdef EGL_LOG_PTR
|
||||||
|
|
||||||
|
extern unsigned int *EGL_LOG_PTR;
|
||||||
|
|
||||||
|
inline void xGLL(int a) { *EGL_LOG_PTR=(unsigned int)a; EGL_LOG_PTR++; };
|
||||||
|
inline void xGLL(unsigned int a) { *EGL_LOG_PTR=a; EGL_LOG_PTR++; };
|
||||||
|
inline void xGLL(float a) { *(float *)EGL_LOG_PTR=a; EGL_LOG_PTR++; };
|
||||||
|
inline void xGLL(double a) { *(float *)EGL_LOG_PTR=(float)a; EGL_LOG_PTR++; };
|
||||||
|
inline void xGLL(const float *a) { for(int t=0;t!=16;t++) xGLL(a[t]); };
|
||||||
|
inline void xGLL(const double *a) { for(int t=0;t!=16;t++) xGLL(a[t]); };
|
||||||
|
#else
|
||||||
|
|
||||||
|
inline void xGLL(int a) {};
|
||||||
|
inline void xGLL(unsigned int a) {};
|
||||||
|
inline void xGLL(float a) {};
|
||||||
|
inline void xGLL(double a) {};
|
||||||
|
inline void xGLL(const float *a) {};
|
||||||
|
inline void xGLL(const double *a) {};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// functions we might log
|
||||||
|
|
||||||
|
#include <GL/egl_logged.h>
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef EMPTY_GLU
|
||||||
|
#define EMPTY_GLU
|
||||||
|
|
||||||
|
inline void gluOrtho2D( int a,int b, int c ,int d ) { } ;
|
||||||
|
inline void gluLookAt(
|
||||||
|
GLfloat a,GLfloat b, GLfloat c,
|
||||||
|
GLfloat d,GLfloat e, GLfloat f,
|
||||||
|
GLfloat g,GLfloat h, GLfloat i ) { };
|
||||||
|
|
||||||
|
#define GLU_FILL 1
|
||||||
|
#define GLU_SMOOTH 2
|
||||||
|
|
||||||
|
typedef int GLUquadric;
|
||||||
|
typedef GLUquadric GLUquadricObj;
|
||||||
|
|
||||||
|
inline GLUquadric *gluNewQuadric() { return (GLUquadric *)1; };
|
||||||
|
inline void gluQuadricDrawStyle( GLUquadric *o, int mode) {};
|
||||||
|
inline void gluQuadricNormals( GLUquadric *o, int mode) {};
|
||||||
|
inline void gluDeleteQuadric( GLUquadric *q) {};
|
||||||
|
inline void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops) {};
|
||||||
|
inline void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks) {};
|
||||||
|
inline int gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data) { return 0;}
|
||||||
|
#endif
|
|
@ -0,0 +1,60 @@
|
||||||
|
#ifndef EMPTY_GLUT_H
|
||||||
|
#define EMPTY_GLUT_H
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glu.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define GLUT_KEY_F1 0
|
||||||
|
#define GLUT_KEY_F2 1
|
||||||
|
#define GLUT_KEY_END 2
|
||||||
|
#define GLUT_KEY_LEFT 3
|
||||||
|
#define GLUT_KEY_RIGHT 4
|
||||||
|
#define GLUT_KEY_UP 5
|
||||||
|
#define GLUT_KEY_DOWN 6
|
||||||
|
#define GLUT_KEY_PAGE_UP 7
|
||||||
|
#define GLUT_KEY_PAGE_DOWN 8
|
||||||
|
#define GLUT_KEY_HOME 9
|
||||||
|
#define GLUT_KEY_F3 10
|
||||||
|
#define GLUT_KEY_F4 11
|
||||||
|
#define GLUT_KEY_F5 12
|
||||||
|
#define GLUT_ACTIVE_SHIFT 13
|
||||||
|
|
||||||
|
|
||||||
|
#define GLUT_DOUBLE 1
|
||||||
|
#define GLUT_RGBA 2
|
||||||
|
#define GLUT_DEPTH 4
|
||||||
|
#define GLUT_STENCIL 8
|
||||||
|
#define GLUT_WINDOW_WIDTH 16
|
||||||
|
#define GLUT_WINDOW_HEIGHT 32
|
||||||
|
#define GLUT_RGB 64
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
inline void glutSwapBuffers() {}
|
||||||
|
inline void glutShowWindow() {}
|
||||||
|
inline void glutPostRedisplay() {}
|
||||||
|
inline void glutInit(int *argc, char **argv) {}
|
||||||
|
inline void glutInitDisplayMode( unsigned int ) {}
|
||||||
|
inline void glutInitWindowPosition(int x, int y) {}
|
||||||
|
inline void glutInitWindowSize(int x, int y) {}
|
||||||
|
inline int glutCreateWindow( const char *str) {return 0;}
|
||||||
|
inline void glutKeyboardFunc( void (*func)(unsigned char, int ,int ) ) {}
|
||||||
|
inline void glutSpecialFunc( void (*func)(int key, int x,int y) ) {}
|
||||||
|
inline void glutSpecialUpFunc( void (*func)(int key, int x,int y) ) {}
|
||||||
|
inline void glutReshapeFunc( void (*func)(int w,int h) ) {}
|
||||||
|
inline void glutDisplayFunc( void (*func)() ) {}
|
||||||
|
inline void glutIdleFunc( void (*func)() ) {}
|
||||||
|
inline void glutMotionFunc( void (*func)(int x,int y) ) {}
|
||||||
|
inline void glutMouseFunc( void (*func)(int button,int state,int x,int y) ) {}
|
||||||
|
inline void glutMainLoop() {}
|
||||||
|
inline void glutSetWindow(int bla) {}
|
||||||
|
|
||||||
|
inline void glutSolidCube(GLfloat ) {}
|
||||||
|
inline void glutSolidSphere(GLfloat , int a , int b) {}
|
||||||
|
inline void glutSolidCone(GLfloat ,GLfloat , int a , int b) {}
|
||||||
|
inline int glutGetModifiers() { return 0;}
|
||||||
|
inline void gluPerspective(float a,float b,float c,float d) {}
|
||||||
|
inline float glutGet(int code) { return 0.f;}
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,607 @@
|
||||||
|
#ifndef __glut_h__
|
||||||
|
#define __glut_h__
|
||||||
|
|
||||||
|
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
|
||||||
|
|
||||||
|
/* This program is freely distributable without licensing fees and is
|
||||||
|
provided without guarantee or warrantee expressed or implied. This
|
||||||
|
program is -not- in the public domain. */
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
|
/* GLUT 3.7 now tries to avoid including <windows.h>
|
||||||
|
to avoid name space pollution, but Win32's <GL/gl.h>
|
||||||
|
needs APIENTRY and WINGDIAPI defined properly. */
|
||||||
|
# if 0
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# include <windows.h>
|
||||||
|
# else
|
||||||
|
/* XXX This is from Win32's <windef.h> */
|
||||||
|
# ifndef APIENTRY
|
||||||
|
# define GLUT_APIENTRY_DEFINED
|
||||||
|
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
||||||
|
# define APIENTRY __stdcall
|
||||||
|
# else
|
||||||
|
# define APIENTRY
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
/* XXX This is from Win32's <winnt.h> */
|
||||||
|
# ifndef CALLBACK
|
||||||
|
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||||
|
# define CALLBACK __stdcall
|
||||||
|
# else
|
||||||
|
# define CALLBACK
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
|
||||||
|
# ifndef WINGDIAPI
|
||||||
|
# define GLUT_WINGDIAPI_DEFINED
|
||||||
|
# define WINGDIAPI __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
/* XXX This is from Win32's <ctype.h> */
|
||||||
|
# ifndef _WCHAR_T_DEFINED
|
||||||
|
/* MinGW32 chokes on the next line */
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
typedef unsigned short int wchar_t;
|
||||||
|
#endif //__MINGW32__
|
||||||
|
# define _WCHAR_T_DEFINED
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
|
||||||
|
#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
|
||||||
|
#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
#pragma message("Note: including lib: glut64.lib\n")
|
||||||
|
#pragma comment (lib, "glut64.lib") /* link with Win32 GLUT lib */
|
||||||
|
#else
|
||||||
|
#pragma message("Note: including lib: glut32.lib\n")
|
||||||
|
#pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
|
||||||
|
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glu.h>
|
||||||
|
|
||||||
|
/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
|
||||||
|
#if !defined(_WIN32)
|
||||||
|
#define APIENTRY
|
||||||
|
#define GLUT_APIENTRY_DEFINED
|
||||||
|
#define CALLBACK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
GLUT API revision history:
|
||||||
|
|
||||||
|
GLUT_API_VERSION is updated to reflect incompatible GLUT
|
||||||
|
API changes (interface changes, semantic changes, deletions,
|
||||||
|
or additions).
|
||||||
|
|
||||||
|
GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
|
||||||
|
|
||||||
|
GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
|
||||||
|
extension. Supports new input devices like tablet, dial and button
|
||||||
|
box, and Spaceball. Easy to query OpenGL extensions.
|
||||||
|
|
||||||
|
GLUT_API_VERSION=3 glutMenuStatus added.
|
||||||
|
|
||||||
|
GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
|
||||||
|
glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
|
||||||
|
video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
|
||||||
|
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
|
||||||
|
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
|
||||||
|
**/
|
||||||
|
#ifndef GLUT_API_VERSION /* allow this to be overriden */
|
||||||
|
//#define GLUT_API_VERSION 3
|
||||||
|
#define GLUT_API_VERSION 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
GLUT implementation revision history:
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
|
||||||
|
API revisions and implementation revisions (ie, bug fixes).
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
|
||||||
|
GLUT Xlib-based implementation. 11/29/94
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
|
||||||
|
GLUT Xlib-based implementation providing GLUT version 2
|
||||||
|
interfaces.
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
|
||||||
|
and video resize. 1/3/97
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
|
||||||
|
|
||||||
|
GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 release with GameGLUT support.
|
||||||
|
**/
|
||||||
|
#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
|
||||||
|
#define GLUT_XLIB_IMPLEMENTATION 13
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Display mode bit masks. */
|
||||||
|
#define GLUT_RGB 0
|
||||||
|
#define GLUT_RGBA GLUT_RGB
|
||||||
|
#define GLUT_INDEX 1
|
||||||
|
#define GLUT_SINGLE 0
|
||||||
|
#define GLUT_DOUBLE 2
|
||||||
|
#define GLUT_ACCUM 4
|
||||||
|
#define GLUT_ALPHA 8
|
||||||
|
#define GLUT_DEPTH 16
|
||||||
|
#define GLUT_STENCIL 32
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
#define GLUT_MULTISAMPLE 128
|
||||||
|
#define GLUT_STEREO 256
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
#define GLUT_LUMINANCE 512
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Mouse buttons. */
|
||||||
|
#define GLUT_LEFT_BUTTON 0
|
||||||
|
#define GLUT_MIDDLE_BUTTON 1
|
||||||
|
#define GLUT_RIGHT_BUTTON 2
|
||||||
|
|
||||||
|
/* Mouse button state. */
|
||||||
|
#define GLUT_DOWN 0
|
||||||
|
#define GLUT_UP 1
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
/* function keys */
|
||||||
|
#define GLUT_KEY_F1 1
|
||||||
|
#define GLUT_KEY_F2 2
|
||||||
|
#define GLUT_KEY_F3 3
|
||||||
|
#define GLUT_KEY_F4 4
|
||||||
|
#define GLUT_KEY_F5 5
|
||||||
|
#define GLUT_KEY_F6 6
|
||||||
|
#define GLUT_KEY_F7 7
|
||||||
|
#define GLUT_KEY_F8 8
|
||||||
|
#define GLUT_KEY_F9 9
|
||||||
|
#define GLUT_KEY_F10 10
|
||||||
|
#define GLUT_KEY_F11 11
|
||||||
|
#define GLUT_KEY_F12 12
|
||||||
|
/* directional keys */
|
||||||
|
#define GLUT_KEY_LEFT 100
|
||||||
|
#define GLUT_KEY_UP 101
|
||||||
|
#define GLUT_KEY_RIGHT 102
|
||||||
|
#define GLUT_KEY_DOWN 103
|
||||||
|
#define GLUT_KEY_PAGE_UP 104
|
||||||
|
#define GLUT_KEY_PAGE_DOWN 105
|
||||||
|
#define GLUT_KEY_HOME 106
|
||||||
|
#define GLUT_KEY_END 107
|
||||||
|
#define GLUT_KEY_INSERT 108
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Entry/exit state. */
|
||||||
|
#define GLUT_LEFT 0
|
||||||
|
#define GLUT_ENTERED 1
|
||||||
|
|
||||||
|
/* Menu usage state. */
|
||||||
|
#define GLUT_MENU_NOT_IN_USE 0
|
||||||
|
#define GLUT_MENU_IN_USE 1
|
||||||
|
|
||||||
|
/* Visibility state. */
|
||||||
|
#define GLUT_NOT_VISIBLE 0
|
||||||
|
#define GLUT_VISIBLE 1
|
||||||
|
|
||||||
|
/* Window status state. */
|
||||||
|
#define GLUT_HIDDEN 0
|
||||||
|
#define GLUT_FULLY_RETAINED 1
|
||||||
|
#define GLUT_PARTIALLY_RETAINED 2
|
||||||
|
#define GLUT_FULLY_COVERED 3
|
||||||
|
|
||||||
|
/* Color index component selection values. */
|
||||||
|
#define GLUT_RED 0
|
||||||
|
#define GLUT_GREEN 1
|
||||||
|
#define GLUT_BLUE 2
|
||||||
|
|
||||||
|
/* Layers for use. */
|
||||||
|
#define GLUT_NORMAL 0
|
||||||
|
#define GLUT_OVERLAY 1
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
/* Stroke font constants (use these in GLUT program). */
|
||||||
|
#define GLUT_STROKE_ROMAN ((void*)0)
|
||||||
|
#define GLUT_STROKE_MONO_ROMAN ((void*)1)
|
||||||
|
|
||||||
|
/* Bitmap font constants (use these in GLUT program). */
|
||||||
|
#define GLUT_BITMAP_9_BY_15 ((void*)2)
|
||||||
|
#define GLUT_BITMAP_8_BY_13 ((void*)3)
|
||||||
|
#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
|
||||||
|
#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
/* Stroke font opaque addresses (use constants instead in source code). */
|
||||||
|
extern void *glutStrokeRoman;
|
||||||
|
extern void *glutStrokeMonoRoman;
|
||||||
|
|
||||||
|
/* Stroke font constants (use these in GLUT program). */
|
||||||
|
#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
|
||||||
|
#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
|
||||||
|
|
||||||
|
/* Bitmap font opaque addresses (use constants instead in source code). */
|
||||||
|
extern void *glutBitmap9By15;
|
||||||
|
extern void *glutBitmap8By13;
|
||||||
|
extern void *glutBitmapTimesRoman10;
|
||||||
|
extern void *glutBitmapTimesRoman24;
|
||||||
|
extern void *glutBitmapHelvetica10;
|
||||||
|
extern void *glutBitmapHelvetica12;
|
||||||
|
extern void *glutBitmapHelvetica18;
|
||||||
|
|
||||||
|
/* Bitmap font constants (use these in GLUT program). */
|
||||||
|
#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
|
||||||
|
#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
|
||||||
|
#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
|
||||||
|
#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
|
||||||
|
#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* glutGet parameters. */
|
||||||
|
#define GLUT_WINDOW_X 100
|
||||||
|
#define GLUT_WINDOW_Y 101
|
||||||
|
#define GLUT_WINDOW_WIDTH 102
|
||||||
|
#define GLUT_WINDOW_HEIGHT 103
|
||||||
|
#define GLUT_WINDOW_BUFFER_SIZE 104
|
||||||
|
#define GLUT_WINDOW_STENCIL_SIZE 105
|
||||||
|
#define GLUT_WINDOW_DEPTH_SIZE 106
|
||||||
|
#define GLUT_WINDOW_RED_SIZE 107
|
||||||
|
#define GLUT_WINDOW_GREEN_SIZE 108
|
||||||
|
#define GLUT_WINDOW_BLUE_SIZE 109
|
||||||
|
#define GLUT_WINDOW_ALPHA_SIZE 110
|
||||||
|
#define GLUT_WINDOW_ACCUM_RED_SIZE 111
|
||||||
|
#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112
|
||||||
|
#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113
|
||||||
|
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114
|
||||||
|
#define GLUT_WINDOW_DOUBLEBUFFER 115
|
||||||
|
#define GLUT_WINDOW_RGBA 116
|
||||||
|
#define GLUT_WINDOW_PARENT 117
|
||||||
|
#define GLUT_WINDOW_NUM_CHILDREN 118
|
||||||
|
#define GLUT_WINDOW_COLORMAP_SIZE 119
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
#define GLUT_WINDOW_NUM_SAMPLES 120
|
||||||
|
#define GLUT_WINDOW_STEREO 121
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
#define GLUT_WINDOW_CURSOR 122
|
||||||
|
#endif
|
||||||
|
#define GLUT_SCREEN_WIDTH 200
|
||||||
|
#define GLUT_SCREEN_HEIGHT 201
|
||||||
|
#define GLUT_SCREEN_WIDTH_MM 202
|
||||||
|
#define GLUT_SCREEN_HEIGHT_MM 203
|
||||||
|
#define GLUT_MENU_NUM_ITEMS 300
|
||||||
|
#define GLUT_DISPLAY_MODE_POSSIBLE 400
|
||||||
|
#define GLUT_INIT_WINDOW_X 500
|
||||||
|
#define GLUT_INIT_WINDOW_Y 501
|
||||||
|
#define GLUT_INIT_WINDOW_WIDTH 502
|
||||||
|
#define GLUT_INIT_WINDOW_HEIGHT 503
|
||||||
|
#define GLUT_INIT_DISPLAY_MODE 504
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
#define GLUT_ELAPSED_TIME 700
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||||
|
#define GLUT_WINDOW_FORMAT_ID 123
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
/* glutDeviceGet parameters. */
|
||||||
|
#define GLUT_HAS_KEYBOARD 600
|
||||||
|
#define GLUT_HAS_MOUSE 601
|
||||||
|
#define GLUT_HAS_SPACEBALL 602
|
||||||
|
#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
|
||||||
|
#define GLUT_HAS_TABLET 604
|
||||||
|
#define GLUT_NUM_MOUSE_BUTTONS 605
|
||||||
|
#define GLUT_NUM_SPACEBALL_BUTTONS 606
|
||||||
|
#define GLUT_NUM_BUTTON_BOX_BUTTONS 607
|
||||||
|
#define GLUT_NUM_DIALS 608
|
||||||
|
#define GLUT_NUM_TABLET_BUTTONS 609
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||||
|
#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610
|
||||||
|
#define GLUT_DEVICE_KEY_REPEAT 611
|
||||||
|
#define GLUT_HAS_JOYSTICK 612
|
||||||
|
#define GLUT_OWNS_JOYSTICK 613
|
||||||
|
#define GLUT_JOYSTICK_BUTTONS 614
|
||||||
|
#define GLUT_JOYSTICK_AXES 615
|
||||||
|
#define GLUT_JOYSTICK_POLL_RATE 616
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
/* glutLayerGet parameters. */
|
||||||
|
#define GLUT_OVERLAY_POSSIBLE 800
|
||||||
|
#define GLUT_LAYER_IN_USE 801
|
||||||
|
#define GLUT_HAS_OVERLAY 802
|
||||||
|
#define GLUT_TRANSPARENT_INDEX 803
|
||||||
|
#define GLUT_NORMAL_DAMAGED 804
|
||||||
|
#define GLUT_OVERLAY_DAMAGED 805
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
/* glutVideoResizeGet parameters. */
|
||||||
|
#define GLUT_VIDEO_RESIZE_POSSIBLE 900
|
||||||
|
#define GLUT_VIDEO_RESIZE_IN_USE 901
|
||||||
|
#define GLUT_VIDEO_RESIZE_X_DELTA 902
|
||||||
|
#define GLUT_VIDEO_RESIZE_Y_DELTA 903
|
||||||
|
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
|
||||||
|
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
|
||||||
|
#define GLUT_VIDEO_RESIZE_X 906
|
||||||
|
#define GLUT_VIDEO_RESIZE_Y 907
|
||||||
|
#define GLUT_VIDEO_RESIZE_WIDTH 908
|
||||||
|
#define GLUT_VIDEO_RESIZE_HEIGHT 909
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* glutUseLayer parameters. */
|
||||||
|
#define GLUT_NORMAL 0
|
||||||
|
#define GLUT_OVERLAY 1
|
||||||
|
|
||||||
|
/* glutGetModifiers return mask. */
|
||||||
|
#define GLUT_ACTIVE_SHIFT 1
|
||||||
|
#define GLUT_ACTIVE_CTRL 2
|
||||||
|
#define GLUT_ACTIVE_ALT 4
|
||||||
|
|
||||||
|
/* glutSetCursor parameters. */
|
||||||
|
/* Basic arrows. */
|
||||||
|
#define GLUT_CURSOR_RIGHT_ARROW 0
|
||||||
|
#define GLUT_CURSOR_LEFT_ARROW 1
|
||||||
|
/* Symbolic cursor shapes. */
|
||||||
|
#define GLUT_CURSOR_INFO 2
|
||||||
|
#define GLUT_CURSOR_DESTROY 3
|
||||||
|
#define GLUT_CURSOR_HELP 4
|
||||||
|
#define GLUT_CURSOR_CYCLE 5
|
||||||
|
#define GLUT_CURSOR_SPRAY 6
|
||||||
|
#define GLUT_CURSOR_WAIT 7
|
||||||
|
#define GLUT_CURSOR_TEXT 8
|
||||||
|
#define GLUT_CURSOR_CROSSHAIR 9
|
||||||
|
/* Directional cursors. */
|
||||||
|
#define GLUT_CURSOR_UP_DOWN 10
|
||||||
|
#define GLUT_CURSOR_LEFT_RIGHT 11
|
||||||
|
/* Sizing cursors. */
|
||||||
|
#define GLUT_CURSOR_TOP_SIDE 12
|
||||||
|
#define GLUT_CURSOR_BOTTOM_SIDE 13
|
||||||
|
#define GLUT_CURSOR_LEFT_SIDE 14
|
||||||
|
#define GLUT_CURSOR_RIGHT_SIDE 15
|
||||||
|
#define GLUT_CURSOR_TOP_LEFT_CORNER 16
|
||||||
|
#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
|
||||||
|
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
|
||||||
|
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
|
||||||
|
/* Inherit from parent window. */
|
||||||
|
#define GLUT_CURSOR_INHERIT 100
|
||||||
|
/* Blank cursor. */
|
||||||
|
#define GLUT_CURSOR_NONE 101
|
||||||
|
/* Fullscreen crosshair (if available). */
|
||||||
|
#define GLUT_CURSOR_FULL_CROSSHAIR 102
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT initialization sub-API. */
|
||||||
|
extern void APIENTRY glutInit(int *argcp, char **argv);
|
||||||
|
extern void APIENTRY glutInitDisplayMode(unsigned int mode);
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
extern void APIENTRY glutInitDisplayString(const char *string);
|
||||||
|
#endif
|
||||||
|
extern void APIENTRY glutInitWindowPosition(int x, int y);
|
||||||
|
extern void APIENTRY glutInitWindowSize(int width, int height);
|
||||||
|
extern void APIENTRY glutMainLoop(void);
|
||||||
|
|
||||||
|
/* GLUT window sub-API. */
|
||||||
|
extern int APIENTRY glutCreateWindow(const char *title);
|
||||||
|
extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
|
||||||
|
extern void APIENTRY glutDestroyWindow(int win);
|
||||||
|
extern void APIENTRY glutPostRedisplay(void);
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||||
|
extern void APIENTRY glutPostWindowRedisplay(int win);
|
||||||
|
#endif
|
||||||
|
extern void APIENTRY glutSwapBuffers(void);
|
||||||
|
extern int APIENTRY glutGetWindow(void);
|
||||||
|
extern void APIENTRY glutSetWindow(int win);
|
||||||
|
extern void APIENTRY glutSetWindowTitle(const char *title);
|
||||||
|
extern void APIENTRY glutSetIconTitle(const char *title);
|
||||||
|
extern void APIENTRY glutPositionWindow(int x, int y);
|
||||||
|
extern void APIENTRY glutReshapeWindow(int width, int height);
|
||||||
|
extern void APIENTRY glutPopWindow(void);
|
||||||
|
extern void APIENTRY glutPushWindow(void);
|
||||||
|
extern void APIENTRY glutIconifyWindow(void);
|
||||||
|
extern void APIENTRY glutShowWindow(void);
|
||||||
|
extern void APIENTRY glutHideWindow(void);
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
extern void APIENTRY glutFullScreen(void);
|
||||||
|
extern void APIENTRY glutSetCursor(int cursor);
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
extern void APIENTRY glutWarpPointer(int x, int y);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT overlay sub-API. */
|
||||||
|
extern void APIENTRY glutEstablishOverlay(void);
|
||||||
|
extern void APIENTRY glutRemoveOverlay(void);
|
||||||
|
extern void APIENTRY glutUseLayer(GLenum layer);
|
||||||
|
extern void APIENTRY glutPostOverlayRedisplay(void);
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
||||||
|
extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
|
||||||
|
#endif
|
||||||
|
extern void APIENTRY glutShowOverlay(void);
|
||||||
|
extern void APIENTRY glutHideOverlay(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT menu sub-API. */
|
||||||
|
extern int APIENTRY glutCreateMenu(void (*)(int));
|
||||||
|
extern void APIENTRY glutDestroyMenu(int menu);
|
||||||
|
extern int APIENTRY glutGetMenu(void);
|
||||||
|
extern void APIENTRY glutSetMenu(int menu);
|
||||||
|
extern void APIENTRY glutAddMenuEntry(const char *label, int value);
|
||||||
|
extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
|
||||||
|
extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
|
||||||
|
extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
|
||||||
|
extern void APIENTRY glutRemoveMenuItem(int item);
|
||||||
|
extern void APIENTRY glutAttachMenu(int button);
|
||||||
|
extern void APIENTRY glutDetachMenu(int button);
|
||||||
|
|
||||||
|
/* GLUT window callback sub-API. */
|
||||||
|
extern void APIENTRY glutDisplayFunc(void (*func)(void));
|
||||||
|
extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
|
||||||
|
extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
|
||||||
|
extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
|
||||||
|
extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
|
||||||
|
extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
|
||||||
|
extern void APIENTRY glutEntryFunc(void (*func)(int state));
|
||||||
|
extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
|
||||||
|
extern void APIENTRY glutIdleFunc(void (*func)(void));
|
||||||
|
extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
|
||||||
|
extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
|
||||||
|
extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
|
||||||
|
extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
|
||||||
|
extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
|
||||||
|
extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
|
||||||
|
extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
|
||||||
|
extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
|
||||||
|
extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
|
||||||
|
extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||||
|
extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
|
||||||
|
extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
|
||||||
|
extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT color index sub-API. */
|
||||||
|
extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
|
||||||
|
extern GLfloat APIENTRY glutGetColor(int ndx, int component);
|
||||||
|
extern void APIENTRY glutCopyColormap(int win);
|
||||||
|
|
||||||
|
/* GLUT state retrieval sub-API. */
|
||||||
|
extern int APIENTRY glutGet(GLenum type);
|
||||||
|
extern int APIENTRY glutDeviceGet(GLenum type);
|
||||||
|
#if (GLUT_API_VERSION >= 2)
|
||||||
|
/* GLUT extension support sub-API */
|
||||||
|
extern int APIENTRY glutExtensionSupported(const char *name);
|
||||||
|
#endif
|
||||||
|
#if (GLUT_API_VERSION >= 3)
|
||||||
|
extern int APIENTRY glutGetModifiers(void);
|
||||||
|
extern int APIENTRY glutLayerGet(GLenum type);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT font sub-API */
|
||||||
|
extern void APIENTRY glutBitmapCharacter(void *font, int character);
|
||||||
|
extern int APIENTRY glutBitmapWidth(void *font, int character);
|
||||||
|
extern void APIENTRY glutStrokeCharacter(void *font, int character);
|
||||||
|
extern int APIENTRY glutStrokeWidth(void *font, int character);
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
|
||||||
|
extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GLUT pre-built models sub-API */
|
||||||
|
extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||||
|
extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
|
||||||
|
extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||||
|
extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
||||||
|
extern void APIENTRY glutWireCube(GLdouble size);
|
||||||
|
extern void APIENTRY glutSolidCube(GLdouble size);
|
||||||
|
extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||||
|
extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
||||||
|
extern void APIENTRY glutWireDodecahedron(void);
|
||||||
|
extern void APIENTRY glutSolidDodecahedron(void);
|
||||||
|
extern void APIENTRY glutWireTeapot(GLdouble size);
|
||||||
|
extern void APIENTRY glutSolidTeapot(GLdouble size);
|
||||||
|
extern void APIENTRY glutWireOctahedron(void);
|
||||||
|
extern void APIENTRY glutSolidOctahedron(void);
|
||||||
|
extern void APIENTRY glutWireTetrahedron(void);
|
||||||
|
extern void APIENTRY glutSolidTetrahedron(void);
|
||||||
|
extern void APIENTRY glutWireIcosahedron(void);
|
||||||
|
extern void APIENTRY glutSolidIcosahedron(void);
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
||||||
|
/* GLUT video resize sub-API. */
|
||||||
|
extern int APIENTRY glutVideoResizeGet(GLenum param);
|
||||||
|
extern void APIENTRY glutSetupVideoResizing(void);
|
||||||
|
extern void APIENTRY glutStopVideoResizing(void);
|
||||||
|
extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
|
||||||
|
extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
|
||||||
|
|
||||||
|
/* GLUT debugging sub-API. */
|
||||||
|
extern void APIENTRY glutReportErrors(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
||||||
|
/* GLUT device control sub-API. */
|
||||||
|
/* glutSetKeyRepeat modes. */
|
||||||
|
#define GLUT_KEY_REPEAT_OFF 0
|
||||||
|
#define GLUT_KEY_REPEAT_ON 1
|
||||||
|
#define GLUT_KEY_REPEAT_DEFAULT 2
|
||||||
|
|
||||||
|
/* Joystick button masks. */
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_A 1
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_B 2
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_C 4
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_D 8
|
||||||
|
|
||||||
|
extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
|
||||||
|
extern void APIENTRY glutSetKeyRepeat(int repeatMode);
|
||||||
|
extern void APIENTRY glutForceJoystickFunc(void);
|
||||||
|
|
||||||
|
/* GLUT game mode sub-API. */
|
||||||
|
/* glutGameModeGet. */
|
||||||
|
#define GLUT_GAME_MODE_ACTIVE 0
|
||||||
|
#define GLUT_GAME_MODE_POSSIBLE 1
|
||||||
|
#define GLUT_GAME_MODE_WIDTH 2
|
||||||
|
#define GLUT_GAME_MODE_HEIGHT 3
|
||||||
|
#define GLUT_GAME_MODE_PIXEL_DEPTH 4
|
||||||
|
#define GLUT_GAME_MODE_REFRESH_RATE 5
|
||||||
|
#define GLUT_GAME_MODE_DISPLAY_CHANGED 6
|
||||||
|
|
||||||
|
extern void APIENTRY glutGameModeString(const char *string);
|
||||||
|
extern int APIENTRY glutEnterGameMode(void);
|
||||||
|
extern void APIENTRY glutLeaveGameMode(void);
|
||||||
|
extern int APIENTRY glutGameModeGet(GLenum mode);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLUT_APIENTRY_DEFINED
|
||||||
|
# undef GLUT_APIENTRY_DEFINED
|
||||||
|
# undef APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLUT_WINGDIAPI_DEFINED
|
||||||
|
# undef GLUT_WINGDIAPI_DEFINED
|
||||||
|
# undef WINGDIAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __glut_h__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,546 @@
|
||||||
|
#ifndef __glxext_h_
|
||||||
|
#define __glxext_h_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** License Applicability. Except to the extent portions of this file are
|
||||||
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
|
** file are subject only to the provisions of the License. You may not use
|
||||||
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
|
**
|
||||||
|
** http://oss.sgi.com/projects/FreeB
|
||||||
|
**
|
||||||
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
**
|
||||||
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
|
** Copyright in any portions created by third parties is as indicated
|
||||||
|
** elsewhere herein. All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Additional Notice Provisions: This software was created using the
|
||||||
|
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||||
|
** not been independently verified as being compliant with the OpenGL(R)
|
||||||
|
** version 1.2.1 Specification.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <GL/glx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef APIENTRY
|
||||||
|
#define APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
/* Header file version number, required by OpenGL ABI for Linux */
|
||||||
|
#define GLX_GLXEXT_VERSION 2
|
||||||
|
|
||||||
|
#ifndef GLX_VERSION_1_3
|
||||||
|
#define GLX_WINDOW_BIT 0x00000001
|
||||||
|
#define GLX_PIXMAP_BIT 0x00000002
|
||||||
|
#define GLX_PBUFFER_BIT 0x00000004
|
||||||
|
#define GLX_RGBA_BIT 0x00000001
|
||||||
|
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||||
|
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||||
|
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||||
|
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||||
|
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||||
|
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||||
|
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||||
|
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||||
|
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||||
|
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||||
|
#define GLX_CONFIG_CAVEAT 0x20
|
||||||
|
#define GLX_X_VISUAL_TYPE 0x22
|
||||||
|
#define GLX_TRANSPARENT_TYPE 0x23
|
||||||
|
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||||
|
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||||
|
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||||
|
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||||
|
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||||
|
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||||
|
#define GLX_NONE 0x8000
|
||||||
|
#define GLX_SLOW_CONFIG 0x8001
|
||||||
|
#define GLX_TRUE_COLOR 0x8002
|
||||||
|
#define GLX_DIRECT_COLOR 0x8003
|
||||||
|
#define GLX_PSEUDO_COLOR 0x8004
|
||||||
|
#define GLX_STATIC_COLOR 0x8005
|
||||||
|
#define GLX_GRAY_SCALE 0x8006
|
||||||
|
#define GLX_STATIC_GRAY 0x8007
|
||||||
|
#define GLX_TRANSPARENT_RGB 0x8008
|
||||||
|
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||||
|
#define GLX_VISUAL_ID 0x800B
|
||||||
|
#define GLX_SCREEN 0x800C
|
||||||
|
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||||
|
#define GLX_DRAWABLE_TYPE 0x8010
|
||||||
|
#define GLX_RENDER_TYPE 0x8011
|
||||||
|
#define GLX_X_RENDERABLE 0x8012
|
||||||
|
#define GLX_FBCONFIG_ID 0x8013
|
||||||
|
#define GLX_RGBA_TYPE 0x8014
|
||||||
|
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||||
|
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||||
|
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||||
|
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||||
|
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||||
|
#define GLX_LARGEST_PBUFFER 0x801C
|
||||||
|
#define GLX_WIDTH 0x801D
|
||||||
|
#define GLX_HEIGHT 0x801E
|
||||||
|
#define GLX_EVENT_MASK 0x801F
|
||||||
|
#define GLX_DAMAGED 0x8020
|
||||||
|
#define GLX_SAVED 0x8021
|
||||||
|
#define GLX_WINDOW 0x8022
|
||||||
|
#define GLX_PBUFFER 0x8023
|
||||||
|
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||||
|
#define GLX_PBUFFER_WIDTH 0x8041
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_visual_info
|
||||||
|
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||||
|
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||||
|
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||||
|
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||||
|
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||||
|
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||||
|
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||||
|
#define GLX_NONE_EXT 0x8000
|
||||||
|
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||||
|
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||||
|
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||||
|
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||||
|
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||||
|
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||||
|
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||||
|
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_swap_control
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_video_sync
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_make_current_read
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_video_source
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_visual_rating
|
||||||
|
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||||
|
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||||
|
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||||
|
/* reuse GLX_NONE_EXT */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_import_context
|
||||||
|
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||||
|
#define GLX_VISUAL_ID_EXT 0x800B
|
||||||
|
#define GLX_SCREEN_EXT 0x800C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_fbconfig
|
||||||
|
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||||
|
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||||
|
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||||
|
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||||
|
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||||
|
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||||
|
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||||
|
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||||
|
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||||
|
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||||
|
/* reuse GLX_SCREEN_EXT */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_pbuffer
|
||||||
|
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||||
|
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||||
|
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||||
|
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||||
|
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||||
|
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||||
|
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||||
|
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||||
|
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||||
|
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||||
|
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||||
|
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||||
|
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||||
|
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||||
|
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||||
|
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||||
|
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||||
|
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||||
|
#define GLX_WIDTH_SGIX 0x801D
|
||||||
|
#define GLX_HEIGHT_SGIX 0x801E
|
||||||
|
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||||
|
#define GLX_DAMAGED_SGIX 0x8020
|
||||||
|
#define GLX_SAVED_SGIX 0x8021
|
||||||
|
#define GLX_WINDOW_SGIX 0x8022
|
||||||
|
#define GLX_PBUFFER_SGIX 0x8023
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_cushion
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_video_resize
|
||||||
|
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||||
|
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_dmbuffer
|
||||||
|
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_swap_group
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_swap_barrier
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIS_blended_overlay
|
||||||
|
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIS_shared_multisample
|
||||||
|
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||||
|
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SUN_get_transparent_index
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_3DFX_multisample
|
||||||
|
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||||
|
#define GLX_SAMPLES_3DFX 0x8051
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_copy_sub_buffer
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_pixmap_colormap
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_release_buffers
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_set_3dfx_mode
|
||||||
|
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||||
|
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
#ifndef GLX_ARB_get_proc_address
|
||||||
|
typedef void (*__GLXextFuncPtr)();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_video_source
|
||||||
|
typedef XID GLXVideoSourceSGIX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_fbconfig
|
||||||
|
typedef XID GLXFBConfigIDSGIX;
|
||||||
|
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_pbuffer
|
||||||
|
typedef XID GLXPbufferSGIX;
|
||||||
|
typedef struct {
|
||||||
|
int type;
|
||||||
|
unsigned long serial; /* # of last request processed by server */
|
||||||
|
Bool send_event; /* true if this came for SendEvent request */
|
||||||
|
Display *display; /* display the event was read from */
|
||||||
|
GLXDrawable drawable; /* i.d. of Drawable */
|
||||||
|
int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
|
||||||
|
int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
|
||||||
|
unsigned int mask; /* mask indicating which buffers are affected*/
|
||||||
|
int x, y;
|
||||||
|
int width, height;
|
||||||
|
int count; /* if nonzero, at least this many more */
|
||||||
|
} GLXBufferClobberEventSGIX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GL_NV_vertex_array_range
|
||||||
|
#ifndef PFNGLXALLOCATEMEMORYNVPROC
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void *glXAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat);
|
||||||
|
#endif
|
||||||
|
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei, GLfloat, GLfloat, GLfloat);
|
||||||
|
#endif
|
||||||
|
#ifndef PFNGLXFREEMEMORYNVPROC
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void glXFreeMemoryNV (void *);
|
||||||
|
#endif
|
||||||
|
typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_VERSION_1_3
|
||||||
|
#define GLX_VERSION_1_3 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
|
||||||
|
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
|
||||||
|
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
|
||||||
|
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
|
||||||
|
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
|
||||||
|
extern void glXDestroyWindow (Display *, GLXWindow);
|
||||||
|
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
|
||||||
|
extern void glXDestroyPixmap (Display *, GLXPixmap);
|
||||||
|
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
|
||||||
|
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
|
||||||
|
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
|
||||||
|
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
|
||||||
|
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||||
|
extern GLXDrawable glXGetCurrentReadDrawable (void);
|
||||||
|
extern Display * glXGetCurrentDisplay (void);
|
||||||
|
extern int glXQueryContext (Display *, GLXContext, int, int *);
|
||||||
|
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
|
||||||
|
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||||
|
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||||
|
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||||
|
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||||
|
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||||
|
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||||
|
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||||
|
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||||
|
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||||
|
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||||
|
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||||
|
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||||
|
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||||
|
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||||
|
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||||
|
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||||
|
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||||
|
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_ARB_get_proc_address
|
||||||
|
#define GLX_ARB_get_proc_address 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIS_multisample
|
||||||
|
#define GLX_SGIS_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_visual_info
|
||||||
|
#define GLX_EXT_visual_info 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_swap_control
|
||||||
|
#define GLX_SGI_swap_control 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern int glXSwapIntervalSGI (int);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_video_sync
|
||||||
|
#define GLX_SGI_video_sync 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern int glXGetVideoSyncSGI (unsigned int *);
|
||||||
|
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||||
|
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_make_current_read
|
||||||
|
#define GLX_SGI_make_current_read 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||||
|
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||||
|
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _VL_H
|
||||||
|
#ifndef GLX_SGIX_video_source
|
||||||
|
#define GLX_SGIX_video_source 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
|
||||||
|
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||||
|
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _VL_H */
|
||||||
|
#ifndef GLX_EXT_visual_rating
|
||||||
|
#define GLX_EXT_visual_rating 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_EXT_import_context
|
||||||
|
#define GLX_EXT_import_context 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Display * glXGetCurrentDisplayEXT (void);
|
||||||
|
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
|
||||||
|
extern GLXContextID glXGetContextIDEXT (GLXContext);
|
||||||
|
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
|
||||||
|
extern void glXFreeContextEXT (Display *, GLXContext);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||||
|
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||||
|
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (GLXContext context);
|
||||||
|
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
||||||
|
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_fbconfig
|
||||||
|
#define GLX_SGIX_fbconfig 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
|
||||||
|
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
|
||||||
|
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
|
||||||
|
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
|
||||||
|
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
|
||||||
|
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||||
|
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||||
|
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||||
|
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||||
|
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
||||||
|
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_pbuffer
|
||||||
|
#define GLX_SGIX_pbuffer 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
|
||||||
|
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
|
||||||
|
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
|
||||||
|
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
|
||||||
|
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||||
|
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||||
|
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||||
|
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||||
|
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGI_cushion
|
||||||
|
#define GLX_SGI_cushion 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void glXCushionSGI (Display *, Window, float);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_video_resize
|
||||||
|
#define GLX_SGIX_video_resize 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
|
||||||
|
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
|
||||||
|
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||||
|
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||||
|
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||||
|
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||||
|
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||||
|
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||||
|
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _DM_BUFFER_H_
|
||||||
|
#ifndef GLX_SGIX_dmbuffer
|
||||||
|
#define GLX_SGIX_dmbuffer 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _DM_BUFFER_H_ */
|
||||||
|
#ifndef GLX_SGIX_swap_group
|
||||||
|
#define GLX_SGIX_swap_group 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SGIX_swap_barrier
|
||||||
|
#define GLX_SGIX_swap_barrier 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
|
||||||
|
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||||
|
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_SUN_get_transparent_index
|
||||||
|
#define GLX_SUN_get_transparent_index 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_copy_sub_buffer
|
||||||
|
#define GLX_MESA_copy_sub_buffer 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_pixmap_colormap
|
||||||
|
#define GLX_MESA_pixmap_colormap 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_release_buffers
|
||||||
|
#define GLX_MESA_release_buffers 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_MESA_set_3dfx_mode
|
||||||
|
#define GLX_MESA_set_3dfx_mode 1
|
||||||
|
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||||
|
extern Bool glXSet3DfxModeMESA (int);
|
||||||
|
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||||
|
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,466 @@
|
||||||
|
#ifndef __wglext_h_
|
||||||
|
#define __wglext_h_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** License Applicability. Except to the extent portions of this file are
|
||||||
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
|
** file are subject only to the provisions of the License. You may not use
|
||||||
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
|
**
|
||||||
|
** http://oss.sgi.com/projects/FreeB
|
||||||
|
**
|
||||||
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
**
|
||||||
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
|
** Copyright in any portions created by third parties is as indicated
|
||||||
|
** elsewhere herein. All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Additional Notice Provisions: This software was created using the
|
||||||
|
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||||
|
** not been independently verified as being compliant with the OpenGL(R)
|
||||||
|
** version 1.2.1 Specification.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef APIENTRY
|
||||||
|
#define APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
/* Header file version number */
|
||||||
|
#define WGL_WGLEXT_VERSION 1
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||||
|
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||||
|
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||||
|
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||||
|
#define WGL_ACCELERATION_ARB 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||||
|
#define WGL_TRANSPARENT_ARB 0x200A
|
||||||
|
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||||
|
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||||
|
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||||
|
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||||
|
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||||
|
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||||
|
#define WGL_STEREO_ARB 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||||
|
#define WGL_COLOR_BITS_ARB 0x2014
|
||||||
|
#define WGL_RED_BITS_ARB 0x2015
|
||||||
|
#define WGL_RED_SHIFT_ARB 0x2016
|
||||||
|
#define WGL_GREEN_BITS_ARB 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||||
|
#define WGL_BLUE_BITS_ARB 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||||
|
#define WGL_SWAP_COPY_ARB 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||||
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||||
|
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||||
|
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||||
|
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||||
|
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||||
|
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||||
|
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||||
|
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||||
|
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||||
|
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||||
|
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||||
|
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||||
|
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||||
|
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||||
|
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||||
|
#define WGL_BACK_LEFT_ARB 0x2085
|
||||||
|
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||||
|
#define WGL_AUX0_ARB 0x2087
|
||||||
|
#define WGL_AUX1_ARB 0x2088
|
||||||
|
#define WGL_AUX2_ARB 0x2089
|
||||||
|
#define WGL_AUX3_ARB 0x208A
|
||||||
|
#define WGL_AUX4_ARB 0x208B
|
||||||
|
#define WGL_AUX5_ARB 0x208C
|
||||||
|
#define WGL_AUX6_ARB 0x208D
|
||||||
|
#define WGL_AUX7_ARB 0x208E
|
||||||
|
#define WGL_AUX8_ARB 0x208F
|
||||||
|
#define WGL_AUX9_ARB 0x2090
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||||
|
#define WGL_ACCELERATION_EXT 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||||
|
#define WGL_TRANSPARENT_EXT 0x200A
|
||||||
|
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||||
|
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||||
|
#define WGL_STEREO_EXT 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||||
|
#define WGL_COLOR_BITS_EXT 0x2014
|
||||||
|
#define WGL_RED_BITS_EXT 0x2015
|
||||||
|
#define WGL_RED_SHIFT_EXT 0x2016
|
||||||
|
#define WGL_GREEN_BITS_EXT 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||||
|
#define WGL_BLUE_BITS_EXT 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||||
|
#define WGL_SWAP_COPY_EXT 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||||
|
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_depth_float
|
||||||
|
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_texture_rectangle
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||||
|
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_depth_texture
|
||||||
|
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||||
|
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||||
|
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||||
|
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_3DFX_multisample
|
||||||
|
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||||
|
#define WGL_SAMPLES_3DFX 0x2061
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_multisample
|
||||||
|
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||||
|
#define WGL_SAMPLES_EXT 0x2042
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_unknown_genlock_extension_name
|
||||||
|
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_unknown_gamma_extension_name
|
||||||
|
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||||
|
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_I3D_unknown_digital_video_cursor_extension_name
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||||
|
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
DECLARE_HANDLE(HPBUFFERARB);
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
DECLARE_HANDLE(HPBUFFEREXT);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_ARB_buffer_region 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT);
|
||||||
|
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE);
|
||||||
|
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int);
|
||||||
|
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#define WGL_ARB_extensions_string 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern const char * WINAPI wglGetExtensionsStringARB (HDC);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_ARB_pixel_format 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *);
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *);
|
||||||
|
extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define WGL_ARB_make_current_read 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC);
|
||||||
|
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_ARB_pbuffer 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *);
|
||||||
|
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB);
|
||||||
|
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC);
|
||||||
|
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB);
|
||||||
|
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_display_color_table
|
||||||
|
#define WGL_EXT_display_color_table 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort);
|
||||||
|
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint);
|
||||||
|
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort);
|
||||||
|
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||||
|
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_extensions_string
|
||||||
|
#define WGL_EXT_extensions_string 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define WGL_EXT_make_current_read 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC);
|
||||||
|
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_EXT_pbuffer 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *);
|
||||||
|
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT);
|
||||||
|
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC);
|
||||||
|
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT);
|
||||||
|
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||||
|
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_EXT_pixel_format 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *);
|
||||||
|
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *);
|
||||||
|
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_EXT_swap_control
|
||||||
|
#define WGL_EXT_swap_control 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern BOOL WINAPI wglSwapIntervalEXT (int);
|
||||||
|
extern int WINAPI wglGetSwapIntervalEXT (void);
|
||||||
|
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||||
|
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_WGL_EXT_depth_float
|
||||||
|
#define WGL_WGL_EXT_depth_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_WGL_3DFX_multisample
|
||||||
|
#define WGL_WGL_3DFX_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_WGL_EXT_multisample
|
||||||
|
#define WGL_WGL_EXT_multisample 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* added by Cass -- but this should already be in here! */
|
||||||
|
#ifndef WGL_NV_allocate_memory
|
||||||
|
#define WGL_NV_allocate_memory 1
|
||||||
|
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||||
|
extern void * wglAllocateMemoryNV(int size, float readfreq, float writefreq, float priority);
|
||||||
|
extern void wglFreeMemoryNV(void * pointer);
|
||||||
|
#endif
|
||||||
|
typedef void * (APIENTRY * PFNWGLALLOCATEMEMORYNVPROC) (int size, float readfreq, float writefreq, float priority);
|
||||||
|
typedef void (APIENTRY * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* WGL_ARB_render_texture */
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_ARB_render_texture 1
|
||||||
|
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||||
|
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int * piAttribList);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_texture_rectangle
|
||||||
|
#define WGL_NV_render_texture_rectangle 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WGL_NV_render_depth_texture
|
||||||
|
#define WGL_NV_render_depth_texture 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2011 Advanced Micro Devices, Inc. http://bulletphysics.org
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_GLUT_INCLUDE_H
|
||||||
|
#define BT_GLUT_INCLUDE_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32//for glut.h
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//think different
|
||||||
|
#if defined(__APPLE__) && !defined (VMDMESA)
|
||||||
|
#include <OpenGL/OpenGL.h>
|
||||||
|
#include <OpenGL/gl.h>
|
||||||
|
#include <OpenGL/glu.h>
|
||||||
|
#include <GLUT/glut.h>
|
||||||
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
#include <windows.h>
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glu.h>
|
||||||
|
#else
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
#endif //_WINDOWS
|
||||||
|
#endif //APPLE
|
||||||
|
|
||||||
|
#endif //BT_GLUT_INCLUDE_H
|
|
@ -0,0 +1 @@
|
||||||
|
# CMake generation timestamp file for this directory.
|
|
@ -0,0 +1,2 @@
|
||||||
|
# CMake generation dependency list for this directory.
|
||||||
|
C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt
|
|
@ -0,0 +1,217 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{0A758B62-DE3C-493C-985D-39E48A384A7C}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>INSTALL</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType></ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message></Message>
|
||||||
|
<Command>setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="..\..\CMakeFiles\014b29ea83ffdb14ab17f55265953026\INSTALL_force.rule">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/014b29ea83ffdb14ab17f55265953026/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/014b29ea83ffdb14ab17f55265953026/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/014b29ea83ffdb14ab17f55265953026/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'"> </Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
cd .
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/Binaries/CMakeFiles/014b29ea83ffdb14ab17f55265953026/INSTALL_force.rule;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\INSTALL_force</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="C:/Users/Robin/Programmering/Bullet/Binaries/ALL_BUILD.vcxproj">
|
||||||
|
<Project>F5149B3B-C2B1-4522-9FFD-121CED456BD3</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,303 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="MinSizeRel|Win32">
|
||||||
|
<Configuration>MinSizeRel</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||||
|
<Configuration>RelWithDebInfo</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGUID>{22C0C4D8-6C43-406A-9CDB-76A4F800971A}</ProjectGUID>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
<ProjectName>LinearMath</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)Physics\Debug\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">LinearMath.dir\Debug\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">LinearMath_Debug</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)Physics\Release</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">LinearMath.dir\Release\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">LinearMath</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\MinSizeRel\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">LinearMath.dir\MinSizeRel\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">LinearMath_MinsizeRel</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">.lib</TargetExt>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\GitHub\Danbias\Code\Physics\RelWithDebInfo\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">LinearMath.dir\RelWithDebInfo\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">LinearMath_RelWithDebugInfo</TargetName>
|
||||||
|
<TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">.lib</TargetExt>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Debug/</AssemblerListingLocation>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_DEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)Physics\Glut;$(SolutionDir)Physics\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>Release/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>MinSizeRel/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>
|
||||||
|
</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="MinSizeRel";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"MinSizeRel\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
|
||||||
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;USE_GRAPHICAL_BENCHMARK;_IRR_STATIC_LIB_;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Midl>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\Glut;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
||||||
|
<HeaderFileName>%(Filename).h</HeaderFileName>
|
||||||
|
<TypeLibraryName>%(Filename).tlb</TypeLibraryName>
|
||||||
|
<InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
|
||||||
|
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
|
||||||
|
</Midl>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt">
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">Building Custom Rule C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt</Message>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">setlocal
|
||||||
|
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704 -BC:/Users/Robin/Programmering/Bullet/Binaries --check-stamp-file C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp
|
||||||
|
if %errorlevel% neq 0 goto :cmEnd
|
||||||
|
:cmEnd
|
||||||
|
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
|
||||||
|
:cmErrorLevel
|
||||||
|
exit /b %1
|
||||||
|
:cmDone
|
||||||
|
if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||||
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath/CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;C:\Users\Robin\Programmering\Bullet\bullet-2.82-r2704\src\LinearMath\CMakeLists.txt;%(AdditionalInputs)</AdditionalInputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">C:\Users\Robin\Programmering\Bullet\Binaries\src\LinearMath\CMakeFiles\generate.stamp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkObjects>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\src\LinearMath\btAabbUtil2.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btAlignedAllocator.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btAlignedObjectArray.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btConvexHull.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btConvexHullComputer.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btDefaultMotionState.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btGeometryUtil.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btGrahamScan2dConvexHull.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btHashMap.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btIDebugDraw.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btList.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btMatrix3x3.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btMatrixX.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btMinMax.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btMotionState.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btPolarDecomposition.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btPoolAllocator.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btQuadWord.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btQuaternion.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btQuickprof.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btRandom.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btScalar.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btSerializer.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btStackAlloc.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btTransform.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btTransformUtil.h" />
|
||||||
|
<ClInclude Include="..\src\LinearMath\btVector3.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\src\LinearMath\btAlignedAllocator.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btConvexHull.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btConvexHullComputer.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btGeometryUtil.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btPolarDecomposition.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btQuickprof.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btSerializer.cpp" />
|
||||||
|
<ClCompile Include="..\src\LinearMath\btVector3.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Install script for directory: C:/Users/Robin/Programmering/Bullet/bullet-2.82-r2704/src/LinearMath
|
||||||
|
|
||||||
|
# Set the install prefix
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BULLET_PHYSICS")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
# Set the install configuration name.
|
||||||
|
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
IF(BUILD_TYPE)
|
||||||
|
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||||
|
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||||
|
ELSE(BUILD_TYPE)
|
||||||
|
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||||
|
ENDIF(BUILD_TYPE)
|
||||||
|
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||||
|
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
|
||||||
|
# Set the component getting installed.
|
||||||
|
IF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
IF(COMPONENT)
|
||||||
|
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||||
|
ELSE(COMPONENT)
|
||||||
|
SET(CMAKE_INSTALL_COMPONENT)
|
||||||
|
ENDIF(COMPONENT)
|
||||||
|
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's.
|
||||||
|
Work in progress, functionality will be added on demand.
|
||||||
|
|
||||||
|
If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h"
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BULLET_C_API_H
|
||||||
|
#define BULLET_C_API_H
|
||||||
|
|
||||||
|
#define PL_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
|
||||||
|
|
||||||
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
|
typedef double plReal;
|
||||||
|
#else
|
||||||
|
typedef float plReal;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef plReal plVector3[3];
|
||||||
|
typedef plReal plQuaternion[4];
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Particular physics SDK (C-API) */
|
||||||
|
PL_DECLARE_HANDLE(plPhysicsSdkHandle);
|
||||||
|
|
||||||
|
/** Dynamics world, belonging to some physics SDK (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plDynamicsWorldHandle);
|
||||||
|
|
||||||
|
/** Rigid Body that can be part of a Dynamics World (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plRigidBodyHandle);
|
||||||
|
|
||||||
|
/** Collision Shape/Geometry, property of a Rigid Body (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plCollisionShapeHandle);
|
||||||
|
|
||||||
|
/** Constraint for Rigid Bodies (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plConstraintHandle);
|
||||||
|
|
||||||
|
/** Triangle Mesh interface (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plMeshInterfaceHandle);
|
||||||
|
|
||||||
|
/** Broadphase Scene/Proxy Handles (C-API)*/
|
||||||
|
PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
|
||||||
|
PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
|
||||||
|
PL_DECLARE_HANDLE(plCollisionWorldHandle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Create and Delete a Physics SDK
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern plPhysicsSdkHandle plNewBulletSdk(void); //this could be also another sdk, like ODE, PhysX etc.
|
||||||
|
extern void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk);
|
||||||
|
|
||||||
|
/** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
|
||||||
|
|
||||||
|
typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2);
|
||||||
|
|
||||||
|
extern plCollisionBroadphaseHandle plCreateSapBroadphase(btBroadphaseCallback beginCallback,btBroadphaseCallback endCallback);
|
||||||
|
|
||||||
|
extern void plDestroyBroadphase(plCollisionBroadphaseHandle bp);
|
||||||
|
|
||||||
|
extern plBroadphaseProxyHandle plCreateProxy(plCollisionBroadphaseHandle bp, void* clientData, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
|
||||||
|
|
||||||
|
extern void plDestroyProxy(plCollisionBroadphaseHandle bp, plBroadphaseProxyHandle proxyHandle);
|
||||||
|
|
||||||
|
extern void plSetBoundingBox(plBroadphaseProxyHandle proxyHandle, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
|
||||||
|
|
||||||
|
/* todo: add pair cache support with queries like add/remove/find pair */
|
||||||
|
|
||||||
|
extern plCollisionWorldHandle plCreateCollisionWorld(plPhysicsSdkHandle physicsSdk);
|
||||||
|
|
||||||
|
/* todo: add/remove objects */
|
||||||
|
|
||||||
|
|
||||||
|
/* Dynamics World */
|
||||||
|
|
||||||
|
extern plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdk);
|
||||||
|
|
||||||
|
extern void plDeleteDynamicsWorld(plDynamicsWorldHandle world);
|
||||||
|
|
||||||
|
extern void plStepSimulation(plDynamicsWorldHandle, plReal timeStep);
|
||||||
|
|
||||||
|
extern void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
|
||||||
|
|
||||||
|
extern void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
|
||||||
|
|
||||||
|
|
||||||
|
/* Rigid Body */
|
||||||
|
|
||||||
|
extern plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionShapeHandle cshape );
|
||||||
|
|
||||||
|
extern void plDeleteRigidBody(plRigidBodyHandle body);
|
||||||
|
|
||||||
|
|
||||||
|
/* Collision Shape definition */
|
||||||
|
|
||||||
|
extern plCollisionShapeHandle plNewSphereShape(plReal radius);
|
||||||
|
extern plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z);
|
||||||
|
extern plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height);
|
||||||
|
extern plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
|
||||||
|
extern plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height);
|
||||||
|
extern plCollisionShapeHandle plNewCompoundShape(void);
|
||||||
|
extern void plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn);
|
||||||
|
|
||||||
|
extern void plDeleteShape(plCollisionShapeHandle shape);
|
||||||
|
|
||||||
|
/* Convex Meshes */
|
||||||
|
extern plCollisionShapeHandle plNewConvexHullShape(void);
|
||||||
|
extern void plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z);
|
||||||
|
/* Concave static triangle meshes */
|
||||||
|
extern plMeshInterfaceHandle plNewMeshInterface(void);
|
||||||
|
extern void plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
|
||||||
|
extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
|
||||||
|
|
||||||
|
extern void plSetScaling(plCollisionShapeHandle shape, plVector3 scaling);
|
||||||
|
|
||||||
|
/* SOLID has Response Callback/Table/Management */
|
||||||
|
/* PhysX has Triggers, User Callbacks and filtering */
|
||||||
|
/* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */
|
||||||
|
|
||||||
|
/* typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHandle rbHandle, plVector3 pos); */
|
||||||
|
/* typedef void plUpdatedOrientationCallback(void* userData, plRigidBodyHandle rbHandle, plQuaternion orientation); */
|
||||||
|
|
||||||
|
/* get world transform */
|
||||||
|
extern void plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix);
|
||||||
|
extern void plGetPosition(plRigidBodyHandle object,plVector3 position);
|
||||||
|
extern void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation);
|
||||||
|
|
||||||
|
/* set world transform (position/orientation) */
|
||||||
|
extern void plSetPosition(plRigidBodyHandle object, const plVector3 position);
|
||||||
|
extern void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation);
|
||||||
|
extern void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient);
|
||||||
|
extern void plSetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix);
|
||||||
|
|
||||||
|
typedef struct plRayCastResult {
|
||||||
|
plRigidBodyHandle m_body;
|
||||||
|
plCollisionShapeHandle m_shape;
|
||||||
|
plVector3 m_positionWorld;
|
||||||
|
plVector3 m_normalWorld;
|
||||||
|
} plRayCastResult;
|
||||||
|
|
||||||
|
extern int plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plRayCastResult res);
|
||||||
|
|
||||||
|
/* Sweep API */
|
||||||
|
|
||||||
|
/* extern plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); */
|
||||||
|
|
||||||
|
/* Continuous Collision Detection API */
|
||||||
|
|
||||||
|
// needed for source/blender/blenkernel/intern/collision.c
|
||||||
|
double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BULLET_C_API_H
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
|
||||||
|
//Bullet Continuous Collision Detection and Physics Library
|
||||||
|
//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// btAxisSweep3
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006 Simon Hobbs
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
//
|
||||||
|
// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||||
|
//
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
//
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
//
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
#include "btAxisSweep3.h"
|
||||||
|
|
||||||
|
|
||||||
|
btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator)
|
||||||
|
:btAxisSweep3Internal<unsigned short int>(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator)
|
||||||
|
{
|
||||||
|
// 1 handle is reserved as sentinel
|
||||||
|
btAssert(maxHandles > 1 && maxHandles < 32767);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator)
|
||||||
|
:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator)
|
||||||
|
{
|
||||||
|
// 1 handle is reserved as sentinel
|
||||||
|
btAssert(maxHandles > 1 && maxHandles < 2147483647);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_BROADPHASE_INTERFACE_H
|
||||||
|
#define BT_BROADPHASE_INTERFACE_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct btDispatcherInfo;
|
||||||
|
class btDispatcher;
|
||||||
|
#include "btBroadphaseProxy.h"
|
||||||
|
|
||||||
|
class btOverlappingPairCache;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct btBroadphaseAabbCallback
|
||||||
|
{
|
||||||
|
virtual ~btBroadphaseAabbCallback() {}
|
||||||
|
virtual bool process(const btBroadphaseProxy* proxy) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct btBroadphaseRayCallback : public btBroadphaseAabbCallback
|
||||||
|
{
|
||||||
|
///added some cached data to accelerate ray-AABB tests
|
||||||
|
btVector3 m_rayDirectionInverse;
|
||||||
|
unsigned int m_signs[3];
|
||||||
|
btScalar m_lambda_max;
|
||||||
|
|
||||||
|
virtual ~btBroadphaseRayCallback() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "LinearMath/btVector3.h"
|
||||||
|
|
||||||
|
///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
|
||||||
|
///Some implementations for this broadphase interface include btAxisSweep3, bt32BitAxisSweep3 and btDbvtBroadphase.
|
||||||
|
///The actual overlapping pair management, storage, adding and removing of pairs is dealt by the btOverlappingPairCache class.
|
||||||
|
class btBroadphaseInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~btBroadphaseInterface() {}
|
||||||
|
|
||||||
|
virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0;
|
||||||
|
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0;
|
||||||
|
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0;
|
||||||
|
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const =0;
|
||||||
|
|
||||||
|
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)) = 0;
|
||||||
|
|
||||||
|
virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback) = 0;
|
||||||
|
|
||||||
|
///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
|
||||||
|
virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0;
|
||||||
|
|
||||||
|
virtual btOverlappingPairCache* getOverlappingPairCache()=0;
|
||||||
|
virtual const btOverlappingPairCache* getOverlappingPairCache() const =0;
|
||||||
|
|
||||||
|
///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
|
||||||
|
///will add some transform later
|
||||||
|
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0;
|
||||||
|
|
||||||
|
///reset broadphase internal structures, to ensure determinism/reproducability
|
||||||
|
virtual void resetPool(btDispatcher* dispatcher) { (void) dispatcher; };
|
||||||
|
|
||||||
|
virtual void printStats() = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_BROADPHASE_INTERFACE_H
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btBroadphaseProxy.h"
|
||||||
|
|
|
@ -0,0 +1,270 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_BROADPHASE_PROXY_H
|
||||||
|
#define BT_BROADPHASE_PROXY_H
|
||||||
|
|
||||||
|
#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
|
||||||
|
#include "LinearMath/btVector3.h"
|
||||||
|
#include "LinearMath/btAlignedAllocator.h"
|
||||||
|
|
||||||
|
|
||||||
|
/// btDispatcher uses these types
|
||||||
|
/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave
|
||||||
|
/// to facilitate type checking
|
||||||
|
/// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAVE_SHAPE_TYPE can be used to extend Bullet without modifying source code
|
||||||
|
enum BroadphaseNativeTypes
|
||||||
|
{
|
||||||
|
// polyhedral convex shapes
|
||||||
|
BOX_SHAPE_PROXYTYPE,
|
||||||
|
TRIANGLE_SHAPE_PROXYTYPE,
|
||||||
|
TETRAHEDRAL_SHAPE_PROXYTYPE,
|
||||||
|
CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE,
|
||||||
|
CONVEX_HULL_SHAPE_PROXYTYPE,
|
||||||
|
CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE,
|
||||||
|
CUSTOM_POLYHEDRAL_SHAPE_TYPE,
|
||||||
|
//implicit convex shapes
|
||||||
|
IMPLICIT_CONVEX_SHAPES_START_HERE,
|
||||||
|
SPHERE_SHAPE_PROXYTYPE,
|
||||||
|
MULTI_SPHERE_SHAPE_PROXYTYPE,
|
||||||
|
CAPSULE_SHAPE_PROXYTYPE,
|
||||||
|
CONE_SHAPE_PROXYTYPE,
|
||||||
|
CONVEX_SHAPE_PROXYTYPE,
|
||||||
|
CYLINDER_SHAPE_PROXYTYPE,
|
||||||
|
UNIFORM_SCALING_SHAPE_PROXYTYPE,
|
||||||
|
MINKOWSKI_SUM_SHAPE_PROXYTYPE,
|
||||||
|
MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE,
|
||||||
|
BOX_2D_SHAPE_PROXYTYPE,
|
||||||
|
CONVEX_2D_SHAPE_PROXYTYPE,
|
||||||
|
CUSTOM_CONVEX_SHAPE_TYPE,
|
||||||
|
//concave shapes
|
||||||
|
CONCAVE_SHAPES_START_HERE,
|
||||||
|
//keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy!
|
||||||
|
TRIANGLE_MESH_SHAPE_PROXYTYPE,
|
||||||
|
SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE,
|
||||||
|
///used for demo integration FAST/Swift collision library and Bullet
|
||||||
|
FAST_CONCAVE_MESH_PROXYTYPE,
|
||||||
|
//terrain
|
||||||
|
TERRAIN_SHAPE_PROXYTYPE,
|
||||||
|
///Used for GIMPACT Trimesh integration
|
||||||
|
GIMPACT_SHAPE_PROXYTYPE,
|
||||||
|
///Multimaterial mesh
|
||||||
|
MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE,
|
||||||
|
|
||||||
|
EMPTY_SHAPE_PROXYTYPE,
|
||||||
|
STATIC_PLANE_PROXYTYPE,
|
||||||
|
CUSTOM_CONCAVE_SHAPE_TYPE,
|
||||||
|
CONCAVE_SHAPES_END_HERE,
|
||||||
|
|
||||||
|
COMPOUND_SHAPE_PROXYTYPE,
|
||||||
|
|
||||||
|
SOFTBODY_SHAPE_PROXYTYPE,
|
||||||
|
HFFLUID_SHAPE_PROXYTYPE,
|
||||||
|
HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE,
|
||||||
|
INVALID_SHAPE_PROXYTYPE,
|
||||||
|
|
||||||
|
MAX_BROADPHASE_COLLISION_TYPES
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
|
||||||
|
///It stores collision shape type information, collision filter information and a client object, typically a btCollisionObject or btRigidBody.
|
||||||
|
ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy
|
||||||
|
{
|
||||||
|
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
///optional filtering to cull potential collisions
|
||||||
|
enum CollisionFilterGroups
|
||||||
|
{
|
||||||
|
DefaultFilter = 1,
|
||||||
|
StaticFilter = 2,
|
||||||
|
KinematicFilter = 4,
|
||||||
|
DebrisFilter = 8,
|
||||||
|
SensorTrigger = 16,
|
||||||
|
CharacterFilter = 32,
|
||||||
|
AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
|
||||||
|
};
|
||||||
|
|
||||||
|
//Usually the client btCollisionObject or Rigidbody class
|
||||||
|
void* m_clientObject;
|
||||||
|
short int m_collisionFilterGroup;
|
||||||
|
short int m_collisionFilterMask;
|
||||||
|
void* m_multiSapParentProxy;
|
||||||
|
int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
|
||||||
|
|
||||||
|
btVector3 m_aabbMin;
|
||||||
|
btVector3 m_aabbMax;
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int getUid() const
|
||||||
|
{
|
||||||
|
return m_uniqueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//used for memory pools
|
||||||
|
btBroadphaseProxy() :m_clientObject(0),m_multiSapParentProxy(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
|
||||||
|
:m_clientObject(userPtr),
|
||||||
|
m_collisionFilterGroup(collisionFilterGroup),
|
||||||
|
m_collisionFilterMask(collisionFilterMask),
|
||||||
|
m_aabbMin(aabbMin),
|
||||||
|
m_aabbMax(aabbMax)
|
||||||
|
{
|
||||||
|
m_multiSapParentProxy = multiSapParentProxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType < IMPLICIT_CONVEX_SHAPES_START_HERE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isConvex(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType < CONCAVE_SHAPES_START_HERE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isNonMoving(int proxyType)
|
||||||
|
{
|
||||||
|
return (isConcave(proxyType) && !(proxyType==GIMPACT_SHAPE_PROXYTYPE));
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isConcave(int proxyType)
|
||||||
|
{
|
||||||
|
return ((proxyType > CONCAVE_SHAPES_START_HERE) &&
|
||||||
|
(proxyType < CONCAVE_SHAPES_END_HERE));
|
||||||
|
}
|
||||||
|
static SIMD_FORCE_INLINE bool isCompound(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType == COMPOUND_SHAPE_PROXYTYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isSoftBody(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType == SOFTBODY_SHAPE_PROXYTYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isInfinite(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType == STATIC_PLANE_PROXYTYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMD_FORCE_INLINE bool isConvex2d(int proxyType)
|
||||||
|
{
|
||||||
|
return (proxyType == BOX_2D_SHAPE_PROXYTYPE) || (proxyType == CONVEX_2D_SHAPE_PROXYTYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
class btCollisionAlgorithm;
|
||||||
|
|
||||||
|
struct btBroadphaseProxy;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///The btBroadphasePair class contains a pair of aabb-overlapping objects.
|
||||||
|
///A btDispatcher can search a btCollisionAlgorithm that performs exact/narrowphase collision detection on the actual collision shapes.
|
||||||
|
ATTRIBUTE_ALIGNED16(struct) btBroadphasePair
|
||||||
|
{
|
||||||
|
btBroadphasePair ()
|
||||||
|
:
|
||||||
|
m_pProxy0(0),
|
||||||
|
m_pProxy1(0),
|
||||||
|
m_algorithm(0),
|
||||||
|
m_internalInfo1(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
btBroadphasePair(const btBroadphasePair& other)
|
||||||
|
: m_pProxy0(other.m_pProxy0),
|
||||||
|
m_pProxy1(other.m_pProxy1),
|
||||||
|
m_algorithm(other.m_algorithm),
|
||||||
|
m_internalInfo1(other.m_internalInfo1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1)
|
||||||
|
{
|
||||||
|
|
||||||
|
//keep them sorted, so the std::set operations work
|
||||||
|
if (proxy0.m_uniqueId < proxy1.m_uniqueId)
|
||||||
|
{
|
||||||
|
m_pProxy0 = &proxy0;
|
||||||
|
m_pProxy1 = &proxy1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pProxy0 = &proxy1;
|
||||||
|
m_pProxy1 = &proxy0;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_algorithm = 0;
|
||||||
|
m_internalInfo1 = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphaseProxy* m_pProxy0;
|
||||||
|
btBroadphaseProxy* m_pProxy1;
|
||||||
|
|
||||||
|
mutable btCollisionAlgorithm* m_algorithm;
|
||||||
|
union { void* m_internalInfo1; int m_internalTmpValue;};//don't use this data, it will be removed in future version.
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
//comparison for set operation, see Solid DT_Encounter
|
||||||
|
SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePair& b)
|
||||||
|
{
|
||||||
|
return a.m_pProxy0 < b.m_pProxy0 ||
|
||||||
|
(a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 < b.m_pProxy1);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class btBroadphasePairSortPredicate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b ) const
|
||||||
|
{
|
||||||
|
const int uidA0 = a.m_pProxy0 ? a.m_pProxy0->m_uniqueId : -1;
|
||||||
|
const int uidB0 = b.m_pProxy0 ? b.m_pProxy0->m_uniqueId : -1;
|
||||||
|
const int uidA1 = a.m_pProxy1 ? a.m_pProxy1->m_uniqueId : -1;
|
||||||
|
const int uidB1 = b.m_pProxy1 ? b.m_pProxy1->m_uniqueId : -1;
|
||||||
|
|
||||||
|
return uidA0 > uidB0 ||
|
||||||
|
(a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1) ||
|
||||||
|
(a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadphasePair& b)
|
||||||
|
{
|
||||||
|
return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_BROADPHASE_PROXY_H
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btCollisionAlgorithm.h"
|
||||||
|
#include "btDispatcher.h"
|
||||||
|
|
||||||
|
btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
|
||||||
|
{
|
||||||
|
m_dispatcher = ci.m_dispatcher1;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_COLLISION_ALGORITHM_H
|
||||||
|
#define BT_COLLISION_ALGORITHM_H
|
||||||
|
|
||||||
|
#include "LinearMath/btScalar.h"
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
|
||||||
|
struct btBroadphaseProxy;
|
||||||
|
class btDispatcher;
|
||||||
|
class btManifoldResult;
|
||||||
|
class btCollisionObject;
|
||||||
|
struct btCollisionObjectWrapper;
|
||||||
|
struct btDispatcherInfo;
|
||||||
|
class btPersistentManifold;
|
||||||
|
|
||||||
|
typedef btAlignedObjectArray<btPersistentManifold*> btManifoldArray;
|
||||||
|
|
||||||
|
struct btCollisionAlgorithmConstructionInfo
|
||||||
|
{
|
||||||
|
btCollisionAlgorithmConstructionInfo()
|
||||||
|
:m_dispatcher1(0),
|
||||||
|
m_manifold(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp)
|
||||||
|
:m_dispatcher1(dispatcher)
|
||||||
|
{
|
||||||
|
(void)temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
btDispatcher* m_dispatcher1;
|
||||||
|
btPersistentManifold* m_manifold;
|
||||||
|
|
||||||
|
// int getDispatcherId();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatcher.
|
||||||
|
///It is persistent over frames
|
||||||
|
class btCollisionAlgorithm
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
btDispatcher* m_dispatcher;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// int getDispatcherId();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btCollisionAlgorithm() {};
|
||||||
|
|
||||||
|
btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci);
|
||||||
|
|
||||||
|
virtual ~btCollisionAlgorithm() {};
|
||||||
|
|
||||||
|
virtual void processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
|
||||||
|
|
||||||
|
virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
|
||||||
|
|
||||||
|
virtual void getAllContactManifolds(btManifoldArray& manifoldArray) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_COLLISION_ALGORITHM_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,796 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///btDbvtBroadphase implementation by Nathanael Presson
|
||||||
|
|
||||||
|
#include "btDbvtBroadphase.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Profiling
|
||||||
|
//
|
||||||
|
|
||||||
|
#if DBVT_BP_PROFILE||DBVT_BP_ENABLE_BENCHMARK
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
struct ProfileScope
|
||||||
|
{
|
||||||
|
__forceinline ProfileScope(btClock& clock,unsigned long& value) :
|
||||||
|
m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
__forceinline ~ProfileScope()
|
||||||
|
{
|
||||||
|
(*m_value)+=m_clock->getTimeMicroseconds()-m_base;
|
||||||
|
}
|
||||||
|
btClock* m_clock;
|
||||||
|
unsigned long* m_value;
|
||||||
|
unsigned long m_base;
|
||||||
|
};
|
||||||
|
#define SPC(_value_) ProfileScope spc_scope(m_clock,_value_)
|
||||||
|
#else
|
||||||
|
#define SPC(_value_)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Helpers
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
template <typename T>
|
||||||
|
static inline void listappend(T* item,T*& list)
|
||||||
|
{
|
||||||
|
item->links[0]=0;
|
||||||
|
item->links[1]=list;
|
||||||
|
if(list) list->links[0]=item;
|
||||||
|
list=item;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
template <typename T>
|
||||||
|
static inline void listremove(T* item,T*& list)
|
||||||
|
{
|
||||||
|
if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1];
|
||||||
|
if(item->links[1]) item->links[1]->links[0]=item->links[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
template <typename T>
|
||||||
|
static inline int listcount(T* root)
|
||||||
|
{
|
||||||
|
int n=0;
|
||||||
|
while(root) { ++n;root=root->links[1]; }
|
||||||
|
return(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
template <typename T>
|
||||||
|
static inline void clear(T& value)
|
||||||
|
{
|
||||||
|
static const struct ZeroDummy : T {} zerodummy;
|
||||||
|
value=zerodummy;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Colliders
|
||||||
|
//
|
||||||
|
|
||||||
|
/* Tree collider */
|
||||||
|
struct btDbvtTreeCollider : btDbvt::ICollide
|
||||||
|
{
|
||||||
|
btDbvtBroadphase* pbp;
|
||||||
|
btDbvtProxy* proxy;
|
||||||
|
btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {}
|
||||||
|
void Process(const btDbvtNode* na,const btDbvtNode* nb)
|
||||||
|
{
|
||||||
|
if(na!=nb)
|
||||||
|
{
|
||||||
|
btDbvtProxy* pa=(btDbvtProxy*)na->data;
|
||||||
|
btDbvtProxy* pb=(btDbvtProxy*)nb->data;
|
||||||
|
#if DBVT_BP_SORTPAIRS
|
||||||
|
if(pa->m_uniqueId>pb->m_uniqueId)
|
||||||
|
btSwap(pa,pb);
|
||||||
|
#endif
|
||||||
|
pbp->m_paircache->addOverlappingPair(pa,pb);
|
||||||
|
++pbp->m_newpairs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Process(const btDbvtNode* n)
|
||||||
|
{
|
||||||
|
Process(n,proxy->leaf);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// btDbvtBroadphase
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache* paircache)
|
||||||
|
{
|
||||||
|
m_deferedcollide = false;
|
||||||
|
m_needcleanup = true;
|
||||||
|
m_releasepaircache = (paircache!=0)?false:true;
|
||||||
|
m_prediction = 0;
|
||||||
|
m_stageCurrent = 0;
|
||||||
|
m_fixedleft = 0;
|
||||||
|
m_fupdates = 1;
|
||||||
|
m_dupdates = 0;
|
||||||
|
m_cupdates = 10;
|
||||||
|
m_newpairs = 1;
|
||||||
|
m_updates_call = 0;
|
||||||
|
m_updates_done = 0;
|
||||||
|
m_updates_ratio = 0;
|
||||||
|
m_paircache = paircache? paircache : new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache();
|
||||||
|
m_gid = 0;
|
||||||
|
m_pid = 0;
|
||||||
|
m_cid = 0;
|
||||||
|
for(int i=0;i<=STAGECOUNT;++i)
|
||||||
|
{
|
||||||
|
m_stageRoots[i]=0;
|
||||||
|
}
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
clear(m_profiling);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
btDbvtBroadphase::~btDbvtBroadphase()
|
||||||
|
{
|
||||||
|
if(m_releasepaircache)
|
||||||
|
{
|
||||||
|
m_paircache->~btOverlappingPairCache();
|
||||||
|
btAlignedFree(m_paircache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
btBroadphaseProxy* btDbvtBroadphase::createProxy( const btVector3& aabbMin,
|
||||||
|
const btVector3& aabbMax,
|
||||||
|
int /*shapeType*/,
|
||||||
|
void* userPtr,
|
||||||
|
short int collisionFilterGroup,
|
||||||
|
short int collisionFilterMask,
|
||||||
|
btDispatcher* /*dispatcher*/,
|
||||||
|
void* /*multiSapProxy*/)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( aabbMin,aabbMax,userPtr,
|
||||||
|
collisionFilterGroup,
|
||||||
|
collisionFilterMask);
|
||||||
|
|
||||||
|
btDbvtAabbMm aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
|
||||||
|
|
||||||
|
//bproxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
|
||||||
|
proxy->stage = m_stageCurrent;
|
||||||
|
proxy->m_uniqueId = ++m_gid;
|
||||||
|
proxy->leaf = m_sets[0].insert(aabb,proxy);
|
||||||
|
listappend(proxy,m_stageRoots[m_stageCurrent]);
|
||||||
|
if(!m_deferedcollide)
|
||||||
|
{
|
||||||
|
btDbvtTreeCollider collider(this);
|
||||||
|
collider.proxy=proxy;
|
||||||
|
m_sets[0].collideTV(m_sets[0].m_root,aabb,collider);
|
||||||
|
m_sets[1].collideTV(m_sets[1].m_root,aabb,collider);
|
||||||
|
}
|
||||||
|
return(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::destroyProxy( btBroadphaseProxy* absproxy,
|
||||||
|
btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
|
||||||
|
if(proxy->stage==STAGECOUNT)
|
||||||
|
m_sets[1].remove(proxy->leaf);
|
||||||
|
else
|
||||||
|
m_sets[0].remove(proxy->leaf);
|
||||||
|
listremove(proxy,m_stageRoots[proxy->stage]);
|
||||||
|
m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher);
|
||||||
|
btAlignedFree(proxy);
|
||||||
|
m_needcleanup=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btDbvtBroadphase::getAabb(btBroadphaseProxy* absproxy,btVector3& aabbMin, btVector3& aabbMax ) const
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
|
||||||
|
aabbMin = proxy->m_aabbMin;
|
||||||
|
aabbMax = proxy->m_aabbMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct BroadphaseRayTester : btDbvt::ICollide
|
||||||
|
{
|
||||||
|
btBroadphaseRayCallback& m_rayCallback;
|
||||||
|
BroadphaseRayTester(btBroadphaseRayCallback& orgCallback)
|
||||||
|
:m_rayCallback(orgCallback)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void Process(const btDbvtNode* leaf)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
|
||||||
|
m_rayCallback.process(proxy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void btDbvtBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
|
||||||
|
{
|
||||||
|
BroadphaseRayTester callback(rayCallback);
|
||||||
|
|
||||||
|
m_sets[0].rayTestInternal( m_sets[0].m_root,
|
||||||
|
rayFrom,
|
||||||
|
rayTo,
|
||||||
|
rayCallback.m_rayDirectionInverse,
|
||||||
|
rayCallback.m_signs,
|
||||||
|
rayCallback.m_lambda_max,
|
||||||
|
aabbMin,
|
||||||
|
aabbMax,
|
||||||
|
callback);
|
||||||
|
|
||||||
|
m_sets[1].rayTestInternal( m_sets[1].m_root,
|
||||||
|
rayFrom,
|
||||||
|
rayTo,
|
||||||
|
rayCallback.m_rayDirectionInverse,
|
||||||
|
rayCallback.m_signs,
|
||||||
|
rayCallback.m_lambda_max,
|
||||||
|
aabbMin,
|
||||||
|
aabbMax,
|
||||||
|
callback);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct BroadphaseAabbTester : btDbvt::ICollide
|
||||||
|
{
|
||||||
|
btBroadphaseAabbCallback& m_aabbCallback;
|
||||||
|
BroadphaseAabbTester(btBroadphaseAabbCallback& orgCallback)
|
||||||
|
:m_aabbCallback(orgCallback)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void Process(const btDbvtNode* leaf)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
|
||||||
|
m_aabbCallback.process(proxy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void btDbvtBroadphase::aabbTest(const btVector3& aabbMin,const btVector3& aabbMax,btBroadphaseAabbCallback& aabbCallback)
|
||||||
|
{
|
||||||
|
BroadphaseAabbTester callback(aabbCallback);
|
||||||
|
|
||||||
|
const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(aabbMin,aabbMax);
|
||||||
|
//process all children, that overlap with the given AABB bounds
|
||||||
|
m_sets[0].collideTV(m_sets[0].m_root,bounds,callback);
|
||||||
|
m_sets[1].collideTV(m_sets[1].m_root,bounds,callback);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::setAabb( btBroadphaseProxy* absproxy,
|
||||||
|
const btVector3& aabbMin,
|
||||||
|
const btVector3& aabbMax,
|
||||||
|
btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
|
||||||
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
|
||||||
|
#if DBVT_BP_PREVENTFALSEUPDATE
|
||||||
|
if(NotEqual(aabb,proxy->leaf->volume))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
bool docollide=false;
|
||||||
|
if(proxy->stage==STAGECOUNT)
|
||||||
|
{/* fixed -> dynamic set */
|
||||||
|
m_sets[1].remove(proxy->leaf);
|
||||||
|
proxy->leaf=m_sets[0].insert(aabb,proxy);
|
||||||
|
docollide=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{/* dynamic set */
|
||||||
|
++m_updates_call;
|
||||||
|
if(Intersect(proxy->leaf->volume,aabb))
|
||||||
|
{/* Moving */
|
||||||
|
|
||||||
|
const btVector3 delta=aabbMin-proxy->m_aabbMin;
|
||||||
|
btVector3 velocity(((proxy->m_aabbMax-proxy->m_aabbMin)/2)*m_prediction);
|
||||||
|
if(delta[0]<0) velocity[0]=-velocity[0];
|
||||||
|
if(delta[1]<0) velocity[1]=-velocity[1];
|
||||||
|
if(delta[2]<0) velocity[2]=-velocity[2];
|
||||||
|
if (
|
||||||
|
#ifdef DBVT_BP_MARGIN
|
||||||
|
m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN)
|
||||||
|
#else
|
||||||
|
m_sets[0].update(proxy->leaf,aabb,velocity)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
++m_updates_done;
|
||||||
|
docollide=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{/* Teleporting */
|
||||||
|
m_sets[0].update(proxy->leaf,aabb);
|
||||||
|
++m_updates_done;
|
||||||
|
docollide=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
listremove(proxy,m_stageRoots[proxy->stage]);
|
||||||
|
proxy->m_aabbMin = aabbMin;
|
||||||
|
proxy->m_aabbMax = aabbMax;
|
||||||
|
proxy->stage = m_stageCurrent;
|
||||||
|
listappend(proxy,m_stageRoots[m_stageCurrent]);
|
||||||
|
if(docollide)
|
||||||
|
{
|
||||||
|
m_needcleanup=true;
|
||||||
|
if(!m_deferedcollide)
|
||||||
|
{
|
||||||
|
btDbvtTreeCollider collider(this);
|
||||||
|
m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider);
|
||||||
|
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::setAabbForceUpdate( btBroadphaseProxy* absproxy,
|
||||||
|
const btVector3& aabbMin,
|
||||||
|
const btVector3& aabbMax,
|
||||||
|
btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
|
||||||
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
|
||||||
|
bool docollide=false;
|
||||||
|
if(proxy->stage==STAGECOUNT)
|
||||||
|
{/* fixed -> dynamic set */
|
||||||
|
m_sets[1].remove(proxy->leaf);
|
||||||
|
proxy->leaf=m_sets[0].insert(aabb,proxy);
|
||||||
|
docollide=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{/* dynamic set */
|
||||||
|
++m_updates_call;
|
||||||
|
/* Teleporting */
|
||||||
|
m_sets[0].update(proxy->leaf,aabb);
|
||||||
|
++m_updates_done;
|
||||||
|
docollide=true;
|
||||||
|
}
|
||||||
|
listremove(proxy,m_stageRoots[proxy->stage]);
|
||||||
|
proxy->m_aabbMin = aabbMin;
|
||||||
|
proxy->m_aabbMax = aabbMax;
|
||||||
|
proxy->stage = m_stageCurrent;
|
||||||
|
listappend(proxy,m_stageRoots[m_stageCurrent]);
|
||||||
|
if(docollide)
|
||||||
|
{
|
||||||
|
m_needcleanup=true;
|
||||||
|
if(!m_deferedcollide)
|
||||||
|
{
|
||||||
|
btDbvtTreeCollider collider(this);
|
||||||
|
m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider);
|
||||||
|
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
collide(dispatcher);
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
if(0==(m_pid%DBVT_BP_PROFILING_RATE))
|
||||||
|
{
|
||||||
|
printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs());
|
||||||
|
unsigned int total=m_profiling.m_total;
|
||||||
|
if(total<=0) total=1;
|
||||||
|
printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE);
|
||||||
|
printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE);
|
||||||
|
printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE);
|
||||||
|
printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE);
|
||||||
|
const unsigned long sum=m_profiling.m_ddcollide+
|
||||||
|
m_profiling.m_fdcollide+
|
||||||
|
m_profiling.m_cleanup;
|
||||||
|
printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE);
|
||||||
|
printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE));
|
||||||
|
clear(m_profiling);
|
||||||
|
m_clock.reset();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
performDeferredRemoval(dispatcher);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void btDbvtBroadphase::performDeferredRemoval(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (m_paircache->hasDeferredRemoval())
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePairArray& overlappingPairArray = m_paircache->getOverlappingPairArray();
|
||||||
|
|
||||||
|
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
|
||||||
|
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
int invalidPair = 0;
|
||||||
|
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
btBroadphasePair previousPair;
|
||||||
|
previousPair.m_pProxy0 = 0;
|
||||||
|
previousPair.m_pProxy1 = 0;
|
||||||
|
previousPair.m_algorithm = 0;
|
||||||
|
|
||||||
|
|
||||||
|
for (i=0;i<overlappingPairArray.size();i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePair& pair = overlappingPairArray[i];
|
||||||
|
|
||||||
|
bool isDuplicate = (pair == previousPair);
|
||||||
|
|
||||||
|
previousPair = pair;
|
||||||
|
|
||||||
|
bool needsRemoval = false;
|
||||||
|
|
||||||
|
if (!isDuplicate)
|
||||||
|
{
|
||||||
|
//important to perform AABB check that is consistent with the broadphase
|
||||||
|
btDbvtProxy* pa=(btDbvtProxy*)pair.m_pProxy0;
|
||||||
|
btDbvtProxy* pb=(btDbvtProxy*)pair.m_pProxy1;
|
||||||
|
bool hasOverlap = Intersect(pa->leaf->volume,pb->leaf->volume);
|
||||||
|
|
||||||
|
if (hasOverlap)
|
||||||
|
{
|
||||||
|
needsRemoval = false;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
needsRemoval = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//remove duplicate
|
||||||
|
needsRemoval = true;
|
||||||
|
//should have no algorithm
|
||||||
|
btAssert(!pair.m_algorithm);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needsRemoval)
|
||||||
|
{
|
||||||
|
m_paircache->cleanOverlappingPair(pair,dispatcher);
|
||||||
|
|
||||||
|
pair.m_pProxy0 = 0;
|
||||||
|
pair.m_pProxy1 = 0;
|
||||||
|
invalidPair++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//perform a sort, to sort 'invalid' pairs to the end
|
||||||
|
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
|
||||||
|
overlappingPairArray.resize(overlappingPairArray.size() - invalidPair);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::collide(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
/*printf("---------------------------------------------------------\n");
|
||||||
|
printf("m_sets[0].m_leaves=%d\n",m_sets[0].m_leaves);
|
||||||
|
printf("m_sets[1].m_leaves=%d\n",m_sets[1].m_leaves);
|
||||||
|
printf("numPairs = %d\n",getOverlappingPairCache()->getNumOverlappingPairs());
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<getOverlappingPairCache()->getNumOverlappingPairs();i++)
|
||||||
|
{
|
||||||
|
printf("pair[%d]=(%d,%d),",i,getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy0->getUid(),
|
||||||
|
getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy1->getUid());
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SPC(m_profiling.m_total);
|
||||||
|
/* optimize */
|
||||||
|
m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100);
|
||||||
|
if(m_fixedleft)
|
||||||
|
{
|
||||||
|
const int count=1+(m_sets[1].m_leaves*m_fupdates)/100;
|
||||||
|
m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100);
|
||||||
|
m_fixedleft=btMax<int>(0,m_fixedleft-count);
|
||||||
|
}
|
||||||
|
/* dynamic -> fixed set */
|
||||||
|
m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT;
|
||||||
|
btDbvtProxy* current=m_stageRoots[m_stageCurrent];
|
||||||
|
if(current)
|
||||||
|
{
|
||||||
|
btDbvtTreeCollider collider(this);
|
||||||
|
do {
|
||||||
|
btDbvtProxy* next=current->links[1];
|
||||||
|
listremove(current,m_stageRoots[current->stage]);
|
||||||
|
listappend(current,m_stageRoots[STAGECOUNT]);
|
||||||
|
#if DBVT_BP_ACCURATESLEEPING
|
||||||
|
m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher);
|
||||||
|
collider.proxy=current;
|
||||||
|
btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider);
|
||||||
|
btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider);
|
||||||
|
#endif
|
||||||
|
m_sets[0].remove(current->leaf);
|
||||||
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) curAabb=btDbvtVolume::FromMM(current->m_aabbMin,current->m_aabbMax);
|
||||||
|
current->leaf = m_sets[1].insert(curAabb,current);
|
||||||
|
current->stage = STAGECOUNT;
|
||||||
|
current = next;
|
||||||
|
} while(current);
|
||||||
|
m_fixedleft=m_sets[1].m_leaves;
|
||||||
|
m_needcleanup=true;
|
||||||
|
}
|
||||||
|
/* collide dynamics */
|
||||||
|
{
|
||||||
|
btDbvtTreeCollider collider(this);
|
||||||
|
if(m_deferedcollide)
|
||||||
|
{
|
||||||
|
SPC(m_profiling.m_fdcollide);
|
||||||
|
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[1].m_root,collider);
|
||||||
|
}
|
||||||
|
if(m_deferedcollide)
|
||||||
|
{
|
||||||
|
SPC(m_profiling.m_ddcollide);
|
||||||
|
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[0].m_root,collider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* clean up */
|
||||||
|
if(m_needcleanup)
|
||||||
|
{
|
||||||
|
SPC(m_profiling.m_cleanup);
|
||||||
|
btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray();
|
||||||
|
if(pairs.size()>0)
|
||||||
|
{
|
||||||
|
|
||||||
|
int ni=btMin(pairs.size(),btMax<int>(m_newpairs,(pairs.size()*m_cupdates)/100));
|
||||||
|
for(int i=0;i<ni;++i)
|
||||||
|
{
|
||||||
|
btBroadphasePair& p=pairs[(m_cid+i)%pairs.size()];
|
||||||
|
btDbvtProxy* pa=(btDbvtProxy*)p.m_pProxy0;
|
||||||
|
btDbvtProxy* pb=(btDbvtProxy*)p.m_pProxy1;
|
||||||
|
if(!Intersect(pa->leaf->volume,pb->leaf->volume))
|
||||||
|
{
|
||||||
|
#if DBVT_BP_SORTPAIRS
|
||||||
|
if(pa->m_uniqueId>pb->m_uniqueId)
|
||||||
|
btSwap(pa,pb);
|
||||||
|
#endif
|
||||||
|
m_paircache->removeOverlappingPair(pa,pb,dispatcher);
|
||||||
|
--ni;--i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++m_pid;
|
||||||
|
m_newpairs=1;
|
||||||
|
m_needcleanup=false;
|
||||||
|
if(m_updates_call>0)
|
||||||
|
{ m_updates_ratio=m_updates_done/(btScalar)m_updates_call; }
|
||||||
|
else
|
||||||
|
{ m_updates_ratio=0; }
|
||||||
|
m_updates_done/=2;
|
||||||
|
m_updates_call/=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::optimize()
|
||||||
|
{
|
||||||
|
m_sets[0].optimizeTopDown();
|
||||||
|
m_sets[1].optimizeTopDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache()
|
||||||
|
{
|
||||||
|
return(m_paircache);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache() const
|
||||||
|
{
|
||||||
|
return(m_paircache);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
|
||||||
|
{
|
||||||
|
|
||||||
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds;
|
||||||
|
|
||||||
|
if(!m_sets[0].empty())
|
||||||
|
if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume,
|
||||||
|
m_sets[1].m_root->volume,bounds);
|
||||||
|
else
|
||||||
|
bounds=m_sets[0].m_root->volume;
|
||||||
|
else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume;
|
||||||
|
else
|
||||||
|
bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0);
|
||||||
|
aabbMin=bounds.Mins();
|
||||||
|
aabbMax=bounds.Maxs();
|
||||||
|
}
|
||||||
|
|
||||||
|
void btDbvtBroadphase::resetPool(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
int totalObjects = m_sets[0].m_leaves + m_sets[1].m_leaves;
|
||||||
|
if (!totalObjects)
|
||||||
|
{
|
||||||
|
//reset internal dynamic tree data structures
|
||||||
|
m_sets[0].clear();
|
||||||
|
m_sets[1].clear();
|
||||||
|
|
||||||
|
m_deferedcollide = false;
|
||||||
|
m_needcleanup = true;
|
||||||
|
m_stageCurrent = 0;
|
||||||
|
m_fixedleft = 0;
|
||||||
|
m_fupdates = 1;
|
||||||
|
m_dupdates = 0;
|
||||||
|
m_cupdates = 10;
|
||||||
|
m_newpairs = 1;
|
||||||
|
m_updates_call = 0;
|
||||||
|
m_updates_done = 0;
|
||||||
|
m_updates_ratio = 0;
|
||||||
|
|
||||||
|
m_gid = 0;
|
||||||
|
m_pid = 0;
|
||||||
|
m_cid = 0;
|
||||||
|
for(int i=0;i<=STAGECOUNT;++i)
|
||||||
|
{
|
||||||
|
m_stageRoots[i]=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void btDbvtBroadphase::printStats()
|
||||||
|
{}
|
||||||
|
|
||||||
|
//
|
||||||
|
#if DBVT_BP_ENABLE_BENCHMARK
|
||||||
|
|
||||||
|
struct btBroadphaseBenchmark
|
||||||
|
{
|
||||||
|
struct Experiment
|
||||||
|
{
|
||||||
|
const char* name;
|
||||||
|
int object_count;
|
||||||
|
int update_count;
|
||||||
|
int spawn_count;
|
||||||
|
int iterations;
|
||||||
|
btScalar speed;
|
||||||
|
btScalar amplitude;
|
||||||
|
};
|
||||||
|
struct Object
|
||||||
|
{
|
||||||
|
btVector3 center;
|
||||||
|
btVector3 extents;
|
||||||
|
btBroadphaseProxy* proxy;
|
||||||
|
btScalar time;
|
||||||
|
void update(btScalar speed,btScalar amplitude,btBroadphaseInterface* pbi)
|
||||||
|
{
|
||||||
|
time += speed;
|
||||||
|
center[0] = btCos(time*(btScalar)2.17)*amplitude+
|
||||||
|
btSin(time)*amplitude/2;
|
||||||
|
center[1] = btCos(time*(btScalar)1.38)*amplitude+
|
||||||
|
btSin(time)*amplitude;
|
||||||
|
center[2] = btSin(time*(btScalar)0.777)*amplitude;
|
||||||
|
pbi->setAabb(proxy,center-extents,center+extents,0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static int UnsignedRand(int range=RAND_MAX-1) { return(rand()%(range+1)); }
|
||||||
|
static btScalar UnitRand() { return(UnsignedRand(16384)/(btScalar)16384); }
|
||||||
|
static void OutputTime(const char* name,btClock& c,unsigned count=0)
|
||||||
|
{
|
||||||
|
const unsigned long us=c.getTimeMicroseconds();
|
||||||
|
const unsigned long ms=(us+500)/1000;
|
||||||
|
const btScalar sec=us/(btScalar)(1000*1000);
|
||||||
|
if(count>0)
|
||||||
|
printf("%s : %u us (%u ms), %.2f/s\r\n",name,us,ms,count/sec);
|
||||||
|
else
|
||||||
|
printf("%s : %u us (%u ms)\r\n",name,us,ms);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void btDbvtBroadphase::benchmark(btBroadphaseInterface* pbi)
|
||||||
|
{
|
||||||
|
static const btBroadphaseBenchmark::Experiment experiments[]=
|
||||||
|
{
|
||||||
|
{"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100},
|
||||||
|
/*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100},
|
||||||
|
{"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/
|
||||||
|
};
|
||||||
|
static const int nexperiments=sizeof(experiments)/sizeof(experiments[0]);
|
||||||
|
btAlignedObjectArray<btBroadphaseBenchmark::Object*> objects;
|
||||||
|
btClock wallclock;
|
||||||
|
/* Begin */
|
||||||
|
for(int iexp=0;iexp<nexperiments;++iexp)
|
||||||
|
{
|
||||||
|
const btBroadphaseBenchmark::Experiment& experiment=experiments[iexp];
|
||||||
|
const int object_count=experiment.object_count;
|
||||||
|
const int update_count=(object_count*experiment.update_count)/100;
|
||||||
|
const int spawn_count=(object_count*experiment.spawn_count)/100;
|
||||||
|
const btScalar speed=experiment.speed;
|
||||||
|
const btScalar amplitude=experiment.amplitude;
|
||||||
|
printf("Experiment #%u '%s':\r\n",iexp,experiment.name);
|
||||||
|
printf("\tObjects: %u\r\n",object_count);
|
||||||
|
printf("\tUpdate: %u\r\n",update_count);
|
||||||
|
printf("\tSpawn: %u\r\n",spawn_count);
|
||||||
|
printf("\tSpeed: %f\r\n",speed);
|
||||||
|
printf("\tAmplitude: %f\r\n",amplitude);
|
||||||
|
srand(180673);
|
||||||
|
/* Create objects */
|
||||||
|
wallclock.reset();
|
||||||
|
objects.reserve(object_count);
|
||||||
|
for(int i=0;i<object_count;++i)
|
||||||
|
{
|
||||||
|
btBroadphaseBenchmark::Object* po=new btBroadphaseBenchmark::Object();
|
||||||
|
po->center[0]=btBroadphaseBenchmark::UnitRand()*50;
|
||||||
|
po->center[1]=btBroadphaseBenchmark::UnitRand()*50;
|
||||||
|
po->center[2]=btBroadphaseBenchmark::UnitRand()*50;
|
||||||
|
po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2;
|
||||||
|
po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2;
|
||||||
|
po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2;
|
||||||
|
po->time=btBroadphaseBenchmark::UnitRand()*2000;
|
||||||
|
po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0);
|
||||||
|
objects.push_back(po);
|
||||||
|
}
|
||||||
|
btBroadphaseBenchmark::OutputTime("\tInitialization",wallclock);
|
||||||
|
/* First update */
|
||||||
|
wallclock.reset();
|
||||||
|
for(int i=0;i<objects.size();++i)
|
||||||
|
{
|
||||||
|
objects[i]->update(speed,amplitude,pbi);
|
||||||
|
}
|
||||||
|
btBroadphaseBenchmark::OutputTime("\tFirst update",wallclock);
|
||||||
|
/* Updates */
|
||||||
|
wallclock.reset();
|
||||||
|
for(int i=0;i<experiment.iterations;++i)
|
||||||
|
{
|
||||||
|
for(int j=0;j<update_count;++j)
|
||||||
|
{
|
||||||
|
objects[j]->update(speed,amplitude,pbi);
|
||||||
|
}
|
||||||
|
pbi->calculateOverlappingPairs(0);
|
||||||
|
}
|
||||||
|
btBroadphaseBenchmark::OutputTime("\tUpdate",wallclock,experiment.iterations);
|
||||||
|
/* Clean up */
|
||||||
|
wallclock.reset();
|
||||||
|
for(int i=0;i<objects.size();++i)
|
||||||
|
{
|
||||||
|
pbi->destroyProxy(objects[i]->proxy,0);
|
||||||
|
delete objects[i];
|
||||||
|
}
|
||||||
|
objects.resize(0);
|
||||||
|
btBroadphaseBenchmark::OutputTime("\tRelease",wallclock);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void btDbvtBroadphase::benchmark(btBroadphaseInterface*)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
#undef SPC
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///btDbvtBroadphase implementation by Nathanael Presson
|
||||||
|
#ifndef BT_DBVT_BROADPHASE_H
|
||||||
|
#define BT_DBVT_BROADPHASE_H
|
||||||
|
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btDbvt.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Compile time config
|
||||||
|
//
|
||||||
|
|
||||||
|
#define DBVT_BP_PROFILE 0
|
||||||
|
//#define DBVT_BP_SORTPAIRS 1
|
||||||
|
#define DBVT_BP_PREVENTFALSEUPDATE 0
|
||||||
|
#define DBVT_BP_ACCURATESLEEPING 0
|
||||||
|
#define DBVT_BP_ENABLE_BENCHMARK 0
|
||||||
|
#define DBVT_BP_MARGIN (btScalar)0.05
|
||||||
|
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
#define DBVT_BP_PROFILING_RATE 256
|
||||||
|
#include "LinearMath/btQuickprof.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// btDbvtProxy
|
||||||
|
//
|
||||||
|
struct btDbvtProxy : btBroadphaseProxy
|
||||||
|
{
|
||||||
|
/* Fields */
|
||||||
|
//btDbvtAabbMm aabb;
|
||||||
|
btDbvtNode* leaf;
|
||||||
|
btDbvtProxy* links[2];
|
||||||
|
int stage;
|
||||||
|
/* ctor */
|
||||||
|
btDbvtProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) :
|
||||||
|
btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask)
|
||||||
|
{
|
||||||
|
links[0]=links[1]=0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef btAlignedObjectArray<btDbvtProxy*> btDbvtProxyArray;
|
||||||
|
|
||||||
|
///The btDbvtBroadphase implements a broadphase using two dynamic AABB bounding volume hierarchies/trees (see btDbvt).
|
||||||
|
///One tree is used for static/non-moving objects, and another tree is used for dynamic objects. Objects can move from one tree to the other.
|
||||||
|
///This is a very fast broadphase, especially for very dynamic worlds where many objects are moving. Its insert/add and remove of objects is generally faster than the sweep and prune broadphases btAxisSweep3 and bt32BitAxisSweep3.
|
||||||
|
struct btDbvtBroadphase : btBroadphaseInterface
|
||||||
|
{
|
||||||
|
/* Config */
|
||||||
|
enum {
|
||||||
|
DYNAMIC_SET = 0, /* Dynamic set index */
|
||||||
|
FIXED_SET = 1, /* Fixed set index */
|
||||||
|
STAGECOUNT = 2 /* Number of stages */
|
||||||
|
};
|
||||||
|
/* Fields */
|
||||||
|
btDbvt m_sets[2]; // Dbvt sets
|
||||||
|
btDbvtProxy* m_stageRoots[STAGECOUNT+1]; // Stages list
|
||||||
|
btOverlappingPairCache* m_paircache; // Pair cache
|
||||||
|
btScalar m_prediction; // Velocity prediction
|
||||||
|
int m_stageCurrent; // Current stage
|
||||||
|
int m_fupdates; // % of fixed updates per frame
|
||||||
|
int m_dupdates; // % of dynamic updates per frame
|
||||||
|
int m_cupdates; // % of cleanup updates per frame
|
||||||
|
int m_newpairs; // Number of pairs created
|
||||||
|
int m_fixedleft; // Fixed optimization left
|
||||||
|
unsigned m_updates_call; // Number of updates call
|
||||||
|
unsigned m_updates_done; // Number of updates done
|
||||||
|
btScalar m_updates_ratio; // m_updates_done/m_updates_call
|
||||||
|
int m_pid; // Parse id
|
||||||
|
int m_cid; // Cleanup index
|
||||||
|
int m_gid; // Gen id
|
||||||
|
bool m_releasepaircache; // Release pair cache on delete
|
||||||
|
bool m_deferedcollide; // Defere dynamic/static collision to collide call
|
||||||
|
bool m_needcleanup; // Need to run cleanup?
|
||||||
|
#if DBVT_BP_PROFILE
|
||||||
|
btClock m_clock;
|
||||||
|
struct {
|
||||||
|
unsigned long m_total;
|
||||||
|
unsigned long m_ddcollide;
|
||||||
|
unsigned long m_fdcollide;
|
||||||
|
unsigned long m_cleanup;
|
||||||
|
unsigned long m_jobcount;
|
||||||
|
} m_profiling;
|
||||||
|
#endif
|
||||||
|
/* Methods */
|
||||||
|
btDbvtBroadphase(btOverlappingPairCache* paircache=0);
|
||||||
|
~btDbvtBroadphase();
|
||||||
|
void collide(btDispatcher* dispatcher);
|
||||||
|
void optimize();
|
||||||
|
|
||||||
|
/* btBroadphaseInterface Implementation */
|
||||||
|
btBroadphaseProxy* createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
|
||||||
|
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
|
||||||
|
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0));
|
||||||
|
virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback);
|
||||||
|
|
||||||
|
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
|
||||||
|
virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
|
||||||
|
virtual btOverlappingPairCache* getOverlappingPairCache();
|
||||||
|
virtual const btOverlappingPairCache* getOverlappingPairCache() const;
|
||||||
|
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const;
|
||||||
|
virtual void printStats();
|
||||||
|
|
||||||
|
|
||||||
|
///reset broadphase internal structures, to ensure determinism/reproducability
|
||||||
|
virtual void resetPool(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
void performDeferredRemoval(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
void setVelocityPrediction(btScalar prediction)
|
||||||
|
{
|
||||||
|
m_prediction = prediction;
|
||||||
|
}
|
||||||
|
btScalar getVelocityPrediction() const
|
||||||
|
{
|
||||||
|
return m_prediction;
|
||||||
|
}
|
||||||
|
|
||||||
|
///this setAabbForceUpdate is similar to setAabb but always forces the aabb update.
|
||||||
|
///it is not part of the btBroadphaseInterface but specific to btDbvtBroadphase.
|
||||||
|
///it bypasses certain optimizations that prevent aabb updates (when the aabb shrinks), see
|
||||||
|
///http://code.google.com/p/bullet/issues/detail?id=223
|
||||||
|
void setAabbForceUpdate( btBroadphaseProxy* absproxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* /*dispatcher*/);
|
||||||
|
|
||||||
|
static void benchmark(btBroadphaseInterface*);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btDispatcher.h"
|
||||||
|
|
||||||
|
btDispatcher::~btDispatcher()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_DISPATCHER_H
|
||||||
|
#define BT_DISPATCHER_H
|
||||||
|
#include "LinearMath/btScalar.h"
|
||||||
|
|
||||||
|
class btCollisionAlgorithm;
|
||||||
|
struct btBroadphaseProxy;
|
||||||
|
class btRigidBody;
|
||||||
|
class btCollisionObject;
|
||||||
|
class btOverlappingPairCache;
|
||||||
|
struct btCollisionObjectWrapper;
|
||||||
|
|
||||||
|
class btPersistentManifold;
|
||||||
|
class btPoolAllocator;
|
||||||
|
|
||||||
|
struct btDispatcherInfo
|
||||||
|
{
|
||||||
|
enum DispatchFunc
|
||||||
|
{
|
||||||
|
DISPATCH_DISCRETE = 1,
|
||||||
|
DISPATCH_CONTINUOUS
|
||||||
|
};
|
||||||
|
btDispatcherInfo()
|
||||||
|
:m_timeStep(btScalar(0.)),
|
||||||
|
m_stepCount(0),
|
||||||
|
m_dispatchFunc(DISPATCH_DISCRETE),
|
||||||
|
m_timeOfImpact(btScalar(1.)),
|
||||||
|
m_useContinuous(true),
|
||||||
|
m_debugDraw(0),
|
||||||
|
m_enableSatConvex(false),
|
||||||
|
m_enableSPU(true),
|
||||||
|
m_useEpa(true),
|
||||||
|
m_allowedCcdPenetration(btScalar(0.04)),
|
||||||
|
m_useConvexConservativeDistanceUtil(false),
|
||||||
|
m_convexConservativeDistanceThreshold(0.0f)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
btScalar m_timeStep;
|
||||||
|
int m_stepCount;
|
||||||
|
int m_dispatchFunc;
|
||||||
|
mutable btScalar m_timeOfImpact;
|
||||||
|
bool m_useContinuous;
|
||||||
|
class btIDebugDraw* m_debugDraw;
|
||||||
|
bool m_enableSatConvex;
|
||||||
|
bool m_enableSPU;
|
||||||
|
bool m_useEpa;
|
||||||
|
btScalar m_allowedCcdPenetration;
|
||||||
|
bool m_useConvexConservativeDistanceUtil;
|
||||||
|
btScalar m_convexConservativeDistanceThreshold;
|
||||||
|
};
|
||||||
|
|
||||||
|
///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs.
|
||||||
|
///For example for pairwise collision detection, calculating contact points stored in btPersistentManifold or user callbacks (game logic).
|
||||||
|
class btDispatcher
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~btDispatcher() ;
|
||||||
|
|
||||||
|
virtual btCollisionAlgorithm* findAlgorithm(const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btPersistentManifold* sharedManifold=0) = 0;
|
||||||
|
|
||||||
|
virtual btPersistentManifold* getNewManifold(const btCollisionObject* b0,const btCollisionObject* b1)=0;
|
||||||
|
|
||||||
|
virtual void releaseManifold(btPersistentManifold* manifold)=0;
|
||||||
|
|
||||||
|
virtual void clearManifold(btPersistentManifold* manifold)=0;
|
||||||
|
|
||||||
|
virtual bool needsCollision(const btCollisionObject* body0,const btCollisionObject* body1) = 0;
|
||||||
|
|
||||||
|
virtual bool needsResponse(const btCollisionObject* body0,const btCollisionObject* body1)=0;
|
||||||
|
|
||||||
|
virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) =0;
|
||||||
|
|
||||||
|
virtual int getNumManifolds() const = 0;
|
||||||
|
|
||||||
|
virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0;
|
||||||
|
|
||||||
|
virtual btPersistentManifold** getInternalManifoldPointer() = 0;
|
||||||
|
|
||||||
|
virtual btPoolAllocator* getInternalManifoldPool() = 0;
|
||||||
|
|
||||||
|
virtual const btPoolAllocator* getInternalManifoldPool() const = 0;
|
||||||
|
|
||||||
|
virtual void* allocateCollisionAlgorithm(int size) = 0;
|
||||||
|
|
||||||
|
virtual void freeCollisionAlgorithm(void* ptr) = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_DISPATCHER_H
|
|
@ -0,0 +1,489 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btMultiSapBroadphase.h"
|
||||||
|
|
||||||
|
#include "btSimpleBroadphase.h"
|
||||||
|
#include "LinearMath/btAabbUtil2.h"
|
||||||
|
#include "btQuantizedBvh.h"
|
||||||
|
|
||||||
|
/// btSapBroadphaseArray m_sapBroadphases;
|
||||||
|
|
||||||
|
/// btOverlappingPairCache* m_overlappingPairs;
|
||||||
|
extern int gOverlappingPairs;
|
||||||
|
|
||||||
|
/*
|
||||||
|
class btMultiSapSortedOverlappingPairCache : public btSortedOverlappingPairCache
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
return btSortedOverlappingPairCache::addOverlappingPair((btBroadphaseProxy*)proxy0->m_multiSapParentProxy,(btBroadphaseProxy*)proxy1->m_multiSapParentProxy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
btMultiSapBroadphase::btMultiSapBroadphase(int /*maxProxies*/,btOverlappingPairCache* pairCache)
|
||||||
|
:m_overlappingPairs(pairCache),
|
||||||
|
m_optimizedAabbTree(0),
|
||||||
|
m_ownsPairCache(false),
|
||||||
|
m_invalidPair(0)
|
||||||
|
{
|
||||||
|
if (!m_overlappingPairs)
|
||||||
|
{
|
||||||
|
m_ownsPairCache = true;
|
||||||
|
void* mem = btAlignedAlloc(sizeof(btSortedOverlappingPairCache),16);
|
||||||
|
m_overlappingPairs = new (mem)btSortedOverlappingPairCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
struct btMultiSapOverlapFilterCallback : public btOverlapFilterCallback
|
||||||
|
{
|
||||||
|
virtual ~btMultiSapOverlapFilterCallback()
|
||||||
|
{}
|
||||||
|
// return true when pairs need collision
|
||||||
|
virtual bool needBroadphaseCollision(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) const
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* multiProxy0 = (btBroadphaseProxy*)childProxy0->m_multiSapParentProxy;
|
||||||
|
btBroadphaseProxy* multiProxy1 = (btBroadphaseProxy*)childProxy1->m_multiSapParentProxy;
|
||||||
|
|
||||||
|
bool collides = (multiProxy0->m_collisionFilterGroup & multiProxy1->m_collisionFilterMask) != 0;
|
||||||
|
collides = collides && (multiProxy1->m_collisionFilterGroup & multiProxy0->m_collisionFilterMask);
|
||||||
|
|
||||||
|
return collides;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void* mem = btAlignedAlloc(sizeof(btMultiSapOverlapFilterCallback),16);
|
||||||
|
m_filterCallback = new (mem)btMultiSapOverlapFilterCallback();
|
||||||
|
|
||||||
|
m_overlappingPairs->setOverlapFilterCallback(m_filterCallback);
|
||||||
|
// mem = btAlignedAlloc(sizeof(btSimpleBroadphase),16);
|
||||||
|
// m_simpleBroadphase = new (mem) btSimpleBroadphase(maxProxies,m_overlappingPairs);
|
||||||
|
}
|
||||||
|
|
||||||
|
btMultiSapBroadphase::~btMultiSapBroadphase()
|
||||||
|
{
|
||||||
|
if (m_ownsPairCache)
|
||||||
|
{
|
||||||
|
m_overlappingPairs->~btOverlappingPairCache();
|
||||||
|
btAlignedFree(m_overlappingPairs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::buildTree(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax)
|
||||||
|
{
|
||||||
|
m_optimizedAabbTree = new btQuantizedBvh();
|
||||||
|
m_optimizedAabbTree->setQuantizationValues(bvhAabbMin,bvhAabbMax);
|
||||||
|
QuantizedNodeArray& nodes = m_optimizedAabbTree->getLeafNodeArray();
|
||||||
|
for (int i=0;i<m_sapBroadphases.size();i++)
|
||||||
|
{
|
||||||
|
btQuantizedBvhNode node;
|
||||||
|
btVector3 aabbMin,aabbMax;
|
||||||
|
m_sapBroadphases[i]->getBroadphaseAabb(aabbMin,aabbMax);
|
||||||
|
m_optimizedAabbTree->quantize(&node.m_quantizedAabbMin[0],aabbMin,0);
|
||||||
|
m_optimizedAabbTree->quantize(&node.m_quantizedAabbMax[0],aabbMax,1);
|
||||||
|
int partId = 0;
|
||||||
|
node.m_escapeIndexOrTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | i;
|
||||||
|
nodes.push_back(node);
|
||||||
|
}
|
||||||
|
m_optimizedAabbTree->buildInternal();
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphaseProxy* btMultiSapBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* /*ignoreMe*/)
|
||||||
|
{
|
||||||
|
//void* ignoreMe -> we could think of recursive multi-sap, if someone is interested
|
||||||
|
|
||||||
|
void* mem = btAlignedAlloc(sizeof(btMultiSapProxy),16);
|
||||||
|
btMultiSapProxy* proxy = new (mem)btMultiSapProxy(aabbMin, aabbMax,shapeType,userPtr, collisionFilterGroup,collisionFilterMask);
|
||||||
|
m_multiSapProxies.push_back(proxy);
|
||||||
|
|
||||||
|
///this should deal with inserting/removal into child broadphases
|
||||||
|
setAabb(proxy,aabbMin,aabbMax,dispatcher);
|
||||||
|
return proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::destroyProxy(btBroadphaseProxy* /*proxy*/,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
///not yet
|
||||||
|
btAssert(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::addToChildBroadphase(btMultiSapProxy* parentMultiSapProxy, btBroadphaseProxy* childProxy, btBroadphaseInterface* childBroadphase)
|
||||||
|
{
|
||||||
|
void* mem = btAlignedAlloc(sizeof(btBridgeProxy),16);
|
||||||
|
btBridgeProxy* bridgeProxyRef = new(mem) btBridgeProxy;
|
||||||
|
bridgeProxyRef->m_childProxy = childProxy;
|
||||||
|
bridgeProxyRef->m_childBroadphase = childBroadphase;
|
||||||
|
parentMultiSapProxy->m_bridgeProxies.push_back(bridgeProxyRef);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool boxIsContainedWithinBox(const btVector3& amin,const btVector3& amax,const btVector3& bmin,const btVector3& bmax);
|
||||||
|
bool boxIsContainedWithinBox(const btVector3& amin,const btVector3& amax,const btVector3& bmin,const btVector3& bmax)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
amin.getX() >= bmin.getX() && amax.getX() <= bmax.getX() &&
|
||||||
|
amin.getY() >= bmin.getY() && amax.getY() <= bmax.getY() &&
|
||||||
|
amin.getZ() >= bmin.getZ() && amax.getZ() <= bmax.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
|
||||||
|
{
|
||||||
|
btMultiSapProxy* multiProxy = static_cast<btMultiSapProxy*>(proxy);
|
||||||
|
aabbMin = multiProxy->m_aabbMin;
|
||||||
|
aabbMax = multiProxy->m_aabbMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax)
|
||||||
|
{
|
||||||
|
for (int i=0;i<m_multiSapProxies.size();i++)
|
||||||
|
{
|
||||||
|
rayCallback.process(m_multiSapProxies[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//#include <stdio.h>
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
btMultiSapProxy* multiProxy = static_cast<btMultiSapProxy*>(proxy);
|
||||||
|
multiProxy->m_aabbMin = aabbMin;
|
||||||
|
multiProxy->m_aabbMax = aabbMax;
|
||||||
|
|
||||||
|
|
||||||
|
// bool fullyContained = false;
|
||||||
|
// bool alreadyInSimple = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct MyNodeOverlapCallback : public btNodeOverlapCallback
|
||||||
|
{
|
||||||
|
btMultiSapBroadphase* m_multiSap;
|
||||||
|
btMultiSapProxy* m_multiProxy;
|
||||||
|
btDispatcher* m_dispatcher;
|
||||||
|
|
||||||
|
MyNodeOverlapCallback(btMultiSapBroadphase* multiSap,btMultiSapProxy* multiProxy,btDispatcher* dispatcher)
|
||||||
|
:m_multiSap(multiSap),
|
||||||
|
m_multiProxy(multiProxy),
|
||||||
|
m_dispatcher(dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void processNode(int /*nodeSubPart*/, int broadphaseIndex)
|
||||||
|
{
|
||||||
|
btBroadphaseInterface* childBroadphase = m_multiSap->getBroadphaseArray()[broadphaseIndex];
|
||||||
|
|
||||||
|
int containingBroadphaseIndex = -1;
|
||||||
|
//already found?
|
||||||
|
for (int i=0;i<m_multiProxy->m_bridgeProxies.size();i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (m_multiProxy->m_bridgeProxies[i]->m_childBroadphase == childBroadphase)
|
||||||
|
{
|
||||||
|
containingBroadphaseIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (containingBroadphaseIndex<0)
|
||||||
|
{
|
||||||
|
//add it
|
||||||
|
btBroadphaseProxy* childProxy = childBroadphase->createProxy(m_multiProxy->m_aabbMin,m_multiProxy->m_aabbMax,m_multiProxy->m_shapeType,m_multiProxy->m_clientObject,m_multiProxy->m_collisionFilterGroup,m_multiProxy->m_collisionFilterMask, m_dispatcher,m_multiProxy);
|
||||||
|
m_multiSap->addToChildBroadphase(m_multiProxy,childProxy,childBroadphase);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
MyNodeOverlapCallback myNodeCallback(this,multiProxy,dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (m_optimizedAabbTree)
|
||||||
|
m_optimizedAabbTree->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax);
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for ( i=0;i<multiProxy->m_bridgeProxies.size();i++)
|
||||||
|
{
|
||||||
|
btVector3 worldAabbMin,worldAabbMax;
|
||||||
|
multiProxy->m_bridgeProxies[i]->m_childBroadphase->getBroadphaseAabb(worldAabbMin,worldAabbMax);
|
||||||
|
bool overlapsBroadphase = TestAabbAgainstAabb2(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
|
||||||
|
if (!overlapsBroadphase)
|
||||||
|
{
|
||||||
|
//remove it now
|
||||||
|
btBridgeProxy* bridgeProxy = multiProxy->m_bridgeProxies[i];
|
||||||
|
|
||||||
|
btBroadphaseProxy* childProxy = bridgeProxy->m_childProxy;
|
||||||
|
bridgeProxy->m_childBroadphase->destroyProxy(childProxy,dispatcher);
|
||||||
|
|
||||||
|
multiProxy->m_bridgeProxies.swap( i,multiProxy->m_bridgeProxies.size()-1);
|
||||||
|
multiProxy->m_bridgeProxies.pop_back();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
|
||||||
|
//find broadphase that contain this multiProxy
|
||||||
|
int numChildBroadphases = getBroadphaseArray().size();
|
||||||
|
for (int i=0;i<numChildBroadphases;i++)
|
||||||
|
{
|
||||||
|
btBroadphaseInterface* childBroadphase = getBroadphaseArray()[i];
|
||||||
|
btVector3 worldAabbMin,worldAabbMax;
|
||||||
|
childBroadphase->getBroadphaseAabb(worldAabbMin,worldAabbMax);
|
||||||
|
bool overlapsBroadphase = TestAabbAgainstAabb2(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
|
||||||
|
|
||||||
|
// fullyContained = fullyContained || boxIsContainedWithinBox(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
|
||||||
|
int containingBroadphaseIndex = -1;
|
||||||
|
|
||||||
|
//if already contains this
|
||||||
|
|
||||||
|
for (int i=0;i<multiProxy->m_bridgeProxies.size();i++)
|
||||||
|
{
|
||||||
|
if (multiProxy->m_bridgeProxies[i]->m_childBroadphase == childBroadphase)
|
||||||
|
{
|
||||||
|
containingBroadphaseIndex = i;
|
||||||
|
}
|
||||||
|
alreadyInSimple = alreadyInSimple || (multiProxy->m_bridgeProxies[i]->m_childBroadphase == m_simpleBroadphase);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overlapsBroadphase)
|
||||||
|
{
|
||||||
|
if (containingBroadphaseIndex<0)
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* childProxy = childBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
|
||||||
|
childProxy->m_multiSapParentProxy = multiProxy;
|
||||||
|
addToChildBroadphase(multiProxy,childProxy,childBroadphase);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (containingBroadphaseIndex>=0)
|
||||||
|
{
|
||||||
|
//remove
|
||||||
|
btBridgeProxy* bridgeProxy = multiProxy->m_bridgeProxies[containingBroadphaseIndex];
|
||||||
|
|
||||||
|
btBroadphaseProxy* childProxy = bridgeProxy->m_childProxy;
|
||||||
|
bridgeProxy->m_childBroadphase->destroyProxy(childProxy,dispatcher);
|
||||||
|
|
||||||
|
multiProxy->m_bridgeProxies.swap( containingBroadphaseIndex,multiProxy->m_bridgeProxies.size()-1);
|
||||||
|
multiProxy->m_bridgeProxies.pop_back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///If we are in no other child broadphase, stick the proxy in the global 'simple' broadphase (brute force)
|
||||||
|
///hopefully we don't end up with many entries here (can assert/provide feedback on stats)
|
||||||
|
if (0)//!multiProxy->m_bridgeProxies.size())
|
||||||
|
{
|
||||||
|
///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision
|
||||||
|
///this is needed to be able to calculate the aabb overlap
|
||||||
|
btBroadphaseProxy* childProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
|
||||||
|
childProxy->m_multiSapParentProxy = multiProxy;
|
||||||
|
addToChildBroadphase(multiProxy,childProxy,m_simpleBroadphase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!multiProxy->m_bridgeProxies.size())
|
||||||
|
{
|
||||||
|
///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision
|
||||||
|
///this is needed to be able to calculate the aabb overlap
|
||||||
|
btBroadphaseProxy* childProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
|
||||||
|
childProxy->m_multiSapParentProxy = multiProxy;
|
||||||
|
addToChildBroadphase(multiProxy,childProxy,m_simpleBroadphase);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
//update
|
||||||
|
for ( i=0;i<multiProxy->m_bridgeProxies.size();i++)
|
||||||
|
{
|
||||||
|
btBridgeProxy* bridgeProxyRef = multiProxy->m_bridgeProxies[i];
|
||||||
|
bridgeProxyRef->m_childBroadphase->setAabb(bridgeProxyRef->m_childProxy,aabbMin,aabbMax,dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
bool stopUpdating=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class btMultiSapBroadphasePairSortPredicate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
bool operator() ( const btBroadphasePair& a1, const btBroadphasePair& b1 ) const
|
||||||
|
{
|
||||||
|
btMultiSapBroadphase::btMultiSapProxy* aProxy0 = a1.m_pProxy0 ? (btMultiSapBroadphase::btMultiSapProxy*)a1.m_pProxy0->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapBroadphase::btMultiSapProxy* aProxy1 = a1.m_pProxy1 ? (btMultiSapBroadphase::btMultiSapProxy*)a1.m_pProxy1->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapBroadphase::btMultiSapProxy* bProxy0 = b1.m_pProxy0 ? (btMultiSapBroadphase::btMultiSapProxy*)b1.m_pProxy0->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapBroadphase::btMultiSapProxy* bProxy1 = b1.m_pProxy1 ? (btMultiSapBroadphase::btMultiSapProxy*)b1.m_pProxy1->m_multiSapParentProxy : 0;
|
||||||
|
|
||||||
|
return aProxy0 > bProxy0 ||
|
||||||
|
(aProxy0 == bProxy0 && aProxy1 > bProxy1) ||
|
||||||
|
(aProxy0 == bProxy0 && aProxy1 == bProxy1 && a1.m_algorithm > b1.m_algorithm);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
|
||||||
|
void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
// m_simpleBroadphase->calculateOverlappingPairs(dispatcher);
|
||||||
|
|
||||||
|
if (!stopUpdating && getOverlappingPairCache()->hasDeferredRemoval())
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePairArray& overlappingPairArray = getOverlappingPairCache()->getOverlappingPairArray();
|
||||||
|
|
||||||
|
// quicksort(overlappingPairArray,0,overlappingPairArray.size());
|
||||||
|
|
||||||
|
overlappingPairArray.quickSort(btMultiSapBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
|
||||||
|
// overlappingPairArray.heapSort(btMultiSapBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
|
||||||
|
m_invalidPair = 0;
|
||||||
|
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
btBroadphasePair previousPair;
|
||||||
|
previousPair.m_pProxy0 = 0;
|
||||||
|
previousPair.m_pProxy1 = 0;
|
||||||
|
previousPair.m_algorithm = 0;
|
||||||
|
|
||||||
|
|
||||||
|
for (i=0;i<overlappingPairArray.size();i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePair& pair = overlappingPairArray[i];
|
||||||
|
|
||||||
|
btMultiSapProxy* aProxy0 = pair.m_pProxy0 ? (btMultiSapProxy*)pair.m_pProxy0->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapProxy* aProxy1 = pair.m_pProxy1 ? (btMultiSapProxy*)pair.m_pProxy1->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapProxy* bProxy0 = previousPair.m_pProxy0 ? (btMultiSapProxy*)previousPair.m_pProxy0->m_multiSapParentProxy : 0;
|
||||||
|
btMultiSapProxy* bProxy1 = previousPair.m_pProxy1 ? (btMultiSapProxy*)previousPair.m_pProxy1->m_multiSapParentProxy : 0;
|
||||||
|
|
||||||
|
bool isDuplicate = (aProxy0 == bProxy0) && (aProxy1 == bProxy1);
|
||||||
|
|
||||||
|
previousPair = pair;
|
||||||
|
|
||||||
|
bool needsRemoval = false;
|
||||||
|
|
||||||
|
if (!isDuplicate)
|
||||||
|
{
|
||||||
|
bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
|
||||||
|
|
||||||
|
if (hasOverlap)
|
||||||
|
{
|
||||||
|
needsRemoval = false;//callback->processOverlap(pair);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
needsRemoval = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//remove duplicate
|
||||||
|
needsRemoval = true;
|
||||||
|
//should have no algorithm
|
||||||
|
btAssert(!pair.m_algorithm);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needsRemoval)
|
||||||
|
{
|
||||||
|
getOverlappingPairCache()->cleanOverlappingPair(pair,dispatcher);
|
||||||
|
|
||||||
|
// m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
|
||||||
|
// m_overlappingPairArray.pop_back();
|
||||||
|
pair.m_pProxy0 = 0;
|
||||||
|
pair.m_pProxy1 = 0;
|
||||||
|
m_invalidPair++;
|
||||||
|
gOverlappingPairs--;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///if you don't like to skip the invalid pairs in the array, execute following code:
|
||||||
|
#define CLEAN_INVALID_PAIRS 1
|
||||||
|
#ifdef CLEAN_INVALID_PAIRS
|
||||||
|
|
||||||
|
//perform a sort, to sort 'invalid' pairs to the end
|
||||||
|
//overlappingPairArray.heapSort(btMultiSapBroadphasePairSortPredicate());
|
||||||
|
overlappingPairArray.quickSort(btMultiSapBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
|
||||||
|
m_invalidPair = 0;
|
||||||
|
#endif//CLEAN_INVALID_PAIRS
|
||||||
|
|
||||||
|
//printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool btMultiSapBroadphase::testAabbOverlap(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1)
|
||||||
|
{
|
||||||
|
btMultiSapProxy* multiSapProxy0 = (btMultiSapProxy*)childProxy0->m_multiSapParentProxy;
|
||||||
|
btMultiSapProxy* multiSapProxy1 = (btMultiSapProxy*)childProxy1->m_multiSapParentProxy;
|
||||||
|
|
||||||
|
return TestAabbAgainstAabb2(multiSapProxy0->m_aabbMin,multiSapProxy0->m_aabbMax,
|
||||||
|
multiSapProxy1->m_aabbMin,multiSapProxy1->m_aabbMax);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::printStats()
|
||||||
|
{
|
||||||
|
/* printf("---------------------------------\n");
|
||||||
|
|
||||||
|
printf("btMultiSapBroadphase.h\n");
|
||||||
|
printf("numHandles = %d\n",m_multiSapProxies.size());
|
||||||
|
//find broadphase that contain this multiProxy
|
||||||
|
int numChildBroadphases = getBroadphaseArray().size();
|
||||||
|
for (int i=0;i<numChildBroadphases;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphaseInterface* childBroadphase = getBroadphaseArray()[i];
|
||||||
|
childBroadphase->printStats();
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void btMultiSapBroadphase::resetPool(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
// not yet
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
#ifndef BT_MULTI_SAP_BROADPHASE
|
||||||
|
#define BT_MULTI_SAP_BROADPHASE
|
||||||
|
|
||||||
|
#include "btBroadphaseInterface.h"
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
#include "btOverlappingPairCache.h"
|
||||||
|
|
||||||
|
|
||||||
|
class btBroadphaseInterface;
|
||||||
|
class btSimpleBroadphase;
|
||||||
|
|
||||||
|
|
||||||
|
typedef btAlignedObjectArray<btBroadphaseInterface*> btSapBroadphaseArray;
|
||||||
|
|
||||||
|
///The btMultiSapBroadphase is a research project, not recommended to use in production. Use btAxisSweep3 or btDbvtBroadphase instead.
|
||||||
|
///The btMultiSapBroadphase is a broadphase that contains multiple SAP broadphases.
|
||||||
|
///The user can add SAP broadphases that cover the world. A btBroadphaseProxy can be in multiple child broadphases at the same time.
|
||||||
|
///A btQuantizedBvh acceleration structures finds overlapping SAPs for each btBroadphaseProxy.
|
||||||
|
///See http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=328
|
||||||
|
///and http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329
|
||||||
|
class btMultiSapBroadphase :public btBroadphaseInterface
|
||||||
|
{
|
||||||
|
btSapBroadphaseArray m_sapBroadphases;
|
||||||
|
|
||||||
|
btSimpleBroadphase* m_simpleBroadphase;
|
||||||
|
|
||||||
|
btOverlappingPairCache* m_overlappingPairs;
|
||||||
|
|
||||||
|
class btQuantizedBvh* m_optimizedAabbTree;
|
||||||
|
|
||||||
|
|
||||||
|
bool m_ownsPairCache;
|
||||||
|
|
||||||
|
btOverlapFilterCallback* m_filterCallback;
|
||||||
|
|
||||||
|
int m_invalidPair;
|
||||||
|
|
||||||
|
struct btBridgeProxy
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* m_childProxy;
|
||||||
|
btBroadphaseInterface* m_childBroadphase;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
struct btMultiSapProxy : public btBroadphaseProxy
|
||||||
|
{
|
||||||
|
|
||||||
|
///array with all the entries that this proxy belongs to
|
||||||
|
btAlignedObjectArray<btBridgeProxy*> m_bridgeProxies;
|
||||||
|
btVector3 m_aabbMin;
|
||||||
|
btVector3 m_aabbMax;
|
||||||
|
|
||||||
|
int m_shapeType;
|
||||||
|
|
||||||
|
/* void* m_userPtr;
|
||||||
|
short int m_collisionFilterGroup;
|
||||||
|
short int m_collisionFilterMask;
|
||||||
|
*/
|
||||||
|
btMultiSapProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask)
|
||||||
|
:btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask),
|
||||||
|
m_aabbMin(aabbMin),
|
||||||
|
m_aabbMax(aabbMax),
|
||||||
|
m_shapeType(shapeType)
|
||||||
|
{
|
||||||
|
m_multiSapParentProxy =this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
btAlignedObjectArray<btMultiSapProxy*> m_multiSapProxies;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btMultiSapBroadphase(int maxProxies = 16384,btOverlappingPairCache* pairCache=0);
|
||||||
|
|
||||||
|
|
||||||
|
btSapBroadphaseArray& getBroadphaseArray()
|
||||||
|
{
|
||||||
|
return m_sapBroadphases;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btSapBroadphaseArray& getBroadphaseArray() const
|
||||||
|
{
|
||||||
|
return m_sapBroadphases;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~btMultiSapBroadphase();
|
||||||
|
|
||||||
|
virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy);
|
||||||
|
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher);
|
||||||
|
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
|
||||||
|
|
||||||
|
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0));
|
||||||
|
|
||||||
|
void addToChildBroadphase(btMultiSapProxy* parentMultiSapProxy, btBroadphaseProxy* childProxy, btBroadphaseInterface* childBroadphase);
|
||||||
|
|
||||||
|
///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
|
||||||
|
virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
virtual btOverlappingPairCache* getOverlappingPairCache()
|
||||||
|
{
|
||||||
|
return m_overlappingPairs;
|
||||||
|
}
|
||||||
|
virtual const btOverlappingPairCache* getOverlappingPairCache() const
|
||||||
|
{
|
||||||
|
return m_overlappingPairs;
|
||||||
|
}
|
||||||
|
|
||||||
|
///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
|
||||||
|
///will add some transform later
|
||||||
|
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
|
||||||
|
{
|
||||||
|
aabbMin.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
|
||||||
|
aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void buildTree(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax);
|
||||||
|
|
||||||
|
virtual void printStats();
|
||||||
|
|
||||||
|
void quicksort (btBroadphasePairArray& a, int lo, int hi);
|
||||||
|
|
||||||
|
///reset broadphase internal structures, to ensure determinism/reproducability
|
||||||
|
virtual void resetPool(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_MULTI_SAP_BROADPHASE
|
|
@ -0,0 +1,633 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "btOverlappingPairCache.h"
|
||||||
|
|
||||||
|
#include "btDispatcher.h"
|
||||||
|
#include "btCollisionAlgorithm.h"
|
||||||
|
#include "LinearMath/btAabbUtil2.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int gOverlappingPairs = 0;
|
||||||
|
|
||||||
|
int gRemovePairs =0;
|
||||||
|
int gAddedPairs =0;
|
||||||
|
int gFindPairs =0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btHashedOverlappingPairCache::btHashedOverlappingPairCache():
|
||||||
|
m_overlapFilterCallback(0),
|
||||||
|
m_blockedForChanges(false),
|
||||||
|
m_ghostPairCallback(0)
|
||||||
|
{
|
||||||
|
int initialAllocatedSize= 2;
|
||||||
|
m_overlappingPairArray.reserve(initialAllocatedSize);
|
||||||
|
growTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btHashedOverlappingPairCache::~btHashedOverlappingPairCache()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
if (pair.m_algorithm && dispatcher)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
pair.m_algorithm->~btCollisionAlgorithm();
|
||||||
|
dispatcher->freeCollisionAlgorithm(pair.m_algorithm);
|
||||||
|
pair.m_algorithm=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
class CleanPairCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* m_cleanProxy;
|
||||||
|
btOverlappingPairCache* m_pairCache;
|
||||||
|
btDispatcher* m_dispatcher;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher)
|
||||||
|
:m_cleanProxy(cleanProxy),
|
||||||
|
m_pairCache(pairCache),
|
||||||
|
m_dispatcher(dispatcher)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
if ((pair.m_pProxy0 == m_cleanProxy) ||
|
||||||
|
(pair.m_pProxy1 == m_cleanProxy))
|
||||||
|
{
|
||||||
|
m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
CleanPairCallback cleanPairs(proxy,this,dispatcher);
|
||||||
|
|
||||||
|
processAllOverlappingPairs(&cleanPairs,dispatcher);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
class RemovePairCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* m_obsoleteProxy;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RemovePairCallback(btBroadphaseProxy* obsoleteProxy)
|
||||||
|
:m_obsoleteProxy(obsoleteProxy)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
return ((pair.m_pProxy0 == m_obsoleteProxy) ||
|
||||||
|
(pair.m_pProxy1 == m_obsoleteProxy));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
RemovePairCallback removeCallback(proxy);
|
||||||
|
|
||||||
|
processAllOverlappingPairs(&removeCallback,dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair* btHashedOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
gFindPairs++;
|
||||||
|
if(proxy0->m_uniqueId>proxy1->m_uniqueId)
|
||||||
|
btSwap(proxy0,proxy1);
|
||||||
|
int proxyId1 = proxy0->getUid();
|
||||||
|
int proxyId2 = proxy1->getUid();
|
||||||
|
|
||||||
|
/*if (proxyId1 > proxyId2)
|
||||||
|
btSwap(proxyId1, proxyId2);*/
|
||||||
|
|
||||||
|
int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1), static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
|
||||||
|
|
||||||
|
if (hash >= m_hashTable.size())
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int index = m_hashTable[hash];
|
||||||
|
while (index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
|
||||||
|
{
|
||||||
|
index = m_next[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index == BT_NULL_PAIR)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
btAssert(index < m_overlappingPairArray.size());
|
||||||
|
|
||||||
|
return &m_overlappingPairArray[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
//#include <stdio.h>
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::growTables()
|
||||||
|
{
|
||||||
|
|
||||||
|
int newCapacity = m_overlappingPairArray.capacity();
|
||||||
|
|
||||||
|
if (m_hashTable.size() < newCapacity)
|
||||||
|
{
|
||||||
|
//grow hashtable and next table
|
||||||
|
int curHashtableSize = m_hashTable.size();
|
||||||
|
|
||||||
|
m_hashTable.resize(newCapacity);
|
||||||
|
m_next.resize(newCapacity);
|
||||||
|
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i= 0; i < newCapacity; ++i)
|
||||||
|
{
|
||||||
|
m_hashTable[i] = BT_NULL_PAIR;
|
||||||
|
}
|
||||||
|
for (i = 0; i < newCapacity; ++i)
|
||||||
|
{
|
||||||
|
m_next[i] = BT_NULL_PAIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0;i<curHashtableSize;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
const btBroadphasePair& pair = m_overlappingPairArray[i];
|
||||||
|
int proxyId1 = pair.m_pProxy0->getUid();
|
||||||
|
int proxyId2 = pair.m_pProxy1->getUid();
|
||||||
|
/*if (proxyId1 > proxyId2)
|
||||||
|
btSwap(proxyId1, proxyId2);*/
|
||||||
|
int hashValue = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
|
||||||
|
m_next[i] = m_hashTable[hashValue];
|
||||||
|
m_hashTable[hashValue] = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
if(proxy0->m_uniqueId>proxy1->m_uniqueId)
|
||||||
|
btSwap(proxy0,proxy1);
|
||||||
|
int proxyId1 = proxy0->getUid();
|
||||||
|
int proxyId2 = proxy1->getUid();
|
||||||
|
|
||||||
|
/*if (proxyId1 > proxyId2)
|
||||||
|
btSwap(proxyId1, proxyId2);*/
|
||||||
|
|
||||||
|
int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash);
|
||||||
|
if (pair != NULL)
|
||||||
|
{
|
||||||
|
return pair;
|
||||||
|
}
|
||||||
|
/*for(int i=0;i<m_overlappingPairArray.size();++i)
|
||||||
|
{
|
||||||
|
if( (m_overlappingPairArray[i].m_pProxy0==proxy0)&&
|
||||||
|
(m_overlappingPairArray[i].m_pProxy1==proxy1))
|
||||||
|
{
|
||||||
|
printf("Adding duplicated %u<>%u\r\n",proxyId1,proxyId2);
|
||||||
|
internalFindPair(proxy0, proxy1, hash);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
int count = m_overlappingPairArray.size();
|
||||||
|
int oldCapacity = m_overlappingPairArray.capacity();
|
||||||
|
void* mem = &m_overlappingPairArray.expandNonInitializing();
|
||||||
|
|
||||||
|
//this is where we add an actual pair, so also call the 'ghost'
|
||||||
|
if (m_ghostPairCallback)
|
||||||
|
m_ghostPairCallback->addOverlappingPair(proxy0,proxy1);
|
||||||
|
|
||||||
|
int newCapacity = m_overlappingPairArray.capacity();
|
||||||
|
|
||||||
|
if (oldCapacity < newCapacity)
|
||||||
|
{
|
||||||
|
growTables();
|
||||||
|
//hash with new capacity
|
||||||
|
hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
pair = new (mem) btBroadphasePair(*proxy0,*proxy1);
|
||||||
|
// pair->m_pProxy0 = proxy0;
|
||||||
|
// pair->m_pProxy1 = proxy1;
|
||||||
|
pair->m_algorithm = 0;
|
||||||
|
pair->m_internalTmpValue = 0;
|
||||||
|
|
||||||
|
|
||||||
|
m_next[count] = m_hashTable[hash];
|
||||||
|
m_hashTable[hash] = count;
|
||||||
|
|
||||||
|
return pair;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void* btHashedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
gRemovePairs++;
|
||||||
|
if(proxy0->m_uniqueId>proxy1->m_uniqueId)
|
||||||
|
btSwap(proxy0,proxy1);
|
||||||
|
int proxyId1 = proxy0->getUid();
|
||||||
|
int proxyId2 = proxy1->getUid();
|
||||||
|
|
||||||
|
/*if (proxyId1 > proxyId2)
|
||||||
|
btSwap(proxyId1, proxyId2);*/
|
||||||
|
|
||||||
|
int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
|
||||||
|
|
||||||
|
btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash);
|
||||||
|
if (pair == NULL)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanOverlappingPair(*pair,dispatcher);
|
||||||
|
|
||||||
|
void* userData = pair->m_internalInfo1;
|
||||||
|
|
||||||
|
btAssert(pair->m_pProxy0->getUid() == proxyId1);
|
||||||
|
btAssert(pair->m_pProxy1->getUid() == proxyId2);
|
||||||
|
|
||||||
|
int pairIndex = int(pair - &m_overlappingPairArray[0]);
|
||||||
|
btAssert(pairIndex < m_overlappingPairArray.size());
|
||||||
|
|
||||||
|
// Remove the pair from the hash table.
|
||||||
|
int index = m_hashTable[hash];
|
||||||
|
btAssert(index != BT_NULL_PAIR);
|
||||||
|
|
||||||
|
int previous = BT_NULL_PAIR;
|
||||||
|
while (index != pairIndex)
|
||||||
|
{
|
||||||
|
previous = index;
|
||||||
|
index = m_next[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previous != BT_NULL_PAIR)
|
||||||
|
{
|
||||||
|
btAssert(m_next[previous] == pairIndex);
|
||||||
|
m_next[previous] = m_next[pairIndex];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_hashTable[hash] = m_next[pairIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
// We now move the last pair into spot of the
|
||||||
|
// pair being removed. We need to fix the hash
|
||||||
|
// table indices to support the move.
|
||||||
|
|
||||||
|
int lastPairIndex = m_overlappingPairArray.size() - 1;
|
||||||
|
|
||||||
|
if (m_ghostPairCallback)
|
||||||
|
m_ghostPairCallback->removeOverlappingPair(proxy0, proxy1,dispatcher);
|
||||||
|
|
||||||
|
// If the removed pair is the last pair, we are done.
|
||||||
|
if (lastPairIndex == pairIndex)
|
||||||
|
{
|
||||||
|
m_overlappingPairArray.pop_back();
|
||||||
|
return userData;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the last pair from the hash table.
|
||||||
|
const btBroadphasePair* last = &m_overlappingPairArray[lastPairIndex];
|
||||||
|
/* missing swap here too, Nat. */
|
||||||
|
int lastHash = static_cast<int>(getHash(static_cast<unsigned int>(last->m_pProxy0->getUid()), static_cast<unsigned int>(last->m_pProxy1->getUid())) & (m_overlappingPairArray.capacity()-1));
|
||||||
|
|
||||||
|
index = m_hashTable[lastHash];
|
||||||
|
btAssert(index != BT_NULL_PAIR);
|
||||||
|
|
||||||
|
previous = BT_NULL_PAIR;
|
||||||
|
while (index != lastPairIndex)
|
||||||
|
{
|
||||||
|
previous = index;
|
||||||
|
index = m_next[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previous != BT_NULL_PAIR)
|
||||||
|
{
|
||||||
|
btAssert(m_next[previous] == lastPairIndex);
|
||||||
|
m_next[previous] = m_next[lastPairIndex];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_hashTable[lastHash] = m_next[lastPairIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the last pair into the remove pair's spot.
|
||||||
|
m_overlappingPairArray[pairIndex] = m_overlappingPairArray[lastPairIndex];
|
||||||
|
|
||||||
|
// Insert the last pair into the hash table
|
||||||
|
m_next[pairIndex] = m_hashTable[lastHash];
|
||||||
|
m_hashTable[lastHash] = pairIndex;
|
||||||
|
|
||||||
|
m_overlappingPairArray.pop_back();
|
||||||
|
|
||||||
|
return userData;
|
||||||
|
}
|
||||||
|
//#include <stdio.h>
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// printf("m_overlappingPairArray.size()=%d\n",m_overlappingPairArray.size());
|
||||||
|
for (i=0;i<m_overlappingPairArray.size();)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePair* pair = &m_overlappingPairArray[i];
|
||||||
|
if (callback->processOverlap(*pair))
|
||||||
|
{
|
||||||
|
removeOverlappingPair(pair->m_pProxy0,pair->m_pProxy1,dispatcher);
|
||||||
|
|
||||||
|
gOverlappingPairs--;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void btHashedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
///need to keep hashmap in sync with pair address, so rebuild all
|
||||||
|
btBroadphasePairArray tmpPairs;
|
||||||
|
int i;
|
||||||
|
for (i=0;i<m_overlappingPairArray.size();i++)
|
||||||
|
{
|
||||||
|
tmpPairs.push_back(m_overlappingPairArray[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0;i<tmpPairs.size();i++)
|
||||||
|
{
|
||||||
|
removeOverlappingPair(tmpPairs[i].m_pProxy0,tmpPairs[i].m_pProxy1,dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < m_next.size(); i++)
|
||||||
|
{
|
||||||
|
m_next[i] = BT_NULL_PAIR;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpPairs.quickSort(btBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
for (i=0;i<tmpPairs.size();i++)
|
||||||
|
{
|
||||||
|
addOverlappingPair(tmpPairs[i].m_pProxy0,tmpPairs[i].m_pProxy1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void* btSortedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1, btDispatcher* dispatcher )
|
||||||
|
{
|
||||||
|
if (!hasDeferredRemoval())
|
||||||
|
{
|
||||||
|
btBroadphasePair findPair(*proxy0,*proxy1);
|
||||||
|
|
||||||
|
int findIndex = m_overlappingPairArray.findLinearSearch(findPair);
|
||||||
|
if (findIndex < m_overlappingPairArray.size())
|
||||||
|
{
|
||||||
|
gOverlappingPairs--;
|
||||||
|
btBroadphasePair& pair = m_overlappingPairArray[findIndex];
|
||||||
|
void* userData = pair.m_internalInfo1;
|
||||||
|
cleanOverlappingPair(pair,dispatcher);
|
||||||
|
if (m_ghostPairCallback)
|
||||||
|
m_ghostPairCallback->removeOverlappingPair(proxy0, proxy1,dispatcher);
|
||||||
|
|
||||||
|
m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1);
|
||||||
|
m_overlappingPairArray.pop_back();
|
||||||
|
return userData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair* btSortedOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
//don't add overlap with own
|
||||||
|
btAssert(proxy0 != proxy1);
|
||||||
|
|
||||||
|
if (!needsBroadphaseCollision(proxy0,proxy1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
void* mem = &m_overlappingPairArray.expandNonInitializing();
|
||||||
|
btBroadphasePair* pair = new (mem) btBroadphasePair(*proxy0,*proxy1);
|
||||||
|
|
||||||
|
gOverlappingPairs++;
|
||||||
|
gAddedPairs++;
|
||||||
|
|
||||||
|
if (m_ghostPairCallback)
|
||||||
|
m_ghostPairCallback->addOverlappingPair(proxy0, proxy1);
|
||||||
|
return pair;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///this findPair becomes really slow. Either sort the list to speedup the query, or
|
||||||
|
///use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed.
|
||||||
|
///we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address)
|
||||||
|
///Also we can use a 2D bitmap, which can be useful for a future GPU implementation
|
||||||
|
btBroadphasePair* btSortedOverlappingPairCache::findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
if (!needsBroadphaseCollision(proxy0,proxy1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
btBroadphasePair tmpPair(*proxy0,*proxy1);
|
||||||
|
int findIndex = m_overlappingPairArray.findLinearSearch(tmpPair);
|
||||||
|
|
||||||
|
if (findIndex < m_overlappingPairArray.size())
|
||||||
|
{
|
||||||
|
//btAssert(it != m_overlappingPairSet.end());
|
||||||
|
btBroadphasePair* pair = &m_overlappingPairArray[findIndex];
|
||||||
|
return pair;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//#include <stdio.h>
|
||||||
|
|
||||||
|
void btSortedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0;i<m_overlappingPairArray.size();)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePair* pair = &m_overlappingPairArray[i];
|
||||||
|
if (callback->processOverlap(*pair))
|
||||||
|
{
|
||||||
|
cleanOverlappingPair(*pair,dispatcher);
|
||||||
|
pair->m_pProxy0 = 0;
|
||||||
|
pair->m_pProxy1 = 0;
|
||||||
|
m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
|
||||||
|
m_overlappingPairArray.pop_back();
|
||||||
|
gOverlappingPairs--;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btSortedOverlappingPairCache::btSortedOverlappingPairCache():
|
||||||
|
m_blockedForChanges(false),
|
||||||
|
m_hasDeferredRemoval(true),
|
||||||
|
m_overlapFilterCallback(0),
|
||||||
|
m_ghostPairCallback(0)
|
||||||
|
{
|
||||||
|
int initialAllocatedSize= 2;
|
||||||
|
m_overlappingPairArray.reserve(initialAllocatedSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
btSortedOverlappingPairCache::~btSortedOverlappingPairCache()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSortedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
if (pair.m_algorithm)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
pair.m_algorithm->~btCollisionAlgorithm();
|
||||||
|
dispatcher->freeCollisionAlgorithm(pair.m_algorithm);
|
||||||
|
pair.m_algorithm=0;
|
||||||
|
gRemovePairs--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btSortedOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
class CleanPairCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* m_cleanProxy;
|
||||||
|
btOverlappingPairCache* m_pairCache;
|
||||||
|
btDispatcher* m_dispatcher;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher)
|
||||||
|
:m_cleanProxy(cleanProxy),
|
||||||
|
m_pairCache(pairCache),
|
||||||
|
m_dispatcher(dispatcher)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
if ((pair.m_pProxy0 == m_cleanProxy) ||
|
||||||
|
(pair.m_pProxy1 == m_cleanProxy))
|
||||||
|
{
|
||||||
|
m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
CleanPairCallback cleanPairs(proxy,this,dispatcher);
|
||||||
|
|
||||||
|
processAllOverlappingPairs(&cleanPairs,dispatcher);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btSortedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
class RemovePairCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
btBroadphaseProxy* m_obsoleteProxy;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RemovePairCallback(btBroadphaseProxy* obsoleteProxy)
|
||||||
|
:m_obsoleteProxy(obsoleteProxy)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
return ((pair.m_pProxy0 == m_obsoleteProxy) ||
|
||||||
|
(pair.m_pProxy1 == m_obsoleteProxy));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
RemovePairCallback removeCallback(proxy);
|
||||||
|
|
||||||
|
processAllOverlappingPairs(&removeCallback,dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSortedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
//should already be sorted
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,470 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_OVERLAPPING_PAIR_CACHE_H
|
||||||
|
#define BT_OVERLAPPING_PAIR_CACHE_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "btBroadphaseInterface.h"
|
||||||
|
#include "btBroadphaseProxy.h"
|
||||||
|
#include "btOverlappingPairCallback.h"
|
||||||
|
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
class btDispatcher;
|
||||||
|
|
||||||
|
typedef btAlignedObjectArray<btBroadphasePair> btBroadphasePairArray;
|
||||||
|
|
||||||
|
struct btOverlapCallback
|
||||||
|
{
|
||||||
|
virtual ~btOverlapCallback()
|
||||||
|
{}
|
||||||
|
//return true for deletion of the pair
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair) = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct btOverlapFilterCallback
|
||||||
|
{
|
||||||
|
virtual ~btOverlapFilterCallback()
|
||||||
|
{}
|
||||||
|
// return true when pairs need collision
|
||||||
|
virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern int gRemovePairs;
|
||||||
|
extern int gAddedPairs;
|
||||||
|
extern int gFindPairs;
|
||||||
|
|
||||||
|
const int BT_NULL_PAIR=0xffffffff;
|
||||||
|
|
||||||
|
///The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
|
||||||
|
///The btHashedOverlappingPairCache and btSortedOverlappingPairCache classes are two implementations.
|
||||||
|
class btOverlappingPairCache : public btOverlappingPairCallback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~btOverlappingPairCache() {} // this is needed so we can get to the derived class destructor
|
||||||
|
|
||||||
|
virtual btBroadphasePair* getOverlappingPairArrayPtr() = 0;
|
||||||
|
|
||||||
|
virtual const btBroadphasePair* getOverlappingPairArrayPtr() const = 0;
|
||||||
|
|
||||||
|
virtual btBroadphasePairArray& getOverlappingPairArray() = 0;
|
||||||
|
|
||||||
|
virtual void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
virtual int getNumOverlappingPairs() const = 0;
|
||||||
|
|
||||||
|
virtual void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
virtual void setOverlapFilterCallback(btOverlapFilterCallback* callback) = 0;
|
||||||
|
|
||||||
|
virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
virtual btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) = 0;
|
||||||
|
|
||||||
|
virtual bool hasDeferredRemoval() = 0;
|
||||||
|
|
||||||
|
virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)=0;
|
||||||
|
|
||||||
|
virtual void sortOverlappingPairs(btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com
|
||||||
|
class btHashedOverlappingPairCache : public btOverlappingPairCache
|
||||||
|
{
|
||||||
|
btBroadphasePairArray m_overlappingPairArray;
|
||||||
|
btOverlapFilterCallback* m_overlapFilterCallback;
|
||||||
|
bool m_blockedForChanges;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
btAlignedObjectArray<int> m_hashTable;
|
||||||
|
btAlignedObjectArray<int> m_next;
|
||||||
|
btOverlappingPairCallback* m_ghostPairCallback;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
btHashedOverlappingPairCache();
|
||||||
|
virtual ~btHashedOverlappingPairCache();
|
||||||
|
|
||||||
|
|
||||||
|
void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
|
||||||
|
{
|
||||||
|
if (m_overlapFilterCallback)
|
||||||
|
return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
|
||||||
|
|
||||||
|
bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
|
||||||
|
collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
|
||||||
|
|
||||||
|
return collides;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a pair and return the new pair. If the pair already exists,
|
||||||
|
// no new pair is created and the old one is returned.
|
||||||
|
virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
gAddedPairs++;
|
||||||
|
|
||||||
|
if (!needsBroadphaseCollision(proxy0,proxy1))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return internalAddPair(proxy0,proxy1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
virtual btBroadphasePair* getOverlappingPairArrayPtr()
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const btBroadphasePair* getOverlappingPairArrayPtr() const
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphasePairArray& getOverlappingPairArray()
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btBroadphasePairArray& getOverlappingPairArray() const
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
int GetCount() const { return m_overlappingPairArray.size(); }
|
||||||
|
// btBroadphasePair* GetPairs() { return m_pairs; }
|
||||||
|
|
||||||
|
btOverlapFilterCallback* getOverlapFilterCallback()
|
||||||
|
{
|
||||||
|
return m_overlapFilterCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOverlapFilterCallback(btOverlapFilterCallback* callback)
|
||||||
|
{
|
||||||
|
m_overlapFilterCallback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getNumOverlappingPairs() const
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray.size();
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
|
||||||
|
btBroadphasePair* internalAddPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
void growTables();
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool equalsPair(const btBroadphasePair& pair, int proxyId1, int proxyId2)
|
||||||
|
{
|
||||||
|
return pair.m_pProxy0->getUid() == proxyId1 && pair.m_pProxy1->getUid() == proxyId2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Thomas Wang's hash, see: http://www.concentric.net/~Ttwang/tech/inthash.htm
|
||||||
|
// This assumes proxyId1 and proxyId2 are 16-bit.
|
||||||
|
SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2)
|
||||||
|
{
|
||||||
|
int key = (proxyId2 << 16) | proxyId1;
|
||||||
|
key = ~key + (key << 15);
|
||||||
|
key = key ^ (key >> 12);
|
||||||
|
key = key + (key << 2);
|
||||||
|
key = key ^ (key >> 4);
|
||||||
|
key = key * 2057;
|
||||||
|
key = key ^ (key >> 16);
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
|
||||||
|
{
|
||||||
|
int key = static_cast<int>(((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16));
|
||||||
|
// Thomas Wang's hash
|
||||||
|
|
||||||
|
key += ~(key << 15);
|
||||||
|
key ^= (key >> 10);
|
||||||
|
key += (key << 3);
|
||||||
|
key ^= (key >> 6);
|
||||||
|
key += ~(key << 11);
|
||||||
|
key ^= (key >> 16);
|
||||||
|
return static_cast<unsigned int>(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE btBroadphasePair* internalFindPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, int hash)
|
||||||
|
{
|
||||||
|
int proxyId1 = proxy0->getUid();
|
||||||
|
int proxyId2 = proxy1->getUid();
|
||||||
|
#if 0 // wrong, 'equalsPair' use unsorted uids, copy-past devil striked again. Nat.
|
||||||
|
if (proxyId1 > proxyId2)
|
||||||
|
btSwap(proxyId1, proxyId2);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int index = m_hashTable[hash];
|
||||||
|
|
||||||
|
while( index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
|
||||||
|
{
|
||||||
|
index = m_next[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( index == BT_NULL_PAIR )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
btAssert(index < m_overlappingPairArray.size());
|
||||||
|
|
||||||
|
return &m_overlappingPairArray[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool hasDeferredRemoval()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
|
||||||
|
{
|
||||||
|
m_ghostPairCallback = ghostPairCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void sortOverlappingPairs(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///btSortedOverlappingPairCache maintains the objects with overlapping AABB
|
||||||
|
///Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase
|
||||||
|
class btSortedOverlappingPairCache : public btOverlappingPairCache
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
//avoid brute-force finding all the time
|
||||||
|
btBroadphasePairArray m_overlappingPairArray;
|
||||||
|
|
||||||
|
//during the dispatch, check that user doesn't destroy/create proxy
|
||||||
|
bool m_blockedForChanges;
|
||||||
|
|
||||||
|
///by default, do the removal during the pair traversal
|
||||||
|
bool m_hasDeferredRemoval;
|
||||||
|
|
||||||
|
//if set, use the callback instead of the built in filter in needBroadphaseCollision
|
||||||
|
btOverlapFilterCallback* m_overlapFilterCallback;
|
||||||
|
|
||||||
|
btOverlappingPairCallback* m_ghostPairCallback;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btSortedOverlappingPairCache();
|
||||||
|
virtual ~btSortedOverlappingPairCache();
|
||||||
|
|
||||||
|
virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
|
||||||
|
void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
|
||||||
|
{
|
||||||
|
if (m_overlapFilterCallback)
|
||||||
|
return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
|
||||||
|
|
||||||
|
bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
|
||||||
|
collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
|
||||||
|
|
||||||
|
return collides;
|
||||||
|
}
|
||||||
|
|
||||||
|
btBroadphasePairArray& getOverlappingPairArray()
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btBroadphasePairArray& getOverlappingPairArray() const
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair* getOverlappingPairArrayPtr()
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const btBroadphasePair* getOverlappingPairArrayPtr() const
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
int getNumOverlappingPairs() const
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
btOverlapFilterCallback* getOverlapFilterCallback()
|
||||||
|
{
|
||||||
|
return m_overlapFilterCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOverlapFilterCallback(btOverlapFilterCallback* callback)
|
||||||
|
{
|
||||||
|
m_overlapFilterCallback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool hasDeferredRemoval()
|
||||||
|
{
|
||||||
|
return m_hasDeferredRemoval;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
|
||||||
|
{
|
||||||
|
m_ghostPairCallback = ghostPairCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void sortOverlappingPairs(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///btNullPairCache skips add/removal of overlapping pairs. Userful for benchmarking and unit testing.
|
||||||
|
class btNullPairCache : public btOverlappingPairCache
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePairArray m_overlappingPairArray;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual btBroadphasePair* getOverlappingPairArrayPtr()
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
const btBroadphasePair* getOverlappingPairArrayPtr() const
|
||||||
|
{
|
||||||
|
return &m_overlappingPairArray[0];
|
||||||
|
}
|
||||||
|
btBroadphasePairArray& getOverlappingPairArray()
|
||||||
|
{
|
||||||
|
return m_overlappingPairArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void cleanOverlappingPair(btBroadphasePair& /*pair*/,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual int getNumOverlappingPairs() const
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void cleanProxyFromPairs(btBroadphaseProxy* /*proxy*/,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setOverlapFilterCallback(btOverlapFilterCallback* /*callback*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual btBroadphasePair* findPair(btBroadphaseProxy* /*proxy0*/, btBroadphaseProxy* /*proxy1*/)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool hasDeferredRemoval()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setInternalGhostPairCallback(btOverlappingPairCallback* /* ghostPairCallback */)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void* removeOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void sortOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
(void) dispatcher;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_OVERLAPPING_PAIR_CACHE_H
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OVERLAPPING_PAIR_CALLBACK_H
|
||||||
|
#define OVERLAPPING_PAIR_CALLBACK_H
|
||||||
|
|
||||||
|
class btDispatcher;
|
||||||
|
struct btBroadphasePair;
|
||||||
|
|
||||||
|
///The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
|
||||||
|
class btOverlappingPairCallback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~btOverlappingPairCallback()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0;
|
||||||
|
|
||||||
|
virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher) = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //OVERLAPPING_PAIR_CALLBACK_H
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,581 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_QUANTIZED_BVH_H
|
||||||
|
#define BT_QUANTIZED_BVH_H
|
||||||
|
|
||||||
|
class btSerializer;
|
||||||
|
|
||||||
|
//#define DEBUG_CHECK_DEQUANTIZATION 1
|
||||||
|
#ifdef DEBUG_CHECK_DEQUANTIZATION
|
||||||
|
#ifdef __SPU__
|
||||||
|
#define printf spu_printf
|
||||||
|
#endif //__SPU__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif //DEBUG_CHECK_DEQUANTIZATION
|
||||||
|
|
||||||
|
#include "LinearMath/btVector3.h"
|
||||||
|
#include "LinearMath/btAlignedAllocator.h"
|
||||||
|
|
||||||
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
|
#define btQuantizedBvhData btQuantizedBvhDoubleData
|
||||||
|
#define btOptimizedBvhNodeData btOptimizedBvhNodeDoubleData
|
||||||
|
#define btQuantizedBvhDataName "btQuantizedBvhDoubleData"
|
||||||
|
#else
|
||||||
|
#define btQuantizedBvhData btQuantizedBvhFloatData
|
||||||
|
#define btOptimizedBvhNodeData btOptimizedBvhNodeFloatData
|
||||||
|
#define btQuantizedBvhDataName "btQuantizedBvhFloatData"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrf__m128.asp
|
||||||
|
|
||||||
|
|
||||||
|
//Note: currently we have 16 bytes per quantized node
|
||||||
|
#define MAX_SUBTREE_SIZE_IN_BYTES 2048
|
||||||
|
|
||||||
|
// 10 gives the potential for 1024 parts, with at most 2^21 (2097152) (minus one
|
||||||
|
// actually) triangles each (since the sign bit is reserved
|
||||||
|
#define MAX_NUM_PARTS_IN_BITS 10
|
||||||
|
|
||||||
|
///btQuantizedBvhNode is a compressed aabb node, 16 bytes.
|
||||||
|
///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range).
|
||||||
|
ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode
|
||||||
|
{
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
//12 bytes
|
||||||
|
unsigned short int m_quantizedAabbMin[3];
|
||||||
|
unsigned short int m_quantizedAabbMax[3];
|
||||||
|
//4 bytes
|
||||||
|
int m_escapeIndexOrTriangleIndex;
|
||||||
|
|
||||||
|
bool isLeafNode() const
|
||||||
|
{
|
||||||
|
//skipindex is negative (internal node), triangleindex >=0 (leafnode)
|
||||||
|
return (m_escapeIndexOrTriangleIndex >= 0);
|
||||||
|
}
|
||||||
|
int getEscapeIndex() const
|
||||||
|
{
|
||||||
|
btAssert(!isLeafNode());
|
||||||
|
return -m_escapeIndexOrTriangleIndex;
|
||||||
|
}
|
||||||
|
int getTriangleIndex() const
|
||||||
|
{
|
||||||
|
btAssert(isLeafNode());
|
||||||
|
unsigned int x=0;
|
||||||
|
unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
|
||||||
|
// Get only the lower bits where the triangle index is stored
|
||||||
|
return (m_escapeIndexOrTriangleIndex&~(y));
|
||||||
|
}
|
||||||
|
int getPartId() const
|
||||||
|
{
|
||||||
|
btAssert(isLeafNode());
|
||||||
|
// Get only the highest bits where the part index is stored
|
||||||
|
return (m_escapeIndexOrTriangleIndex>>(31-MAX_NUM_PARTS_IN_BITS));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
/// btOptimizedBvhNode contains both internal and leaf node information.
|
||||||
|
/// Total node size is 44 bytes / node. You can use the compressed version of 16 bytes.
|
||||||
|
ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode
|
||||||
|
{
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
//32 bytes
|
||||||
|
btVector3 m_aabbMinOrg;
|
||||||
|
btVector3 m_aabbMaxOrg;
|
||||||
|
|
||||||
|
//4
|
||||||
|
int m_escapeIndex;
|
||||||
|
|
||||||
|
//8
|
||||||
|
//for child nodes
|
||||||
|
int m_subPart;
|
||||||
|
int m_triangleIndex;
|
||||||
|
|
||||||
|
//pad the size to 64 bytes
|
||||||
|
char m_padding[20];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///btBvhSubtreeInfo provides info to gather a subtree of limited size
|
||||||
|
ATTRIBUTE_ALIGNED16(class) btBvhSubtreeInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
//12 bytes
|
||||||
|
unsigned short int m_quantizedAabbMin[3];
|
||||||
|
unsigned short int m_quantizedAabbMax[3];
|
||||||
|
//4 bytes, points to the root of the subtree
|
||||||
|
int m_rootNodeIndex;
|
||||||
|
//4 bytes
|
||||||
|
int m_subtreeSize;
|
||||||
|
int m_padding[3];
|
||||||
|
|
||||||
|
btBvhSubtreeInfo()
|
||||||
|
{
|
||||||
|
//memset(&m_padding[0], 0, sizeof(m_padding));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setAabbFromQuantizeNode(const btQuantizedBvhNode& quantizedNode)
|
||||||
|
{
|
||||||
|
m_quantizedAabbMin[0] = quantizedNode.m_quantizedAabbMin[0];
|
||||||
|
m_quantizedAabbMin[1] = quantizedNode.m_quantizedAabbMin[1];
|
||||||
|
m_quantizedAabbMin[2] = quantizedNode.m_quantizedAabbMin[2];
|
||||||
|
m_quantizedAabbMax[0] = quantizedNode.m_quantizedAabbMax[0];
|
||||||
|
m_quantizedAabbMax[1] = quantizedNode.m_quantizedAabbMax[1];
|
||||||
|
m_quantizedAabbMax[2] = quantizedNode.m_quantizedAabbMax[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
class btNodeOverlapCallback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~btNodeOverlapCallback() {};
|
||||||
|
|
||||||
|
virtual void processNode(int subPart, int triangleIndex) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "LinearMath/btAlignedAllocator.h"
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///for code readability:
|
||||||
|
typedef btAlignedObjectArray<btOptimizedBvhNode> NodeArray;
|
||||||
|
typedef btAlignedObjectArray<btQuantizedBvhNode> QuantizedNodeArray;
|
||||||
|
typedef btAlignedObjectArray<btBvhSubtreeInfo> BvhSubtreeInfoArray;
|
||||||
|
|
||||||
|
|
||||||
|
///The btQuantizedBvh class stores an AABB tree that can be quickly traversed on CPU and Cell SPU.
|
||||||
|
///It is used by the btBvhTriangleMeshShape as midphase, and by the btMultiSapBroadphase.
|
||||||
|
///It is recommended to use quantization for better performance and lower memory requirements.
|
||||||
|
ATTRIBUTE_ALIGNED16(class) btQuantizedBvh
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum btTraversalMode
|
||||||
|
{
|
||||||
|
TRAVERSAL_STACKLESS = 0,
|
||||||
|
TRAVERSAL_STACKLESS_CACHE_FRIENDLY,
|
||||||
|
TRAVERSAL_RECURSIVE
|
||||||
|
};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
btVector3 m_bvhAabbMin;
|
||||||
|
btVector3 m_bvhAabbMax;
|
||||||
|
btVector3 m_bvhQuantization;
|
||||||
|
|
||||||
|
int m_bulletVersion; //for serialization versioning. It could also be used to detect endianess.
|
||||||
|
|
||||||
|
int m_curNodeIndex;
|
||||||
|
//quantization data
|
||||||
|
bool m_useQuantization;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NodeArray m_leafNodes;
|
||||||
|
NodeArray m_contiguousNodes;
|
||||||
|
QuantizedNodeArray m_quantizedLeafNodes;
|
||||||
|
QuantizedNodeArray m_quantizedContiguousNodes;
|
||||||
|
|
||||||
|
btTraversalMode m_traversalMode;
|
||||||
|
BvhSubtreeInfoArray m_SubtreeHeaders;
|
||||||
|
|
||||||
|
//This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray
|
||||||
|
mutable int m_subtreeHeaderCount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!)
|
||||||
|
///this might be refactored into a virtual, it is usually not calculated at run-time
|
||||||
|
void setInternalNodeAabbMin(int nodeIndex, const btVector3& aabbMin)
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
quantize(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] ,aabbMin,0);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
m_contiguousNodes[nodeIndex].m_aabbMinOrg = aabbMin;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void setInternalNodeAabbMax(int nodeIndex,const btVector3& aabbMax)
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
quantize(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0],aabbMax,1);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
m_contiguousNodes[nodeIndex].m_aabbMaxOrg = aabbMax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btVector3 getAabbMin(int nodeIndex) const
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMin[0]);
|
||||||
|
}
|
||||||
|
//non-quantized
|
||||||
|
return m_leafNodes[nodeIndex].m_aabbMinOrg;
|
||||||
|
|
||||||
|
}
|
||||||
|
btVector3 getAabbMax(int nodeIndex) const
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMax[0]);
|
||||||
|
}
|
||||||
|
//non-quantized
|
||||||
|
return m_leafNodes[nodeIndex].m_aabbMaxOrg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setInternalNodeEscapeIndex(int nodeIndex, int escapeIndex)
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = -escapeIndex;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_contiguousNodes[nodeIndex].m_escapeIndex = escapeIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void mergeInternalNodeAabb(int nodeIndex,const btVector3& newAabbMin,const btVector3& newAabbMax)
|
||||||
|
{
|
||||||
|
if (m_useQuantization)
|
||||||
|
{
|
||||||
|
unsigned short int quantizedAabbMin[3];
|
||||||
|
unsigned short int quantizedAabbMax[3];
|
||||||
|
quantize(quantizedAabbMin,newAabbMin,0);
|
||||||
|
quantize(quantizedAabbMax,newAabbMax,1);
|
||||||
|
for (int i=0;i<3;i++)
|
||||||
|
{
|
||||||
|
if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] > quantizedAabbMin[i])
|
||||||
|
m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] = quantizedAabbMin[i];
|
||||||
|
|
||||||
|
if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] < quantizedAabbMax[i])
|
||||||
|
m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] = quantizedAabbMax[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//non-quantized
|
||||||
|
m_contiguousNodes[nodeIndex].m_aabbMinOrg.setMin(newAabbMin);
|
||||||
|
m_contiguousNodes[nodeIndex].m_aabbMaxOrg.setMax(newAabbMax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void swapLeafNodes(int firstIndex,int secondIndex);
|
||||||
|
|
||||||
|
void assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void buildTree (int startIndex,int endIndex);
|
||||||
|
|
||||||
|
int calcSplittingAxis(int startIndex,int endIndex);
|
||||||
|
|
||||||
|
int sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis);
|
||||||
|
|
||||||
|
void walkStacklessTree(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const;
|
||||||
|
|
||||||
|
void walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const;
|
||||||
|
void walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const;
|
||||||
|
void walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const;
|
||||||
|
|
||||||
|
///tree traversal designed for small-memory processors like PS3 SPU
|
||||||
|
void walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const;
|
||||||
|
|
||||||
|
///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal
|
||||||
|
void walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const;
|
||||||
|
|
||||||
|
///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal
|
||||||
|
void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
btQuantizedBvh();
|
||||||
|
|
||||||
|
virtual ~btQuantizedBvh();
|
||||||
|
|
||||||
|
|
||||||
|
///***************************************** expert/internal use only *************************
|
||||||
|
void setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin=btScalar(1.0));
|
||||||
|
QuantizedNodeArray& getLeafNodeArray() { return m_quantizedLeafNodes; }
|
||||||
|
///buildInternal is expert use only: assumes that setQuantizationValues and LeafNodeArray are initialized
|
||||||
|
void buildInternal();
|
||||||
|
///***************************************** expert/internal use only *************************
|
||||||
|
|
||||||
|
void reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const;
|
||||||
|
void reportRayOverlappingNodex (btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget) const;
|
||||||
|
void reportBoxCastOverlappingNodex(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin,const btVector3& aabbMax) const;
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE void quantize(unsigned short* out, const btVector3& point,int isMax) const
|
||||||
|
{
|
||||||
|
|
||||||
|
btAssert(m_useQuantization);
|
||||||
|
|
||||||
|
btAssert(point.getX() <= m_bvhAabbMax.getX());
|
||||||
|
btAssert(point.getY() <= m_bvhAabbMax.getY());
|
||||||
|
btAssert(point.getZ() <= m_bvhAabbMax.getZ());
|
||||||
|
|
||||||
|
btAssert(point.getX() >= m_bvhAabbMin.getX());
|
||||||
|
btAssert(point.getY() >= m_bvhAabbMin.getY());
|
||||||
|
btAssert(point.getZ() >= m_bvhAabbMin.getZ());
|
||||||
|
|
||||||
|
btVector3 v = (point - m_bvhAabbMin) * m_bvhQuantization;
|
||||||
|
///Make sure rounding is done in a way that unQuantize(quantizeWithClamp(...)) is conservative
|
||||||
|
///end-points always set the first bit, so that they are sorted properly (so that neighbouring AABBs overlap properly)
|
||||||
|
///@todo: double-check this
|
||||||
|
if (isMax)
|
||||||
|
{
|
||||||
|
out[0] = (unsigned short) (((unsigned short)(v.getX()+btScalar(1.)) | 1));
|
||||||
|
out[1] = (unsigned short) (((unsigned short)(v.getY()+btScalar(1.)) | 1));
|
||||||
|
out[2] = (unsigned short) (((unsigned short)(v.getZ()+btScalar(1.)) | 1));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
out[0] = (unsigned short) (((unsigned short)(v.getX()) & 0xfffe));
|
||||||
|
out[1] = (unsigned short) (((unsigned short)(v.getY()) & 0xfffe));
|
||||||
|
out[2] = (unsigned short) (((unsigned short)(v.getZ()) & 0xfffe));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG_CHECK_DEQUANTIZATION
|
||||||
|
btVector3 newPoint = unQuantize(out);
|
||||||
|
if (isMax)
|
||||||
|
{
|
||||||
|
if (newPoint.getX() < point.getX())
|
||||||
|
{
|
||||||
|
printf("unconservative X, diffX = %f, oldX=%f,newX=%f\n",newPoint.getX()-point.getX(), newPoint.getX(),point.getX());
|
||||||
|
}
|
||||||
|
if (newPoint.getY() < point.getY())
|
||||||
|
{
|
||||||
|
printf("unconservative Y, diffY = %f, oldY=%f,newY=%f\n",newPoint.getY()-point.getY(), newPoint.getY(),point.getY());
|
||||||
|
}
|
||||||
|
if (newPoint.getZ() < point.getZ())
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("unconservative Z, diffZ = %f, oldZ=%f,newZ=%f\n",newPoint.getZ()-point.getZ(), newPoint.getZ(),point.getZ());
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (newPoint.getX() > point.getX())
|
||||||
|
{
|
||||||
|
printf("unconservative X, diffX = %f, oldX=%f,newX=%f\n",newPoint.getX()-point.getX(), newPoint.getX(),point.getX());
|
||||||
|
}
|
||||||
|
if (newPoint.getY() > point.getY())
|
||||||
|
{
|
||||||
|
printf("unconservative Y, diffY = %f, oldY=%f,newY=%f\n",newPoint.getY()-point.getY(), newPoint.getY(),point.getY());
|
||||||
|
}
|
||||||
|
if (newPoint.getZ() > point.getZ())
|
||||||
|
{
|
||||||
|
printf("unconservative Z, diffZ = %f, oldZ=%f,newZ=%f\n",newPoint.getZ()-point.getZ(), newPoint.getZ(),point.getZ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif //DEBUG_CHECK_DEQUANTIZATION
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE void quantizeWithClamp(unsigned short* out, const btVector3& point2,int isMax) const
|
||||||
|
{
|
||||||
|
|
||||||
|
btAssert(m_useQuantization);
|
||||||
|
|
||||||
|
btVector3 clampedPoint(point2);
|
||||||
|
clampedPoint.setMax(m_bvhAabbMin);
|
||||||
|
clampedPoint.setMin(m_bvhAabbMax);
|
||||||
|
|
||||||
|
quantize(out,clampedPoint,isMax);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE btVector3 unQuantize(const unsigned short* vecIn) const
|
||||||
|
{
|
||||||
|
btVector3 vecOut;
|
||||||
|
vecOut.setValue(
|
||||||
|
(btScalar)(vecIn[0]) / (m_bvhQuantization.getX()),
|
||||||
|
(btScalar)(vecIn[1]) / (m_bvhQuantization.getY()),
|
||||||
|
(btScalar)(vecIn[2]) / (m_bvhQuantization.getZ()));
|
||||||
|
vecOut += m_bvhAabbMin;
|
||||||
|
return vecOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
///setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees.
|
||||||
|
void setTraversalMode(btTraversalMode traversalMode)
|
||||||
|
{
|
||||||
|
m_traversalMode = traversalMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE QuantizedNodeArray& getQuantizedNodeArray()
|
||||||
|
{
|
||||||
|
return m_quantizedContiguousNodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE BvhSubtreeInfoArray& getSubtreeInfoArray()
|
||||||
|
{
|
||||||
|
return m_SubtreeHeaders;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/////Calculate space needed to store BVH for serialization
|
||||||
|
unsigned calculateSerializeBufferSize() const;
|
||||||
|
|
||||||
|
/// Data buffer MUST be 16 byte aligned
|
||||||
|
virtual bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const;
|
||||||
|
|
||||||
|
///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
|
||||||
|
static btQuantizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian);
|
||||||
|
|
||||||
|
static unsigned int getAlignmentSerializationPadding();
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
virtual int calculateSerializeBufferSizeNew() const;
|
||||||
|
|
||||||
|
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||||
|
virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
|
||||||
|
|
||||||
|
virtual void deSerializeFloat(struct btQuantizedBvhFloatData& quantizedBvhFloatData);
|
||||||
|
|
||||||
|
virtual void deSerializeDouble(struct btQuantizedBvhDoubleData& quantizedBvhDoubleData);
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool isQuantized()
|
||||||
|
{
|
||||||
|
return m_useQuantization;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Special "copy" constructor that allows for in-place deserialization
|
||||||
|
// Prevents btVector3's default constructor from being called, but doesn't inialize much else
|
||||||
|
// ownsMemory should most likely be false if deserializing, and if you are not, don't call this (it also changes the function signature, which we need)
|
||||||
|
btQuantizedBvh(btQuantizedBvh &other, bool ownsMemory);
|
||||||
|
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
struct btBvhSubtreeInfoData
|
||||||
|
{
|
||||||
|
int m_rootNodeIndex;
|
||||||
|
int m_subtreeSize;
|
||||||
|
unsigned short m_quantizedAabbMin[3];
|
||||||
|
unsigned short m_quantizedAabbMax[3];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct btOptimizedBvhNodeFloatData
|
||||||
|
{
|
||||||
|
btVector3FloatData m_aabbMinOrg;
|
||||||
|
btVector3FloatData m_aabbMaxOrg;
|
||||||
|
int m_escapeIndex;
|
||||||
|
int m_subPart;
|
||||||
|
int m_triangleIndex;
|
||||||
|
char m_pad[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct btOptimizedBvhNodeDoubleData
|
||||||
|
{
|
||||||
|
btVector3DoubleData m_aabbMinOrg;
|
||||||
|
btVector3DoubleData m_aabbMaxOrg;
|
||||||
|
int m_escapeIndex;
|
||||||
|
int m_subPart;
|
||||||
|
int m_triangleIndex;
|
||||||
|
char m_pad[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct btQuantizedBvhNodeData
|
||||||
|
{
|
||||||
|
unsigned short m_quantizedAabbMin[3];
|
||||||
|
unsigned short m_quantizedAabbMax[3];
|
||||||
|
int m_escapeIndexOrTriangleIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct btQuantizedBvhFloatData
|
||||||
|
{
|
||||||
|
btVector3FloatData m_bvhAabbMin;
|
||||||
|
btVector3FloatData m_bvhAabbMax;
|
||||||
|
btVector3FloatData m_bvhQuantization;
|
||||||
|
int m_curNodeIndex;
|
||||||
|
int m_useQuantization;
|
||||||
|
int m_numContiguousLeafNodes;
|
||||||
|
int m_numQuantizedContiguousNodes;
|
||||||
|
btOptimizedBvhNodeFloatData *m_contiguousNodesPtr;
|
||||||
|
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||||
|
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||||
|
int m_traversalMode;
|
||||||
|
int m_numSubtreeHeaders;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct btQuantizedBvhDoubleData
|
||||||
|
{
|
||||||
|
btVector3DoubleData m_bvhAabbMin;
|
||||||
|
btVector3DoubleData m_bvhAabbMax;
|
||||||
|
btVector3DoubleData m_bvhQuantization;
|
||||||
|
int m_curNodeIndex;
|
||||||
|
int m_useQuantization;
|
||||||
|
int m_numContiguousLeafNodes;
|
||||||
|
int m_numQuantizedContiguousNodes;
|
||||||
|
btOptimizedBvhNodeDoubleData *m_contiguousNodesPtr;
|
||||||
|
btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
|
||||||
|
|
||||||
|
int m_traversalMode;
|
||||||
|
int m_numSubtreeHeaders;
|
||||||
|
btBvhSubtreeInfoData *m_subTreeInfoPtr;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int btQuantizedBvh::calculateSerializeBufferSizeNew() const
|
||||||
|
{
|
||||||
|
return sizeof(btQuantizedBvhData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_QUANTIZED_BVH_H
|
|
@ -0,0 +1,349 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btSimpleBroadphase.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
|
||||||
|
|
||||||
|
#include "LinearMath/btVector3.h"
|
||||||
|
#include "LinearMath/btTransform.h"
|
||||||
|
#include "LinearMath/btMatrix3x3.h"
|
||||||
|
#include "LinearMath/btAabbUtil2.h"
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
extern int gOverlappingPairs;
|
||||||
|
|
||||||
|
void btSimpleBroadphase::validate()
|
||||||
|
{
|
||||||
|
for (int i=0;i<m_numHandles;i++)
|
||||||
|
{
|
||||||
|
for (int j=i+1;j<m_numHandles;j++)
|
||||||
|
{
|
||||||
|
btAssert(&m_pHandles[i] != &m_pHandles[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
btSimpleBroadphase::btSimpleBroadphase(int maxProxies, btOverlappingPairCache* overlappingPairCache)
|
||||||
|
:m_pairCache(overlappingPairCache),
|
||||||
|
m_ownsPairCache(false),
|
||||||
|
m_invalidPair(0)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!overlappingPairCache)
|
||||||
|
{
|
||||||
|
void* mem = btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16);
|
||||||
|
m_pairCache = new (mem)btHashedOverlappingPairCache();
|
||||||
|
m_ownsPairCache = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// allocate handles buffer and put all handles on free list
|
||||||
|
m_pHandlesRawPtr = btAlignedAlloc(sizeof(btSimpleBroadphaseProxy)*maxProxies,16);
|
||||||
|
m_pHandles = new(m_pHandlesRawPtr) btSimpleBroadphaseProxy[maxProxies];
|
||||||
|
m_maxHandles = maxProxies;
|
||||||
|
m_numHandles = 0;
|
||||||
|
m_firstFreeHandle = 0;
|
||||||
|
m_LastHandleIndex = -1;
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
for (int i = m_firstFreeHandle; i < maxProxies; i++)
|
||||||
|
{
|
||||||
|
m_pHandles[i].SetNextFree(i + 1);
|
||||||
|
m_pHandles[i].m_uniqueId = i+2;//any UID will do, we just avoid too trivial values (0,1) for debugging purposes
|
||||||
|
}
|
||||||
|
m_pHandles[maxProxies - 1].SetNextFree(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
btSimpleBroadphase::~btSimpleBroadphase()
|
||||||
|
{
|
||||||
|
btAlignedFree(m_pHandlesRawPtr);
|
||||||
|
|
||||||
|
if (m_ownsPairCache)
|
||||||
|
{
|
||||||
|
m_pairCache->~btOverlappingPairCache();
|
||||||
|
btAlignedFree(m_pairCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* /*dispatcher*/,void* multiSapProxy)
|
||||||
|
{
|
||||||
|
if (m_numHandles >= m_maxHandles)
|
||||||
|
{
|
||||||
|
btAssert(0);
|
||||||
|
return 0; //should never happen, but don't let the game crash ;-)
|
||||||
|
}
|
||||||
|
btAssert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]);
|
||||||
|
|
||||||
|
int newHandleIndex = allocHandle();
|
||||||
|
btSimpleBroadphaseProxy* proxy = new (&m_pHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy);
|
||||||
|
|
||||||
|
return proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
class RemovingOverlapCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
(void)pair;
|
||||||
|
btAssert(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class RemovePairContainingProxy
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphaseProxy* m_targetProxy;
|
||||||
|
public:
|
||||||
|
virtual ~RemovePairContainingProxy()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy0);
|
||||||
|
btSimpleBroadphaseProxy* proxy1 = static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy1);
|
||||||
|
|
||||||
|
return ((m_targetProxy == proxy0 || m_targetProxy == proxy1));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
|
||||||
|
btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxyOrg);
|
||||||
|
freeHandle(proxy0);
|
||||||
|
|
||||||
|
m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg,dispatcher);
|
||||||
|
|
||||||
|
//validate();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSimpleBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
|
||||||
|
{
|
||||||
|
const btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy);
|
||||||
|
aabbMin = sbp->m_aabbMin;
|
||||||
|
aabbMax = sbp->m_aabbMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSimpleBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* /*dispatcher*/)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy);
|
||||||
|
sbp->m_aabbMin = aabbMin;
|
||||||
|
sbp->m_aabbMax = aabbMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSimpleBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax)
|
||||||
|
{
|
||||||
|
for (int i=0; i <= m_LastHandleIndex; i++)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy = &m_pHandles[i];
|
||||||
|
if(!proxy->m_clientObject)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
rayCallback.process(proxy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btSimpleBroadphase::aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback)
|
||||||
|
{
|
||||||
|
for (int i=0; i <= m_LastHandleIndex; i++)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy = &m_pHandles[i];
|
||||||
|
if(!proxy->m_clientObject)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (TestAabbAgainstAabb2(aabbMin,aabbMax,proxy->m_aabbMin,proxy->m_aabbMax))
|
||||||
|
{
|
||||||
|
callback.process(proxy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bool btSimpleBroadphase::aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
return proxy0->m_aabbMin[0] <= proxy1->m_aabbMax[0] && proxy1->m_aabbMin[0] <= proxy0->m_aabbMax[0] &&
|
||||||
|
proxy0->m_aabbMin[1] <= proxy1->m_aabbMax[1] && proxy1->m_aabbMin[1] <= proxy0->m_aabbMax[1] &&
|
||||||
|
proxy0->m_aabbMin[2] <= proxy1->m_aabbMax[2] && proxy1->m_aabbMin[2] <= proxy0->m_aabbMax[2];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//then remove non-overlapping ones
|
||||||
|
class CheckOverlapCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
return (!btSimpleBroadphase::aabbOverlap(static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy0),static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy1)));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
//first check for new overlapping pairs
|
||||||
|
int i,j;
|
||||||
|
if (m_numHandles >= 0)
|
||||||
|
{
|
||||||
|
int new_largest_index = -1;
|
||||||
|
for (i=0; i <= m_LastHandleIndex; i++)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy0 = &m_pHandles[i];
|
||||||
|
if(!proxy0->m_clientObject)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
new_largest_index = i;
|
||||||
|
for (j=i+1; j <= m_LastHandleIndex; j++)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy1 = &m_pHandles[j];
|
||||||
|
btAssert(proxy0 != proxy1);
|
||||||
|
if(!proxy1->m_clientObject)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0);
|
||||||
|
btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1);
|
||||||
|
|
||||||
|
if (aabbOverlap(p0,p1))
|
||||||
|
{
|
||||||
|
if ( !m_pairCache->findPair(proxy0,proxy1))
|
||||||
|
{
|
||||||
|
m_pairCache->addOverlappingPair(proxy0,proxy1);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (!m_pairCache->hasDeferredRemoval())
|
||||||
|
{
|
||||||
|
if ( m_pairCache->findPair(proxy0,proxy1))
|
||||||
|
{
|
||||||
|
m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_LastHandleIndex = new_largest_index;
|
||||||
|
|
||||||
|
if (m_ownsPairCache && m_pairCache->hasDeferredRemoval())
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray();
|
||||||
|
|
||||||
|
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
|
||||||
|
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
|
||||||
|
m_invalidPair = 0;
|
||||||
|
|
||||||
|
|
||||||
|
btBroadphasePair previousPair;
|
||||||
|
previousPair.m_pProxy0 = 0;
|
||||||
|
previousPair.m_pProxy1 = 0;
|
||||||
|
previousPair.m_algorithm = 0;
|
||||||
|
|
||||||
|
|
||||||
|
for (i=0;i<overlappingPairArray.size();i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
btBroadphasePair& pair = overlappingPairArray[i];
|
||||||
|
|
||||||
|
bool isDuplicate = (pair == previousPair);
|
||||||
|
|
||||||
|
previousPair = pair;
|
||||||
|
|
||||||
|
bool needsRemoval = false;
|
||||||
|
|
||||||
|
if (!isDuplicate)
|
||||||
|
{
|
||||||
|
bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
|
||||||
|
|
||||||
|
if (hasOverlap)
|
||||||
|
{
|
||||||
|
needsRemoval = false;//callback->processOverlap(pair);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
needsRemoval = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//remove duplicate
|
||||||
|
needsRemoval = true;
|
||||||
|
//should have no algorithm
|
||||||
|
btAssert(!pair.m_algorithm);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needsRemoval)
|
||||||
|
{
|
||||||
|
m_pairCache->cleanOverlappingPair(pair,dispatcher);
|
||||||
|
|
||||||
|
// m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
|
||||||
|
// m_overlappingPairArray.pop_back();
|
||||||
|
pair.m_pProxy0 = 0;
|
||||||
|
pair.m_pProxy1 = 0;
|
||||||
|
m_invalidPair++;
|
||||||
|
gOverlappingPairs--;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///if you don't like to skip the invalid pairs in the array, execute following code:
|
||||||
|
#define CLEAN_INVALID_PAIRS 1
|
||||||
|
#ifdef CLEAN_INVALID_PAIRS
|
||||||
|
|
||||||
|
//perform a sort, to sort 'invalid' pairs to the end
|
||||||
|
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
|
||||||
|
|
||||||
|
overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
|
||||||
|
m_invalidPair = 0;
|
||||||
|
#endif//CLEAN_INVALID_PAIRS
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool btSimpleBroadphase::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0);
|
||||||
|
btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1);
|
||||||
|
return aabbOverlap(p0,p1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void btSimpleBroadphase::resetPool(btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
//not yet
|
||||||
|
}
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_SIMPLE_BROADPHASE_H
|
||||||
|
#define BT_SIMPLE_BROADPHASE_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "btOverlappingPairCache.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct btSimpleBroadphaseProxy : public btBroadphaseProxy
|
||||||
|
{
|
||||||
|
int m_nextFree;
|
||||||
|
|
||||||
|
// int m_handleId;
|
||||||
|
|
||||||
|
|
||||||
|
btSimpleBroadphaseProxy() {};
|
||||||
|
|
||||||
|
btSimpleBroadphaseProxy(const btVector3& minpt,const btVector3& maxpt,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,void* multiSapProxy)
|
||||||
|
:btBroadphaseProxy(minpt,maxpt,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy)
|
||||||
|
{
|
||||||
|
(void)shapeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE void SetNextFree(int next) {m_nextFree = next;}
|
||||||
|
SIMD_FORCE_INLINE int GetNextFree() const {return m_nextFree;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
///The SimpleBroadphase is just a unit-test for btAxisSweep3, bt32BitAxisSweep3, or btDbvtBroadphase, so use those classes instead.
|
||||||
|
///It is a brute force aabb culling broadphase based on O(n^2) aabb checks
|
||||||
|
class btSimpleBroadphase : public btBroadphaseInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int m_numHandles; // number of active handles
|
||||||
|
int m_maxHandles; // max number of handles
|
||||||
|
int m_LastHandleIndex;
|
||||||
|
|
||||||
|
btSimpleBroadphaseProxy* m_pHandles; // handles pool
|
||||||
|
|
||||||
|
void* m_pHandlesRawPtr;
|
||||||
|
int m_firstFreeHandle; // free handles list
|
||||||
|
|
||||||
|
int allocHandle()
|
||||||
|
{
|
||||||
|
btAssert(m_numHandles < m_maxHandles);
|
||||||
|
int freeHandle = m_firstFreeHandle;
|
||||||
|
m_firstFreeHandle = m_pHandles[freeHandle].GetNextFree();
|
||||||
|
m_numHandles++;
|
||||||
|
if(freeHandle > m_LastHandleIndex)
|
||||||
|
{
|
||||||
|
m_LastHandleIndex = freeHandle;
|
||||||
|
}
|
||||||
|
return freeHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void freeHandle(btSimpleBroadphaseProxy* proxy)
|
||||||
|
{
|
||||||
|
int handle = int(proxy-m_pHandles);
|
||||||
|
btAssert(handle >= 0 && handle < m_maxHandles);
|
||||||
|
if(handle == m_LastHandleIndex)
|
||||||
|
{
|
||||||
|
m_LastHandleIndex--;
|
||||||
|
}
|
||||||
|
proxy->SetNextFree(m_firstFreeHandle);
|
||||||
|
m_firstFreeHandle = handle;
|
||||||
|
|
||||||
|
proxy->m_clientObject = 0;
|
||||||
|
|
||||||
|
m_numHandles--;
|
||||||
|
}
|
||||||
|
|
||||||
|
btOverlappingPairCache* m_pairCache;
|
||||||
|
bool m_ownsPairCache;
|
||||||
|
|
||||||
|
int m_invalidPair;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
inline btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy)
|
||||||
|
{
|
||||||
|
btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxy);
|
||||||
|
return proxy0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy) const
|
||||||
|
{
|
||||||
|
const btSimpleBroadphaseProxy* proxy0 = static_cast<const btSimpleBroadphaseProxy*>(proxy);
|
||||||
|
return proxy0;
|
||||||
|
}
|
||||||
|
|
||||||
|
///reset broadphase internal structures, to ensure determinism/reproducability
|
||||||
|
virtual void resetPool(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
|
||||||
|
void validate();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
btSimpleBroadphase(int maxProxies=16384,btOverlappingPairCache* overlappingPairCache=0);
|
||||||
|
virtual ~btSimpleBroadphase();
|
||||||
|
|
||||||
|
|
||||||
|
static bool aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
|
||||||
|
virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy);
|
||||||
|
|
||||||
|
virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
|
||||||
|
|
||||||
|
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
|
||||||
|
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher);
|
||||||
|
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
|
||||||
|
|
||||||
|
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0));
|
||||||
|
virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback);
|
||||||
|
|
||||||
|
btOverlappingPairCache* getOverlappingPairCache()
|
||||||
|
{
|
||||||
|
return m_pairCache;
|
||||||
|
}
|
||||||
|
const btOverlappingPairCache* getOverlappingPairCache() const
|
||||||
|
{
|
||||||
|
return m_pairCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
|
||||||
|
|
||||||
|
|
||||||
|
///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
|
||||||
|
///will add some transform later
|
||||||
|
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
|
||||||
|
{
|
||||||
|
aabbMin.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
|
||||||
|
aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void printStats()
|
||||||
|
{
|
||||||
|
// printf("btSimpleBroadphase.h\n");
|
||||||
|
// printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_maxHandles);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_SIMPLE_BROADPHASE_H
|
||||||
|
|
|
@ -0,0 +1,286 @@
|
||||||
|
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )
|
||||||
|
|
||||||
|
SET(BulletCollision_SRCS
|
||||||
|
BroadphaseCollision/btAxisSweep3.cpp
|
||||||
|
BroadphaseCollision/btBroadphaseProxy.cpp
|
||||||
|
BroadphaseCollision/btCollisionAlgorithm.cpp
|
||||||
|
BroadphaseCollision/btDbvt.cpp
|
||||||
|
BroadphaseCollision/btDbvtBroadphase.cpp
|
||||||
|
BroadphaseCollision/btDispatcher.cpp
|
||||||
|
BroadphaseCollision/btMultiSapBroadphase.cpp
|
||||||
|
BroadphaseCollision/btOverlappingPairCache.cpp
|
||||||
|
BroadphaseCollision/btQuantizedBvh.cpp
|
||||||
|
BroadphaseCollision/btSimpleBroadphase.cpp
|
||||||
|
CollisionDispatch/btActivatingCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btBoxBoxDetector.cpp
|
||||||
|
CollisionDispatch/btCollisionDispatcher.cpp
|
||||||
|
CollisionDispatch/btCollisionObject.cpp
|
||||||
|
CollisionDispatch/btCollisionWorld.cpp
|
||||||
|
CollisionDispatch/btCompoundCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btConvexConvexAlgorithm.cpp
|
||||||
|
CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
|
||||||
|
CollisionDispatch/btDefaultCollisionConfiguration.cpp
|
||||||
|
CollisionDispatch/btEmptyCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btGhostObject.cpp
|
||||||
|
CollisionDispatch/btHashedSimplePairCache.cpp
|
||||||
|
CollisionDispatch/btInternalEdgeUtility.cpp
|
||||||
|
CollisionDispatch/btInternalEdgeUtility.h
|
||||||
|
CollisionDispatch/btManifoldResult.cpp
|
||||||
|
CollisionDispatch/btSimulationIslandManager.cpp
|
||||||
|
CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/btUnionFind.cpp
|
||||||
|
CollisionDispatch/SphereTriangleDetector.cpp
|
||||||
|
CollisionShapes/btBoxShape.cpp
|
||||||
|
CollisionShapes/btBox2dShape.cpp
|
||||||
|
CollisionShapes/btBvhTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/btCapsuleShape.cpp
|
||||||
|
CollisionShapes/btCollisionShape.cpp
|
||||||
|
CollisionShapes/btCompoundShape.cpp
|
||||||
|
CollisionShapes/btConcaveShape.cpp
|
||||||
|
CollisionShapes/btConeShape.cpp
|
||||||
|
CollisionShapes/btConvexHullShape.cpp
|
||||||
|
CollisionShapes/btConvexInternalShape.cpp
|
||||||
|
CollisionShapes/btConvexPointCloudShape.cpp
|
||||||
|
CollisionShapes/btConvexPolyhedron.cpp
|
||||||
|
CollisionShapes/btConvexShape.cpp
|
||||||
|
CollisionShapes/btConvex2dShape.cpp
|
||||||
|
CollisionShapes/btConvexTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/btCylinderShape.cpp
|
||||||
|
CollisionShapes/btEmptyShape.cpp
|
||||||
|
CollisionShapes/btHeightfieldTerrainShape.cpp
|
||||||
|
CollisionShapes/btMinkowskiSumShape.cpp
|
||||||
|
CollisionShapes/btMultimaterialTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/btMultiSphereShape.cpp
|
||||||
|
CollisionShapes/btOptimizedBvh.cpp
|
||||||
|
CollisionShapes/btPolyhedralConvexShape.cpp
|
||||||
|
CollisionShapes/btScaledBvhTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/btShapeHull.cpp
|
||||||
|
CollisionShapes/btSphereShape.cpp
|
||||||
|
CollisionShapes/btStaticPlaneShape.cpp
|
||||||
|
CollisionShapes/btStridingMeshInterface.cpp
|
||||||
|
CollisionShapes/btTetrahedronShape.cpp
|
||||||
|
CollisionShapes/btTriangleBuffer.cpp
|
||||||
|
CollisionShapes/btTriangleCallback.cpp
|
||||||
|
CollisionShapes/btTriangleIndexVertexArray.cpp
|
||||||
|
CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
|
||||||
|
CollisionShapes/btTriangleMesh.cpp
|
||||||
|
CollisionShapes/btTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/btUniformScalingShape.cpp
|
||||||
|
Gimpact/btContactProcessing.cpp
|
||||||
|
Gimpact/btGenericPoolAllocator.cpp
|
||||||
|
Gimpact/btGImpactBvh.cpp
|
||||||
|
Gimpact/btGImpactCollisionAlgorithm.cpp
|
||||||
|
Gimpact/btGImpactQuantizedBvh.cpp
|
||||||
|
Gimpact/btGImpactShape.cpp
|
||||||
|
Gimpact/btTriangleShapeEx.cpp
|
||||||
|
Gimpact/gim_box_set.cpp
|
||||||
|
Gimpact/gim_contact.cpp
|
||||||
|
Gimpact/gim_memory.cpp
|
||||||
|
Gimpact/gim_tri_collision.cpp
|
||||||
|
NarrowPhaseCollision/btContinuousConvexCollision.cpp
|
||||||
|
NarrowPhaseCollision/btConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/btGjkConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/btGjkEpa2.cpp
|
||||||
|
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
|
||||||
|
NarrowPhaseCollision/btGjkPairDetector.cpp
|
||||||
|
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
|
||||||
|
NarrowPhaseCollision/btPersistentManifold.cpp
|
||||||
|
NarrowPhaseCollision/btRaycastCallback.cpp
|
||||||
|
NarrowPhaseCollision/btSubSimplexConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
|
||||||
|
NarrowPhaseCollision/btPolyhedralContactClipping.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(Root_HDRS
|
||||||
|
../btBulletCollisionCommon.h
|
||||||
|
)
|
||||||
|
SET(BroadphaseCollision_HDRS
|
||||||
|
BroadphaseCollision/btAxisSweep3.h
|
||||||
|
BroadphaseCollision/btBroadphaseInterface.h
|
||||||
|
BroadphaseCollision/btBroadphaseProxy.h
|
||||||
|
BroadphaseCollision/btCollisionAlgorithm.h
|
||||||
|
BroadphaseCollision/btDbvt.h
|
||||||
|
BroadphaseCollision/btDbvtBroadphase.h
|
||||||
|
BroadphaseCollision/btDispatcher.h
|
||||||
|
BroadphaseCollision/btMultiSapBroadphase.h
|
||||||
|
BroadphaseCollision/btOverlappingPairCache.h
|
||||||
|
BroadphaseCollision/btOverlappingPairCallback.h
|
||||||
|
BroadphaseCollision/btQuantizedBvh.h
|
||||||
|
BroadphaseCollision/btSimpleBroadphase.h
|
||||||
|
)
|
||||||
|
SET(CollisionDispatch_HDRS
|
||||||
|
CollisionDispatch/btActivatingCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btBoxBoxCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btBoxBoxDetector.h
|
||||||
|
CollisionDispatch/btCollisionConfiguration.h
|
||||||
|
CollisionDispatch/btCollisionCreateFunc.h
|
||||||
|
CollisionDispatch/btCollisionDispatcher.h
|
||||||
|
CollisionDispatch/btCollisionObject.h
|
||||||
|
CollisionDispatch/btCollisionObjectWrapper.h
|
||||||
|
CollisionDispatch/btCollisionWorld.h
|
||||||
|
CollisionDispatch/btCompoundCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexConvexAlgorithm.h
|
||||||
|
CollisionDispatch/btConvex2dConvex2dAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btDefaultCollisionConfiguration.h
|
||||||
|
CollisionDispatch/btEmptyCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btGhostObject.h
|
||||||
|
CollisionDispatch/btHashedSimplePairCache.h
|
||||||
|
CollisionDispatch/btManifoldResult.h
|
||||||
|
CollisionDispatch/btSimulationIslandManager.h
|
||||||
|
CollisionDispatch/btSphereBoxCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btSphereSphereCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btUnionFind.h
|
||||||
|
CollisionDispatch/SphereTriangleDetector.h
|
||||||
|
)
|
||||||
|
SET(CollisionShapes_HDRS
|
||||||
|
CollisionShapes/btBoxShape.h
|
||||||
|
CollisionShapes/btBox2dShape.h
|
||||||
|
CollisionShapes/btBvhTriangleMeshShape.h
|
||||||
|
CollisionShapes/btCapsuleShape.h
|
||||||
|
CollisionShapes/btCollisionMargin.h
|
||||||
|
CollisionShapes/btCollisionShape.h
|
||||||
|
CollisionShapes/btCompoundShape.h
|
||||||
|
CollisionShapes/btConcaveShape.h
|
||||||
|
CollisionShapes/btConeShape.h
|
||||||
|
CollisionShapes/btConvexHullShape.h
|
||||||
|
CollisionShapes/btConvexInternalShape.h
|
||||||
|
CollisionShapes/btConvexPointCloudShape.h
|
||||||
|
CollisionShapes/btConvexPolyhedron.h
|
||||||
|
CollisionShapes/btConvexShape.h
|
||||||
|
CollisionShapes/btConvex2dShape.h
|
||||||
|
CollisionShapes/btConvexTriangleMeshShape.h
|
||||||
|
CollisionShapes/btCylinderShape.h
|
||||||
|
CollisionShapes/btEmptyShape.h
|
||||||
|
CollisionShapes/btHeightfieldTerrainShape.h
|
||||||
|
CollisionShapes/btMaterial.h
|
||||||
|
CollisionShapes/btMinkowskiSumShape.h
|
||||||
|
CollisionShapes/btMultimaterialTriangleMeshShape.h
|
||||||
|
CollisionShapes/btMultiSphereShape.h
|
||||||
|
CollisionShapes/btOptimizedBvh.h
|
||||||
|
CollisionShapes/btPolyhedralConvexShape.h
|
||||||
|
CollisionShapes/btScaledBvhTriangleMeshShape.h
|
||||||
|
CollisionShapes/btShapeHull.h
|
||||||
|
CollisionShapes/btSphereShape.h
|
||||||
|
CollisionShapes/btStaticPlaneShape.h
|
||||||
|
CollisionShapes/btStridingMeshInterface.h
|
||||||
|
CollisionShapes/btTetrahedronShape.h
|
||||||
|
CollisionShapes/btTriangleBuffer.h
|
||||||
|
CollisionShapes/btTriangleCallback.h
|
||||||
|
CollisionShapes/btTriangleIndexVertexArray.h
|
||||||
|
CollisionShapes/btTriangleIndexVertexMaterialArray.h
|
||||||
|
CollisionShapes/btTriangleInfoMap.h
|
||||||
|
CollisionShapes/btTriangleMesh.h
|
||||||
|
CollisionShapes/btTriangleMeshShape.h
|
||||||
|
CollisionShapes/btTriangleShape.h
|
||||||
|
CollisionShapes/btUniformScalingShape.h
|
||||||
|
)
|
||||||
|
SET(Gimpact_HDRS
|
||||||
|
Gimpact/btBoxCollision.h
|
||||||
|
Gimpact/btClipPolygon.h
|
||||||
|
Gimpact/btContactProcessing.h
|
||||||
|
Gimpact/btGenericPoolAllocator.h
|
||||||
|
Gimpact/btGeometryOperations.h
|
||||||
|
Gimpact/btGImpactBvh.h
|
||||||
|
Gimpact/btGImpactCollisionAlgorithm.h
|
||||||
|
Gimpact/btGImpactMassUtil.h
|
||||||
|
Gimpact/btGImpactQuantizedBvh.h
|
||||||
|
Gimpact/btGImpactShape.h
|
||||||
|
Gimpact/btQuantization.h
|
||||||
|
Gimpact/btTriangleShapeEx.h
|
||||||
|
Gimpact/gim_array.h
|
||||||
|
Gimpact/gim_basic_geometry_operations.h
|
||||||
|
Gimpact/gim_bitset.h
|
||||||
|
Gimpact/gim_box_collision.h
|
||||||
|
Gimpact/gim_box_set.h
|
||||||
|
Gimpact/gim_clip_polygon.h
|
||||||
|
Gimpact/gim_contact.h
|
||||||
|
Gimpact/gim_geom_types.h
|
||||||
|
Gimpact/gim_geometry.h
|
||||||
|
Gimpact/gim_hash_table.h
|
||||||
|
Gimpact/gim_linear_math.h
|
||||||
|
Gimpact/gim_math.h
|
||||||
|
Gimpact/gim_memory.h
|
||||||
|
Gimpact/gim_radixsort.h
|
||||||
|
Gimpact/gim_tri_collision.h
|
||||||
|
)
|
||||||
|
SET(NarrowPhaseCollision_HDRS
|
||||||
|
NarrowPhaseCollision/btContinuousConvexCollision.h
|
||||||
|
NarrowPhaseCollision/btConvexCast.h
|
||||||
|
NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
|
||||||
|
NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
|
||||||
|
NarrowPhaseCollision/btGjkConvexCast.h
|
||||||
|
NarrowPhaseCollision/btGjkEpa2.h
|
||||||
|
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
|
||||||
|
NarrowPhaseCollision/btGjkPairDetector.h
|
||||||
|
NarrowPhaseCollision/btManifoldPoint.h
|
||||||
|
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
|
||||||
|
NarrowPhaseCollision/btPersistentManifold.h
|
||||||
|
NarrowPhaseCollision/btPointCollector.h
|
||||||
|
NarrowPhaseCollision/btRaycastCallback.h
|
||||||
|
NarrowPhaseCollision/btSimplexSolverInterface.h
|
||||||
|
NarrowPhaseCollision/btSubSimplexConvexCast.h
|
||||||
|
NarrowPhaseCollision/btVoronoiSimplexSolver.h
|
||||||
|
NarrowPhaseCollision/btPolyhedralContactClipping.h
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(BulletCollision_HDRS
|
||||||
|
${Root_HDRS}
|
||||||
|
${BroadphaseCollision_HDRS}
|
||||||
|
${CollisionDispatch_HDRS}
|
||||||
|
${CollisionShapes_HDRS}
|
||||||
|
${Gimpact_HDRS}
|
||||||
|
${NarrowPhaseCollision_HDRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
|
||||||
|
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
|
||||||
|
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
|
||||||
|
IF (BUILD_SHARED_LIBS)
|
||||||
|
TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
|
||||||
|
ENDIF (BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
IF (INSTALL_LIBS)
|
||||||
|
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
#INSTALL of other files requires CMake 2.6
|
||||||
|
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||||
|
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||||
|
INSTALL(TARGETS BulletCollision DESTINATION .)
|
||||||
|
ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||||
|
INSTALL(TARGETS BulletCollision RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
|
ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
||||||
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
|
||||||
|
INSTALL(FILES ../btBulletCollisionCommon.h
|
||||||
|
DESTINATION ${INCLUDE_INSTALL_DIR}/BulletCollision)
|
||||||
|
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||||
|
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||||
|
|
||||||
|
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||||
|
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true)
|
||||||
|
|
||||||
|
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER "${Root_HDRS}")
|
||||||
|
# Have to list out sub-directories manually:
|
||||||
|
SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision)
|
||||||
|
SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch)
|
||||||
|
SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes)
|
||||||
|
SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact)
|
||||||
|
SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision)
|
||||||
|
|
||||||
|
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
||||||
|
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
||||||
|
ENDIF (INSTALL_LIBS)
|
|
@ -0,0 +1,200 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "LinearMath/btScalar.h"
|
||||||
|
#include "SphereTriangleDetector.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btSphereShape.h"
|
||||||
|
|
||||||
|
|
||||||
|
SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold)
|
||||||
|
:m_sphere(sphere),
|
||||||
|
m_triangle(triangle),
|
||||||
|
m_contactBreakingThreshold(contactBreakingThreshold)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)debugDraw;
|
||||||
|
const btTransform& transformA = input.m_transformA;
|
||||||
|
const btTransform& transformB = input.m_transformB;
|
||||||
|
|
||||||
|
btVector3 point,normal;
|
||||||
|
btScalar timeOfImpact = btScalar(1.);
|
||||||
|
btScalar depth = btScalar(0.);
|
||||||
|
// output.m_distance = btScalar(BT_LARGE_FLOAT);
|
||||||
|
//move sphere into triangle space
|
||||||
|
btTransform sphereInTr = transformB.inverseTimes(transformA);
|
||||||
|
|
||||||
|
if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact,m_contactBreakingThreshold))
|
||||||
|
{
|
||||||
|
if (swapResults)
|
||||||
|
{
|
||||||
|
btVector3 normalOnB = transformB.getBasis()*normal;
|
||||||
|
btVector3 normalOnA = -normalOnB;
|
||||||
|
btVector3 pointOnA = transformB*point+normalOnB*depth;
|
||||||
|
output.addContactPoint(normalOnA,pointOnA,depth);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
output.addContactPoint(transformB.getBasis()*normal,transformB*point,depth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// See also geometrictools.com
|
||||||
|
// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv
|
||||||
|
btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest);
|
||||||
|
|
||||||
|
btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest) {
|
||||||
|
btVector3 diff = p - from;
|
||||||
|
btVector3 v = to - from;
|
||||||
|
btScalar t = v.dot(diff);
|
||||||
|
|
||||||
|
if (t > 0) {
|
||||||
|
btScalar dotVV = v.dot(v);
|
||||||
|
if (t < dotVV) {
|
||||||
|
t /= dotVV;
|
||||||
|
diff -= t*v;
|
||||||
|
} else {
|
||||||
|
t = 1;
|
||||||
|
diff -= v;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
t = 0;
|
||||||
|
|
||||||
|
nearest = from + t*v;
|
||||||
|
return diff.dot(diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SphereTriangleDetector::facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal) {
|
||||||
|
btVector3 lp(p);
|
||||||
|
btVector3 lnormal(normal);
|
||||||
|
|
||||||
|
return pointInTriangle(vertices, lnormal, &lp);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold)
|
||||||
|
{
|
||||||
|
|
||||||
|
const btVector3* vertices = &m_triangle->getVertexPtr(0);
|
||||||
|
|
||||||
|
btScalar radius = m_sphere->getRadius();
|
||||||
|
btScalar radiusWithThreshold = radius + contactBreakingThreshold;
|
||||||
|
|
||||||
|
btVector3 normal = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]);
|
||||||
|
normal.normalize();
|
||||||
|
btVector3 p1ToCentre = sphereCenter - vertices[0];
|
||||||
|
btScalar distanceFromPlane = p1ToCentre.dot(normal);
|
||||||
|
|
||||||
|
if (distanceFromPlane < btScalar(0.))
|
||||||
|
{
|
||||||
|
//triangle facing the other way
|
||||||
|
distanceFromPlane *= btScalar(-1.);
|
||||||
|
normal *= btScalar(-1.);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isInsideContactPlane = distanceFromPlane < radiusWithThreshold;
|
||||||
|
|
||||||
|
// Check for contact / intersection
|
||||||
|
bool hasContact = false;
|
||||||
|
btVector3 contactPoint;
|
||||||
|
if (isInsideContactPlane) {
|
||||||
|
if (facecontains(sphereCenter,vertices,normal)) {
|
||||||
|
// Inside the contact wedge - touches a point on the shell plane
|
||||||
|
hasContact = true;
|
||||||
|
contactPoint = sphereCenter - normal*distanceFromPlane;
|
||||||
|
} else {
|
||||||
|
// Could be inside one of the contact capsules
|
||||||
|
btScalar contactCapsuleRadiusSqr = radiusWithThreshold*radiusWithThreshold;
|
||||||
|
btVector3 nearestOnEdge;
|
||||||
|
for (int i = 0; i < m_triangle->getNumEdges(); i++) {
|
||||||
|
|
||||||
|
btVector3 pa;
|
||||||
|
btVector3 pb;
|
||||||
|
|
||||||
|
m_triangle->getEdge(i,pa,pb);
|
||||||
|
|
||||||
|
btScalar distanceSqr = SegmentSqrDistance(pa,pb,sphereCenter, nearestOnEdge);
|
||||||
|
if (distanceSqr < contactCapsuleRadiusSqr) {
|
||||||
|
// Yep, we're inside a capsule
|
||||||
|
hasContact = true;
|
||||||
|
contactPoint = nearestOnEdge;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasContact) {
|
||||||
|
btVector3 contactToCentre = sphereCenter - contactPoint;
|
||||||
|
btScalar distanceSqr = contactToCentre.length2();
|
||||||
|
|
||||||
|
if (distanceSqr < radiusWithThreshold*radiusWithThreshold)
|
||||||
|
{
|
||||||
|
if (distanceSqr>SIMD_EPSILON)
|
||||||
|
{
|
||||||
|
btScalar distance = btSqrt(distanceSqr);
|
||||||
|
resultNormal = contactToCentre;
|
||||||
|
resultNormal.normalize();
|
||||||
|
point = contactPoint;
|
||||||
|
depth = -(radius-distance);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
resultNormal = normal;
|
||||||
|
point = contactPoint;
|
||||||
|
depth = -radius;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SphereTriangleDetector::pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p )
|
||||||
|
{
|
||||||
|
const btVector3* p1 = &vertices[0];
|
||||||
|
const btVector3* p2 = &vertices[1];
|
||||||
|
const btVector3* p3 = &vertices[2];
|
||||||
|
|
||||||
|
btVector3 edge1( *p2 - *p1 );
|
||||||
|
btVector3 edge2( *p3 - *p2 );
|
||||||
|
btVector3 edge3( *p1 - *p3 );
|
||||||
|
|
||||||
|
btVector3 p1_to_p( *p - *p1 );
|
||||||
|
btVector3 p2_to_p( *p - *p2 );
|
||||||
|
btVector3 p3_to_p( *p - *p3 );
|
||||||
|
|
||||||
|
btVector3 edge1_normal( edge1.cross(normal));
|
||||||
|
btVector3 edge2_normal( edge2.cross(normal));
|
||||||
|
btVector3 edge3_normal( edge3.cross(normal));
|
||||||
|
|
||||||
|
btScalar r1, r2, r3;
|
||||||
|
r1 = edge1_normal.dot( p1_to_p );
|
||||||
|
r2 = edge2_normal.dot( p2_to_p );
|
||||||
|
r3 = edge3_normal.dot( p3_to_p );
|
||||||
|
if ( ( r1 > 0 && r2 > 0 && r3 > 0 ) ||
|
||||||
|
( r1 <= 0 && r2 <= 0 && r3 <= 0 ) )
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_SPHERE_TRIANGLE_DETECTOR_H
|
||||||
|
#define BT_SPHERE_TRIANGLE_DETECTOR_H
|
||||||
|
|
||||||
|
#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class btSphereShape;
|
||||||
|
class btTriangleShape;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// sphere-triangle to match the btDiscreteCollisionDetectorInterface
|
||||||
|
struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface
|
||||||
|
{
|
||||||
|
virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
|
||||||
|
|
||||||
|
SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle, btScalar contactBreakingThreshold);
|
||||||
|
|
||||||
|
virtual ~SphereTriangleDetector() {};
|
||||||
|
|
||||||
|
bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p );
|
||||||
|
bool facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal);
|
||||||
|
|
||||||
|
btSphereShape* m_sphere;
|
||||||
|
btTriangleShape* m_triangle;
|
||||||
|
btScalar m_contactBreakingThreshold;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif //BT_SPHERE_TRIANGLE_DETECTOR_H
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btActivatingCollisionAlgorithm.h"
|
||||||
|
#include "btCollisionDispatcher.h"
|
||||||
|
#include "btCollisionObject.h"
|
||||||
|
|
||||||
|
btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci)
|
||||||
|
:btCollisionAlgorithm(ci)
|
||||||
|
//,
|
||||||
|
//m_colObj0(0),
|
||||||
|
//m_colObj1(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* ,const btCollisionObjectWrapper* )
|
||||||
|
:btCollisionAlgorithm(ci)
|
||||||
|
//,
|
||||||
|
//m_colObj0(0),
|
||||||
|
//m_colObj1(0)
|
||||||
|
{
|
||||||
|
// if (ci.m_dispatcher1->needsCollision(colObj0,colObj1))
|
||||||
|
// {
|
||||||
|
// m_colObj0 = colObj0;
|
||||||
|
// m_colObj1 = colObj1;
|
||||||
|
//
|
||||||
|
// m_colObj0->activate();
|
||||||
|
// m_colObj1->activate();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
btActivatingCollisionAlgorithm::~btActivatingCollisionAlgorithm()
|
||||||
|
{
|
||||||
|
// m_colObj0->activate();
|
||||||
|
// m_colObj1->activate();
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H
|
||||||
|
#define __BT_ACTIVATING_COLLISION_ALGORITHM_H
|
||||||
|
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
|
||||||
|
|
||||||
|
///This class is not enabled yet (work-in-progress) to more aggressively activate objects.
|
||||||
|
class btActivatingCollisionAlgorithm : public btCollisionAlgorithm
|
||||||
|
{
|
||||||
|
// btCollisionObject* m_colObj0;
|
||||||
|
// btCollisionObject* m_colObj1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci);
|
||||||
|
|
||||||
|
btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap);
|
||||||
|
|
||||||
|
virtual ~btActivatingCollisionAlgorithm();
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H
|
|
@ -0,0 +1,421 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
* The b2CollidePolygons routines are Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library.
|
||||||
|
///The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross
|
||||||
|
|
||||||
|
#include "btBox2dBox2dCollisionAlgorithm.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btBoxShape.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btBox2dShape.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
|
||||||
|
|
||||||
|
#define USE_PERSISTENT_CONTACTS 1
|
||||||
|
|
||||||
|
btBox2dBox2dCollisionAlgorithm::btBox2dBox2dCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* obj0Wrap,const btCollisionObjectWrapper* obj1Wrap)
|
||||||
|
: btActivatingCollisionAlgorithm(ci,obj0Wrap,obj1Wrap),
|
||||||
|
m_ownManifold(false),
|
||||||
|
m_manifoldPtr(mf)
|
||||||
|
{
|
||||||
|
if (!m_manifoldPtr && m_dispatcher->needsCollision(obj0Wrap->getCollisionObject(),obj1Wrap->getCollisionObject()))
|
||||||
|
{
|
||||||
|
m_manifoldPtr = m_dispatcher->getNewManifold(obj0Wrap->getCollisionObject(),obj1Wrap->getCollisionObject());
|
||||||
|
m_ownManifold = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btBox2dBox2dCollisionAlgorithm::~btBox2dBox2dCollisionAlgorithm()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (m_ownManifold)
|
||||||
|
{
|
||||||
|
if (m_manifoldPtr)
|
||||||
|
m_dispatcher->releaseManifold(m_manifoldPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void b2CollidePolygons(btManifoldResult* manifold, const btBox2dShape* polyA, const btTransform& xfA, const btBox2dShape* polyB, const btTransform& xfB);
|
||||||
|
|
||||||
|
//#include <stdio.h>
|
||||||
|
void btBox2dBox2dCollisionAlgorithm::processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
|
||||||
|
{
|
||||||
|
if (!m_manifoldPtr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
const btBox2dShape* box0 = (const btBox2dShape*)body0Wrap->getCollisionShape();
|
||||||
|
const btBox2dShape* box1 = (const btBox2dShape*)body1Wrap->getCollisionShape();
|
||||||
|
|
||||||
|
resultOut->setPersistentManifold(m_manifoldPtr);
|
||||||
|
|
||||||
|
b2CollidePolygons(resultOut,box0,body0Wrap->getWorldTransform(),box1,body1Wrap->getWorldTransform());
|
||||||
|
|
||||||
|
// refreshContactPoints is only necessary when using persistent contact points. otherwise all points are newly added
|
||||||
|
if (m_ownManifold)
|
||||||
|
{
|
||||||
|
resultOut->refreshContactPoints();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar btBox2dBox2dCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* /*body0*/,btCollisionObject* /*body1*/,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
|
||||||
|
{
|
||||||
|
//not yet
|
||||||
|
return 1.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct ClipVertex
|
||||||
|
{
|
||||||
|
btVector3 v;
|
||||||
|
int id;
|
||||||
|
//b2ContactID id;
|
||||||
|
//b2ContactID id;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define b2Dot(a,b) (a).dot(b)
|
||||||
|
#define b2Mul(a,b) (a)*(b)
|
||||||
|
#define b2MulT(a,b) (a).transpose()*(b)
|
||||||
|
#define b2Cross(a,b) (a).cross(b)
|
||||||
|
#define btCrossS(a,s) btVector3(s * a.getY(), -s * a.getX(),0.f)
|
||||||
|
|
||||||
|
int b2_maxManifoldPoints =2;
|
||||||
|
|
||||||
|
static int ClipSegmentToLine(ClipVertex vOut[2], ClipVertex vIn[2],
|
||||||
|
const btVector3& normal, btScalar offset)
|
||||||
|
{
|
||||||
|
// Start with no output points
|
||||||
|
int numOut = 0;
|
||||||
|
|
||||||
|
// Calculate the distance of end points to the line
|
||||||
|
btScalar distance0 = b2Dot(normal, vIn[0].v) - offset;
|
||||||
|
btScalar distance1 = b2Dot(normal, vIn[1].v) - offset;
|
||||||
|
|
||||||
|
// If the points are behind the plane
|
||||||
|
if (distance0 <= 0.0f) vOut[numOut++] = vIn[0];
|
||||||
|
if (distance1 <= 0.0f) vOut[numOut++] = vIn[1];
|
||||||
|
|
||||||
|
// If the points are on different sides of the plane
|
||||||
|
if (distance0 * distance1 < 0.0f)
|
||||||
|
{
|
||||||
|
// Find intersection point of edge and plane
|
||||||
|
btScalar interp = distance0 / (distance0 - distance1);
|
||||||
|
vOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v);
|
||||||
|
if (distance0 > 0.0f)
|
||||||
|
{
|
||||||
|
vOut[numOut].id = vIn[0].id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vOut[numOut].id = vIn[1].id;
|
||||||
|
}
|
||||||
|
++numOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
return numOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the separation between poly1 and poly2 for a give edge normal on poly1.
|
||||||
|
static btScalar EdgeSeparation(const btBox2dShape* poly1, const btTransform& xf1, int edge1,
|
||||||
|
const btBox2dShape* poly2, const btTransform& xf2)
|
||||||
|
{
|
||||||
|
const btVector3* vertices1 = poly1->getVertices();
|
||||||
|
const btVector3* normals1 = poly1->getNormals();
|
||||||
|
|
||||||
|
int count2 = poly2->getVertexCount();
|
||||||
|
const btVector3* vertices2 = poly2->getVertices();
|
||||||
|
|
||||||
|
btAssert(0 <= edge1 && edge1 < poly1->getVertexCount());
|
||||||
|
|
||||||
|
// Convert normal from poly1's frame into poly2's frame.
|
||||||
|
btVector3 normal1World = b2Mul(xf1.getBasis(), normals1[edge1]);
|
||||||
|
btVector3 normal1 = b2MulT(xf2.getBasis(), normal1World);
|
||||||
|
|
||||||
|
// Find support vertex on poly2 for -normal.
|
||||||
|
int index = 0;
|
||||||
|
btScalar minDot = BT_LARGE_FLOAT;
|
||||||
|
|
||||||
|
if( count2 > 0 )
|
||||||
|
index = (int) normal1.minDot( vertices2, count2, minDot);
|
||||||
|
|
||||||
|
btVector3 v1 = b2Mul(xf1, vertices1[edge1]);
|
||||||
|
btVector3 v2 = b2Mul(xf2, vertices2[index]);
|
||||||
|
btScalar separation = b2Dot(v2 - v1, normal1World);
|
||||||
|
return separation;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the max separation between poly1 and poly2 using edge normals from poly1.
|
||||||
|
static btScalar FindMaxSeparation(int* edgeIndex,
|
||||||
|
const btBox2dShape* poly1, const btTransform& xf1,
|
||||||
|
const btBox2dShape* poly2, const btTransform& xf2)
|
||||||
|
{
|
||||||
|
int count1 = poly1->getVertexCount();
|
||||||
|
const btVector3* normals1 = poly1->getNormals();
|
||||||
|
|
||||||
|
// Vector pointing from the centroid of poly1 to the centroid of poly2.
|
||||||
|
btVector3 d = b2Mul(xf2, poly2->getCentroid()) - b2Mul(xf1, poly1->getCentroid());
|
||||||
|
btVector3 dLocal1 = b2MulT(xf1.getBasis(), d);
|
||||||
|
|
||||||
|
// Find edge normal on poly1 that has the largest projection onto d.
|
||||||
|
int edge = 0;
|
||||||
|
btScalar maxDot;
|
||||||
|
if( count1 > 0 )
|
||||||
|
edge = (int) dLocal1.maxDot( normals1, count1, maxDot);
|
||||||
|
|
||||||
|
// Get the separation for the edge normal.
|
||||||
|
btScalar s = EdgeSeparation(poly1, xf1, edge, poly2, xf2);
|
||||||
|
if (s > 0.0f)
|
||||||
|
{
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the separation for the previous edge normal.
|
||||||
|
int prevEdge = edge - 1 >= 0 ? edge - 1 : count1 - 1;
|
||||||
|
btScalar sPrev = EdgeSeparation(poly1, xf1, prevEdge, poly2, xf2);
|
||||||
|
if (sPrev > 0.0f)
|
||||||
|
{
|
||||||
|
return sPrev;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the separation for the next edge normal.
|
||||||
|
int nextEdge = edge + 1 < count1 ? edge + 1 : 0;
|
||||||
|
btScalar sNext = EdgeSeparation(poly1, xf1, nextEdge, poly2, xf2);
|
||||||
|
if (sNext > 0.0f)
|
||||||
|
{
|
||||||
|
return sNext;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find the best edge and the search direction.
|
||||||
|
int bestEdge;
|
||||||
|
btScalar bestSeparation;
|
||||||
|
int increment;
|
||||||
|
if (sPrev > s && sPrev > sNext)
|
||||||
|
{
|
||||||
|
increment = -1;
|
||||||
|
bestEdge = prevEdge;
|
||||||
|
bestSeparation = sPrev;
|
||||||
|
}
|
||||||
|
else if (sNext > s)
|
||||||
|
{
|
||||||
|
increment = 1;
|
||||||
|
bestEdge = nextEdge;
|
||||||
|
bestSeparation = sNext;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*edgeIndex = edge;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform a local search for the best edge normal.
|
||||||
|
for ( ; ; )
|
||||||
|
{
|
||||||
|
if (increment == -1)
|
||||||
|
edge = bestEdge - 1 >= 0 ? bestEdge - 1 : count1 - 1;
|
||||||
|
else
|
||||||
|
edge = bestEdge + 1 < count1 ? bestEdge + 1 : 0;
|
||||||
|
|
||||||
|
s = EdgeSeparation(poly1, xf1, edge, poly2, xf2);
|
||||||
|
if (s > 0.0f)
|
||||||
|
{
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s > bestSeparation)
|
||||||
|
{
|
||||||
|
bestEdge = edge;
|
||||||
|
bestSeparation = s;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*edgeIndex = bestEdge;
|
||||||
|
return bestSeparation;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void FindIncidentEdge(ClipVertex c[2],
|
||||||
|
const btBox2dShape* poly1, const btTransform& xf1, int edge1,
|
||||||
|
const btBox2dShape* poly2, const btTransform& xf2)
|
||||||
|
{
|
||||||
|
const btVector3* normals1 = poly1->getNormals();
|
||||||
|
|
||||||
|
int count2 = poly2->getVertexCount();
|
||||||
|
const btVector3* vertices2 = poly2->getVertices();
|
||||||
|
const btVector3* normals2 = poly2->getNormals();
|
||||||
|
|
||||||
|
btAssert(0 <= edge1 && edge1 < poly1->getVertexCount());
|
||||||
|
|
||||||
|
// Get the normal of the reference edge in poly2's frame.
|
||||||
|
btVector3 normal1 = b2MulT(xf2.getBasis(), b2Mul(xf1.getBasis(), normals1[edge1]));
|
||||||
|
|
||||||
|
// Find the incident edge on poly2.
|
||||||
|
int index = 0;
|
||||||
|
btScalar minDot = BT_LARGE_FLOAT;
|
||||||
|
for (int i = 0; i < count2; ++i)
|
||||||
|
{
|
||||||
|
btScalar dot = b2Dot(normal1, normals2[i]);
|
||||||
|
if (dot < minDot)
|
||||||
|
{
|
||||||
|
minDot = dot;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the clip vertices for the incident edge.
|
||||||
|
int i1 = index;
|
||||||
|
int i2 = i1 + 1 < count2 ? i1 + 1 : 0;
|
||||||
|
|
||||||
|
c[0].v = b2Mul(xf2, vertices2[i1]);
|
||||||
|
// c[0].id.features.referenceEdge = (unsigned char)edge1;
|
||||||
|
// c[0].id.features.incidentEdge = (unsigned char)i1;
|
||||||
|
// c[0].id.features.incidentVertex = 0;
|
||||||
|
|
||||||
|
c[1].v = b2Mul(xf2, vertices2[i2]);
|
||||||
|
// c[1].id.features.referenceEdge = (unsigned char)edge1;
|
||||||
|
// c[1].id.features.incidentEdge = (unsigned char)i2;
|
||||||
|
// c[1].id.features.incidentVertex = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find edge normal of max separation on A - return if separating axis is found
|
||||||
|
// Find edge normal of max separation on B - return if separation axis is found
|
||||||
|
// Choose reference edge as min(minA, minB)
|
||||||
|
// Find incident edge
|
||||||
|
// Clip
|
||||||
|
|
||||||
|
// The normal points from 1 to 2
|
||||||
|
void b2CollidePolygons(btManifoldResult* manifold,
|
||||||
|
const btBox2dShape* polyA, const btTransform& xfA,
|
||||||
|
const btBox2dShape* polyB, const btTransform& xfB)
|
||||||
|
{
|
||||||
|
|
||||||
|
int edgeA = 0;
|
||||||
|
btScalar separationA = FindMaxSeparation(&edgeA, polyA, xfA, polyB, xfB);
|
||||||
|
if (separationA > 0.0f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int edgeB = 0;
|
||||||
|
btScalar separationB = FindMaxSeparation(&edgeB, polyB, xfB, polyA, xfA);
|
||||||
|
if (separationB > 0.0f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const btBox2dShape* poly1; // reference poly
|
||||||
|
const btBox2dShape* poly2; // incident poly
|
||||||
|
btTransform xf1, xf2;
|
||||||
|
int edge1; // reference edge
|
||||||
|
unsigned char flip;
|
||||||
|
const btScalar k_relativeTol = 0.98f;
|
||||||
|
const btScalar k_absoluteTol = 0.001f;
|
||||||
|
|
||||||
|
// TODO_ERIN use "radius" of poly for absolute tolerance.
|
||||||
|
if (separationB > k_relativeTol * separationA + k_absoluteTol)
|
||||||
|
{
|
||||||
|
poly1 = polyB;
|
||||||
|
poly2 = polyA;
|
||||||
|
xf1 = xfB;
|
||||||
|
xf2 = xfA;
|
||||||
|
edge1 = edgeB;
|
||||||
|
flip = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
poly1 = polyA;
|
||||||
|
poly2 = polyB;
|
||||||
|
xf1 = xfA;
|
||||||
|
xf2 = xfB;
|
||||||
|
edge1 = edgeA;
|
||||||
|
flip = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClipVertex incidentEdge[2];
|
||||||
|
FindIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);
|
||||||
|
|
||||||
|
int count1 = poly1->getVertexCount();
|
||||||
|
const btVector3* vertices1 = poly1->getVertices();
|
||||||
|
|
||||||
|
btVector3 v11 = vertices1[edge1];
|
||||||
|
btVector3 v12 = edge1 + 1 < count1 ? vertices1[edge1+1] : vertices1[0];
|
||||||
|
|
||||||
|
//btVector3 dv = v12 - v11;
|
||||||
|
btVector3 sideNormal = b2Mul(xf1.getBasis(), v12 - v11);
|
||||||
|
sideNormal.normalize();
|
||||||
|
btVector3 frontNormal = btCrossS(sideNormal, 1.0f);
|
||||||
|
|
||||||
|
|
||||||
|
v11 = b2Mul(xf1, v11);
|
||||||
|
v12 = b2Mul(xf1, v12);
|
||||||
|
|
||||||
|
btScalar frontOffset = b2Dot(frontNormal, v11);
|
||||||
|
btScalar sideOffset1 = -b2Dot(sideNormal, v11);
|
||||||
|
btScalar sideOffset2 = b2Dot(sideNormal, v12);
|
||||||
|
|
||||||
|
// Clip incident edge against extruded edge1 side edges.
|
||||||
|
ClipVertex clipPoints1[2];
|
||||||
|
clipPoints1[0].v.setValue(0,0,0);
|
||||||
|
clipPoints1[1].v.setValue(0,0,0);
|
||||||
|
|
||||||
|
ClipVertex clipPoints2[2];
|
||||||
|
clipPoints2[0].v.setValue(0,0,0);
|
||||||
|
clipPoints2[1].v.setValue(0,0,0);
|
||||||
|
|
||||||
|
|
||||||
|
int np;
|
||||||
|
|
||||||
|
// Clip to box side 1
|
||||||
|
np = ClipSegmentToLine(clipPoints1, incidentEdge, -sideNormal, sideOffset1);
|
||||||
|
|
||||||
|
if (np < 2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Clip to negative box side 1
|
||||||
|
np = ClipSegmentToLine(clipPoints2, clipPoints1, sideNormal, sideOffset2);
|
||||||
|
|
||||||
|
if (np < 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now clipPoints2 contains the clipped points.
|
||||||
|
btVector3 manifoldNormal = flip ? -frontNormal : frontNormal;
|
||||||
|
|
||||||
|
int pointCount = 0;
|
||||||
|
for (int i = 0; i < b2_maxManifoldPoints; ++i)
|
||||||
|
{
|
||||||
|
btScalar separation = b2Dot(frontNormal, clipPoints2[i].v) - frontOffset;
|
||||||
|
|
||||||
|
if (separation <= 0.0f)
|
||||||
|
{
|
||||||
|
|
||||||
|
//b2ManifoldPoint* cp = manifold->points + pointCount;
|
||||||
|
//btScalar separation = separation;
|
||||||
|
//cp->localPoint1 = b2MulT(xfA, clipPoints2[i].v);
|
||||||
|
//cp->localPoint2 = b2MulT(xfB, clipPoints2[i].v);
|
||||||
|
|
||||||
|
manifold->addContactPoint(-manifoldNormal,clipPoints2[i].v,separation);
|
||||||
|
|
||||||
|
// cp->id = clipPoints2[i].id;
|
||||||
|
// cp->id.features.flip = flip;
|
||||||
|
++pointCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// manifold->pointCount = pointCount;}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
|
||||||
|
#define BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
|
||||||
|
|
||||||
|
#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
|
||||||
|
|
||||||
|
class btPersistentManifold;
|
||||||
|
|
||||||
|
///box-box collision detection
|
||||||
|
class btBox2dBox2dCollisionAlgorithm : public btActivatingCollisionAlgorithm
|
||||||
|
{
|
||||||
|
bool m_ownManifold;
|
||||||
|
btPersistentManifold* m_manifoldPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
btBox2dBox2dCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
|
||||||
|
: btActivatingCollisionAlgorithm(ci) {}
|
||||||
|
|
||||||
|
virtual void processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
|
||||||
|
|
||||||
|
virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
|
||||||
|
|
||||||
|
btBox2dBox2dCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap);
|
||||||
|
|
||||||
|
virtual ~btBox2dBox2dCollisionAlgorithm();
|
||||||
|
|
||||||
|
virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
|
||||||
|
{
|
||||||
|
if (m_manifoldPtr && m_ownManifold)
|
||||||
|
{
|
||||||
|
manifoldArray.push_back(m_manifoldPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct CreateFunc :public btCollisionAlgorithmCreateFunc
|
||||||
|
{
|
||||||
|
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
|
||||||
|
{
|
||||||
|
int bbsize = sizeof(btBox2dBox2dCollisionAlgorithm);
|
||||||
|
void* ptr = ci.m_dispatcher1->allocateCollisionAlgorithm(bbsize);
|
||||||
|
return new(ptr) btBox2dBox2dCollisionAlgorithm(0,ci,body0Wrap,body1Wrap);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "btBoxBoxCollisionAlgorithm.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btBoxShape.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||||
|
#include "btBoxBoxDetector.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
|
||||||
|
#define USE_PERSISTENT_CONTACTS 1
|
||||||
|
|
||||||
|
btBoxBoxCollisionAlgorithm::btBoxBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
|
||||||
|
: btActivatingCollisionAlgorithm(ci,body0Wrap,body1Wrap),
|
||||||
|
m_ownManifold(false),
|
||||||
|
m_manifoldPtr(mf)
|
||||||
|
{
|
||||||
|
if (!m_manifoldPtr && m_dispatcher->needsCollision(body0Wrap->getCollisionObject(),body1Wrap->getCollisionObject()))
|
||||||
|
{
|
||||||
|
m_manifoldPtr = m_dispatcher->getNewManifold(body0Wrap->getCollisionObject(),body1Wrap->getCollisionObject());
|
||||||
|
m_ownManifold = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
btBoxBoxCollisionAlgorithm::~btBoxBoxCollisionAlgorithm()
|
||||||
|
{
|
||||||
|
if (m_ownManifold)
|
||||||
|
{
|
||||||
|
if (m_manifoldPtr)
|
||||||
|
m_dispatcher->releaseManifold(m_manifoldPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void btBoxBoxCollisionAlgorithm::processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
|
||||||
|
{
|
||||||
|
if (!m_manifoldPtr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
const btBoxShape* box0 = (btBoxShape*)body0Wrap->getCollisionShape();
|
||||||
|
const btBoxShape* box1 = (btBoxShape*)body1Wrap->getCollisionShape();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// report a contact. internally this will be kept persistent, and contact reduction is done
|
||||||
|
resultOut->setPersistentManifold(m_manifoldPtr);
|
||||||
|
#ifndef USE_PERSISTENT_CONTACTS
|
||||||
|
m_manifoldPtr->clearManifold();
|
||||||
|
#endif //USE_PERSISTENT_CONTACTS
|
||||||
|
|
||||||
|
btDiscreteCollisionDetectorInterface::ClosestPointInput input;
|
||||||
|
input.m_maximumDistanceSquared = BT_LARGE_FLOAT;
|
||||||
|
input.m_transformA = body0Wrap->getWorldTransform();
|
||||||
|
input.m_transformB = body1Wrap->getWorldTransform();
|
||||||
|
|
||||||
|
btBoxBoxDetector detector(box0,box1);
|
||||||
|
detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
|
||||||
|
|
||||||
|
#ifdef USE_PERSISTENT_CONTACTS
|
||||||
|
// refreshContactPoints is only necessary when using persistent contact points. otherwise all points are newly added
|
||||||
|
if (m_ownManifold)
|
||||||
|
{
|
||||||
|
resultOut->refreshContactPoints();
|
||||||
|
}
|
||||||
|
#endif //USE_PERSISTENT_CONTACTS
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar btBoxBoxCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* /*body0*/,btCollisionObject* /*body1*/,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
|
||||||
|
{
|
||||||
|
//not yet
|
||||||
|
return 1.f;
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_BOX_BOX__COLLISION_ALGORITHM_H
|
||||||
|
#define BT_BOX_BOX__COLLISION_ALGORITHM_H
|
||||||
|
|
||||||
|
#include "btActivatingCollisionAlgorithm.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
|
||||||
|
|
||||||
|
class btPersistentManifold;
|
||||||
|
|
||||||
|
///box-box collision detection
|
||||||
|
class btBoxBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm
|
||||||
|
{
|
||||||
|
bool m_ownManifold;
|
||||||
|
btPersistentManifold* m_manifoldPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
btBoxBoxCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
|
||||||
|
: btActivatingCollisionAlgorithm(ci) {}
|
||||||
|
|
||||||
|
virtual void processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
|
||||||
|
|
||||||
|
virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
|
||||||
|
|
||||||
|
btBoxBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap);
|
||||||
|
|
||||||
|
virtual ~btBoxBoxCollisionAlgorithm();
|
||||||
|
|
||||||
|
virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
|
||||||
|
{
|
||||||
|
if (m_manifoldPtr && m_ownManifold)
|
||||||
|
{
|
||||||
|
manifoldArray.push_back(m_manifoldPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct CreateFunc :public btCollisionAlgorithmCreateFunc
|
||||||
|
{
|
||||||
|
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
|
||||||
|
{
|
||||||
|
int bbsize = sizeof(btBoxBoxCollisionAlgorithm);
|
||||||
|
void* ptr = ci.m_dispatcher1->allocateCollisionAlgorithm(bbsize);
|
||||||
|
return new(ptr) btBoxBoxCollisionAlgorithm(0,ci,body0Wrap,body1Wrap);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_BOX_BOX__COLLISION_ALGORITHM_H
|
||||||
|
|
|
@ -0,0 +1,718 @@
|
||||||
|
/*
|
||||||
|
* Box-Box collision detection re-distributed under the ZLib license with permission from Russell L. Smith
|
||||||
|
* Original version is from Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.
|
||||||
|
* All rights reserved. Email: russ@q12.org Web: www.q12.org
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Bullet is Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///ODE box-box collision detection is adapted to work with Bullet
|
||||||
|
|
||||||
|
#include "btBoxBoxDetector.h"
|
||||||
|
#include "BulletCollision/CollisionShapes/btBoxShape.h"
|
||||||
|
|
||||||
|
#include <float.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
btBoxBoxDetector::btBoxBoxDetector(const btBoxShape* box1,const btBoxShape* box2)
|
||||||
|
: m_box1(box1),
|
||||||
|
m_box2(box2)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// given two boxes (p1,R1,side1) and (p2,R2,side2), collide them together and
|
||||||
|
// generate contact points. this returns 0 if there is no contact otherwise
|
||||||
|
// it returns the number of contacts generated.
|
||||||
|
// `normal' returns the contact normal.
|
||||||
|
// `depth' returns the maximum penetration depth along that normal.
|
||||||
|
// `return_code' returns a number indicating the type of contact that was
|
||||||
|
// detected:
|
||||||
|
// 1,2,3 = box 2 intersects with a face of box 1
|
||||||
|
// 4,5,6 = box 1 intersects with a face of box 2
|
||||||
|
// 7..15 = edge-edge contact
|
||||||
|
// `maxc' is the maximum number of contacts allowed to be generated, i.e.
|
||||||
|
// the size of the `contact' array.
|
||||||
|
// `contact' and `skip' are the contact array information provided to the
|
||||||
|
// collision functions. this function only fills in the position and depth
|
||||||
|
// fields.
|
||||||
|
struct dContactGeom;
|
||||||
|
#define dDOTpq(a,b,p,q) ((a)[0]*(b)[0] + (a)[p]*(b)[q] + (a)[2*(p)]*(b)[2*(q)])
|
||||||
|
#define dInfinity FLT_MAX
|
||||||
|
|
||||||
|
|
||||||
|
/*PURE_INLINE btScalar dDOT (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,1); }
|
||||||
|
PURE_INLINE btScalar dDOT13 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,3); }
|
||||||
|
PURE_INLINE btScalar dDOT31 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,3,1); }
|
||||||
|
PURE_INLINE btScalar dDOT33 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,3,3); }
|
||||||
|
*/
|
||||||
|
static btScalar dDOT (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,1); }
|
||||||
|
static btScalar dDOT44 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,4,4); }
|
||||||
|
static btScalar dDOT41 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,4,1); }
|
||||||
|
static btScalar dDOT14 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,4); }
|
||||||
|
#define dMULTIPLYOP1_331(A,op,B,C) \
|
||||||
|
{\
|
||||||
|
(A)[0] op dDOT41((B),(C)); \
|
||||||
|
(A)[1] op dDOT41((B+1),(C)); \
|
||||||
|
(A)[2] op dDOT41((B+2),(C)); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define dMULTIPLYOP0_331(A,op,B,C) \
|
||||||
|
{ \
|
||||||
|
(A)[0] op dDOT((B),(C)); \
|
||||||
|
(A)[1] op dDOT((B+4),(C)); \
|
||||||
|
(A)[2] op dDOT((B+8),(C)); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define dMULTIPLY1_331(A,B,C) dMULTIPLYOP1_331(A,=,B,C)
|
||||||
|
#define dMULTIPLY0_331(A,B,C) dMULTIPLYOP0_331(A,=,B,C)
|
||||||
|
|
||||||
|
typedef btScalar dMatrix3[4*3];
|
||||||
|
|
||||||
|
void dLineClosestApproach (const btVector3& pa, const btVector3& ua,
|
||||||
|
const btVector3& pb, const btVector3& ub,
|
||||||
|
btScalar *alpha, btScalar *beta);
|
||||||
|
void dLineClosestApproach (const btVector3& pa, const btVector3& ua,
|
||||||
|
const btVector3& pb, const btVector3& ub,
|
||||||
|
btScalar *alpha, btScalar *beta)
|
||||||
|
{
|
||||||
|
btVector3 p;
|
||||||
|
p[0] = pb[0] - pa[0];
|
||||||
|
p[1] = pb[1] - pa[1];
|
||||||
|
p[2] = pb[2] - pa[2];
|
||||||
|
btScalar uaub = dDOT(ua,ub);
|
||||||
|
btScalar q1 = dDOT(ua,p);
|
||||||
|
btScalar q2 = -dDOT(ub,p);
|
||||||
|
btScalar d = 1-uaub*uaub;
|
||||||
|
if (d <= btScalar(0.0001f)) {
|
||||||
|
// @@@ this needs to be made more robust
|
||||||
|
*alpha = 0;
|
||||||
|
*beta = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
d = 1.f/d;
|
||||||
|
*alpha = (q1 + uaub*q2)*d;
|
||||||
|
*beta = (uaub*q1 + q2)*d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// find all the intersection points between the 2D rectangle with vertices
|
||||||
|
// at (+/-h[0],+/-h[1]) and the 2D quadrilateral with vertices (p[0],p[1]),
|
||||||
|
// (p[2],p[3]),(p[4],p[5]),(p[6],p[7]).
|
||||||
|
//
|
||||||
|
// the intersection points are returned as x,y pairs in the 'ret' array.
|
||||||
|
// the number of intersection points is returned by the function (this will
|
||||||
|
// be in the range 0 to 8).
|
||||||
|
|
||||||
|
static int intersectRectQuad2 (btScalar h[2], btScalar p[8], btScalar ret[16])
|
||||||
|
{
|
||||||
|
// q (and r) contain nq (and nr) coordinate points for the current (and
|
||||||
|
// chopped) polygons
|
||||||
|
int nq=4,nr=0;
|
||||||
|
btScalar buffer[16];
|
||||||
|
btScalar *q = p;
|
||||||
|
btScalar *r = ret;
|
||||||
|
for (int dir=0; dir <= 1; dir++) {
|
||||||
|
// direction notation: xy[0] = x axis, xy[1] = y axis
|
||||||
|
for (int sign=-1; sign <= 1; sign += 2) {
|
||||||
|
// chop q along the line xy[dir] = sign*h[dir]
|
||||||
|
btScalar *pq = q;
|
||||||
|
btScalar *pr = r;
|
||||||
|
nr = 0;
|
||||||
|
for (int i=nq; i > 0; i--) {
|
||||||
|
// go through all points in q and all lines between adjacent points
|
||||||
|
if (sign*pq[dir] < h[dir]) {
|
||||||
|
// this point is inside the chopping line
|
||||||
|
pr[0] = pq[0];
|
||||||
|
pr[1] = pq[1];
|
||||||
|
pr += 2;
|
||||||
|
nr++;
|
||||||
|
if (nr & 8) {
|
||||||
|
q = r;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
btScalar *nextq = (i > 1) ? pq+2 : q;
|
||||||
|
if ((sign*pq[dir] < h[dir]) ^ (sign*nextq[dir] < h[dir])) {
|
||||||
|
// this line crosses the chopping line
|
||||||
|
pr[1-dir] = pq[1-dir] + (nextq[1-dir]-pq[1-dir]) /
|
||||||
|
(nextq[dir]-pq[dir]) * (sign*h[dir]-pq[dir]);
|
||||||
|
pr[dir] = sign*h[dir];
|
||||||
|
pr += 2;
|
||||||
|
nr++;
|
||||||
|
if (nr & 8) {
|
||||||
|
q = r;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pq += 2;
|
||||||
|
}
|
||||||
|
q = r;
|
||||||
|
r = (q==ret) ? buffer : ret;
|
||||||
|
nq = nr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
done:
|
||||||
|
if (q != ret) memcpy (ret,q,nr*2*sizeof(btScalar));
|
||||||
|
return nr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define M__PI 3.14159265f
|
||||||
|
|
||||||
|
// given n points in the plane (array p, of size 2*n), generate m points that
|
||||||
|
// best represent the whole set. the definition of 'best' here is not
|
||||||
|
// predetermined - the idea is to select points that give good box-box
|
||||||
|
// collision detection behavior. the chosen point indexes are returned in the
|
||||||
|
// array iret (of size m). 'i0' is always the first entry in the array.
|
||||||
|
// n must be in the range [1..8]. m must be in the range [1..n]. i0 must be
|
||||||
|
// in the range [0..n-1].
|
||||||
|
|
||||||
|
void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[]);
|
||||||
|
void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[])
|
||||||
|
{
|
||||||
|
// compute the centroid of the polygon in cx,cy
|
||||||
|
int i,j;
|
||||||
|
btScalar a,cx,cy,q;
|
||||||
|
if (n==1) {
|
||||||
|
cx = p[0];
|
||||||
|
cy = p[1];
|
||||||
|
}
|
||||||
|
else if (n==2) {
|
||||||
|
cx = btScalar(0.5)*(p[0] + p[2]);
|
||||||
|
cy = btScalar(0.5)*(p[1] + p[3]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
a = 0;
|
||||||
|
cx = 0;
|
||||||
|
cy = 0;
|
||||||
|
for (i=0; i<(n-1); i++) {
|
||||||
|
q = p[i*2]*p[i*2+3] - p[i*2+2]*p[i*2+1];
|
||||||
|
a += q;
|
||||||
|
cx += q*(p[i*2]+p[i*2+2]);
|
||||||
|
cy += q*(p[i*2+1]+p[i*2+3]);
|
||||||
|
}
|
||||||
|
q = p[n*2-2]*p[1] - p[0]*p[n*2-1];
|
||||||
|
if (btFabs(a+q) > SIMD_EPSILON)
|
||||||
|
{
|
||||||
|
a = 1.f/(btScalar(3.0)*(a+q));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
a=BT_LARGE_FLOAT;
|
||||||
|
}
|
||||||
|
cx = a*(cx + q*(p[n*2-2]+p[0]));
|
||||||
|
cy = a*(cy + q*(p[n*2-1]+p[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
// compute the angle of each point w.r.t. the centroid
|
||||||
|
btScalar A[8];
|
||||||
|
for (i=0; i<n; i++) A[i] = btAtan2(p[i*2+1]-cy,p[i*2]-cx);
|
||||||
|
|
||||||
|
// search for points that have angles closest to A[i0] + i*(2*pi/m).
|
||||||
|
int avail[8];
|
||||||
|
for (i=0; i<n; i++) avail[i] = 1;
|
||||||
|
avail[i0] = 0;
|
||||||
|
iret[0] = i0;
|
||||||
|
iret++;
|
||||||
|
for (j=1; j<m; j++) {
|
||||||
|
a = btScalar(j)*(2*M__PI/m) + A[i0];
|
||||||
|
if (a > M__PI) a -= 2*M__PI;
|
||||||
|
btScalar maxdiff=1e9,diff;
|
||||||
|
|
||||||
|
*iret = i0; // iret is not allowed to keep this value, but it sometimes does, when diff=#QNAN0
|
||||||
|
|
||||||
|
for (i=0; i<n; i++) {
|
||||||
|
if (avail[i]) {
|
||||||
|
diff = btFabs (A[i]-a);
|
||||||
|
if (diff > M__PI) diff = 2*M__PI - diff;
|
||||||
|
if (diff < maxdiff) {
|
||||||
|
maxdiff = diff;
|
||||||
|
*iret = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if defined(DEBUG) || defined (_DEBUG)
|
||||||
|
btAssert (*iret != i0); // ensure iret got set
|
||||||
|
#endif
|
||||||
|
avail[*iret] = 0;
|
||||||
|
iret++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int dBoxBox2 (const btVector3& p1, const dMatrix3 R1,
|
||||||
|
const btVector3& side1, const btVector3& p2,
|
||||||
|
const dMatrix3 R2, const btVector3& side2,
|
||||||
|
btVector3& normal, btScalar *depth, int *return_code,
|
||||||
|
int maxc, dContactGeom * /*contact*/, int /*skip*/,btDiscreteCollisionDetectorInterface::Result& output);
|
||||||
|
int dBoxBox2 (const btVector3& p1, const dMatrix3 R1,
|
||||||
|
const btVector3& side1, const btVector3& p2,
|
||||||
|
const dMatrix3 R2, const btVector3& side2,
|
||||||
|
btVector3& normal, btScalar *depth, int *return_code,
|
||||||
|
int maxc, dContactGeom * /*contact*/, int /*skip*/,btDiscreteCollisionDetectorInterface::Result& output)
|
||||||
|
{
|
||||||
|
const btScalar fudge_factor = btScalar(1.05);
|
||||||
|
btVector3 p,pp,normalC(0.f,0.f,0.f);
|
||||||
|
const btScalar *normalR = 0;
|
||||||
|
btScalar A[3],B[3],R11,R12,R13,R21,R22,R23,R31,R32,R33,
|
||||||
|
Q11,Q12,Q13,Q21,Q22,Q23,Q31,Q32,Q33,s,s2,l;
|
||||||
|
int i,j,invert_normal,code;
|
||||||
|
|
||||||
|
// get vector from centers of box 1 to box 2, relative to box 1
|
||||||
|
p = p2 - p1;
|
||||||
|
dMULTIPLY1_331 (pp,R1,p); // get pp = p relative to body 1
|
||||||
|
|
||||||
|
// get side lengths / 2
|
||||||
|
A[0] = side1[0]*btScalar(0.5);
|
||||||
|
A[1] = side1[1]*btScalar(0.5);
|
||||||
|
A[2] = side1[2]*btScalar(0.5);
|
||||||
|
B[0] = side2[0]*btScalar(0.5);
|
||||||
|
B[1] = side2[1]*btScalar(0.5);
|
||||||
|
B[2] = side2[2]*btScalar(0.5);
|
||||||
|
|
||||||
|
// Rij is R1'*R2, i.e. the relative rotation between R1 and R2
|
||||||
|
R11 = dDOT44(R1+0,R2+0); R12 = dDOT44(R1+0,R2+1); R13 = dDOT44(R1+0,R2+2);
|
||||||
|
R21 = dDOT44(R1+1,R2+0); R22 = dDOT44(R1+1,R2+1); R23 = dDOT44(R1+1,R2+2);
|
||||||
|
R31 = dDOT44(R1+2,R2+0); R32 = dDOT44(R1+2,R2+1); R33 = dDOT44(R1+2,R2+2);
|
||||||
|
|
||||||
|
Q11 = btFabs(R11); Q12 = btFabs(R12); Q13 = btFabs(R13);
|
||||||
|
Q21 = btFabs(R21); Q22 = btFabs(R22); Q23 = btFabs(R23);
|
||||||
|
Q31 = btFabs(R31); Q32 = btFabs(R32); Q33 = btFabs(R33);
|
||||||
|
|
||||||
|
// for all 15 possible separating axes:
|
||||||
|
// * see if the axis separates the boxes. if so, return 0.
|
||||||
|
// * find the depth of the penetration along the separating axis (s2)
|
||||||
|
// * if this is the largest depth so far, record it.
|
||||||
|
// the normal vector will be set to the separating axis with the smallest
|
||||||
|
// depth. note: normalR is set to point to a column of R1 or R2 if that is
|
||||||
|
// the smallest depth normal so far. otherwise normalR is 0 and normalC is
|
||||||
|
// set to a vector relative to body 1. invert_normal is 1 if the sign of
|
||||||
|
// the normal should be flipped.
|
||||||
|
|
||||||
|
#define TST(expr1,expr2,norm,cc) \
|
||||||
|
s2 = btFabs(expr1) - (expr2); \
|
||||||
|
if (s2 > 0) return 0; \
|
||||||
|
if (s2 > s) { \
|
||||||
|
s = s2; \
|
||||||
|
normalR = norm; \
|
||||||
|
invert_normal = ((expr1) < 0); \
|
||||||
|
code = (cc); \
|
||||||
|
}
|
||||||
|
|
||||||
|
s = -dInfinity;
|
||||||
|
invert_normal = 0;
|
||||||
|
code = 0;
|
||||||
|
|
||||||
|
// separating axis = u1,u2,u3
|
||||||
|
TST (pp[0],(A[0] + B[0]*Q11 + B[1]*Q12 + B[2]*Q13),R1+0,1);
|
||||||
|
TST (pp[1],(A[1] + B[0]*Q21 + B[1]*Q22 + B[2]*Q23),R1+1,2);
|
||||||
|
TST (pp[2],(A[2] + B[0]*Q31 + B[1]*Q32 + B[2]*Q33),R1+2,3);
|
||||||
|
|
||||||
|
// separating axis = v1,v2,v3
|
||||||
|
TST (dDOT41(R2+0,p),(A[0]*Q11 + A[1]*Q21 + A[2]*Q31 + B[0]),R2+0,4);
|
||||||
|
TST (dDOT41(R2+1,p),(A[0]*Q12 + A[1]*Q22 + A[2]*Q32 + B[1]),R2+1,5);
|
||||||
|
TST (dDOT41(R2+2,p),(A[0]*Q13 + A[1]*Q23 + A[2]*Q33 + B[2]),R2+2,6);
|
||||||
|
|
||||||
|
// note: cross product axes need to be scaled when s is computed.
|
||||||
|
// normal (n1,n2,n3) is relative to box 1.
|
||||||
|
#undef TST
|
||||||
|
#define TST(expr1,expr2,n1,n2,n3,cc) \
|
||||||
|
s2 = btFabs(expr1) - (expr2); \
|
||||||
|
if (s2 > SIMD_EPSILON) return 0; \
|
||||||
|
l = btSqrt((n1)*(n1) + (n2)*(n2) + (n3)*(n3)); \
|
||||||
|
if (l > SIMD_EPSILON) { \
|
||||||
|
s2 /= l; \
|
||||||
|
if (s2*fudge_factor > s) { \
|
||||||
|
s = s2; \
|
||||||
|
normalR = 0; \
|
||||||
|
normalC[0] = (n1)/l; normalC[1] = (n2)/l; normalC[2] = (n3)/l; \
|
||||||
|
invert_normal = ((expr1) < 0); \
|
||||||
|
code = (cc); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar fudge2 (1.0e-5f);
|
||||||
|
|
||||||
|
Q11 += fudge2;
|
||||||
|
Q12 += fudge2;
|
||||||
|
Q13 += fudge2;
|
||||||
|
|
||||||
|
Q21 += fudge2;
|
||||||
|
Q22 += fudge2;
|
||||||
|
Q23 += fudge2;
|
||||||
|
|
||||||
|
Q31 += fudge2;
|
||||||
|
Q32 += fudge2;
|
||||||
|
Q33 += fudge2;
|
||||||
|
|
||||||
|
// separating axis = u1 x (v1,v2,v3)
|
||||||
|
TST(pp[2]*R21-pp[1]*R31,(A[1]*Q31+A[2]*Q21+B[1]*Q13+B[2]*Q12),0,-R31,R21,7);
|
||||||
|
TST(pp[2]*R22-pp[1]*R32,(A[1]*Q32+A[2]*Q22+B[0]*Q13+B[2]*Q11),0,-R32,R22,8);
|
||||||
|
TST(pp[2]*R23-pp[1]*R33,(A[1]*Q33+A[2]*Q23+B[0]*Q12+B[1]*Q11),0,-R33,R23,9);
|
||||||
|
|
||||||
|
// separating axis = u2 x (v1,v2,v3)
|
||||||
|
TST(pp[0]*R31-pp[2]*R11,(A[0]*Q31+A[2]*Q11+B[1]*Q23+B[2]*Q22),R31,0,-R11,10);
|
||||||
|
TST(pp[0]*R32-pp[2]*R12,(A[0]*Q32+A[2]*Q12+B[0]*Q23+B[2]*Q21),R32,0,-R12,11);
|
||||||
|
TST(pp[0]*R33-pp[2]*R13,(A[0]*Q33+A[2]*Q13+B[0]*Q22+B[1]*Q21),R33,0,-R13,12);
|
||||||
|
|
||||||
|
// separating axis = u3 x (v1,v2,v3)
|
||||||
|
TST(pp[1]*R11-pp[0]*R21,(A[0]*Q21+A[1]*Q11+B[1]*Q33+B[2]*Q32),-R21,R11,0,13);
|
||||||
|
TST(pp[1]*R12-pp[0]*R22,(A[0]*Q22+A[1]*Q12+B[0]*Q33+B[2]*Q31),-R22,R12,0,14);
|
||||||
|
TST(pp[1]*R13-pp[0]*R23,(A[0]*Q23+A[1]*Q13+B[0]*Q32+B[1]*Q31),-R23,R13,0,15);
|
||||||
|
|
||||||
|
#undef TST
|
||||||
|
|
||||||
|
if (!code) return 0;
|
||||||
|
|
||||||
|
// if we get to this point, the boxes interpenetrate. compute the normal
|
||||||
|
// in global coordinates.
|
||||||
|
if (normalR) {
|
||||||
|
normal[0] = normalR[0];
|
||||||
|
normal[1] = normalR[4];
|
||||||
|
normal[2] = normalR[8];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dMULTIPLY0_331 (normal,R1,normalC);
|
||||||
|
}
|
||||||
|
if (invert_normal) {
|
||||||
|
normal[0] = -normal[0];
|
||||||
|
normal[1] = -normal[1];
|
||||||
|
normal[2] = -normal[2];
|
||||||
|
}
|
||||||
|
*depth = -s;
|
||||||
|
|
||||||
|
// compute contact point(s)
|
||||||
|
|
||||||
|
if (code > 6) {
|
||||||
|
// an edge from box 1 touches an edge from box 2.
|
||||||
|
// find a point pa on the intersecting edge of box 1
|
||||||
|
btVector3 pa;
|
||||||
|
btScalar sign;
|
||||||
|
for (i=0; i<3; i++) pa[i] = p1[i];
|
||||||
|
for (j=0; j<3; j++) {
|
||||||
|
sign = (dDOT14(normal,R1+j) > 0) ? btScalar(1.0) : btScalar(-1.0);
|
||||||
|
for (i=0; i<3; i++) pa[i] += sign * A[j] * R1[i*4+j];
|
||||||
|
}
|
||||||
|
|
||||||
|
// find a point pb on the intersecting edge of box 2
|
||||||
|
btVector3 pb;
|
||||||
|
for (i=0; i<3; i++) pb[i] = p2[i];
|
||||||
|
for (j=0; j<3; j++) {
|
||||||
|
sign = (dDOT14(normal,R2+j) > 0) ? btScalar(-1.0) : btScalar(1.0);
|
||||||
|
for (i=0; i<3; i++) pb[i] += sign * B[j] * R2[i*4+j];
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar alpha,beta;
|
||||||
|
btVector3 ua,ub;
|
||||||
|
for (i=0; i<3; i++) ua[i] = R1[((code)-7)/3 + i*4];
|
||||||
|
for (i=0; i<3; i++) ub[i] = R2[((code)-7)%3 + i*4];
|
||||||
|
|
||||||
|
dLineClosestApproach (pa,ua,pb,ub,&alpha,&beta);
|
||||||
|
for (i=0; i<3; i++) pa[i] += ua[i]*alpha;
|
||||||
|
for (i=0; i<3; i++) pb[i] += ub[i]*beta;
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
//contact[0].pos[i] = btScalar(0.5)*(pa[i]+pb[i]);
|
||||||
|
//contact[0].depth = *depth;
|
||||||
|
btVector3 pointInWorld;
|
||||||
|
|
||||||
|
#ifdef USE_CENTER_POINT
|
||||||
|
for (i=0; i<3; i++)
|
||||||
|
pointInWorld[i] = (pa[i]+pb[i])*btScalar(0.5);
|
||||||
|
output.addContactPoint(-normal,pointInWorld,-*depth);
|
||||||
|
#else
|
||||||
|
output.addContactPoint(-normal,pb,-*depth);
|
||||||
|
|
||||||
|
#endif //
|
||||||
|
*return_code = code;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// okay, we have a face-something intersection (because the separating
|
||||||
|
// axis is perpendicular to a face). define face 'a' to be the reference
|
||||||
|
// face (i.e. the normal vector is perpendicular to this) and face 'b' to be
|
||||||
|
// the incident face (the closest face of the other box).
|
||||||
|
|
||||||
|
const btScalar *Ra,*Rb,*pa,*pb,*Sa,*Sb;
|
||||||
|
if (code <= 3) {
|
||||||
|
Ra = R1;
|
||||||
|
Rb = R2;
|
||||||
|
pa = p1;
|
||||||
|
pb = p2;
|
||||||
|
Sa = A;
|
||||||
|
Sb = B;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Ra = R2;
|
||||||
|
Rb = R1;
|
||||||
|
pa = p2;
|
||||||
|
pb = p1;
|
||||||
|
Sa = B;
|
||||||
|
Sb = A;
|
||||||
|
}
|
||||||
|
|
||||||
|
// nr = normal vector of reference face dotted with axes of incident box.
|
||||||
|
// anr = absolute values of nr.
|
||||||
|
btVector3 normal2,nr,anr;
|
||||||
|
if (code <= 3) {
|
||||||
|
normal2[0] = normal[0];
|
||||||
|
normal2[1] = normal[1];
|
||||||
|
normal2[2] = normal[2];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
normal2[0] = -normal[0];
|
||||||
|
normal2[1] = -normal[1];
|
||||||
|
normal2[2] = -normal[2];
|
||||||
|
}
|
||||||
|
dMULTIPLY1_331 (nr,Rb,normal2);
|
||||||
|
anr[0] = btFabs (nr[0]);
|
||||||
|
anr[1] = btFabs (nr[1]);
|
||||||
|
anr[2] = btFabs (nr[2]);
|
||||||
|
|
||||||
|
// find the largest compontent of anr: this corresponds to the normal
|
||||||
|
// for the indident face. the other axis numbers of the indicent face
|
||||||
|
// are stored in a1,a2.
|
||||||
|
int lanr,a1,a2;
|
||||||
|
if (anr[1] > anr[0]) {
|
||||||
|
if (anr[1] > anr[2]) {
|
||||||
|
a1 = 0;
|
||||||
|
lanr = 1;
|
||||||
|
a2 = 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
a1 = 0;
|
||||||
|
a2 = 1;
|
||||||
|
lanr = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (anr[0] > anr[2]) {
|
||||||
|
lanr = 0;
|
||||||
|
a1 = 1;
|
||||||
|
a2 = 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
a1 = 0;
|
||||||
|
a2 = 1;
|
||||||
|
lanr = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// compute center point of incident face, in reference-face coordinates
|
||||||
|
btVector3 center;
|
||||||
|
if (nr[lanr] < 0) {
|
||||||
|
for (i=0; i<3; i++) center[i] = pb[i] - pa[i] + Sb[lanr] * Rb[i*4+lanr];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (i=0; i<3; i++) center[i] = pb[i] - pa[i] - Sb[lanr] * Rb[i*4+lanr];
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the normal and non-normal axis numbers of the reference box
|
||||||
|
int codeN,code1,code2;
|
||||||
|
if (code <= 3) codeN = code-1; else codeN = code-4;
|
||||||
|
if (codeN==0) {
|
||||||
|
code1 = 1;
|
||||||
|
code2 = 2;
|
||||||
|
}
|
||||||
|
else if (codeN==1) {
|
||||||
|
code1 = 0;
|
||||||
|
code2 = 2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
code1 = 0;
|
||||||
|
code2 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the four corners of the incident face, in reference-face coordinates
|
||||||
|
btScalar quad[8]; // 2D coordinate of incident face (x,y pairs)
|
||||||
|
btScalar c1,c2,m11,m12,m21,m22;
|
||||||
|
c1 = dDOT14 (center,Ra+code1);
|
||||||
|
c2 = dDOT14 (center,Ra+code2);
|
||||||
|
// optimize this? - we have already computed this data above, but it is not
|
||||||
|
// stored in an easy-to-index format. for now it's quicker just to recompute
|
||||||
|
// the four dot products.
|
||||||
|
m11 = dDOT44 (Ra+code1,Rb+a1);
|
||||||
|
m12 = dDOT44 (Ra+code1,Rb+a2);
|
||||||
|
m21 = dDOT44 (Ra+code2,Rb+a1);
|
||||||
|
m22 = dDOT44 (Ra+code2,Rb+a2);
|
||||||
|
{
|
||||||
|
btScalar k1 = m11*Sb[a1];
|
||||||
|
btScalar k2 = m21*Sb[a1];
|
||||||
|
btScalar k3 = m12*Sb[a2];
|
||||||
|
btScalar k4 = m22*Sb[a2];
|
||||||
|
quad[0] = c1 - k1 - k3;
|
||||||
|
quad[1] = c2 - k2 - k4;
|
||||||
|
quad[2] = c1 - k1 + k3;
|
||||||
|
quad[3] = c2 - k2 + k4;
|
||||||
|
quad[4] = c1 + k1 + k3;
|
||||||
|
quad[5] = c2 + k2 + k4;
|
||||||
|
quad[6] = c1 + k1 - k3;
|
||||||
|
quad[7] = c2 + k2 - k4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the size of the reference face
|
||||||
|
btScalar rect[2];
|
||||||
|
rect[0] = Sa[code1];
|
||||||
|
rect[1] = Sa[code2];
|
||||||
|
|
||||||
|
// intersect the incident and reference faces
|
||||||
|
btScalar ret[16];
|
||||||
|
int n = intersectRectQuad2 (rect,quad,ret);
|
||||||
|
if (n < 1) return 0; // this should never happen
|
||||||
|
|
||||||
|
// convert the intersection points into reference-face coordinates,
|
||||||
|
// and compute the contact position and depth for each point. only keep
|
||||||
|
// those points that have a positive (penetrating) depth. delete points in
|
||||||
|
// the 'ret' array as necessary so that 'point' and 'ret' correspond.
|
||||||
|
btScalar point[3*8]; // penetrating contact points
|
||||||
|
btScalar dep[8]; // depths for those points
|
||||||
|
btScalar det1 = 1.f/(m11*m22 - m12*m21);
|
||||||
|
m11 *= det1;
|
||||||
|
m12 *= det1;
|
||||||
|
m21 *= det1;
|
||||||
|
m22 *= det1;
|
||||||
|
int cnum = 0; // number of penetrating contact points found
|
||||||
|
for (j=0; j < n; j++) {
|
||||||
|
btScalar k1 = m22*(ret[j*2]-c1) - m12*(ret[j*2+1]-c2);
|
||||||
|
btScalar k2 = -m21*(ret[j*2]-c1) + m11*(ret[j*2+1]-c2);
|
||||||
|
for (i=0; i<3; i++) point[cnum*3+i] =
|
||||||
|
center[i] + k1*Rb[i*4+a1] + k2*Rb[i*4+a2];
|
||||||
|
dep[cnum] = Sa[codeN] - dDOT(normal2,point+cnum*3);
|
||||||
|
if (dep[cnum] >= 0) {
|
||||||
|
ret[cnum*2] = ret[j*2];
|
||||||
|
ret[cnum*2+1] = ret[j*2+1];
|
||||||
|
cnum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cnum < 1) return 0; // this should never happen
|
||||||
|
|
||||||
|
// we can't generate more contacts than we actually have
|
||||||
|
if (maxc > cnum) maxc = cnum;
|
||||||
|
if (maxc < 1) maxc = 1;
|
||||||
|
|
||||||
|
if (cnum <= maxc) {
|
||||||
|
|
||||||
|
if (code<4)
|
||||||
|
{
|
||||||
|
// we have less contacts than we need, so we use them all
|
||||||
|
for (j=0; j < cnum; j++)
|
||||||
|
{
|
||||||
|
btVector3 pointInWorld;
|
||||||
|
for (i=0; i<3; i++)
|
||||||
|
pointInWorld[i] = point[j*3+i] + pa[i];
|
||||||
|
output.addContactPoint(-normal,pointInWorld,-dep[j]);
|
||||||
|
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// we have less contacts than we need, so we use them all
|
||||||
|
for (j=0; j < cnum; j++)
|
||||||
|
{
|
||||||
|
btVector3 pointInWorld;
|
||||||
|
for (i=0; i<3; i++)
|
||||||
|
pointInWorld[i] = point[j*3+i] + pa[i]-normal[i]*dep[j];
|
||||||
|
//pointInWorld[i] = point[j*3+i] + pa[i];
|
||||||
|
output.addContactPoint(-normal,pointInWorld,-dep[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// we have more contacts than are wanted, some of them must be culled.
|
||||||
|
// find the deepest point, it is always the first contact.
|
||||||
|
int i1 = 0;
|
||||||
|
btScalar maxdepth = dep[0];
|
||||||
|
for (i=1; i<cnum; i++) {
|
||||||
|
if (dep[i] > maxdepth) {
|
||||||
|
maxdepth = dep[i];
|
||||||
|
i1 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int iret[8];
|
||||||
|
cullPoints2 (cnum,ret,maxc,i1,iret);
|
||||||
|
|
||||||
|
for (j=0; j < maxc; j++) {
|
||||||
|
// dContactGeom *con = CONTACT(contact,skip*j);
|
||||||
|
// for (i=0; i<3; i++) con->pos[i] = point[iret[j]*3+i] + pa[i];
|
||||||
|
// con->depth = dep[iret[j]];
|
||||||
|
|
||||||
|
btVector3 posInWorld;
|
||||||
|
for (i=0; i<3; i++)
|
||||||
|
posInWorld[i] = point[iret[j]*3+i] + pa[i];
|
||||||
|
if (code<4)
|
||||||
|
{
|
||||||
|
output.addContactPoint(-normal,posInWorld,-dep[iret[j]]);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
output.addContactPoint(-normal,posInWorld-normal*dep[iret[j]],-dep[iret[j]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cnum = maxc;
|
||||||
|
}
|
||||||
|
|
||||||
|
*return_code = code;
|
||||||
|
return cnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btBoxBoxDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* /*debugDraw*/,bool /*swapResults*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
const btTransform& transformA = input.m_transformA;
|
||||||
|
const btTransform& transformB = input.m_transformB;
|
||||||
|
|
||||||
|
int skip = 0;
|
||||||
|
dContactGeom *contact = 0;
|
||||||
|
|
||||||
|
dMatrix3 R1;
|
||||||
|
dMatrix3 R2;
|
||||||
|
|
||||||
|
for (int j=0;j<3;j++)
|
||||||
|
{
|
||||||
|
R1[0+4*j] = transformA.getBasis()[j].x();
|
||||||
|
R2[0+4*j] = transformB.getBasis()[j].x();
|
||||||
|
|
||||||
|
R1[1+4*j] = transformA.getBasis()[j].y();
|
||||||
|
R2[1+4*j] = transformB.getBasis()[j].y();
|
||||||
|
|
||||||
|
|
||||||
|
R1[2+4*j] = transformA.getBasis()[j].z();
|
||||||
|
R2[2+4*j] = transformB.getBasis()[j].z();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btVector3 normal;
|
||||||
|
btScalar depth;
|
||||||
|
int return_code;
|
||||||
|
int maxc = 4;
|
||||||
|
|
||||||
|
|
||||||
|
dBoxBox2 (transformA.getOrigin(),
|
||||||
|
R1,
|
||||||
|
2.f*m_box1->getHalfExtentsWithMargin(),
|
||||||
|
transformB.getOrigin(),
|
||||||
|
R2,
|
||||||
|
2.f*m_box2->getHalfExtentsWithMargin(),
|
||||||
|
normal, &depth, &return_code,
|
||||||
|
maxc, contact, skip,
|
||||||
|
output
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Box-Box collision detection re-distributed under the ZLib license with permission from Russell L. Smith
|
||||||
|
* Original version is from Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.
|
||||||
|
* All rights reserved. Email: russ@q12.org Web: www.q12.org
|
||||||
|
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
#ifndef BT_BOX_BOX_DETECTOR_H
|
||||||
|
#define BT_BOX_BOX_DETECTOR_H
|
||||||
|
|
||||||
|
|
||||||
|
class btBoxShape;
|
||||||
|
#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
|
||||||
|
|
||||||
|
|
||||||
|
/// btBoxBoxDetector wraps the ODE box-box collision detector
|
||||||
|
/// re-distributed under the Zlib license with permission from Russell L. Smith
|
||||||
|
struct btBoxBoxDetector : public btDiscreteCollisionDetectorInterface
|
||||||
|
{
|
||||||
|
const btBoxShape* m_box1;
|
||||||
|
const btBoxShape* m_box2;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btBoxBoxDetector(const btBoxShape* box1,const btBoxShape* box2);
|
||||||
|
|
||||||
|
virtual ~btBoxBoxDetector() {};
|
||||||
|
|
||||||
|
virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_BOX_BOX_DETECTOR_H
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_COLLISION_CONFIGURATION
|
||||||
|
#define BT_COLLISION_CONFIGURATION
|
||||||
|
|
||||||
|
struct btCollisionAlgorithmCreateFunc;
|
||||||
|
|
||||||
|
class btPoolAllocator;
|
||||||
|
|
||||||
|
///btCollisionConfiguration allows to configure Bullet collision detection
|
||||||
|
///stack allocator size, default collision algorithms and persistent manifold pool size
|
||||||
|
///@todo: describe the meaning
|
||||||
|
class btCollisionConfiguration
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual ~btCollisionConfiguration()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
///memory pools
|
||||||
|
virtual btPoolAllocator* getPersistentManifoldPool() = 0;
|
||||||
|
|
||||||
|
virtual btPoolAllocator* getCollisionAlgorithmPool() = 0;
|
||||||
|
|
||||||
|
|
||||||
|
virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_COLLISION_CONFIGURATION
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_COLLISION_CREATE_FUNC
|
||||||
|
#define BT_COLLISION_CREATE_FUNC
|
||||||
|
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
class btCollisionAlgorithm;
|
||||||
|
class btCollisionObject;
|
||||||
|
struct btCollisionObjectWrapper;
|
||||||
|
struct btCollisionAlgorithmConstructionInfo;
|
||||||
|
|
||||||
|
///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm
|
||||||
|
struct btCollisionAlgorithmCreateFunc
|
||||||
|
{
|
||||||
|
bool m_swapped;
|
||||||
|
|
||||||
|
btCollisionAlgorithmCreateFunc()
|
||||||
|
:m_swapped(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual ~btCollisionAlgorithmCreateFunc(){};
|
||||||
|
|
||||||
|
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)body0Wrap;
|
||||||
|
(void)body1Wrap;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif //BT_COLLISION_CREATE_FUNC
|
||||||
|
|
|
@ -0,0 +1,314 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "btCollisionDispatcher.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
|
||||||
|
|
||||||
|
#include "BulletCollision/CollisionShapes/btCollisionShape.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
|
||||||
|
#include "LinearMath/btPoolAllocator.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h"
|
||||||
|
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
|
||||||
|
|
||||||
|
int gNumManifold = 0;
|
||||||
|
|
||||||
|
#ifdef BT_DEBUG
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
btCollisionDispatcher::btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration):
|
||||||
|
m_dispatcherFlags(btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD),
|
||||||
|
m_collisionConfiguration(collisionConfiguration)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
setNearCallback(defaultNearCallback);
|
||||||
|
|
||||||
|
m_collisionAlgorithmPoolAllocator = collisionConfiguration->getCollisionAlgorithmPool();
|
||||||
|
|
||||||
|
m_persistentManifoldPoolAllocator = collisionConfiguration->getPersistentManifoldPool();
|
||||||
|
|
||||||
|
for (i=0;i<MAX_BROADPHASE_COLLISION_TYPES;i++)
|
||||||
|
{
|
||||||
|
for (int j=0;j<MAX_BROADPHASE_COLLISION_TYPES;j++)
|
||||||
|
{
|
||||||
|
m_doubleDispatch[i][j] = m_collisionConfiguration->getCollisionAlgorithmCreateFunc(i,j);
|
||||||
|
btAssert(m_doubleDispatch[i][j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc *createFunc)
|
||||||
|
{
|
||||||
|
m_doubleDispatch[proxyType0][proxyType1] = createFunc;
|
||||||
|
}
|
||||||
|
|
||||||
|
btCollisionDispatcher::~btCollisionDispatcher()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
btPersistentManifold* btCollisionDispatcher::getNewManifold(const btCollisionObject* body0,const btCollisionObject* body1)
|
||||||
|
{
|
||||||
|
gNumManifold++;
|
||||||
|
|
||||||
|
//btAssert(gNumManifold < 65535);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//optional relative contact breaking threshold, turned on by default (use setDispatcherFlags to switch off feature for improved performance)
|
||||||
|
|
||||||
|
btScalar contactBreakingThreshold = (m_dispatcherFlags & btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD) ?
|
||||||
|
btMin(body0->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold) , body1->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold))
|
||||||
|
: gContactBreakingThreshold ;
|
||||||
|
|
||||||
|
btScalar contactProcessingThreshold = btMin(body0->getContactProcessingThreshold(),body1->getContactProcessingThreshold());
|
||||||
|
|
||||||
|
void* mem = 0;
|
||||||
|
|
||||||
|
if (m_persistentManifoldPoolAllocator->getFreeCount())
|
||||||
|
{
|
||||||
|
mem = m_persistentManifoldPoolAllocator->allocate(sizeof(btPersistentManifold));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//we got a pool memory overflow, by default we fallback to dynamically allocate memory. If we require a contiguous contact pool then assert.
|
||||||
|
if ((m_dispatcherFlags&CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION)==0)
|
||||||
|
{
|
||||||
|
mem = btAlignedAlloc(sizeof(btPersistentManifold),16);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
btAssert(0);
|
||||||
|
//make sure to increase the m_defaultMaxPersistentManifoldPoolSize in the btDefaultCollisionConstructionInfo/btDefaultCollisionConfiguration
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0,contactBreakingThreshold,contactProcessingThreshold);
|
||||||
|
manifold->m_index1a = m_manifoldsPtr.size();
|
||||||
|
m_manifoldsPtr.push_back(manifold);
|
||||||
|
|
||||||
|
return manifold;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btCollisionDispatcher::clearManifold(btPersistentManifold* manifold)
|
||||||
|
{
|
||||||
|
manifold->clearManifold();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold)
|
||||||
|
{
|
||||||
|
|
||||||
|
gNumManifold--;
|
||||||
|
|
||||||
|
//printf("releaseManifold: gNumManifold %d\n",gNumManifold);
|
||||||
|
clearManifold(manifold);
|
||||||
|
|
||||||
|
int findIndex = manifold->m_index1a;
|
||||||
|
btAssert(findIndex < m_manifoldsPtr.size());
|
||||||
|
m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1);
|
||||||
|
m_manifoldsPtr[findIndex]->m_index1a = findIndex;
|
||||||
|
m_manifoldsPtr.pop_back();
|
||||||
|
|
||||||
|
manifold->~btPersistentManifold();
|
||||||
|
if (m_persistentManifoldPoolAllocator->validPtr(manifold))
|
||||||
|
{
|
||||||
|
m_persistentManifoldPoolAllocator->freeMemory(manifold);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
btAlignedFree(manifold);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btPersistentManifold* sharedManifold)
|
||||||
|
{
|
||||||
|
|
||||||
|
btCollisionAlgorithmConstructionInfo ci;
|
||||||
|
|
||||||
|
ci.m_dispatcher1 = this;
|
||||||
|
ci.m_manifold = sharedManifold;
|
||||||
|
btCollisionAlgorithm* algo = m_doubleDispatch[body0Wrap->getCollisionShape()->getShapeType()][body1Wrap->getCollisionShape()->getShapeType()]->CreateCollisionAlgorithm(ci,body0Wrap,body1Wrap);
|
||||||
|
|
||||||
|
return algo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bool btCollisionDispatcher::needsResponse(const btCollisionObject* body0,const btCollisionObject* body1)
|
||||||
|
{
|
||||||
|
//here you can do filtering
|
||||||
|
bool hasResponse =
|
||||||
|
(body0->hasContactResponse() && body1->hasContactResponse());
|
||||||
|
//no response between two static/kinematic bodies:
|
||||||
|
hasResponse = hasResponse &&
|
||||||
|
((!body0->isStaticOrKinematicObject()) ||(! body1->isStaticOrKinematicObject()));
|
||||||
|
return hasResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool btCollisionDispatcher::needsCollision(const btCollisionObject* body0,const btCollisionObject* body1)
|
||||||
|
{
|
||||||
|
btAssert(body0);
|
||||||
|
btAssert(body1);
|
||||||
|
|
||||||
|
bool needsCollision = true;
|
||||||
|
|
||||||
|
#ifdef BT_DEBUG
|
||||||
|
if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
|
||||||
|
{
|
||||||
|
//broadphase filtering already deals with this
|
||||||
|
if (body0->isStaticOrKinematicObject() && body1->isStaticOrKinematicObject())
|
||||||
|
{
|
||||||
|
m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
|
||||||
|
printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif //BT_DEBUG
|
||||||
|
|
||||||
|
if ((!body0->isActive()) && (!body1->isActive()))
|
||||||
|
needsCollision = false;
|
||||||
|
else if (!body0->checkCollideWith(body1))
|
||||||
|
needsCollision = false;
|
||||||
|
|
||||||
|
return needsCollision ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///interface for iterating all overlapping collision pairs, no matter how those pairs are stored (array, set, map etc)
|
||||||
|
///this is useful for the collision dispatcher.
|
||||||
|
class btCollisionPairCallback : public btOverlapCallback
|
||||||
|
{
|
||||||
|
const btDispatcherInfo& m_dispatchInfo;
|
||||||
|
btCollisionDispatcher* m_dispatcher;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btCollisionPairCallback(const btDispatcherInfo& dispatchInfo,btCollisionDispatcher* dispatcher)
|
||||||
|
:m_dispatchInfo(dispatchInfo),
|
||||||
|
m_dispatcher(dispatcher)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*btCollisionPairCallback& operator=(btCollisionPairCallback& other)
|
||||||
|
{
|
||||||
|
m_dispatchInfo = other.m_dispatchInfo;
|
||||||
|
m_dispatcher = other.m_dispatcher;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
virtual ~btCollisionPairCallback() {}
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool processOverlap(btBroadphasePair& pair)
|
||||||
|
{
|
||||||
|
(*m_dispatcher->getNearCallback())(pair,*m_dispatcher,m_dispatchInfo);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher)
|
||||||
|
{
|
||||||
|
//m_blockedForChanges = true;
|
||||||
|
|
||||||
|
btCollisionPairCallback collisionCallback(dispatchInfo,this);
|
||||||
|
|
||||||
|
pairCache->processAllOverlappingPairs(&collisionCallback,dispatcher);
|
||||||
|
|
||||||
|
//m_blockedForChanges = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//by default, Bullet will use this near callback
|
||||||
|
void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo)
|
||||||
|
{
|
||||||
|
btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
|
||||||
|
btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
|
||||||
|
|
||||||
|
if (dispatcher.needsCollision(colObj0,colObj1))
|
||||||
|
{
|
||||||
|
btCollisionObjectWrapper obj0Wrap(0,colObj0->getCollisionShape(),colObj0,colObj0->getWorldTransform(),-1,-1);
|
||||||
|
btCollisionObjectWrapper obj1Wrap(0,colObj1->getCollisionShape(),colObj1,colObj1->getWorldTransform(),-1,-1);
|
||||||
|
|
||||||
|
|
||||||
|
//dispatcher will keep algorithms persistent in the collision pair
|
||||||
|
if (!collisionPair.m_algorithm)
|
||||||
|
{
|
||||||
|
collisionPair.m_algorithm = dispatcher.findAlgorithm(&obj0Wrap,&obj1Wrap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (collisionPair.m_algorithm)
|
||||||
|
{
|
||||||
|
btManifoldResult contactPointResult(&obj0Wrap,&obj1Wrap);
|
||||||
|
|
||||||
|
if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE)
|
||||||
|
{
|
||||||
|
//discrete collision detection query
|
||||||
|
|
||||||
|
collisionPair.m_algorithm->processCollision(&obj0Wrap,&obj1Wrap,dispatchInfo,&contactPointResult);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//continuous collision detection query, time of impact (toi)
|
||||||
|
btScalar toi = collisionPair.m_algorithm->calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&contactPointResult);
|
||||||
|
if (dispatchInfo.m_timeOfImpact > toi)
|
||||||
|
dispatchInfo.m_timeOfImpact = toi;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void* btCollisionDispatcher::allocateCollisionAlgorithm(int size)
|
||||||
|
{
|
||||||
|
if (m_collisionAlgorithmPoolAllocator->getFreeCount())
|
||||||
|
{
|
||||||
|
return m_collisionAlgorithmPoolAllocator->allocate(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
//warn user for overflow?
|
||||||
|
return btAlignedAlloc(static_cast<size_t>(size), 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
void btCollisionDispatcher::freeCollisionAlgorithm(void* ptr)
|
||||||
|
{
|
||||||
|
if (m_collisionAlgorithmPoolAllocator->validPtr(ptr))
|
||||||
|
{
|
||||||
|
m_collisionAlgorithmPoolAllocator->freeMemory(ptr);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
btAlignedFree(ptr);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_COLLISION__DISPATCHER_H
|
||||||
|
#define BT_COLLISION__DISPATCHER_H
|
||||||
|
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
|
||||||
|
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
|
||||||
|
|
||||||
|
#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
|
||||||
|
|
||||||
|
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
|
||||||
|
class btIDebugDraw;
|
||||||
|
class btOverlappingPairCache;
|
||||||
|
class btPoolAllocator;
|
||||||
|
class btCollisionConfiguration;
|
||||||
|
|
||||||
|
#include "btCollisionCreateFunc.h"
|
||||||
|
|
||||||
|
#define USE_DISPATCH_REGISTRY_ARRAY 1
|
||||||
|
|
||||||
|
class btCollisionDispatcher;
|
||||||
|
///user can override this nearcallback for collision filtering and more finegrained control over collision detection
|
||||||
|
typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo);
|
||||||
|
|
||||||
|
|
||||||
|
///btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs.
|
||||||
|
///Time of Impact, Closest Points and Penetration Depth.
|
||||||
|
class btCollisionDispatcher : public btDispatcher
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int m_dispatcherFlags;
|
||||||
|
|
||||||
|
btAlignedObjectArray<btPersistentManifold*> m_manifoldsPtr;
|
||||||
|
|
||||||
|
btManifoldResult m_defaultManifoldResult;
|
||||||
|
|
||||||
|
btNearCallback m_nearCallback;
|
||||||
|
|
||||||
|
btPoolAllocator* m_collisionAlgorithmPoolAllocator;
|
||||||
|
|
||||||
|
btPoolAllocator* m_persistentManifoldPoolAllocator;
|
||||||
|
|
||||||
|
btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES];
|
||||||
|
|
||||||
|
btCollisionConfiguration* m_collisionConfiguration;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
enum DispatcherFlags
|
||||||
|
{
|
||||||
|
CD_STATIC_STATIC_REPORTED = 1,
|
||||||
|
CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2,
|
||||||
|
CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4
|
||||||
|
};
|
||||||
|
|
||||||
|
int getDispatcherFlags() const
|
||||||
|
{
|
||||||
|
return m_dispatcherFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setDispatcherFlags(int flags)
|
||||||
|
{
|
||||||
|
m_dispatcherFlags = flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
|
||||||
|
void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc);
|
||||||
|
|
||||||
|
int getNumManifolds() const
|
||||||
|
{
|
||||||
|
return int( m_manifoldsPtr.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
btPersistentManifold** getInternalManifoldPointer()
|
||||||
|
{
|
||||||
|
return m_manifoldsPtr.size()? &m_manifoldsPtr[0] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
btPersistentManifold* getManifoldByIndexInternal(int index)
|
||||||
|
{
|
||||||
|
return m_manifoldsPtr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
const btPersistentManifold* getManifoldByIndexInternal(int index) const
|
||||||
|
{
|
||||||
|
return m_manifoldsPtr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration);
|
||||||
|
|
||||||
|
virtual ~btCollisionDispatcher();
|
||||||
|
|
||||||
|
virtual btPersistentManifold* getNewManifold(const btCollisionObject* b0,const btCollisionObject* b1);
|
||||||
|
|
||||||
|
virtual void releaseManifold(btPersistentManifold* manifold);
|
||||||
|
|
||||||
|
|
||||||
|
virtual void clearManifold(btPersistentManifold* manifold);
|
||||||
|
|
||||||
|
btCollisionAlgorithm* findAlgorithm(const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,btPersistentManifold* sharedManifold = 0);
|
||||||
|
|
||||||
|
virtual bool needsCollision(const btCollisionObject* body0,const btCollisionObject* body1);
|
||||||
|
|
||||||
|
virtual bool needsResponse(const btCollisionObject* body0,const btCollisionObject* body1);
|
||||||
|
|
||||||
|
virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) ;
|
||||||
|
|
||||||
|
void setNearCallback(btNearCallback nearCallback)
|
||||||
|
{
|
||||||
|
m_nearCallback = nearCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
btNearCallback getNearCallback() const
|
||||||
|
{
|
||||||
|
return m_nearCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
//by default, Bullet will use this near callback
|
||||||
|
static void defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo);
|
||||||
|
|
||||||
|
virtual void* allocateCollisionAlgorithm(int size);
|
||||||
|
|
||||||
|
virtual void freeCollisionAlgorithm(void* ptr);
|
||||||
|
|
||||||
|
btCollisionConfiguration* getCollisionConfiguration()
|
||||||
|
{
|
||||||
|
return m_collisionConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btCollisionConfiguration* getCollisionConfiguration() const
|
||||||
|
{
|
||||||
|
return m_collisionConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCollisionConfiguration(btCollisionConfiguration* config)
|
||||||
|
{
|
||||||
|
m_collisionConfiguration = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual btPoolAllocator* getInternalManifoldPool()
|
||||||
|
{
|
||||||
|
return m_persistentManifoldPoolAllocator;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual const btPoolAllocator* getInternalManifoldPool() const
|
||||||
|
{
|
||||||
|
return m_persistentManifoldPoolAllocator;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_COLLISION__DISPATCHER_H
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "btCollisionObject.h"
|
||||||
|
#include "LinearMath/btSerializer.h"
|
||||||
|
|
||||||
|
btCollisionObject::btCollisionObject()
|
||||||
|
: m_anisotropicFriction(1.f,1.f,1.f),
|
||||||
|
m_hasAnisotropicFriction(false),
|
||||||
|
m_contactProcessingThreshold(BT_LARGE_FLOAT),
|
||||||
|
m_broadphaseHandle(0),
|
||||||
|
m_collisionShape(0),
|
||||||
|
m_extensionPointer(0),
|
||||||
|
m_rootCollisionShape(0),
|
||||||
|
m_collisionFlags(btCollisionObject::CF_STATIC_OBJECT),
|
||||||
|
m_islandTag1(-1),
|
||||||
|
m_companionId(-1),
|
||||||
|
m_activationState1(1),
|
||||||
|
m_deactivationTime(btScalar(0.)),
|
||||||
|
m_friction(btScalar(0.5)),
|
||||||
|
m_rollingFriction(0.0f),
|
||||||
|
m_restitution(btScalar(0.)),
|
||||||
|
m_internalType(CO_COLLISION_OBJECT),
|
||||||
|
m_userObjectPointer(0),
|
||||||
|
m_hitFraction(btScalar(1.)),
|
||||||
|
m_ccdSweptSphereRadius(btScalar(0.)),
|
||||||
|
m_ccdMotionThreshold(btScalar(0.)),
|
||||||
|
m_checkCollideWith(false),
|
||||||
|
m_updateRevision(0)
|
||||||
|
{
|
||||||
|
m_worldTransform.setIdentity();
|
||||||
|
}
|
||||||
|
|
||||||
|
btCollisionObject::~btCollisionObject()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void btCollisionObject::setActivationState(int newState) const
|
||||||
|
{
|
||||||
|
if ( (m_activationState1 != DISABLE_DEACTIVATION) && (m_activationState1 != DISABLE_SIMULATION))
|
||||||
|
m_activationState1 = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btCollisionObject::forceActivationState(int newState) const
|
||||||
|
{
|
||||||
|
m_activationState1 = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btCollisionObject::activate(bool forceActivation) const
|
||||||
|
{
|
||||||
|
if (forceActivation || !(m_collisionFlags & (CF_STATIC_OBJECT|CF_KINEMATIC_OBJECT)))
|
||||||
|
{
|
||||||
|
setActivationState(ACTIVE_TAG);
|
||||||
|
m_deactivationTime = btScalar(0.);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* btCollisionObject::serialize(void* dataBuffer, btSerializer* serializer) const
|
||||||
|
{
|
||||||
|
|
||||||
|
btCollisionObjectData* dataOut = (btCollisionObjectData*)dataBuffer;
|
||||||
|
|
||||||
|
m_worldTransform.serialize(dataOut->m_worldTransform);
|
||||||
|
m_interpolationWorldTransform.serialize(dataOut->m_interpolationWorldTransform);
|
||||||
|
m_interpolationLinearVelocity.serialize(dataOut->m_interpolationLinearVelocity);
|
||||||
|
m_interpolationAngularVelocity.serialize(dataOut->m_interpolationAngularVelocity);
|
||||||
|
m_anisotropicFriction.serialize(dataOut->m_anisotropicFriction);
|
||||||
|
dataOut->m_hasAnisotropicFriction = m_hasAnisotropicFriction;
|
||||||
|
dataOut->m_contactProcessingThreshold = m_contactProcessingThreshold;
|
||||||
|
dataOut->m_broadphaseHandle = 0;
|
||||||
|
dataOut->m_collisionShape = serializer->getUniquePointer(m_collisionShape);
|
||||||
|
dataOut->m_rootCollisionShape = 0;//@todo
|
||||||
|
dataOut->m_collisionFlags = m_collisionFlags;
|
||||||
|
dataOut->m_islandTag1 = m_islandTag1;
|
||||||
|
dataOut->m_companionId = m_companionId;
|
||||||
|
dataOut->m_activationState1 = m_activationState1;
|
||||||
|
dataOut->m_deactivationTime = m_deactivationTime;
|
||||||
|
dataOut->m_friction = m_friction;
|
||||||
|
dataOut->m_rollingFriction = m_rollingFriction;
|
||||||
|
dataOut->m_restitution = m_restitution;
|
||||||
|
dataOut->m_internalType = m_internalType;
|
||||||
|
|
||||||
|
char* name = (char*) serializer->findNameForPointer(this);
|
||||||
|
dataOut->m_name = (char*)serializer->getUniquePointer(name);
|
||||||
|
if (dataOut->m_name)
|
||||||
|
{
|
||||||
|
serializer->serializeName(name);
|
||||||
|
}
|
||||||
|
dataOut->m_hitFraction = m_hitFraction;
|
||||||
|
dataOut->m_ccdSweptSphereRadius = m_ccdSweptSphereRadius;
|
||||||
|
dataOut->m_ccdMotionThreshold = m_ccdMotionThreshold;
|
||||||
|
dataOut->m_checkCollideWith = m_checkCollideWith;
|
||||||
|
|
||||||
|
return btCollisionObjectDataName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void btCollisionObject::serializeSingleObject(class btSerializer* serializer) const
|
||||||
|
{
|
||||||
|
int len = calculateSerializeBufferSize();
|
||||||
|
btChunk* chunk = serializer->allocate(len,1);
|
||||||
|
const char* structType = serialize(chunk->m_oldPtr, serializer);
|
||||||
|
serializer->finalizeChunk(chunk,structType,BT_COLLISIONOBJECT_CODE,(void*)this);
|
||||||
|
}
|
|
@ -0,0 +1,565 @@
|
||||||
|
/*
|
||||||
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
|
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied warranty.
|
||||||
|
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it freely,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BT_COLLISION_OBJECT_H
|
||||||
|
#define BT_COLLISION_OBJECT_H
|
||||||
|
|
||||||
|
#include "LinearMath/btTransform.h"
|
||||||
|
|
||||||
|
//island management, m_activationState1
|
||||||
|
#define ACTIVE_TAG 1
|
||||||
|
#define ISLAND_SLEEPING 2
|
||||||
|
#define WANTS_DEACTIVATION 3
|
||||||
|
#define DISABLE_DEACTIVATION 4
|
||||||
|
#define DISABLE_SIMULATION 5
|
||||||
|
|
||||||
|
struct btBroadphaseProxy;
|
||||||
|
class btCollisionShape;
|
||||||
|
struct btCollisionShapeData;
|
||||||
|
#include "LinearMath/btMotionState.h"
|
||||||
|
#include "LinearMath/btAlignedAllocator.h"
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
|
||||||
|
typedef btAlignedObjectArray<class btCollisionObject*> btCollisionObjectArray;
|
||||||
|
|
||||||
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
|
#define btCollisionObjectData btCollisionObjectDoubleData
|
||||||
|
#define btCollisionObjectDataName "btCollisionObjectDoubleData"
|
||||||
|
#else
|
||||||
|
#define btCollisionObjectData btCollisionObjectFloatData
|
||||||
|
#define btCollisionObjectDataName "btCollisionObjectFloatData"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/// btCollisionObject can be used to manage collision detection objects.
|
||||||
|
/// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy.
|
||||||
|
/// They can be added to the btCollisionWorld.
|
||||||
|
ATTRIBUTE_ALIGNED16(class) btCollisionObject
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
btTransform m_worldTransform;
|
||||||
|
|
||||||
|
///m_interpolationWorldTransform is used for CCD and interpolation
|
||||||
|
///it can be either previous or future (predicted) transform
|
||||||
|
btTransform m_interpolationWorldTransform;
|
||||||
|
//those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities)
|
||||||
|
//without destroying the continuous interpolated motion (which uses this interpolation velocities)
|
||||||
|
btVector3 m_interpolationLinearVelocity;
|
||||||
|
btVector3 m_interpolationAngularVelocity;
|
||||||
|
|
||||||
|
btVector3 m_anisotropicFriction;
|
||||||
|
int m_hasAnisotropicFriction;
|
||||||
|
btScalar m_contactProcessingThreshold;
|
||||||
|
|
||||||
|
btBroadphaseProxy* m_broadphaseHandle;
|
||||||
|
btCollisionShape* m_collisionShape;
|
||||||
|
///m_extensionPointer is used by some internal low-level Bullet extensions.
|
||||||
|
void* m_extensionPointer;
|
||||||
|
|
||||||
|
///m_rootCollisionShape is temporarily used to store the original collision shape
|
||||||
|
///The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes
|
||||||
|
///If it is NULL, the m_collisionShape is not temporarily replaced.
|
||||||
|
btCollisionShape* m_rootCollisionShape;
|
||||||
|
|
||||||
|
int m_collisionFlags;
|
||||||
|
|
||||||
|
int m_islandTag1;
|
||||||
|
int m_companionId;
|
||||||
|
|
||||||
|
mutable int m_activationState1;
|
||||||
|
mutable btScalar m_deactivationTime;
|
||||||
|
|
||||||
|
btScalar m_friction;
|
||||||
|
btScalar m_restitution;
|
||||||
|
btScalar m_rollingFriction;
|
||||||
|
|
||||||
|
///m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc.
|
||||||
|
///do not assign your own m_internalType unless you write a new dynamics object class.
|
||||||
|
int m_internalType;
|
||||||
|
|
||||||
|
///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer
|
||||||
|
union
|
||||||
|
{
|
||||||
|
void* m_userObjectPointer;
|
||||||
|
int m_userIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
///time of impact calculation
|
||||||
|
btScalar m_hitFraction;
|
||||||
|
|
||||||
|
///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
|
||||||
|
btScalar m_ccdSweptSphereRadius;
|
||||||
|
|
||||||
|
/// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
|
||||||
|
btScalar m_ccdMotionThreshold;
|
||||||
|
|
||||||
|
/// If some object should have elaborate collision filtering by sub-classes
|
||||||
|
int m_checkCollideWith;
|
||||||
|
|
||||||
|
///internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation.
|
||||||
|
int m_updateRevision;
|
||||||
|
|
||||||
|
virtual bool checkCollideWithOverride(const btCollisionObject* /* co */) const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
|
enum CollisionFlags
|
||||||
|
{
|
||||||
|
CF_STATIC_OBJECT= 1,
|
||||||
|
CF_KINEMATIC_OBJECT= 2,
|
||||||
|
CF_NO_CONTACT_RESPONSE = 4,
|
||||||
|
CF_CUSTOM_MATERIAL_CALLBACK = 8,//this allows per-triangle material (friction/restitution)
|
||||||
|
CF_CHARACTER_OBJECT = 16,
|
||||||
|
CF_DISABLE_VISUALIZE_OBJECT = 32, //disable debug drawing
|
||||||
|
CF_DISABLE_SPU_COLLISION_PROCESSING = 64//disable parallel/SPU processing
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CollisionObjectTypes
|
||||||
|
{
|
||||||
|
CO_COLLISION_OBJECT =1,
|
||||||
|
CO_RIGID_BODY=2,
|
||||||
|
///CO_GHOST_OBJECT keeps track of all objects overlapping its AABB and that pass its collision filter
|
||||||
|
///It is useful for collision sensors, explosion objects, character controller etc.
|
||||||
|
CO_GHOST_OBJECT=4,
|
||||||
|
CO_SOFT_BODY=8,
|
||||||
|
CO_HF_FLUID=16,
|
||||||
|
CO_USER_TYPE=32,
|
||||||
|
CO_FEATHERSTONE_LINK=64
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AnisotropicFrictionFlags
|
||||||
|
{
|
||||||
|
CF_ANISOTROPIC_FRICTION_DISABLED=0,
|
||||||
|
CF_ANISOTROPIC_FRICTION = 1,
|
||||||
|
CF_ANISOTROPIC_ROLLING_FRICTION = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool mergesSimulationIslands() const
|
||||||
|
{
|
||||||
|
///static objects, kinematic and object without contact response don't merge islands
|
||||||
|
return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const btVector3& getAnisotropicFriction() const
|
||||||
|
{
|
||||||
|
return m_anisotropicFriction;
|
||||||
|
}
|
||||||
|
void setAnisotropicFriction(const btVector3& anisotropicFriction, int frictionMode = CF_ANISOTROPIC_FRICTION)
|
||||||
|
{
|
||||||
|
m_anisotropicFriction = anisotropicFriction;
|
||||||
|
bool isUnity = (anisotropicFriction[0]!=1.f) || (anisotropicFriction[1]!=1.f) || (anisotropicFriction[2]!=1.f);
|
||||||
|
m_hasAnisotropicFriction = isUnity?frictionMode : 0;
|
||||||
|
}
|
||||||
|
bool hasAnisotropicFriction(int frictionMode = CF_ANISOTROPIC_FRICTION) const
|
||||||
|
{
|
||||||
|
return (m_hasAnisotropicFriction&frictionMode)!=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
///the constraint solver can discard solving contacts, if the distance is above this threshold. 0 by default.
|
||||||
|
///Note that using contacts with positive distance can improve stability. It increases, however, the chance of colliding with degerate contacts, such as 'interior' triangle edges
|
||||||
|
void setContactProcessingThreshold( btScalar contactProcessingThreshold)
|
||||||
|
{
|
||||||
|
m_contactProcessingThreshold = contactProcessingThreshold;
|
||||||
|
}
|
||||||
|
btScalar getContactProcessingThreshold() const
|
||||||
|
{
|
||||||
|
return m_contactProcessingThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool isStaticObject() const {
|
||||||
|
return (m_collisionFlags & CF_STATIC_OBJECT) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool isKinematicObject() const
|
||||||
|
{
|
||||||
|
return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const
|
||||||
|
{
|
||||||
|
return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool hasContactResponse() const {
|
||||||
|
return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
btCollisionObject();
|
||||||
|
|
||||||
|
virtual ~btCollisionObject();
|
||||||
|
|
||||||
|
virtual void setCollisionShape(btCollisionShape* collisionShape)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_collisionShape = collisionShape;
|
||||||
|
m_rootCollisionShape = collisionShape;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const
|
||||||
|
{
|
||||||
|
return m_collisionShape;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE btCollisionShape* getCollisionShape()
|
||||||
|
{
|
||||||
|
return m_collisionShape;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///Avoid using this internal API call, the extension pointer is used by some Bullet extensions.
|
||||||
|
///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
|
||||||
|
void* internalGetExtensionPointer() const
|
||||||
|
{
|
||||||
|
return m_extensionPointer;
|
||||||
|
}
|
||||||
|
///Avoid using this internal API call, the extension pointer is used by some Bullet extensions
|
||||||
|
///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
|
||||||
|
void internalSetExtensionPointer(void* pointer)
|
||||||
|
{
|
||||||
|
m_extensionPointer = pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1;}
|
||||||
|
|
||||||
|
void setActivationState(int newState) const;
|
||||||
|
|
||||||
|
void setDeactivationTime(btScalar time)
|
||||||
|
{
|
||||||
|
m_deactivationTime = time;
|
||||||
|
}
|
||||||
|
btScalar getDeactivationTime() const
|
||||||
|
{
|
||||||
|
return m_deactivationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
void forceActivationState(int newState) const;
|
||||||
|
|
||||||
|
void activate(bool forceActivation = false) const;
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE bool isActive() const
|
||||||
|
{
|
||||||
|
return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
|
||||||
|
}
|
||||||
|
|
||||||
|
void setRestitution(btScalar rest)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_restitution = rest;
|
||||||
|
}
|
||||||
|
btScalar getRestitution() const
|
||||||
|
{
|
||||||
|
return m_restitution;
|
||||||
|
}
|
||||||
|
void setFriction(btScalar frict)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_friction = frict;
|
||||||
|
}
|
||||||
|
btScalar getFriction() const
|
||||||
|
{
|
||||||
|
return m_friction;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setRollingFriction(btScalar frict)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_rollingFriction = frict;
|
||||||
|
}
|
||||||
|
btScalar getRollingFriction() const
|
||||||
|
{
|
||||||
|
return m_rollingFriction;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///reserved for Bullet internal usage
|
||||||
|
int getInternalType() const
|
||||||
|
{
|
||||||
|
return m_internalType;
|
||||||
|
}
|
||||||
|
|
||||||
|
btTransform& getWorldTransform()
|
||||||
|
{
|
||||||
|
return m_worldTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btTransform& getWorldTransform() const
|
||||||
|
{
|
||||||
|
return m_worldTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setWorldTransform(const btTransform& worldTrans)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_worldTransform = worldTrans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE btBroadphaseProxy* getBroadphaseHandle()
|
||||||
|
{
|
||||||
|
return m_broadphaseHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE const btBroadphaseProxy* getBroadphaseHandle() const
|
||||||
|
{
|
||||||
|
return m_broadphaseHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBroadphaseHandle(btBroadphaseProxy* handle)
|
||||||
|
{
|
||||||
|
m_broadphaseHandle = handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const btTransform& getInterpolationWorldTransform() const
|
||||||
|
{
|
||||||
|
return m_interpolationWorldTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
btTransform& getInterpolationWorldTransform()
|
||||||
|
{
|
||||||
|
return m_interpolationWorldTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setInterpolationWorldTransform(const btTransform& trans)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_interpolationWorldTransform = trans;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setInterpolationLinearVelocity(const btVector3& linvel)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_interpolationLinearVelocity = linvel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setInterpolationAngularVelocity(const btVector3& angvel)
|
||||||
|
{
|
||||||
|
m_updateRevision++;
|
||||||
|
m_interpolationAngularVelocity = angvel;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btVector3& getInterpolationLinearVelocity() const
|
||||||
|
{
|
||||||
|
return m_interpolationLinearVelocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
const btVector3& getInterpolationAngularVelocity() const
|
||||||
|
{
|
||||||
|
return m_interpolationAngularVelocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int getIslandTag() const
|
||||||
|
{
|
||||||
|
return m_islandTag1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setIslandTag(int tag)
|
||||||
|
{
|
||||||
|
m_islandTag1 = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int getCompanionId() const
|
||||||
|
{
|
||||||
|
return m_companionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCompanionId(int id)
|
||||||
|
{
|
||||||
|
m_companionId = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE btScalar getHitFraction() const
|
||||||
|
{
|
||||||
|
return m_hitFraction;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setHitFraction(btScalar hitFraction)
|
||||||
|
{
|
||||||
|
m_hitFraction = hitFraction;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int getCollisionFlags() const
|
||||||
|
{
|
||||||
|
return m_collisionFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCollisionFlags(int flags)
|
||||||
|
{
|
||||||
|
m_collisionFlags = flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
|
||||||
|
btScalar getCcdSweptSphereRadius() const
|
||||||
|
{
|
||||||
|
return m_ccdSweptSphereRadius;
|
||||||
|
}
|
||||||
|
|
||||||
|
///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
|
||||||
|
void setCcdSweptSphereRadius(btScalar radius)
|
||||||
|
{
|
||||||
|
m_ccdSweptSphereRadius = radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar getCcdMotionThreshold() const
|
||||||
|
{
|
||||||
|
return m_ccdMotionThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
btScalar getCcdSquareMotionThreshold() const
|
||||||
|
{
|
||||||
|
return m_ccdMotionThreshold*m_ccdMotionThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
|
||||||
|
void setCcdMotionThreshold(btScalar ccdMotionThreshold)
|
||||||
|
{
|
||||||
|
m_ccdMotionThreshold = ccdMotionThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
///users can point to their objects, userPointer is not used by Bullet
|
||||||
|
void* getUserPointer() const
|
||||||
|
{
|
||||||
|
return m_userObjectPointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getUserIndex() const
|
||||||
|
{
|
||||||
|
return m_userIndex;
|
||||||
|
}
|
||||||
|
///users can point to their objects, userPointer is not used by Bullet
|
||||||
|
void setUserPointer(void* userPointer)
|
||||||
|
{
|
||||||
|
m_userObjectPointer = userPointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
///users can point to their objects, userPointer is not used by Bullet
|
||||||
|
void setUserIndex(int index)
|
||||||
|
{
|
||||||
|
m_userIndex = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getUpdateRevisionInternal() const
|
||||||
|
{
|
||||||
|
return m_updateRevision;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool checkCollideWith(const btCollisionObject* co) const
|
||||||
|
{
|
||||||
|
if (m_checkCollideWith)
|
||||||
|
return checkCollideWithOverride(co);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual int calculateSerializeBufferSize() const;
|
||||||
|
|
||||||
|
///fills the dataBuffer and returns the struct name (and 0 on failure)
|
||||||
|
virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
|
||||||
|
|
||||||
|
virtual void serializeSingleObject(class btSerializer* serializer) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
|
||||||
|
struct btCollisionObjectDoubleData
|
||||||
|
{
|
||||||
|
void *m_broadphaseHandle;
|
||||||
|
void *m_collisionShape;
|
||||||
|
btCollisionShapeData *m_rootCollisionShape;
|
||||||
|
char *m_name;
|
||||||
|
|
||||||
|
btTransformDoubleData m_worldTransform;
|
||||||
|
btTransformDoubleData m_interpolationWorldTransform;
|
||||||
|
btVector3DoubleData m_interpolationLinearVelocity;
|
||||||
|
btVector3DoubleData m_interpolationAngularVelocity;
|
||||||
|
btVector3DoubleData m_anisotropicFriction;
|
||||||
|
double m_contactProcessingThreshold;
|
||||||
|
double m_deactivationTime;
|
||||||
|
double m_friction;
|
||||||
|
double m_rollingFriction;
|
||||||
|
double m_restitution;
|
||||||
|
double m_hitFraction;
|
||||||
|
double m_ccdSweptSphereRadius;
|
||||||
|
double m_ccdMotionThreshold;
|
||||||
|
|
||||||
|
int m_hasAnisotropicFriction;
|
||||||
|
int m_collisionFlags;
|
||||||
|
int m_islandTag1;
|
||||||
|
int m_companionId;
|
||||||
|
int m_activationState1;
|
||||||
|
int m_internalType;
|
||||||
|
int m_checkCollideWith;
|
||||||
|
|
||||||
|
char m_padding[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
|
||||||
|
struct btCollisionObjectFloatData
|
||||||
|
{
|
||||||
|
void *m_broadphaseHandle;
|
||||||
|
void *m_collisionShape;
|
||||||
|
btCollisionShapeData *m_rootCollisionShape;
|
||||||
|
char *m_name;
|
||||||
|
|
||||||
|
btTransformFloatData m_worldTransform;
|
||||||
|
btTransformFloatData m_interpolationWorldTransform;
|
||||||
|
btVector3FloatData m_interpolationLinearVelocity;
|
||||||
|
btVector3FloatData m_interpolationAngularVelocity;
|
||||||
|
btVector3FloatData m_anisotropicFriction;
|
||||||
|
float m_contactProcessingThreshold;
|
||||||
|
float m_deactivationTime;
|
||||||
|
float m_friction;
|
||||||
|
float m_rollingFriction;
|
||||||
|
|
||||||
|
float m_restitution;
|
||||||
|
float m_hitFraction;
|
||||||
|
float m_ccdSweptSphereRadius;
|
||||||
|
float m_ccdMotionThreshold;
|
||||||
|
|
||||||
|
int m_hasAnisotropicFriction;
|
||||||
|
int m_collisionFlags;
|
||||||
|
int m_islandTag1;
|
||||||
|
int m_companionId;
|
||||||
|
int m_activationState1;
|
||||||
|
int m_internalType;
|
||||||
|
int m_checkCollideWith;
|
||||||
|
char m_padding[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferSize() const
|
||||||
|
{
|
||||||
|
return sizeof(btCollisionObjectData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //BT_COLLISION_OBJECT_H
|
|
@ -0,0 +1,43 @@
|
||||||
|
#ifndef BT_COLLISION_OBJECT_WRAPPER_H
|
||||||
|
#define BT_COLLISION_OBJECT_WRAPPER_H
|
||||||
|
|
||||||
|
///btCollisionObjectWrapperis an internal data structure.
|
||||||
|
///Most users can ignore this and use btCollisionObject and btCollisionShape instead
|
||||||
|
class btCollisionShape;
|
||||||
|
class btCollisionObject;
|
||||||
|
class btTransform;
|
||||||
|
#include "LinearMath/btScalar.h" // for SIMD_FORCE_INLINE definition
|
||||||
|
|
||||||
|
#define BT_DECLARE_STACK_ONLY_OBJECT \
|
||||||
|
private: \
|
||||||
|
void* operator new(size_t size); \
|
||||||
|
void operator delete(void*);
|
||||||
|
|
||||||
|
struct btCollisionObjectWrapper;
|
||||||
|
struct btCollisionObjectWrapper
|
||||||
|
{
|
||||||
|
BT_DECLARE_STACK_ONLY_OBJECT
|
||||||
|
|
||||||
|
private:
|
||||||
|
btCollisionObjectWrapper(const btCollisionObjectWrapper&); // not implemented. Not allowed.
|
||||||
|
btCollisionObjectWrapper* operator=(const btCollisionObjectWrapper&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
const btCollisionObjectWrapper* m_parent;
|
||||||
|
const btCollisionShape* m_shape;
|
||||||
|
const btCollisionObject* m_collisionObject;
|
||||||
|
const btTransform& m_worldTransform;
|
||||||
|
int m_partId;
|
||||||
|
int m_index;
|
||||||
|
|
||||||
|
btCollisionObjectWrapper(const btCollisionObjectWrapper* parent, const btCollisionShape* shape, const btCollisionObject* collisionObject, const btTransform& worldTransform, int partId, int index)
|
||||||
|
: m_parent(parent), m_shape(shape), m_collisionObject(collisionObject), m_worldTransform(worldTransform),
|
||||||
|
m_partId(partId), m_index(index)
|
||||||
|
{}
|
||||||
|
|
||||||
|
SIMD_FORCE_INLINE const btTransform& getWorldTransform() const { return m_worldTransform; }
|
||||||
|
SIMD_FORCE_INLINE const btCollisionObject* getCollisionObject() const { return m_collisionObject; }
|
||||||
|
SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_shape; }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_COLLISION_OBJECT_WRAPPER_H
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue