Esempio n. 1
0
void InitDemo(int index)
{
// 	if (index > 0)
// 		log(MEX_LOG_APP0, "InitDemo: %s", demoStrings[index - 1]);
// 	else
// 		log(MEX_LOG_APP0, "ReleaseDemo");

//i51AdeOsLog(0, "start InitDemo:%d",index);
	world.Clear();
//i51AdeOsLog(0, "world.Clear()");
	numBodies = 0;
	numJoints = 0;
	bomb = NULL;

	demoIndex = index;
	
	switch (index)
	{
	case 0:
		break;
	case 1:
		Demo1(bodies, joints);
		break;
	case 2:
		Demo2(bodies, joints);
		break;
	case 3:
		Demo3(bodies, joints);
		break;
	case 4:
		Demo4(bodies, joints);
		break;
	case 5:
		Demo5(bodies, joints);
		break;
	case 6:
		Demo6(bodies, joints);
		break;
	case 7:
		Demo7(bodies, joints);
		break;
	case 8:
		Demo8(bodies, joints);
		break;
	case 9:
////i51AdeOsLog(0, "InitDemo(13)");
		Demo9(bodies, joints);
////i51AdeOsLog(0, "InitDemo(14)");
		break;
	}
i51AdeOsLog(0, "End InitDemo:%d",index);	
}
Esempio n. 2
0
void CDemoDlg::OnButtonDemos() 
{

	SetScopeFace(&m_Graph2);
	
	for (int i=0;i<30;i++) {
		Demo1();
		UpdateWindow();
		Sleep(100);
	}

	SetPlotFace(&m_Graph2);
	int i;
	for (i=0;i<30;i++) {
		Demo1();
		UpdateWindow();
		Sleep(100);
	}


	SetScopeFace(&m_Graph2);

	for (i=0;i<30;i++) {
		Demo2();
		UpdateWindow();
		Sleep(100);
	}

	SetScopeFace(&m_Graph2);

	for (i=0;i<30;i++) {
		Demo3(6);
		UpdateWindow();
		Sleep(100);
	}

	for (i=0;i<30;i++) {
		Demo3(7);
		UpdateWindow();
		Sleep(100);
	}

	for (i=0;i<30;i++) {
		Demo3(8);
		UpdateWindow();
		Sleep(100);
	}

	for (i=0;i<30;i++) {
		Demo3(9);
		UpdateWindow();
		Sleep(100);
	}

	for (i=0;i<30;i++) {
		Demo3(10);
		UpdateWindow();
		Sleep(100);
	}

	SetPlotFace(&m_Graph2);

	for (i=1; i<17; i++)
		Demo4(i);

	SetPlotFace(&m_Graph2);
	m_Graph2.ClearGraph();
}