Fix broken CDTestFramework
Avoid crash in BulletWorldImporter, ignoring 'invalid' constraints between two static bodies Use a bitfield for btCollisionObject::CollisionObjectTypes (to allow custom types that are derived from build-in types such as btRigidBody) Revert/improve softbody debug rendering
This commit is contained in:
@@ -48,6 +48,9 @@ SET(AllBulletDemos_SRCS
|
||||
../ForkLiftDemo/ForkLiftDemo.cpp
|
||||
../SoftDemo/SoftDemo.cpp
|
||||
../ConstraintDemo/ConstraintDemo.cpp
|
||||
../Benchmarks/BenchmarkDemo.cpp
|
||||
../Box2dDemo/Box2dDemo.cpp
|
||||
|
||||
)
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
@@ -30,8 +30,10 @@ subject to the following restrictions:
|
||||
#include "../GjkConvexCastDemo/LinearConvexCastDemo.h"
|
||||
#include "../ForkLiftDemo/ForkLiftDemo.h"
|
||||
#include "../ConstraintDemo/ConstraintDemo.h"
|
||||
//#include "../Benchmarks/BenchmarkDemo.h"
|
||||
#include "../Benchmarks/BenchmarkDemo.h"
|
||||
#include "../SoftDemo/SoftDemo.h"
|
||||
#include "../Box2dDemo/Box2dDemo.h"
|
||||
|
||||
#include "GLDebugFont.h"
|
||||
|
||||
#include "GlutStuff.h"//OpenGL stuff
|
||||
@@ -104,7 +106,7 @@ public:
|
||||
|
||||
btDemoEntry g_demoEntries[] =
|
||||
{
|
||||
|
||||
{"Box2dDemo",Box2dDemo::Create},
|
||||
{"ConstraintDemo",ConstraintDemo::Create},
|
||||
{"ForkLift Demo",ForkLiftDemo::Create},
|
||||
{"Ragdoll Demo",RagdollDemo::Create},
|
||||
@@ -122,7 +124,7 @@ btDemoEntry g_demoEntries[] =
|
||||
{"SoftBody Cloth Attach",SoftDemo5::Create},
|
||||
|
||||
{"SoftBody Cloth",SoftDemo0::Create},
|
||||
|
||||
|
||||
// {"SoftBody Volume",SoftDemo2::Create},
|
||||
{"SoftBody Pressure",SoftDemo1::Create},
|
||||
{"SoftBody Cluster Car",SoftDemo24::Create},
|
||||
@@ -159,7 +161,7 @@ btDemoEntry g_demoEntries[] =
|
||||
//{"BspDemo", BspDemo::Create},
|
||||
// {"Raytracer Test",Raytracer::Create},
|
||||
// {"GjkConvexCast",LinearConvexCastDemo::Create},
|
||||
// {"Benchmark 3000 FALL",BenchmarkDemo1::Create},
|
||||
{"Benchmark 3000 FALL",BenchmarkDemo1::Create},
|
||||
// {"Benchmark 1000 STACK",BenchmarkDemo2::Create},
|
||||
// {"Benchmark 136 RAGDOLLS",BenchmarkDemo3::Create},
|
||||
// {"Benchmark 1000 CONVEX",BenchmarkDemo4::Create},
|
||||
|
||||
@@ -75,8 +75,8 @@ void setDefaultSettings()
|
||||
viewY = 0.0f;
|
||||
framePeriod = 6;//16;//16;//todo: test if this value should be 0
|
||||
|
||||
width = 800;//640;
|
||||
height = 600;//1024;//480;
|
||||
width = 1280;
|
||||
height = 768;//480;
|
||||
iterationCount = 10;
|
||||
gDrawAabb=0;
|
||||
gWireFrame=0;
|
||||
|
||||
@@ -1454,6 +1454,7 @@ void SoftDemo::renderme()
|
||||
{
|
||||
btIDebugDraw* idraw=m_dynamicsWorld->getDebugDrawer();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
m_dynamicsWorld->debugDrawWorld();
|
||||
|
||||
/* Bodies */
|
||||
|
||||
@@ -379,7 +379,7 @@ BulletSAPCompleteBoxPruningTest::BulletSAPCompleteBoxPruningTest(int numBoxes,in
|
||||
methodname = "btSimpleBroadphase+btNullPairCache";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
/* case 6:
|
||||
{
|
||||
methodname = "btMultiSapBroadphase";
|
||||
btMultiSapBroadphase* multiSap = new btMultiSapBroadphase(maxNumBoxes);
|
||||
@@ -416,6 +416,7 @@ BulletSAPCompleteBoxPruningTest::BulletSAPCompleteBoxPruningTest(int numBoxes,in
|
||||
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case 7:
|
||||
{
|
||||
btDbvtBroadphase* pbp=new btDbvtBroadphase();
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDTestFramework", "CDTestFramework.vcproj", "{0565DB39-45CC-416E-B549-BFC24F2666D1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE} = {6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A} = {7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C} = {3AD0C16A-DCAC-442E-9E17-A911A717EB4C}
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2} = {DBE44CA3-2912-4441-8D99-AA2242688AD2}
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467} = {FDA229FA-D080-4ABB-ADBD-35AD30155467}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Opcode", "Opcode\Opcode.vcproj", "{DBE44CA3-2912-4441-8D99-AA2242688AD2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletmath", "..\..\msvc\8\libbulletmath.vcproj", "{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinearMath", "..\..\win7_32\src\LinearMath\LinearMath.vcproj", "{FDA229FA-D080-4ABB-ADBD-35AD30155467}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletcollision", "..\..\msvc\8\libbulletcollision.vcproj", "{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BulletCollision", "..\..\win7_32\src\BulletCollision\BulletCollision.vcproj", "{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
DebugDll|Win32 = DebugDll|Win32
|
||||
DebugDoublePrecision|Win32 = DebugDoublePrecision|Win32
|
||||
MinSizeRel|Win32 = MinSizeRel|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
ReleaseDll|Win32 = ReleaseDll|Win32
|
||||
ReleaseDoublePrecision|Win32 = ReleaseDoublePrecision|Win32
|
||||
RelWithDebInfo|Win32 = RelWithDebInfo|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
@@ -29,48 +31,64 @@ Global
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.DebugDll|Win32.Build.0 = Debug|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.DebugDoublePrecision|Win32.ActiveCfg = Debug|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.DebugDoublePrecision|Win32.Build.0 = Debug|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.Release|Win32.Build.0 = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.ReleaseDll|Win32.ActiveCfg = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.ReleaseDll|Win32.Build.0 = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.ReleaseDoublePrecision|Win32.ActiveCfg = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.ReleaseDoublePrecision|Win32.Build.0 = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{0565DB39-45CC-416E-B549-BFC24F2666D1}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.DebugDll|Win32.ActiveCfg = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.DebugDll|Win32.Build.0 = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.DebugDoublePrecision|Win32.ActiveCfg = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.DebugDoublePrecision|Win32.Build.0 = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.MinSizeRel|Win32.ActiveCfg = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.MinSizeRel|Win32.Build.0 = Debug|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.Release|Win32.Build.0 = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.ReleaseDll|Win32.ActiveCfg = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.ReleaseDll|Win32.Build.0 = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.ReleaseDoublePrecision|Win32.ActiveCfg = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.ReleaseDoublePrecision|Win32.Build.0 = Release|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.DebugDll|Win32.ActiveCfg = DebugDll|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.DebugDll|Win32.Build.0 = DebugDll|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.DebugDoublePrecision|Win32.ActiveCfg = DebugDoublePrecision|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.DebugDoublePrecision|Win32.Build.0 = DebugDoublePrecision|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.Release|Win32.Build.0 = Release|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.ReleaseDll|Win32.ActiveCfg = ReleaseDll|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.ReleaseDll|Win32.Build.0 = ReleaseDll|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.ReleaseDoublePrecision|Win32.ActiveCfg = ReleaseDoublePrecision|Win32
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}.ReleaseDoublePrecision|Win32.Build.0 = ReleaseDoublePrecision|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.DebugDll|Win32.ActiveCfg = DebugDll|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.DebugDll|Win32.Build.0 = DebugDll|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.DebugDoublePrecision|Win32.ActiveCfg = DebugDoublePrecision|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.DebugDoublePrecision|Win32.Build.0 = DebugDoublePrecision|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.Release|Win32.Build.0 = Release|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDll|Win32.ActiveCfg = ReleaseDll|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDll|Win32.Build.0 = ReleaseDll|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.ActiveCfg = ReleaseDoublePrecision|Win32
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.Build.0 = ReleaseDoublePrecision|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.DebugDll|Win32.ActiveCfg = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.DebugDll|Win32.Build.0 = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.DebugDoublePrecision|Win32.ActiveCfg = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.DebugDoublePrecision|Win32.Build.0 = Debug|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.Release|Win32.Build.0 = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.ReleaseDll|Win32.ActiveCfg = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.ReleaseDll|Win32.Build.0 = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.ReleaseDoublePrecision|Win32.ActiveCfg = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.ReleaseDoublePrecision|Win32.Build.0 = Release|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{FDA229FA-D080-4ABB-ADBD-35AD30155467}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.DebugDll|Win32.ActiveCfg = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.DebugDll|Win32.Build.0 = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.DebugDoublePrecision|Win32.ActiveCfg = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.DebugDoublePrecision|Win32.Build.0 = Debug|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.Release|Win32.Build.0 = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.ReleaseDll|Win32.ActiveCfg = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.ReleaseDll|Win32.Build.0 = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.ReleaseDoublePrecision|Win32.ActiveCfg = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.ReleaseDoublePrecision|Win32.Build.0 = Release|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3AD0C16A-DCAC-442E-9E17-A911A717EB4C}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="9.00"
|
||||
Name="CDTestFramework"
|
||||
ProjectGUID="{0565DB39-45CC-416E-B549-BFC24F2666D1}"
|
||||
RootNamespace="CDTestFramework"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
@@ -69,6 +70,8 @@
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/CDTestFramework.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -89,9 +92,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
@@ -154,6 +154,8 @@
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -174,9 +176,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="9.00"
|
||||
Name="Opcode"
|
||||
ProjectGUID="{DBE44CA3-2912-4441-8D99-AA2242688AD2}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
@@ -54,7 +55,7 @@
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OPCODE_EXPORTS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
@@ -83,6 +84,8 @@
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/Opcode.pdb"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Release/Opcode.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
@@ -104,9 +107,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
@@ -180,6 +180,8 @@
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/Opcode_D.pdb"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Debug/Opcode_D.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
@@ -201,9 +203,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
||||
@@ -51,12 +51,12 @@ subject to the following restrictions:
|
||||
inline_ void Start()
|
||||
{
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&mCounter0);
|
||||
StartProfile(mCycles);
|
||||
//StartProfile(mCycles);
|
||||
}
|
||||
|
||||
inline_ void End()
|
||||
{
|
||||
EndProfile(mCycles);
|
||||
//EndProfile(mCycles);
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&mCounter1);
|
||||
}
|
||||
|
||||
|
||||
@@ -684,6 +684,8 @@ bool btBulletWorldImporter::convertAllObjects( bParse::btBulletFile* bulletFile
|
||||
if (!rbB)
|
||||
rbB = &getFixedBody();
|
||||
}
|
||||
if (!rbA && !rbB)
|
||||
continue;
|
||||
|
||||
btTypedConstraint* constraint = 0;
|
||||
|
||||
|
||||
@@ -128,12 +128,13 @@ public:
|
||||
enum CollisionObjectTypes
|
||||
{
|
||||
CO_COLLISION_OBJECT =1,
|
||||
CO_RIGID_BODY,
|
||||
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,
|
||||
CO_SOFT_BODY,
|
||||
CO_HF_FLUID
|
||||
CO_GHOST_OBJECT=4,
|
||||
CO_SOFT_BODY=8,
|
||||
CO_HF_FLUID=16,
|
||||
CO_USER_TYPE=32
|
||||
};
|
||||
|
||||
SIMD_FORCE_INLINE bool mergesSimulationIslands() const
|
||||
|
||||
@@ -1127,7 +1127,7 @@ void btDiscreteDynamicsWorld::serializeRigidBodies(btSerializer* serializer)
|
||||
for (i=0;i<m_collisionObjects.size();i++)
|
||||
{
|
||||
btCollisionObject* colObj = m_collisionObjects[i];
|
||||
if (colObj->getInternalType() == btCollisionObject::CO_RIGID_BODY)
|
||||
if (colObj->getInternalType() & btCollisionObject::CO_RIGID_BODY)
|
||||
{
|
||||
int len = colObj->calculateSerializeBufferSize();
|
||||
btChunk* chunk = serializer->allocate(len,1);
|
||||
|
||||
@@ -188,13 +188,13 @@ public:
|
||||
///but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast
|
||||
static const btRigidBody* upcast(const btCollisionObject* colObj)
|
||||
{
|
||||
if (colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY)
|
||||
if (colObj->getInternalType()&btCollisionObject::CO_RIGID_BODY)
|
||||
return (const btRigidBody*)colObj;
|
||||
return 0;
|
||||
}
|
||||
static btRigidBody* upcast(btCollisionObject* colObj)
|
||||
{
|
||||
if (colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY)
|
||||
if (colObj->getInternalType()&btCollisionObject::CO_RIGID_BODY)
|
||||
return (btRigidBody*)colObj;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -165,98 +165,7 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
|
||||
const btVector3 ccolor=btVector3(1,0,0);
|
||||
int i,j,nj;
|
||||
|
||||
/* Nodes */
|
||||
if(0!=(drawflags&fDrawFlags::Nodes))
|
||||
{
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
idraw->drawLine(n.m_x-btVector3(scl,0,0),n.m_x+btVector3(scl,0,0),btVector3(1,0,0));
|
||||
idraw->drawLine(n.m_x-btVector3(0,scl,0),n.m_x+btVector3(0,scl,0),btVector3(0,1,0));
|
||||
idraw->drawLine(n.m_x-btVector3(0,0,scl),n.m_x+btVector3(0,0,scl),btVector3(0,0,1));
|
||||
}
|
||||
}
|
||||
/* Links */
|
||||
if(0!=(drawflags&fDrawFlags::Links))
|
||||
{
|
||||
for(i=0;i<psb->m_links.size();++i)
|
||||
{
|
||||
const btSoftBody::Link& l=psb->m_links[i];
|
||||
if(0==(l.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
idraw->drawLine(l.m_n[0]->m_x,l.m_n[1]->m_x,lcolor);
|
||||
}
|
||||
}
|
||||
/* Normals */
|
||||
if(0!=(drawflags&fDrawFlags::Normals))
|
||||
{
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
const btVector3 d=n.m_n*nscl;
|
||||
idraw->drawLine(n.m_x,n.m_x+d,ncolor);
|
||||
idraw->drawLine(n.m_x,n.m_x-d,ncolor*0.5);
|
||||
}
|
||||
}
|
||||
/* Contacts */
|
||||
if(0!=(drawflags&fDrawFlags::Contacts))
|
||||
{
|
||||
static const btVector3 axis[]={btVector3(1,0,0),
|
||||
btVector3(0,1,0),
|
||||
btVector3(0,0,1)};
|
||||
for(i=0;i<psb->m_rcontacts.size();++i)
|
||||
{
|
||||
const btSoftBody::RContact& c=psb->m_rcontacts[i];
|
||||
const btVector3 o= c.m_node->m_x-c.m_cti.m_normal*
|
||||
(btDot(c.m_node->m_x,c.m_cti.m_normal)+c.m_cti.m_offset);
|
||||
const btVector3 x=btCross(c.m_cti.m_normal,axis[c.m_cti.m_normal.minAxis()]).normalized();
|
||||
const btVector3 y=btCross(x,c.m_cti.m_normal).normalized();
|
||||
idraw->drawLine(o-x*nscl,o+x*nscl,ccolor);
|
||||
idraw->drawLine(o-y*nscl,o+y*nscl,ccolor);
|
||||
idraw->drawLine(o,o+c.m_cti.m_normal*nscl*3,btVector3(1,1,0));
|
||||
}
|
||||
}
|
||||
/* Anchors */
|
||||
if(0!=(drawflags&fDrawFlags::Anchors))
|
||||
{
|
||||
for(i=0;i<psb->m_anchors.size();++i)
|
||||
{
|
||||
const btSoftBody::Anchor& a=psb->m_anchors[i];
|
||||
const btVector3 q=a.m_body->getWorldTransform()*a.m_local;
|
||||
drawVertex(idraw,a.m_node->m_x,0.25,btVector3(1,0,0));
|
||||
drawVertex(idraw,q,0.25,btVector3(0,1,0));
|
||||
idraw->drawLine(a.m_node->m_x,q,btVector3(1,1,1));
|
||||
}
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
if(n.m_im<=0)
|
||||
{
|
||||
drawVertex(idraw,n.m_x,0.25,btVector3(1,0,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Faces */
|
||||
if(0!=(drawflags&fDrawFlags::Faces))
|
||||
{
|
||||
const btScalar scl=(btScalar)0.8;
|
||||
const btScalar alp=(btScalar)1;
|
||||
const btVector3 col(0,(btScalar)0.7,0);
|
||||
for(i=0;i<psb->m_faces.size();++i)
|
||||
{
|
||||
const btSoftBody::Face& f=psb->m_faces[i];
|
||||
if(0==(f.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
const btVector3 x[]={f.m_n[0]->m_x,f.m_n[1]->m_x,f.m_n[2]->m_x};
|
||||
const btVector3 c=(x[0]+x[1]+x[2])/3;
|
||||
idraw->drawTriangle((x[0]-c)*scl+c,
|
||||
(x[1]-c)*scl+c,
|
||||
(x[2]-c)*scl+c,
|
||||
col,alp);
|
||||
}
|
||||
}
|
||||
/* Clusters */
|
||||
/* Clusters */
|
||||
if(0!=(drawflags&fDrawFlags::Clusters))
|
||||
{
|
||||
srand(1806);
|
||||
@@ -304,13 +213,84 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
|
||||
}
|
||||
#endif
|
||||
/* Frame */
|
||||
btSoftBody::Cluster& c=*psb->m_clusters[i];
|
||||
idraw->drawLine(c.m_com,c.m_framexform*btVector3(10,0,0),btVector3(1,0,0));
|
||||
idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,10,0),btVector3(0,1,0));
|
||||
idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,0,10),btVector3(0,0,1));
|
||||
// btSoftBody::Cluster& c=*psb->m_clusters[i];
|
||||
// idraw->drawLine(c.m_com,c.m_framexform*btVector3(10,0,0),btVector3(1,0,0));
|
||||
// idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,10,0),btVector3(0,1,0));
|
||||
// idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,0,10),btVector3(0,0,1));
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Nodes */
|
||||
if(0!=(drawflags&fDrawFlags::Nodes))
|
||||
{
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
idraw->drawLine(n.m_x-btVector3(scl,0,0),n.m_x+btVector3(scl,0,0),btVector3(1,0,0));
|
||||
idraw->drawLine(n.m_x-btVector3(0,scl,0),n.m_x+btVector3(0,scl,0),btVector3(0,1,0));
|
||||
idraw->drawLine(n.m_x-btVector3(0,0,scl),n.m_x+btVector3(0,0,scl),btVector3(0,0,1));
|
||||
}
|
||||
}
|
||||
/* Links */
|
||||
if(0!=(drawflags&fDrawFlags::Links))
|
||||
{
|
||||
for(i=0;i<psb->m_links.size();++i)
|
||||
{
|
||||
const btSoftBody::Link& l=psb->m_links[i];
|
||||
if(0==(l.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
idraw->drawLine(l.m_n[0]->m_x,l.m_n[1]->m_x,lcolor);
|
||||
}
|
||||
}
|
||||
/* Normals */
|
||||
if(0!=(drawflags&fDrawFlags::Normals))
|
||||
{
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
const btVector3 d=n.m_n*nscl;
|
||||
idraw->drawLine(n.m_x,n.m_x+d,ncolor);
|
||||
idraw->drawLine(n.m_x,n.m_x-d,ncolor*0.5);
|
||||
}
|
||||
}
|
||||
/* Contacts */
|
||||
if(0!=(drawflags&fDrawFlags::Contacts))
|
||||
{
|
||||
static const btVector3 axis[]={btVector3(1,0,0),
|
||||
btVector3(0,1,0),
|
||||
btVector3(0,0,1)};
|
||||
for(i=0;i<psb->m_rcontacts.size();++i)
|
||||
{
|
||||
const btSoftBody::RContact& c=psb->m_rcontacts[i];
|
||||
const btVector3 o= c.m_node->m_x-c.m_cti.m_normal*
|
||||
(btDot(c.m_node->m_x,c.m_cti.m_normal)+c.m_cti.m_offset);
|
||||
const btVector3 x=btCross(c.m_cti.m_normal,axis[c.m_cti.m_normal.minAxis()]).normalized();
|
||||
const btVector3 y=btCross(x,c.m_cti.m_normal).normalized();
|
||||
idraw->drawLine(o-x*nscl,o+x*nscl,ccolor);
|
||||
idraw->drawLine(o-y*nscl,o+y*nscl,ccolor);
|
||||
idraw->drawLine(o,o+c.m_cti.m_normal*nscl*3,btVector3(1,1,0));
|
||||
}
|
||||
}
|
||||
/* Faces */
|
||||
if(0!=(drawflags&fDrawFlags::Faces))
|
||||
{
|
||||
const btScalar scl=(btScalar)0.8;
|
||||
const btScalar alp=(btScalar)1;
|
||||
const btVector3 col(0,(btScalar)0.7,0);
|
||||
for(i=0;i<psb->m_faces.size();++i)
|
||||
{
|
||||
const btSoftBody::Face& f=psb->m_faces[i];
|
||||
if(0==(f.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
const btVector3 x[]={f.m_n[0]->m_x,f.m_n[1]->m_x,f.m_n[2]->m_x};
|
||||
const btVector3 c=(x[0]+x[1]+x[2])/3;
|
||||
idraw->drawTriangle((x[0]-c)*scl+c,
|
||||
(x[1]-c)*scl+c,
|
||||
(x[2]-c)*scl+c,
|
||||
col,alp);
|
||||
}
|
||||
}
|
||||
/* Tetras */
|
||||
if(0!=(drawflags&fDrawFlags::Tetras))
|
||||
{
|
||||
@@ -329,6 +309,29 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
|
||||
idraw->drawTriangle((x[2]-c)*scl+c,(x[0]-c)*scl+c,(x[3]-c)*scl+c,col,alp);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Anchors */
|
||||
if(0!=(drawflags&fDrawFlags::Anchors))
|
||||
{
|
||||
for(i=0;i<psb->m_anchors.size();++i)
|
||||
{
|
||||
const btSoftBody::Anchor& a=psb->m_anchors[i];
|
||||
const btVector3 q=a.m_body->getWorldTransform()*a.m_local;
|
||||
drawVertex(idraw,a.m_node->m_x,0.25,btVector3(1,0,0));
|
||||
drawVertex(idraw,q,0.25,btVector3(0,1,0));
|
||||
idraw->drawLine(a.m_node->m_x,q,btVector3(1,1,1));
|
||||
}
|
||||
for(i=0;i<psb->m_nodes.size();++i)
|
||||
{
|
||||
const btSoftBody::Node& n=psb->m_nodes[i];
|
||||
if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
|
||||
if(n.m_im<=0)
|
||||
{
|
||||
drawVertex(idraw,n.m_x,0.25,btVector3(1,0,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Notes */
|
||||
if(0!=(drawflags&fDrawFlags::Notes))
|
||||
|
||||
Reference in New Issue
Block a user