Skip to content

Commit

Permalink
last tweaks to 3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioJerez committed Feb 11, 2020
1 parent 3660e50 commit 9e68aef
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
3 changes: 2 additions & 1 deletion applications/demosSandbox/sdkDemos/DemoEntityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions applications/demosSandbox/sdkDemos/demos/BasicStacking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}

Expand All @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);
}

Expand Down
2 changes: 0 additions & 2 deletions sdk/dgCore/dgMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion sdk/dgNewton/Newton.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


#define NEWTON_MAJOR_VERSION 3
#define NEWTON_MINOR_VERSION 15
#define NEWTON_MINOR_VERSION 14

#include <dgTypes.h>

Expand Down

0 comments on commit 9e68aef

Please sign in to comment.