• 大小: 4.46MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-08
  • 语言: C/C++
  • 标签: 质点弹簧  

资源简介

在vc6.0创建mfc对基于质点弹簧的织物模拟仿真,包括碰撞,重力作用

资源截图

代码片段和文件信息

// ClothSimulation.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “ClothSimulation.h“

#include “MainFrm.h“
#include “ClothSimulationDoc.h“
#include “ClothSimulationView.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CClothSimulationApp


BEGIN_MESSAGE_MAP(CClothSimulationApp CWinApp)
//{{AFX_MSG_MAP(CClothSimulationApp)
ON_COMMAND(ID_APP_ABOUT OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CClothSimulationApp construction

CClothSimulationApp::CClothSimulationApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CClothSimulationApp object

CClothSimulationApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CClothSimulationApp initialization

BOOL CClothSimulationApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));

LoadStdProfileSettings();  // Load standard INI file options (including MRU)

// Register the application‘s document templates.  Document templates
//  serve as the connection between documents frame windows and views.

CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CClothSimulationDoc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CClothSimulationView));
AddDocTemplate(pDocTemplate);

// Parse command line for standard shell commands DDE file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;

// The on

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-01-10 20:16  ClothSimulation\
     文件       23552  2013-11-05 10:10  ClothSimulation\BabysGotBack.dps
     文件       34796  2013-12-28 19:29  ClothSimulation\ClothSimulation.aps
     文件        6261  2013-12-28 23:27  ClothSimulation\ClothSimulation.clw
     文件        4373  2013-11-05 10:10  ClothSimulation\ClothSimulation.cpp
     文件        5925  2013-11-05 10:10  ClothSimulation\ClothSimulation.dsp
     文件         555  2013-11-05 10:10  ClothSimulation\ClothSimulation.dsw
     文件        1440  2013-11-07 21:02  ClothSimulation\ClothSimulation.h
     文件      476160  2013-12-28 23:27  ClothSimulation\ClothSimulation.ncb
     文件       62976  2013-12-28 23:27  ClothSimulation\ClothSimulation.opt
     文件         266  2013-12-28 19:29  ClothSimulation\ClothSimulation.plg
     文件       17785  2013-11-14 18:52  ClothSimulation\ClothSimulation.rc
     文件        1922  2013-11-05 10:10  ClothSimulation\ClothSimulationDoc.cpp
     文件        1559  2013-11-05 10:10  ClothSimulation\ClothSimulationDoc.h
     文件       33698  2013-11-18 11:31  ClothSimulation\ClothSimulationView.cpp
     文件        5035  2013-11-05 10:10  ClothSimulation\ClothSimulationView.h
     文件        1330  2013-11-05 10:10  ClothSimulation\DlgAddSphere.cpp
     文件        1348  2013-11-05 10:10  ClothSimulation\DlgAddSphere.h
     文件        2232  2013-11-05 10:10  ClothSimulation\DlgNewCloth.cpp
     文件        1506  2013-11-05 10:10  ClothSimulation\DlgNewCloth.h
     文件        1551  2013-11-05 10:10  ClothSimulation\DlgSimProp.cpp
     文件        1419  2013-11-05 10:10  ClothSimulation\DlgSimProp.h
     文件        1148  2013-11-05 10:10  ClothSimulation\DlgVertexMass.cpp
     文件        1315  2013-11-05 10:10  ClothSimulation\DlgVertexMass.h
     文件        2376  2013-11-05 10:10  ClothSimulation\MainFrm.cpp
     文件        1440  2013-11-05 10:10  ClothSimulation\MainFrm.h
     文件        3154  2013-11-05 10:10  ClothSimulation\MathDefs.cpp
     文件        2817  2013-11-05 10:10  ClothSimulation\MathDefs.h
     文件       37779  2013-11-05 10:10  ClothSimulation\PhysEnv.cpp
     文件        4872  2013-11-05 10:10  ClothSimulation\PhysEnv.h
     文件        4522  2013-11-05 10:10  ClothSimulation\ReadMe.txt
............此处省略47个文件信息

评论

共有 条评论

相关资源