diff --git a/applications/demosSandbox/sdkDemos/DemoEntityManager.cpp b/applications/demosSandbox/sdkDemos/DemoEntityManager.cpp index 1c09250ec5..6e99b55ca2 100644 --- a/applications/demosSandbox/sdkDemos/DemoEntityManager.cpp +++ b/applications/demosSandbox/sdkDemos/DemoEntityManager.cpp @@ -906,7 +906,8 @@ void DemoEntityManager::ShowMainMenuBar() { // load a demo if (m_currentScene != -1) { -// DeserializedPhysicScene("C:/Users/julio/Downloads/newtonCrashLarge.bin"); + //DeserializedPhysicScene("C:/Users/julio/Downloads/newtonCrashLarge.bin"); + //DeserializedPhysicScene("C:/temp/test.bin"); LoadDemo(m_currentScene); m_lastCurrentScene = m_currentScene; m_currentScene = -1; diff --git a/applications/demosSandbox/sdkDemos/demos/BasicStacking.cpp b/applications/demosSandbox/sdkDemos/demos/BasicStacking.cpp index a3ac7e3c66..0b8268a63f 100644 --- a/applications/demosSandbox/sdkDemos/demos/BasicStacking.cpp +++ b/applications/demosSandbox/sdkDemos/demos/BasicStacking.cpp @@ -212,7 +212,7 @@ static void SphereStack(DemoEntityManager* const scene, dFloat mass, const dVect // create the shape and visual mesh as a common data to be re used NewtonCollision* const collision = CreateConvexCollision(world, dGetIdentityMatrix(), blockBoxSize, _SPHERE_PRIMITIVE, defaultMaterialID); DemoMesh* const geometry = new DemoMesh("sphere", scene->GetShaderCache(), collision, "wood_0.tga", "wood_0.tga", "wood_0.tga"); -#if 0 +#if 1 for (int i = 0; i < count; i++) { CreateSimpleSolid(scene, geometry, mass, baseMatrix, collision, defaultMaterialID); baseMatrix.m_posit += baseMatrix.m_up.Scale(blockBoxSize.m_x); @@ -376,7 +376,7 @@ baseMatrix.m_posit.m_y -= 0.1f; // create the shape and visual mesh as a common data to be re used NewtonCollision* const collision = CreateConvexCollision(world, dGetIdentityMatrix(), blockBoxSize, _BOX_PRIMITIVE, defaultMaterialID); DemoMesh* const geometry = new DemoMesh("sphere", scene->GetShaderCache(), collision, "wood_0.tga", "wood_0.tga", "wood_0.tga"); -#if 0 +#if 1 for (int i = 0; i < count; i++) { CreateSimpleSolid(scene, geometry, mass, baseMatrix, collision, defaultMaterialID); baseMatrix = dYawMatrix (20.0f * dDegreeToRad) * baseMatrix; @@ -441,10 +441,10 @@ void BasicBoxStacks (DemoEntityManager* const scene) //high = 12; //high = 10; for (int i = 0; i < 1; i ++) { -// BuildPyramid (scene, 10.0f, dVector( 0.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.25f, 0.8f, 0.0f), high, _BOX_PRIMITIVE); -// BuildPyramid (scene, 10.0f, dVector( 10.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.75f, 0.35f, 0.75f, 0.0f), high, _CYLINDER_PRIMITIVE, dRollMatrix(0.5f * dPi)); -// BuildPyramid (scene, 10.0f, dVector( 20.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.35f, 0.8f, 0.0f), high, _CYLINDER_PRIMITIVE, dRollMatrix(0.5f * dPi)); -// BuildPyramid (scene, 10.0f, dVector( 30.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.25f, 0.8f, 0.0f), high, _REGULAR_CONVEX_HULL_PRIMITIVE, dRollMatrix(0.5f * dPi)); + BuildPyramid (scene, 10.0f, dVector( 0.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.25f, 0.8f, 0.0f), high, _BOX_PRIMITIVE); + BuildPyramid (scene, 10.0f, dVector( 10.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.75f, 0.35f, 0.75f, 0.0f), high, _CYLINDER_PRIMITIVE, dRollMatrix(0.5f * dPi)); + BuildPyramid (scene, 10.0f, dVector( 20.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.35f, 0.8f, 0.0f), high, _CYLINDER_PRIMITIVE, dRollMatrix(0.5f * dPi)); + BuildPyramid (scene, 10.0f, dVector( 30.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.25f, 0.8f, 0.0f), high, _REGULAR_CONVEX_HULL_PRIMITIVE, dRollMatrix(0.5f * dPi)); //BuildPyramid (scene, 10.0f, dVector( 40.0f + i * 4.0f, 0.0f, 0.0f, 0.0f), dVector (0.5f, 0.35f, 0.8f, 0.0), high, _CHAMFER_CYLINDER_PRIMITIVE, dRollMatrix(0.5f * dPi)); } @@ -455,13 +455,13 @@ void BasicBoxStacks (DemoEntityManager* const scene) } } -// high = 20; -high = 3; + high = 20; +//high = 3; for (int i = 0; i < 1; i ++) { for (int j = 0; j < 1; j ++) { SphereStack(scene, 1.0f, dVector(-5.0f + j * 8, 0.0f, -6.0f + i * 8, 0.0f), dVector (0.5f, 0.5f, 0.5f, 0.0f), high); -// CapsuleStack (scene, 1.0f, dVector(-5.0f + j * 8, 0.0f, -14.0f + i * 8, 0.0f), dVector (0.8f, 4.0f, 0.8f, 0.0f), high); -// BoxStack(scene, 1.0f, dVector(-5.5f + j * 8, 0.0f, 6.0f + i * 8, 0.0f), dVector (0.5f, 0.5f, 0.5f, 0.0f), high); + CapsuleStack (scene, 1.0f, dVector(-5.0f + j * 8, 0.0f, -14.0f + i * 8, 0.0f), dVector (0.8f, 4.0f, 0.8f, 0.0f), high); + BoxStack(scene, 1.0f, dVector(-5.5f + j * 8, 0.0f, 6.0f + i * 8, 0.0f), dVector (0.5f, 0.5f, 0.5f, 0.0f), high); } } diff --git a/applications/demosSandbox/sdkDemos/demos/GyroscopyPrecession.cpp b/applications/demosSandbox/sdkDemos/demos/GyroscopyPrecession.cpp index 9e53deadbd..bdaada6070 100644 --- a/applications/demosSandbox/sdkDemos/demos/GyroscopyPrecession.cpp +++ b/applications/demosSandbox/sdkDemos/demos/GyroscopyPrecession.cpp @@ -368,7 +368,6 @@ void GyroscopyPrecession(DemoEntityManager* const scene) NewtonMaterialSetDefaultFriction(world, defaultMaterialID, defaultMaterialID, 1.0f, 1.0f); NewtonMaterialSetDefaultElasticity(world, defaultMaterialID, defaultMaterialID, 0.6f); -/* // should spins very slowly, with a tilt angle of 30 degrees CreateBicycleWheel(scene, dVector(0.0f, 3.0f, -8.0f, 1.0f), 100.0f, 0.6f, 0.3f, 30.0f); @@ -394,9 +393,9 @@ void GyroscopyPrecession(DemoEntityManager* const scene) DzhanibekovEffect(scene, dVector(0.0f, 3.0f, 4.0f, 1.0f), dVector (0.01f, 10.0f, 0.01f), 0.25f, 2.0f); DzhanibekovEffect(scene, dVector(0.0f, 3.0f, 6.0f, 1.0f), dVector (10.0f, 0.01f, 0.01f), 0.25f, 2.0f); DzhanibekovEffect(scene, dVector(0.0f, 3.0f, 8.0f, 1.0f), dVector (0.0f, 0.0f, 10.0f), 0.25f, 2.0f); -*/ + // interesting and strange effect generated by and skew inertia - RattleBack(scene, dVector(-2.0f, 0.5f, - 3.0, 1.0f), 0.0f, 1.0f); +// RattleBack(scene, dVector(-2.0f, 0.5f, - 3.0, 1.0f), 0.0f, 1.0f); // RattleBack(scene, dVector(-2.0f, 0.5f, - 6.0, 1.0f), 2.0f, 1.0f); // RattleBack(scene, dVector(-2.0f, 0.5f, - 9.0, 1.0f), -2.0f, 1.0f); @@ -408,9 +407,9 @@ void GyroscopyPrecession(DemoEntityManager* const scene) const dFloat spacing = 3.0f; for (int i = 0; i < topsCount; i++) { for (int j = 0; j < topsCount; j++) { -// PrecessingTop(scene, dVector(spacing * j, 0.5f, -spacing * i - spacing, 1.0f)); + PrecessingTop(scene, dVector(spacing * j, 0.5f, -spacing * i - spacing, 1.0f)); } -// PhiTop(scene, dVector(30.0f, 0.4f, -spacing * i - spacing, 1.0f), i * 5.0f + 10.0f, 1.0f); + PhiTop(scene, dVector(30.0f, 0.4f, -spacing * i - spacing, 1.0f), i * 5.0f + 10.0f, 1.0f); // TippeTop(scene, dVector(-6.0f, 0.3f, -spacing * i - spacing, 1.0f), 0.0f, 0.0f, 0.0f); } diff --git a/sdk/dgCore/dgMatrix.cpp b/sdk/dgCore/dgMatrix.cpp index 02ca504194..5835036a82 100644 --- a/sdk/dgCore/dgMatrix.cpp +++ b/sdk/dgCore/dgMatrix.cpp @@ -146,8 +146,6 @@ dgMatrix dgMatrix::operator* (const dgMatrix &B) const B.m_front * m_posit.BroadcastX() + B.m_up * m_posit.BroadcastY() + B.m_right * m_posit.BroadcastZ() + B.m_posit * m_posit.BroadcastW()); } - - void dgMatrix::TransformTriplex (dgFloat32* const dst, dgInt32 dstStrideInBytes, const dgFloat32* const src, dgInt32 srcStrideInBytes, dgInt32 count) const { dgInt32 dstStride = dgInt32 (dstStrideInBytes /sizeof (dgFloat32)); diff --git a/sdk/dgNewton/Newton.h b/sdk/dgNewton/Newton.h index 451aef0033..1a7f3a0394 100644 --- a/sdk/dgNewton/Newton.h +++ b/sdk/dgNewton/Newton.h @@ -24,7 +24,7 @@ #define NEWTON_MAJOR_VERSION 3 -#define NEWTON_MINOR_VERSION 15 +#define NEWTON_MINOR_VERSION 14 #include